博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Welcome to LED Control Wiki
阅读量:5068 次
发布时间:2019-06-12

本文共 3962 字,大约阅读时间需要 13 分钟。

 

About this project

This project was developed after I had to find out that controlling my RGB ambient light with the normal infrared remote control was complicated and not reliable. Within a few months I build this solution that enabled controlling my LEDs with a Bluetooth-enabled Android Device running a self programmed app. On the hardware side an Arduino is receiving the commands and controlling three PWM signals.

The for free (but closed source), the Arduino sketch is released under . The is also documented in this wiki and open for usage by others.

If you like this project I would be pleased with recommendations or a good rating at Google Play. Let me also know when you find some bugs.

Requirements

You need a few things to get started:

  • Arduino Uno
  • Android powered Phone/Tablet with bluetooth running Android 4.0 or above
  • RGB-LED-Stripes with common anode (one common '+' and a seperate '-/GND' for each color) (you can also use stripes with common cathodes, but the showed circuit diagramm will not work (in particular the output stage). A is also available.)
  • External Power Supply (to power Arduino and LEDs)
  • USART capable bluetooth module (for example HC-06, available on ebay for < 10$)
  • 3x 220 Ohm resistors (gate current limiter)
  • 3x 10 kOhm resistors (gate pull-down)
  • 3x N-Channel Power-MOSFETs (enhancement mode) (for example IRF1404)

optional voltage divider

  • 1x 4,7 kOhm resistor
  • 1x 10 kOhm resistor

Assembly

Connect the Arduino and the others parts as showed below. Be sure that you do not change the RX pin with the TX pin of the bluetooth module. In General: RX of the bluetooth module has to be connected to TX of Arduino and vice versa.

Wiring

Caution: The HC-06 bluetooth module I bought works with 3,3V. You can power it with 5V because there is a built-in voltage regulator (make sure that yours has also one or power it with 3,3V), but RX and TX are not 5V tolerant. To avoid permanent damage the Arduino output-voltage is reduced to 3,3V by a voltage divider (therefore the 4k7 and 10k resistors). On the other hand a special step-up circuit is not necessary because the Arduino recognizes 3,3V of the bluetooth module as HIGH-Level.

Note: For permanent installations you should consider soldering your circuit on a Arduino Proto Shield (bought or home made). I personally soldered everything on a stripboard and put the whole thing in a small case.

Note: You don't need the connection from TX (pin 3) on Arduino to RX of the bluetooth module, because currently nothing will be send back to the Android device. Just remove the connection from pin 3 (Arduino) to RX (bluetooth module) and the voltage divider. It may be possible that a bidirectional communication will be used in future releases.

Installing the software

You're almost done. Now you need to install the software and select the target device.

  1. Upload the Arduino Sketch ()
  2. Install the Android app on your phone ()
  3. Start a new bluetooth device discovery (Android -> Settings -> Bluetooth -> Add)
  4. Start the LED Control app and select your receiver (LED Control -> Connection Settings -> your device)

LED Control Android App

Troubleshooting

There are several reasons why your circuit may not work as intended. Here are some possibilities:

  • Check if the LED voltage is high enough and your stripes have the right polarity by connecting them directly to your power source.
  • Are RX and TX connected in the right way? Read also the notes .
  • By default, the Arduino sends some debug data to the PC via the hardware serial. If the Software in Arduino behaves abnormal check the console log.
  • In case you are not sure whether your bluetooth module works properly or not, connect it directly to your Arduino (still keeping the voltage levels in mind, see note above). Therefore you have to remove the 328P chip temporary from your Uno.
  • To check the output stage, you can try pulling the gate of each channel to ground or +5V.

 thanks:https://github.com/fennel-labs

转载于:https://www.cnblogs.com/myohao/p/5715465.html

你可能感兴趣的文章
Unique Binary Search Trees II
查看>>
TF-IDF原理
查看>>
Hibernate 系列教程5-双向多对一
查看>>
人月神话读书笔记-2
查看>>
第七次进度总结
查看>>
如何为配置文件加密
查看>>
《梦断代码》阅读笔记02
查看>>
第一次站立会议
查看>>
jQuery siblings() 方法
查看>>
android基础:广播BroadCast简单案例
查看>>
ELK-Kibana汉化
查看>>
实例之轮盘抽奖
查看>>
react之路:redux的使用
查看>>
zzw原创_expdp及impdp中的exclude及include参数的那点事
查看>>
web上传组件
查看>>
如何在windows中编写R程序包(转载)
查看>>
ORACLE sql根据in查询里面数据的顺序进行排序
查看>>
文件操作2
查看>>
JavaScript之HTML5 data-* 自定义属性[HTML5标准 node.dataset.attributeName]
查看>>
URAL题解二
查看>>