我们从2011年坚守至今,只想做纯粹的技术论坛,请不要发布和技术无关的话题。  本站有两万多份高大上的PCB和原理图下载,每日更新中,欢迎常回来看看

 找回密码
 立即注册
搜索
查看: 1942|回复: 8

[DIY秀] 小夜灯DIY

[复制链接]

17

主题

37

回帖

142

积分

二级逆天

积分
142

终身成就奖

QQ
发表于 2017-9-25 21:30 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区

您需要 登录 才可以下载或查看,没有账号?立即注册

×
这是一个英文教程:这是我做的实物http://www.meipai.com/media/557711075


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 app is available at Google Play for free (but closed source), the Arduino sketch is released under Apache License. The used protocol 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:
    [li]Arduino Uno[/li][li]Android powered Phone/Tablet with bluetooth running Android 4.0 or above[/li][li]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 solution therefore is also available.)[/li][li]External Power Supply (to power Arduino and LEDs)[/li][li]USART capable bluetooth module (for example HC-06, available on ebay for < 10$)[/li][li]3x 220 Ohm resistors (gate current limiter)[/li][li]3x 10 kOhm resistors (gate pull-down)[/li][li]3x N-Channel Power-MOSFETs (enhancement mode) (for example IRF1404)[/li]
optional voltage divider
    [li]1x 4,7 kOhm resistor[/li][li]1x 10 kOhm resistor[/li]


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.
Associated Fritzing File
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.



Troubleshooting

There are several reasons why your circuit may not work as intended. Here are some possibilities:
    [li]Check if the LED voltage is high enough and your stripes have the right polarity by connecting them directly to your power source.[/li][li]Are RX and TX connected in the right way? Read also the notes above.[/li][li]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.[/li][li]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.[/li][li]To check the output stage, you can try pulling the gate of each channel to ground or +5V.[/li]
 thanks:https://github.com/fennel-labs
  • 打卡等级:以坛为家I
  • 打卡总天数:78
  • 打卡月天数:0
  • 打卡总奖励:262
  • 最近打卡:2026-04-21 17:03:37

6

主题

3753

回帖

3815

积分

二级逆天

积分
3815

终身成就奖社区居民优秀斑竹奖

QQ
发表于 2017-9-25 21:43 | 显示全部楼层
回复

使用道具 举报

  • 打卡等级:以坛为家II
  • 打卡总天数:265
  • 打卡月天数:0
  • 打卡总奖励:882
  • 最近打卡:2025-11-17 14:46:45

3

主题

2491

回帖

5131

积分

二级逆天

积分
5131

终身成就奖优秀斑竹奖

QQ
发表于 2017-9-26 08:27 | 显示全部楼层
回复

使用道具 举报

12

主题

778

回帖

1261

积分

二级逆天

积分
1261

社区居民终身成就奖

QQ
发表于 2017-9-26 08:56 | 显示全部楼层
回复

使用道具 举报

27

主题

222

回帖

118

积分

二级逆天

积分
118

终身成就奖

QQ
发表于 2017-9-26 09:05 | 显示全部楼层
回复

使用道具 举报

  • 打卡等级:以坛为家III
  • 打卡总天数:373
  • 打卡月天数:8
  • 打卡总奖励:1108
  • 最近打卡:2026-11-11 09:00:16

14

主题

1万

回帖

1万

积分

三级逆天

积分
12333

社区居民忠实会员社区劳模终身成就奖特殊贡献奖原创先锋奖优秀斑竹奖

QQ
发表于 2017-9-26 11:36 | 显示全部楼层
回复

使用道具 举报

1

主题

132

回帖

130

积分

二级逆天

积分
130

终身成就奖特殊贡献奖原创先锋奖

QQ
发表于 2017-9-27 10:10 | 显示全部楼层
回复

使用道具 举报

3

主题

515

回帖

468

积分

二级逆天

积分
468

终身成就奖社区居民

QQ
发表于 2017-9-27 16:12 | 显示全部楼层
回复

使用道具 举报

  • 打卡等级:初入少年
  • 打卡总天数:1
  • 打卡月天数:0
  • 打卡总奖励:6
  • 最近打卡:2025-07-22 21:26:35

4

主题

438

回帖

737

积分

二级逆天

积分
737

终身成就奖

QQ
发表于 2017-9-30 08:54 | 显示全部楼层
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2024 NTpcb.com All Right Reserved.  Powered by Discuz! (NTpcb)

本站信息均由会员发表,不代表NTpcb立场,如侵犯了您的权利请举报投诉

本站所有资料仅限参考学习交流,PCB原理图源码等所有资料不保证准确没问题,请不要用作生产。否则后果自负。

闽公网安备35062302000276号 | 闽ICP备2024076463号-1 | 论坛技术支持QQ群171867948 | 论坛问题,充值问题请联系QQ1308068381

平平安安
TOP
快速回复 返回顶部 返回列表