tag:blogger.com,1999:blog-151223042024-02-19T12:18:55.056+07:00SatujamsajaMy Home At CyberspaceDeni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-15122304.post-17277732192870903912017-05-14T09:12:00.001+07:002017-05-14T09:12:40.493+07:00RDA5807M FM radio module for ArduinoI was surprised with it's ability to receive FM radio broadcast without any problem in such a small module. The size is not bigger than a coin, really small. It may a bit difficult for wiring but it can be done. You can also add small power audio amplifier and use small speaker directly. Here is the module chip, small power amplifier in prototyping pcb.<br />
<br />
<a name='more'></a><br />
<div>
<br />
<div>
<div class="separator" style="clear: both; text-align: center;">
<u><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeZHCmiq-2voylG0kX4PPMiH2p1oG5RXb3nSpr_vXKTkX9AJdJ1WW0R1IAYgDpodcxM9ctt0ZV87H1uUwPxLxnuzhzFBzeyy68A4cN3F07QkHlSRJmXACTUkUfbL82wtCQ1aYU/s640/IMG_20170514_085117.jpg" width="640" /></u></div>
<div>
<br />
<div>
<b>Wiring</b></div>
</div>
</div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg15IAxv3-83JxR2mriw4FEkzlAA8fVKFyS1oFLGDzmzZd6SAR3mZT3plFkseV7peN-6-dN_rg6n5PTdmJWQhfZGDSvmLWZnRkualQZDC-kjh1nmW0kdsR_ESQDrerzxls1CLMe/s400/RDA5807m.png" width="398" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>ANT ----> External antenna</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>R-OUT ----> R audio</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>L-OUT ----> L audio</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>GND <----> GND</----></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>VCC <----> 3.3v</----></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>SDA <----> A4(analog pin 4)</----></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>SCL <----> A5(analog pin 5)</----></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>Libraries</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: justify;">
Download: <a href="https://github.com/mathertel/Radio" rel="nofollow" target="_blank">https://github.com/mathertel/Radio</a> , there are several example files you can use to test.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>Sketch</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Download sketch: <a href="https://github.com/satujamsaja/Arduino/tree/master/rda5807m" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/rda5807m</a>. Use serial monitor to control the radio. See the code for list of command.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Good luck.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<b><br /></b></div>
Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0tag:blogger.com,1999:blog-15122304.post-66423440338534352352017-05-01T19:06:00.002+07:002017-05-01T19:09:57.742+07:00DS3231 RTC ModuleThis module is very useful if you want to create project with time related data such as data logging, alarm and clock. This module keep track the time even the system has been turned off. Thanks to small coin battery installed on this module. Once it has been set, module will keep track the time as long as battery is still life.<br />
<br />
<a name='more'></a>There are many libraries that can be used for this module. But here the simple one we will use. Let start to configure it. This module use I2C interface, so you can use it in parallel with other I2C module.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuCq49e6hzMg1W1d0hEo0Oao09F8S3-FAY-M-QuKL-Dg5jgOYYGjX-mDEyXu7JCduRGbH9NB2toggG3jrQE5-nJp6kA2wteH_Hyd6EMt2GmAuUJ9fvyBSOpFgr8jXMXgm5yBlF/s640/IMG_20170501_184245.jpg" width="640" /></div>
<br />
<br />
<b>Wiring:</b><br />
<b><br /></b>
<b>GND <----> GND</----></b><br />
<b>VCC <----> 5V</----></b><br />
<b>SDA <----> A4(analog pin 4)</----></b><br />
<b>SCL <----> A5(analog pin 5)</----></b><br />
<b><br /></b>
<b>Libraries:</b><br />
<b><br /></b>
Download : <a href="http://www.rinkydinkelectronics.com/library.php?id=73" rel="nofollow" target="_blank">http://www.rinkydinkelectronics.com/library.php?id=73</a>, or modified version <a href="https://github.com/satujamsaja/Arduino/tree/master/ds3231" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/ds3231</a><br />
<br />
<b>Sketch:</b><br />
<b><br /></b>
Download sketch : <a href="https://github.com/satujamsaja/Arduino/tree/master/ds3231" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/ds3231</a><br />
<br />
<b>Result:</b><br />
<b><br /></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="444" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1OVwgsP4estDhHImtWrfF8NsIdLmivvaarqcnF5NO0k0xswS34kQLSvoMeo4vOp4Zp3h4x-lkYA3Fj04LywkEKkXIoWkCtc5EIsECAFYVPdopL9Sirtp_DpQut6ugMibQM739/s640/_dev_cu_wchusbserial1410.png" width="640" /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
I have also created simple oled clock using this RTC module and oled library downloaded from: <a href="http://rinkydinkelectronics.com/library.php?id=79" rel="nofollow" target="_blank">http://rinkydinkelectronics.com/library.php?id=79</a> or the modified library and sketch here: <a href="https://github.com/satujamsaja/Arduino/tree/master/ds3231oledi2c" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/ds3231oledi2c</a></div>
<b><br /></b>
<b>Result:</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/aKRY-7QhKg8/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/aKRY-7QhKg8?feature=player_embedded" width="320"></iframe></div>
<b><br /></b>
Good luck.<br />
<b><br /></b>
<b><br /></b>
<b><br /></b>Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0tag:blogger.com,1999:blog-15122304.post-75282118707118348102017-05-01T05:25:00.004+07:002017-05-01T18:21:41.678+07:00OLED 128x64 0.96" I2C as Arduino display This display is really small but has nice contrast. The display still perform very well even with different viewing angle, not like LCD or TFT. It also has only 4 pin using I2C interface. Very easy to configure.<br />
<br />
<a name='more'></a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh83E3hHNmk5LkHT0XIQ44oRCjmSUmzvud6NwZjrKrxwlc6E0Jjeg6El2CcmP52f1l0oODMU56J73F95GtqBZvPHjoPofWxJOReEaFFOLHT7eMzIjFfqjOJEgvs3VMNHlOg-pZT/s640/IMG_20170501_052359.jpg" width="640" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<b>Wiring:</b><br />
<br />
<b>GND <----> GND</----></b><br />
<b>VDD <----> 3.3V</----></b><br />
<b>SCK/SCL <----> A5(analog pin 5)</----></b><br />
<b>SDA <----> A4(analog pin 4)</----></b><br />
<b><br /></b>
<b>Libraries:</b><br />
<b><br /></b>
<b>Install Adafruit GFX library</b><br />
<b><br /></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_NhdV6WryIdi62B97S1BCMFDyD9vl3CJIU8Ke77rSoixOmMuEt8bwSdhIzl4jPQ1I8y-kvXuzzXTCRD8v1jHNK63KKUL3QzVq7fjgdloIoOZApZSmRMVieVeOLP-8xXiKfwSr/s640/Library_Manager+3.png" width="640" /></div>
<b><br /></b>
<b>Install Adafruit SSD1306</b><br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiahDd2UE3SDNIe7pWP2-1LVfqY8LKEMowS6T1rJFzMBJvtv0v4FR2paj-JKauYXDXPq_8Y2aoUmIfSmQ6kWzmytDjLiN4o49vUHs7Ga-w4Fx3I166xeofJxvBafF-jpxohesIJ/s640/Library_Manager+4.png" width="640" /></div>
<b><br /></b>
<b>Notes:</b><br />
<br />
<ul>
<li>This display I2C address is <b>0x3C</b></li>
<li>Modify <b>Adafruit_SSD1306.h </b>to use correct type. See screenshot below.</li>
</ul>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="350" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfv6kkhOwPJ6ql-BeFtUtxefnQx54czzI734osE76YV-uiRfIj7eSGgGMg2SZdvJMamEIGS9ItraStNy5UqYMNJlj03z6wwlhsyOtF_hPAsh4DqK7AAlY6CKdiucBsz8JLboE5/s640/Adafruit_SSD1306_h____Documents_Arduino_libraries_Adafruit_SSD1306__-_VIM.png" width="640" /></div>
<div>
<br /></div>
<br />
<b>Sketch:</b><br />
<b><br /></b>
Download and upload : <a href="https://github.com/satujamsaja/Arduino/tree/master/oledi2c" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/oledi2c</a> to Arduino.<br />
<br />
<b>Result:</b><br />
<b><br /></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggKDOtwwuRc3WipHWA8DIoZdtnA44vHL93I2FwuXGwir-uA1RmHB7wf_070jbcB5E_Zmd0_vCDSywy0xWLaQwiZIUk4TYab8BCVrwfVOAiRp0Oz_9fd5Wv70PQc3XEFrQD3dJ0/s640/IMG_20170501_055956.jpg" width="640" /></div>
<b><br /></b>
<b><br /></b>
Good luck.Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0tag:blogger.com,1999:blog-15122304.post-23843190744416238662016-10-08T21:17:00.002+07:002017-05-01T05:33:16.444+07:00Make 1.8 SPI TFT 128x160 works as Arduino project display<div style="text-align: justify;">
Almost a week I tried to make this display worked. I tried few pinouts combination and few library and still it won't work. Finally I managed to get this display working with <a href="https://github.com/olikraus/ucglib" rel="nofollow" target="_blank">Ucglib</a> library and help from internet and doing trial and error. </div>
<div style="text-align: justify;">
<br />
<a name='more'></a><br /></div>
<div style="text-align: justify;">
There are several type of this display on the internet. You can search this kind of display and it's variation. But the one I have sadly has common problem. Here is mine.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQkFncdFt_qiYookmlpYj3TNbbSQJBh_PvPIj_jeBHlgaTpHANB59jWU2ucGk3YLXyn6HPtODWLwizrza1zCVDuHraaYLsyJdCp2_4iCsMtHHmAPc3D_vwdJytvgcmzUchBogM/s1600/IMG_20161008_192154.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQkFncdFt_qiYookmlpYj3TNbbSQJBh_PvPIj_jeBHlgaTpHANB59jWU2ucGk3YLXyn6HPtODWLwizrza1zCVDuHraaYLsyJdCp2_4iCsMtHHmAPc3D_vwdJytvgcmzUchBogM/s640/IMG_20161008_192154.jpg" width="640" /></a></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
And here is in the back of the lcd.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSl9wbAEwOQoz7YNV7exMYDijJKMlD6Ws92qehF6TVzLSp4-aNQbmJcJjB1O9-5ganwKCiSQRltN98cp9pzdzfVG2t9A2QpanyNNpFQQzDbej4Ve-1qISKPx1rSetLDgvxW7fi/s1600/IMG_20161008_192144.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSl9wbAEwOQoz7YNV7exMYDijJKMlD6Ws92qehF6TVzLSp4-aNQbmJcJjB1O9-5ganwKCiSQRltN98cp9pzdzfVG2t9A2QpanyNNpFQQzDbej4Ve-1qISKPx1rSetLDgvxW7fi/s640/IMG_20161008_192144.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>Wiring</b></div>
<div class="separator" style="clear: both; text-align: justify;">
The pinouts could be different on other type. But here are the pinouts that working for me. Note that first pin is <b>GND. </b>All pin used are digital pins.</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<ul>
<li style="text-align: justify;"><b>GND <-----> GND</-----></b></li>
<li style="text-align: justify;"><b>VCC <-----> 5v</-----></b></li>
<li style="text-align: justify;"><b>RESET (RST) <-----> PIN 8</-----></b> (in series with 1K resistor)</li>
<li style="text-align: justify;"><b>AO (DC) <------> PIN 9 </------></b> (in series with 1K resistor)</li>
<li style="text-align: justify;"><b>SDA <-----> PIN 11 </-----></b> (in series with 1K resistor)</li>
<li style="text-align: justify;"><b>SCL <------> PIN 13 </------></b> (in series with 1K resistor)</li>
<li style="text-align: justify;"><b>CS <-----> PIN 10 </-----></b> (in series with 1K resistor)</li>
<li style="text-align: justify;"><b>LED+ <-----> 3.3v</-----></b></li>
<li style="text-align: justify;"><b>LED- <-----> GND</-----></b></li>
</ul>
<div style="text-align: justify;">
I need to add resistor in series with all used pins. I found this resistors make better color contrast. Maybe the lcd pinouts was intended to work on 3.3v. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>Libraries</b></div>
<div style="text-align: justify;">
Install Ucglib library from Arduino Libraries or you can download it from link on the top.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQKTHLW6nPJ67BC39GxY_6HOhgjrlTs6XA22UbGk0UxyHdHgHzadUr8UTDU1U9HYGitFcedZpzkNF2oM1uzGaYjFhhuNmkQ73nSUYWTttg_b7fsj4W4DsfHAtFtJQM1TkHXU-p/s640/Library_Manager.png" width="640" /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>Testing</b></div>
<div style="text-align: justify;">
<div style="text-align: left;">
Download my test sketch on: <a href="https://github.com/satujamsaja/Arduino/tree/master/spitft1.8" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/spitft1.8</a> it should show like below. My other sketch will display sensors results. You can download it on this link <a href="https://github.com/satujamsaja/Arduino/tree/master/spitftdht22bmp280" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/spitftdht22bmp280</a> and also check the sensors wiring on my previous posts.<br />
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: justify;">
Good Luck.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0tag:blogger.com,1999:blog-15122304.post-91860976738687123192016-09-27T20:16:00.005+07:002017-05-01T05:32:51.861+07:00Using Nokia 5110 LCD module as Arduino project displayOn previous post we learn how to use LCD as Arduino project display. Another common display for Arduino project is Nokia 5110 LCD. The LCD is the same display used for legendary Nokia 3310 phone. The driver use PCD8544 controller by Phillips. It has nice contrast and also led backlight. Here the example on my project.<br />
<br />
<a name='more'></a><br /><br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Ibo9VtNZmcGjfBVy2BO27-T0BfCKxfCpvVVTXHJi1Fz81324qttiyszppHWn2vM8VJMYFTJcqU3WA-bdYF0jqSRAoYGO3jTYK7Ud_MPVFVxhlXUimR9PGJCBJGKYBPxOJ7bO/s640/IMG_20160927_200430.jpg" width="640" /></div>
<br />
After doing research on google, finally I can make this display works.<br />
<br />
<b>Wiring </b><br />
For this type on the back has pin descriptions.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcle5fucWE0u-DfIzNyPQxhoA-_Jj-s3KpFuZx9UwbMZdAERnhHeh1Pzk2gX1kPH9rl9SMpAgXXTW9mF31yemyA5CWlkXo9XkM-H3YOgb0rtFQV7YM7LmTjlbj5ujD8s145ufi/s640/IMG_20160927_200521.jpg" width="640" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
The wiring need 5 pinS connected to arduino. Here the connection from LCD to Arduino. All pin used is digital pins. See top picture for pinouts.</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<ul>
<li><b>RST <----> PIN 12</----></b></li>
<li><b>CE <----> PIN 11</----></b></li>
<li><b>DC <----> PIN 10</----></b></li>
<li><b>DIN <----> PIN 9</----></b></li>
<li><b>CLK <----> PIN 8</----></b></li>
<li><b>VCC <----> 3.3v</----></b></li>
<li><b>BL <----> 3.3v (backlight)</----></b></li>
<li><b>GND <----> GND</----></b></li>
</ul>
<div>
<b>Libraries</b></div>
<div>
Install Adafruit GFX library and Adafruit PCD8544 Nokia 5110 LCD library using libraries manager.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwX7NHRnaLc67ohP80EdoBnWeHxQQtF772aw9ooshGPQEgb5uiQEMXwnpoD_3wZYVRlhD8bkT-rvJBNzNWa5Mh32yrNYMsLjGyRiKPwspuX9jGM-UZ2yiS_Ehhq93J92rx2MeB/s640/Library_Manager.png" width="640" /></div>
<div>
<br /></div>
<div>
<b>Testing</b></div>
<div>
Download and upload this sketch to Arduino from my github here <a href="https://github.com/satujamsaja/Arduino/tree/master/lcd5110" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/lcd5110</a> .My other sketch to display temperature, humidity and pressure also available for download at <a href="https://github.com/satujamsaja/Arduino/tree/master/dht22bmp280lcd5110" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/dht22bmp280lcd5110</a><br />
<br />
Good Luck.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0tag:blogger.com,1999:blog-15122304.post-51279265413400157882016-09-25T19:25:00.000+07:002017-05-01T05:32:30.153+07:00Using LCD 2004a I2C on project with ArduinoOn previous post measurement sensor results displayed on serial monitor. This is good when we are on development stage. When we want something more independent we need external display. I have purchased a few type of display. For now we will use LCD 2004 for external display.<br />
<br />
<a name='more'></a><br /><br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh0aaKPGMQyS_0-aSINIMPmau13-wpyTmYGVssP2PLsyITOgpPj6ECRWTLxvyJMFf8QAsMxPrW_ujrB3RxR43yK6_cNrvL8tBr1a3GJ5fEqKzVinkPERvRQqqgGLcuWPDDjUch/s640/IMG_20160925_182411.jpg" width="640" /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
This LCD has 20 cols x 4 rows size. Not much information we can show on this small display. Above LCD use SPI or I2C interface. The reason I choose I2C interface is we only use 2 main pin for connection. This is useful when we use a lot of device on Arduino.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>Wiring</b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-lIe4VaBEuXcn-IKkn95JJV-C584oG_Vn2YVt4IT9jP9Y8lZKQMS75_vyPkNjzyDBBmkueDmkJWNqGoo-wUyDvwdMP1iVAnzVqvpER0zVQJJtC8HvBm0x8EMqH8qze4VvOjrF/s1600/IMG_20160925_182346.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-lIe4VaBEuXcn-IKkn95JJV-C584oG_Vn2YVt4IT9jP9Y8lZKQMS75_vyPkNjzyDBBmkueDmkJWNqGoo-wUyDvwdMP1iVAnzVqvpER0zVQJJtC8HvBm0x8EMqH8qze4VvOjrF/s640/IMG_20160925_182346.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: justify;">
Above image shows the LCD back view. The I2C interface module has potentiometer to adjust backlight brightness and jumper to turn on or off backlight. The wiring is simple.</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<ul>
<li><b>GND <----> Gnd</----></b></li>
<li><b>VCC <----> 5v</----></b></li>
<li><b>SDA <----> A4 (Analog pin 4)</----></b></li>
<li><b>SCL <----> A5 (Analog pin 5)</----></b></li>
</ul>
<div>
Note that one of the advantage using I2C interface is that we can use many devices on same pin. In this case I use LCD display in parallel with GY BMP 280 that has I2C interface too. </div>
<div>
<b><br /></b></div>
<div>
<b><br /></b></div>
<div>
<b>Library</b></div>
<div>
<br /></div>
<div>
Download library <a href="https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads" rel="nofollow" target="_blank">here</a> and copy the folder into Arduino library.<br />
<br />
<b>Sketches</b><br />
<br />
Run the test sketch from my github : <a href="https://github.com/satujamsaja/Arduino/tree/master/lcdi2c" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/lcdi2c</a> and implementation on the project that display DHT 22 and GY BMP 280 <a href="https://github.com/satujamsaja/Arduino/tree/master/dht22bmp28020x4" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/dht22bmp28020x4</a> .</div>
<div>
<br /></div>
<div>
Good Luck.</div>
<br />Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0tag:blogger.com,1999:blog-15122304.post-49754252183924501582016-09-18T00:33:00.002+07:002017-05-01T05:32:14.096+07:00Read temperature and barometric pressure from GY BMP 280 using ArduinoThis sensor based on BMP 280 digital pressure sensor made by Bosch. You can find the complete datasheet <a href="https://www.bosch-sensortec.com/bst/products/all_products/bmp280">here</a>. This small sensor is quite impressive with it's accuracy. It claimed to be <b>±1 hPa</b> in measuring barometric pressure, <b>±1.0°C</b> in temperature measurement and <b>±1 meter</b> in altitude accuracy. Pretty impressive right ?<br />
<div>
<br />
<a name='more'></a><br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRUqN4YXSD7UkMsZtxGzFuMmTpG_-9JHIB9wdkeVGuzx4dgc0CGd5bwe0i2Qli30pT7N7pyFo2Z81d89TtCLOU2V4BG0-3YUPZuvbJc8V8JT4oVCQSU7gi66gztDUidael2EGH/s640/gybmp280.jpg" width="640" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
This sensor support both I2C or SPI interface. The wiring for this sensor is simple. Note that this sensor require 3.3v, so if you use Arduino Uno, use the 3.3v pin.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>Wiring sensor and Arduino:</b></div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<ul>
<li><b>VCC <----> 3.3v</----></b></li>
<li><b>GND <----> GND</----></b></li>
<li><b>SCL/SCK <----> A5(Analog pin 5)</----></b></li>
<li><b>SDA/SDI <----> A4(Analog pin 4)</----></b></li>
</ul>
<div>
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfaVeyiV8jQetxJCnafIKH6BCS16X8lNH6RwjkA2mSgnqCwmmwC_RSbY76N6hL28Co-jDApRWP7tRjwF89YghthHQjklikjAqateC6NCtMdC0R4DwM8_kzeaawhwfZ3tiXnj9e/s640/IMG_20160917_225636.jpg" width="640" /></div>
<div>
<br /></div>
<div>
<b>Install following library from Arduino IDE.</b></div>
<div>
<b><br /></b></div>
<div>
<b>Adafruit Unified Sensors </b>(<a href="https://github.com/adafruit/Adafruit_Sensor" rel="nofollow" target="_blank">https://github.com/adafruit/Adafruit_Sensor</a>)</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEpcd6gtDmcu118OKG2huVBdkMDi6uZYS2cpYEBqv1JTPGQD6TwF6QZxhBKazpfRr-9VtL33E_Xu9yiHIROjHFZwflLkWfZmzQRpC8N-8eu_iuOHbFLx1HG-tPPQiIiSewMXig/s640/Library_Manager.png" width="640" /></div>
<div>
<br /></div>
<b>Adafruit BMP 280 Library</b> (<a href="https://github.com/adafruit/Adafruit_BMP280_Library" rel="nofollow" target="_blank">https://github.com/adafruit/Adafruit_BMP280_Library</a>)<br />
<ul>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_xx1zyQh5ZAnaRsGseOAz5tMmLlzCzV7e2JkUl_nuply16u0ykAL4gURO3ZXhqZ5de-BGo2wdLXu1K9WtPBvIQylmsVtXwx0ZN50vo7Eq3LfcW2-isfImp1YfgGewSlXqFy0B/s640/Library_Manager+2.png" width="640" /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b>Note:</b></div>
</div>
<div>
For this sensor you need to change I2C address on to <b>0x76. </b>Locate file <b>Adafruit_BMP280.h </b>and change the I2C the address.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU2qFTDimVRnxRwf-_6iY-890RFdDQdkOWyycDqpNlFSfOSXNHqaP-OY5guvDfDRk490_DCndftETkeQ7VRtROfUmI1CwIDbKyuj3ya1DWyP3lxPibsHxrjZejKzE8TLc6760Q/s640/Adafruit_BMP280_h____Documents_Arduino_libraries_Adafruit_BMP280_Library__-_VIM1.png" width="640" /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Download sketch and upload to Arduino from my github : <a href="https://github.com/satujamsaja/Arduino/tree/master/bmp280" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/bmp280</a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b>Here is the result.</b></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="484" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-_vwlDX2ER8rAXTvNc0aI1GPm66Y6pzXt1rcDD45yYeLB5__RLM-wndLpoHTqhK5DWlhEru9o3u_TKdHgMgxBWi-WFIaT8o9H89OW2BXsoiLIYj6T6R6_rDCYyZiUM_kBKvpb/s640/_dev_cu_usbmodem1A111__Arduino_Genuino_Uno_+2.png" width="640" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both;">
While pressure result pretty accurate, altitude is miss about 18m. Calculated from google map, my location altitude is 7m above sea level. Well we wouldn't get accurate altitude without accurate <b>sea level pressure</b> on that point. This sea level pressure would change depend on weather or even temperature. But for this calculation we use <b>1 atm</b> which is equal to <b>1013.25 millibar.</b></div>
<div class="separator" style="clear: both;">
<b><br /></b></div>
<div class="separator" style="clear: both;">
Good luck.</div>
<div class="separator" style="clear: both;">
<br /></div>
Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0tag:blogger.com,1999:blog-15122304.post-27394014757479860572016-09-17T14:53:00.003+07:002017-05-01T05:30:21.373+07:00Read temperature and humidity from DHT 22 Sensor using ArduinoDHT 22 is low cost temperature and humidity sensor. This sensor has more accuracy compared to previous version (DHT 11). See the comparison <a href="https://learn.adafruit.com/dht/overview" rel="nofollow" target="_blank">here</a>. My DHT 22 comes with in breakout board, so there is no need to add additional resistor to drop the voltage. This sensor has 3 pins.<br />
<br />
<a name='more'></a><br /><br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmObD1IEAjVTSDMw1CRvfBPo2fKaxPE2DNFEXJVwfEtpPKpSiRwxDn1D49S8oU2o8sJbGu6s7Eevoh1ZOhJKJLMjOxrKXqTqsdTnek4B3utT_OcC0MkfEyLR7mc_QgmihPpq2K/s400/IMG_20160917_125132.jpg" width="225" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Above photo shows DHT 22 compared to GY BMP 280. The pins out is easy.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<b>DHT 22 (From left to right)</b></div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<ul>
<li><b>VCC</b></li>
<li><b>Output</b></li>
<li><b>GND</b></li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9Xo5e5FY683ZIoQSb5rYW30OQq9B4MbodN5reli1TgYCZPxcwowR9nCX4mmC5MwtrophGpf12-os4-u07w9nN-Jl2kQQtofj2NgviweThnIrkU-Ka0TAYYacTw1761JxV1BDS/s640/IMG_20160917_131403.jpg" width="640" /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Connecting sensor to Arduino also easy.</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<ul>
<li><b>VCC <-----> Arduino 5V</-----></b></li>
<li><b>Output <-----> Digital Pin 2</-----></b></li>
<li><b>GND <------> Arduino GND</------></b></li>
</ul>
<div>
Connect Arduino with computer and run Arduino IDE. Install Adafruit DHT sensor library from Libraries Manager.<br />
<b><br /></b>
<b>Install Adafruit Unified Sensor.</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNSID8fh87K148AAO7p78KGP4L1oVZqK8_2YL6zSexoyGQ-8CPepf93G4dum9Dbj8tf0zMgdZb-s8eOjYWoU2c1tNDqhzJT-ESjLYxmjxyQSrpH79Jc3-r5nW77a3LxvLziUwF/s640/Library_Manager.png" width="640" /></div>
<br /></div>
<div>
<br />
<b>Install DHT Sensor Library.</b><br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4uqaXpk7KCLabHl97fk8YOgilJ8z-gJevrF6Bc9DTO5iHtRyXe5HJIXLG4nd0TgtGBG52C2D6uG3Ua_m5oMurcCZX97gNBBEGBK2jE-CFBib0gIQtIwAWSwQPRluvM18SJlTG/s640/Library_Manager.png" width="640" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Download test sketch from my github : <a href="https://github.com/satujamsaja/Arduino/tree/master/dht22" target="_blank">https://github.com/satujamsaja/Arduino/tree/master/dht22</a></div>
<div class="separator" style="clear: both; text-align: justify;">
and run the sketch.</div>
<div>
<br /></div>
<div>
Here is the result:</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="522" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZxY88FZy2DlFBSteGyXDiHnBGAYd-tZQImJf0sE8FoFQDg-bXAJtMXa1ZAEV453vfmYqaMSzJP4AK56XXVNFqMFFLV78UqgUVrBzHRE5qdNaZcbhDsi1WxR8kUeiDBp86dXOR/s640/_dev_cu_usbmodem1A111__Arduino_Genuino_Uno_.png" width="640" /></div>
<div>
<br /></div>
<div>
Good luck.</div>
<br />
<br />Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0tag:blogger.com,1999:blog-15122304.post-49985974801280597622016-07-24T09:41:00.004+07:002017-05-01T05:30:46.878+07:00Arduino : Configuring HM-10 as iBeacon<div style="text-align: justify;">
I was so excited when found out that this HM-10 Bluetooth can be configured as iBeacon device. Bluetooth Low Energy beacon which the protocol was developed by Apple. But we will call this device or module as <b>beacon</b>.</div>
<div style="text-align: justify;">
<br />
<a name='more'></a><br /></div>
<div style="text-align: justify;">
The beacons will broadcast it's identifier to any nearby electronic devices. With this information, mobile app can perform actions if in the range or close to the device. The proximity to the device grouped by the range or regions which are <b>Far</b>, <b>Near</b> and <b>Immediate</b>. Each region can trigger the app to do call to action presented to the user. This range can be adjusted by configuring the transmitting power of the beacon.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
For example we have store and beacons configured for some special products. When customer walk or pass in to the store, the app can present promo, sale or any interesting store information to the customer. When customer pass near to the discounted or sale product user can be presented with the discount information or product details. Then when customer put the device very close to the product, the app can add product to the app cart or do checkout automatically.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
That is one of the scenario on the real world implementation. You can find many resources on the internet that explained better about iBeacon and examples of it's implementation. But on this post I'll try to explain how to configure HM-10 as iBeacon device. See screenshot below.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicgv7g-Rl6wL2KyExG0P91M3Tdpu-awBc2mGQXEIkXAcPFFqsQHWIO8JtiH90QiXG-RKyagXt63VVvUihECMwkARIIEeL7SOFN0BKtrySKVPD867IRTRRd_O58py-gQ5lqEKgu/s1600/_dev_cu_usbserial-A50285BI.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicgv7g-Rl6wL2KyExG0P91M3Tdpu-awBc2mGQXEIkXAcPFFqsQHWIO8JtiH90QiXG-RKyagXt63VVvUihECMwkARIIEeL7SOFN0BKtrySKVPD867IRTRRd_O58py-gQ5lqEKgu/s640/_dev_cu_usbserial-A50285BI.png" width="554" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Commands explanation.</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<ol>
<li><b>AT+RENEW: </b>restore software to factory default</li>
<li><b>AT+RESET: </b>reboot device</li>
<li><b>AT: </b>check at command is accepted by device, if its OK you are good to go</li>
<li><b>AT+MARJ0xAAAA: </b>set major device number in hexadecimal</li>
<li><b>AT+MINO0xBBBB: </b>set minor device number in hexadecimal</li>
<li><b>AT+ADVI5: </b>set advertisement interval to 5 second</li>
<li><b>AT+NAMESMBEACON: </b>set beacon name to SMBEACON</li>
<li><b>AT+IBEA1: </b>enable beacon mode</li>
<li><b>AT+PRWM0: </b>enable power on mode, this will save power</li>
<li><b>AT+RESET: </b>reboot device</li>
</ol>
So your bluetooth now ready to broadcast it's identifier to nearby supported device. Test using Beacon scanner available on the playstore or appstore. Here I tested the device using Beacon Scanner android app.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0AzgmfRRB5bKMHqAI_mhUDu1vKqG4cAEYe_vjzBxN0yhrFOxDbqEiyGQbVj36IhLneYZzm5FHKZ-yBkz-ay5oySihbUu9MV5J3eRdBz-XCj0ZRZ3VcQJwOb9kq_xF6VUmen5j/s1600/Screenshot_2016-07-24-10-20-58_de.flurp.beaconscanner.app.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0AzgmfRRB5bKMHqAI_mhUDu1vKqG4cAEYe_vjzBxN0yhrFOxDbqEiyGQbVj36IhLneYZzm5FHKZ-yBkz-ay5oySihbUu9MV5J3eRdBz-XCj0ZRZ3VcQJwOb9kq_xF6VUmen5j/s640/Screenshot_2016-07-24-10-20-58_de.flurp.beaconscanner.app.png" width="360" /></a></div>
<br />
<br />
We can also modify device UUID by using AT command. On the real world implementation as example above, this UUID can be used for identify the store building then major number used as the store level and the minor number used to identify specific location or product on that store level. Then we can create the app that respond to those beacons. We can put as many beacons on but make sure to change major and minor number. I'll try to create app to demo the beacon usage.<br />
<br />
<b>Update September 16, 2016</b><br />
<br />
<ul>
<li>I have created Beacon demo app at my github page : <a href="https://github.com/satujamsaja/hm10beacon" target="_blank">https://github.com/satujamsaja/hm10beacon</a></li>
</ul>
Here is the video.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/y82IV0dnaZ4/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/y82IV0dnaZ4?feature=player_embedded" width="320"></iframe></div>
<br />
<b><br /></b>
<br />
Resources and links<br />
<br />
<ol>
<li>How to : <a href="http://www.blueluminance.com/HM-10-as-iBeacon.pdf" target="_blank">http://www.blueluminance.com/HM-10-as-iBeacon.pdf</a></li>
<li>10 things about beacon : <a href="https://www.youtube.com/watch?v=L44m7otNI7o" target="_blank">https://www.youtube.com/watch?v=L44m7otNI7o</a></li>
</ol>
<br />
<br />
<br />
<div style="text-align: justify;">
<br /></div>
Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0tag:blogger.com,1999:blog-15122304.post-37755731334482024832016-07-17T21:18:00.002+07:002016-12-20T18:45:35.825+07:00Arduino: Configuring HM-10In my earlier post I mentioned about how to configure HM-10. My HM-10 by default has name BT05. I want to change it. But how ? That's not hard as long you have necessary tools to do it. In my case I setup it using breadboard and use Arduino 5v as power supply. To configure HM-10 you need to issue AT command. For that purpose you need to use serial communication between computer and the module. Here are tools that I use:<br />
<ol>
<li>HM-10 BLE</li>
<li>USB to Serial/TTL adapter or cable I use FT232RL USB to TTL adapter</li>
<li>Arduino and Arduino IDE</li>
<li>Male to male jumpers</li>
<li>USB to mini usb cable data (for serial connection)</li>
</ol>
<div>
Here is HM-10 and FT232RL side by side.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6sxyJ8LN6nEWU5noQyT3itOMMoGMN2PfOcN0YwSH9gModzlkoLiDo3xLnO_GiNF0dKPPZ_YcVJz-JAh88glIqF9clWw7M0GXullladh8FlkRJEEu8VYl4ADb6D75u8ww_H3Qi/s1600/IMG_20160715_204554.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6sxyJ8LN6nEWU5noQyT3itOMMoGMN2PfOcN0YwSH9gModzlkoLiDo3xLnO_GiNF0dKPPZ_YcVJz-JAh88glIqF9clWw7M0GXullladh8FlkRJEEu8VYl4ADb6D75u8ww_H3Qi/s640/IMG_20160715_204554.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
For pinout for HM-10 and FT232RL based on above picture are below.</div>
<div>
<br /></div>
<div>
<b>HM-10 (From left to right)</b></div>
<div>
<ul>
<li>STATE</li>
<li>RXD</li>
<li>TXD</li>
<li>GND</li>
<li>VCC</li>
<li>EN</li>
</ul>
<div>
<b>FT232RL (From left to right)</b></div>
<div>
<ul>
<li>DTR</li>
<li>RX</li>
<li>TX</li>
<li>VCC</li>
<li>CTS</li>
<li>GND</li>
</ul>
<div>
The pin we will use for serial communication are below.</div>
</div>
<div>
<br /></div>
<div>
<b>HM-10 TXD <-------> FT232RL RX</-------></b></div>
<div>
<b>HM-10 RXD <-------> FT232RL TX</-------></b></div>
<div>
<br /></div>
<div>
Since we use Arduino power for this purpose, make sure the jumper on FT232RL is on 5v voltage or it could burn the adapter.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br /></div>
</div>
<div>
<br />
After you finished all wiring, you are ready to go.<br />
<br />
<ol>
<li>Connect Arduino USB to your laptop/PC</li>
<li>Connect USB data cable from FT232RL to computer</li>
<li>Run Arduino IDE, and select serial port from <b>Tools > Serial</b> in my Arduino IDE detected as <b>/dev/cu.usbserial-xxxxx</b></li>
<li>Open Serial Monitor</li>
<li>Set 9600 baud Newline and Carriage Return</li>
</ol>
<div>
Here the screenshot from serial monitor.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8z-en17TSon4hUF1k9F8kmjmXZuoOi30xXl24_djgaXwQ8brOSwJjckGAWDmHWtwe_SnPCIHpfimKFOgi5dA-ob5N9yk_SPuuXJzDSiw9kwYDUU-Lokd1hy6yJpm5mLZWmw4F/s1600/_dev_cu_usbserial-A50285BI.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8z-en17TSon4hUF1k9F8kmjmXZuoOi30xXl24_djgaXwQ8brOSwJjckGAWDmHWtwe_SnPCIHpfimKFOgi5dA-ob5N9yk_SPuuXJzDSiw9kwYDUU-Lokd1hy6yJpm5mLZWmw4F/s640/_dev_cu_usbserial-A50285BI.png" width="622" /></a></div>
<div>
<br /></div>
<div>
Command explanations.</div>
<div>
<ol>
<li><b>AT</b> : check terminal command, all good if return OK</li>
<li><b>AT+NAME</b>: get device name</li>
<li><b>AT+NAMESARANG MACAN</b>: set device name to SARANG MACAN</li>
<li><b>AT+NAME</b>: get modified device name</li>
<li><b>AT+RESET</b>: reboot device/software</li>
</ol>
<div>
Now you can test it by scan the bluetooth from your smartphone. Here what I get when using my HM-10 BLE app.</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXslLZS80sQRxtJGlVdliXo9kCxqyQqoRPWqVoNOrcYYeLOTFomaxmdt1JzLFjWRvIpWLROVjfW9B51uzzJn_BVjNSOOGiejXrsHYAdy7T36k0Fzzy025QrNXI9lTynOHDbkwi/s1600/Screenshot_2016-07-17-21-47-28_com.ionicframework.hm10662278.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXslLZS80sQRxtJGlVdliXo9kCxqyQqoRPWqVoNOrcYYeLOTFomaxmdt1JzLFjWRvIpWLROVjfW9B51uzzJn_BVjNSOOGiejXrsHYAdy7T36k0Fzzy025QrNXI9lTynOHDbkwi/s640/Screenshot_2016-07-17-21-47-28_com.ionicframework.hm10662278.png" width="360" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
For more command list supported by device you can type <b>AT+HELP</b> on terminal. Here the list.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDLCnzcGzyA9KBCwFCD0_eyK504egL5g5UL-ZPhLgq9dCJnU_pGXP8OXqAUMHoBcPngUwkhbr4jmisMS67-8BVoJ5ADoKBWu8WTIuk5zMvQwevPCUjYw847RBM00QenxEfPTmh/s1600/_dev_cu_usbserial-A50285BI.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDLCnzcGzyA9KBCwFCD0_eyK504egL5g5UL-ZPhLgq9dCJnU_pGXP8OXqAUMHoBcPngUwkhbr4jmisMS67-8BVoJ5ADoKBWu8WTIuk5zMvQwevPCUjYw847RBM00QenxEfPTmh/s640/_dev_cu_usbserial-A50285BI.png" width="622" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div>
I have mentioned that my HM-10 was cloned version. Turn out the module built by Bolutek. I am in process getting the original one. Will update it later. Next post I'll try to configure it as iBeacon. Happy hacking :)</div>
<div>
<br /></div>
</div>
<div>
<br /></div>
Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0tag:blogger.com,1999:blog-15122304.post-18138129071897126722016-07-15T06:30:00.003+07:002017-05-01T05:31:11.989+07:00Arduino : Controlling RGB led using smartphone and HM-10 Bluetooth 4.0 LE<div style="text-align: justify;">
My last setup as seen on previous post has been abandoned for a while. A bit busy with another work and holiday. About holiday I'll tell you in my upcoming post. Interesting place to visit and beautiful too. You probably will be interested too.</div>
<div style="text-align: justify;">
<br />
<a name='more'></a><br /></div>
<div style="text-align: justify;">
I have been doing some research and learning to build mobile app for my last project with RGB led and Bluetooth LE. So i end up learning <a href="http://ionicframework.com/docs/v2/" rel="nofollow" target="_blank">Ionic 2</a>. The reasons are it has beautiful UI and has plugin for BLE. I have done small work using Ionic 1 in the past, but with Ionic 2 it completely different. I also need to learn Angular 2 and typescript.</div>
<br />
Below is the wiring for the project. It's combination from my previous projects. The wiring for bluetooth module are below.<br />
<br />
TXD (ble) <--> Pin 7 digital</--><br />
RXD (ble) <--> Pin 8 digital</--><br />
<br />
Pin 6 digital used for DIN (RGB Led data in)<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKizrMZ-seZDlf1KjFr-jx3oQ8VllqL0Vex5nonFS_siV4DVdSS8JYrLuxR5XyYVu9dBACSA7TbG2sF9YwL-GlCtcUFgl1l6A8FoLRKL-rmFeLvS7QyoGmDWdflRI32vZRx6Xm/s1600/hm10rgbled_bb.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="616" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKizrMZ-seZDlf1KjFr-jx3oQ8VllqL0Vex5nonFS_siV4DVdSS8JYrLuxR5XyYVu9dBACSA7TbG2sF9YwL-GlCtcUFgl1l6A8FoLRKL-rmFeLvS7QyoGmDWdflRI32vZRx6Xm/s640/hm10rgbled_bb.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
To test it, you can follow below steps.</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<ol>
<li>Download Arduino sketch from my <a href="https://github.com/satujamsaja/Arduino/blob/master/hm10rgb/hm10rgb.ino" target="_blank">github</a> </li>
<li>Upload sketch to arduino.</li>
<li>Download my compiled apk on my <a href="https://github.com/satujamsaja/hm10-rgb-led-control/tree/master/build" target="_blank">github</a></li>
<li>Enable smartphone bluetooth</li>
<li>Run the app and enjoy</li>
</ol>
<div>
Here is video demo:</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/JHPqbgi9JW0/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/JHPqbgi9JW0?feature=player_embedded" width="320"></iframe></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
So it's time to move on from RGB led project. I have purchased 2 small servo and pan/tilt servo bracket. It could be interesting project. Controlled by smartphone ? Why not.</div>
<div>
<br /></div>
<div>
Resources and links</div>
<div>
<ol>
<li>Ionic 2 : <a href="http://ionicframework.com/docs/v2/" rel="nofollow" target="_blank">http://ionicframework.com/docs/v2/</a></li>
<li>BLE cordova plugin : <a href="https://github.com/don/cordova-plugin-ble-central" rel="nofollow" target="_blank">https://github.com/don/cordova-plugin-ble-central</a></li>
</ol>
<div>
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<br />Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0tag:blogger.com,1999:blog-15122304.post-22461605218244257392016-06-27T03:26:00.000+07:002017-05-01T05:31:44.356+07:00Arduino : Connecting Arduino to HM-10 Bluetooth 4.0 LE module<div style="text-align: justify;">
We will learn more interesting stuff with Arduino and bluetooth. Basic stuff is connecting Arduino to HM-10 Bluetooth 4.0 LE module which also known as Bluetooth Smart and doing some serial communication. This module has has some interesting feature. Beside of it's reduced energy consumption, another feature that quite interesting is that we can use it as <a href="https://en.wikipedia.org/wiki/IBeacon" rel="nofollow" target="_blank">iBeacon</a>.</div>
<div style="text-align: justify;">
<br />
<a name='more'></a><br /></div>
<div style="text-align: justify;">
You can learn more about this module by reading the datasheet <a href="https://www.seeedstudio.com/wiki/images/c/cd/Bluetooth4_en.pdf" rel="nofollow" target="_blank">here</a>. You can tell the difference with the real one is that it has small crystal on it's board.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZunu7nm-TcAdWEsocTHc_94M8IEBkpMuGNDOGbb4X1XSODVrDzVWNnfsErh15oQXiuyuFikprSfqF5thPP7se4uloA2X5hOoiyk94EXVQ_EyueXSLFxF-qXAVIv3TnZHYH3ZS/s1600/bluetooth40_en_doc.png" /></div>
<br />
<div style="text-align: justify;">
Mine looks like the one on the left, but it has no crystal component on it. But I can tell you it working just fine.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Here the breadboard wiring created using <a href="http://fritzing.org/home/" rel="nofollow" target="_blank">Fritzing</a>.</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="476" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXwOMaVZaxv_SO-nnlPQESbPgHYGlIqnVhfwqNqzwPgd7FZalMXYsAtSiePDch6Bv-KamLZDftBX9vi6s9Sq4nVVwMII1yQ8onqYriMbOtfpIY3izB9K_A72HSQuZcFsiJBIpy/s640/hm10_bb.png" width="640" /></div>
<div class="separator" style="clear: both; text-align: justify;">
Please note that we use digital pin 7 and 8 as serial RX and TX using <a href="https://www.arduino.cc/en/Reference/SoftwareSerial" rel="nofollow" target="_blank">SerialSoftware</a> library, we can't use TX (pin 1) and RX (pin 0) because it used by computer through USB. </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
And here what is looks like on real breadboard.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLUW0ONd_6mdj3g2FhR0PmxmEQpCBcPcbB5xHc52pcqdr1ebiRh5Z7GiqdxmMslhJqvcOEcwPWWca4CKXHG4uz9izRFawwpUH5ZQg5VLDXZkELndmfEmkaNT9Sj8VVHfAAxsWH/s640/IMG_20160709_215658.jpg" width="640" /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
The power led will blinking when it's connected correctly. Note that the module has it's own breakout when I bought it. So it will safe to connect it directly to the Arduino 5V pin. On the market it may sold as just the module. You need to use 3.3V Arduino pin or you can create voltage divider circuit to drop voltage to 3.3V.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Test using your phone by enabling bluetooth. You should see the BT05 on your bluetooth device list like below. Note that this default bluetooth settings. I'll cover how to configure bluetooth on my next post.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR_y_ymwssNMKMkfT96wzzK-9evSiHL5TLg1qrhLsBc_kY2_QkY5DzfJKAOgMwTr-2cLnu9beVSiyt_2RgzsN81_QW_UGTgFIE_KdyNGNrsdZjR8anrPExO3IJJK-CgI5KiVkF/s640/Screenshot_2016-07-10-10-48-38_com.android.settings.png" width="360" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
To test serial communication between Arduino and phone follow below step.</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<ol>
<li style="text-align: justify;">Download Arduino sketch <a href="https://github.com/satujamsaja/Arduino/blob/master/hm-10.txt" target="_blank">here</a> compile and upload.</li>
<li style="text-align: justify;">Open Serial monitor on Arduino IDE (<b>Tools > Serial Monitor</b>) use 9600 baud rate.</li>
<li style="text-align: justify;">Download <a href="https://play.google.com/store/apps/details?id=com.tumaku.msmble" rel="nofollow" target="_blank">MSMBle</a> from Google Play Store, this app easy to use and just works, not like other app I have installed</li>
<li style="text-align: justify;">Start the app and scan for existing BLE device.</li>
<li style="text-align: justify;">Select service for bidirectional communication, so phone and Arduino can talk each other <span style="background-color: white; color: #686868; font-family: "open sans" , sans-serif; font-size: 16px; line-height: 25.6px;"></span><b>(Service UUID: 0000ffe0-0000-1000-8000-00805f9b34fb)</b></li>
<li style="text-align: justify;">Try to send text from MSMBle and it should displayed on Arduino Serial monitor instantly</li>
<li style="text-align: justify;">Then try to send text from Serial Monitor and it also should displayed instantly on MSMBle app</li>
</ol>
<div>
<div style="text-align: justify;">
If above test working, you have basic understanding on serial communication. You can create any device application controlled by phone. From home automation to robotics. The limit is just your imagination.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Here is the video demo.</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/rZTqZ4--ig0/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/rZTqZ4--ig0?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
Next post, I'll post how to control RGB led from Smartphone using bluetooth. Happy hacking!</div>
<div>
<br /></div>
<div>
Readings and resources links:<br />
<br />
<ol>
<li>Bluetooth HM-10 : <a href="https://www.seeedstudio.com/wiki/images/c/cd/Bluetooth4_en.pdf" target="_blank">https://www.seeedstudio.com/wiki/images/c/cd/Bluetooth4_en.pdf</a></li>
<li>Arduino Software Serial : <a href="https://www.arduino.cc/en/Reference/SoftwareSerial" rel="nofollow" target="_blank">https://www.arduino.cc/en/Reference/SoftwareSerial</a></li>
<li>HM-10 BLE module: <a href="http://blog.blecentral.com/2015/05/05/hm-10-peripheral/" target="_blank">http://blog.blecentral.com/2015/05/05/hm-10-peripheral/</a></li>
<li>HM-10 Arduino sketch: <a href="https://github.com/satujamsaja/Arduino/blob/master/hm-10.txt" target="_blank">https://github.com/satujamsaja/Arduino/blob/master/hm-10.txt</a></li>
</ol>
<div>
<br /></div>
</div>
Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0tag:blogger.com,1999:blog-15122304.post-91542375157445097552016-06-25T00:25:00.003+07:002016-07-17T21:20:44.042+07:00Arduino : Controlling PL9823-F8 RGB LED<div style="text-align: justify;">
I have great passion about electronics since I was in middle school then high school. With some of my school friend that has same passion in electronics, we built radio transmitter so we can communicate each other at anytime. It was so cool back then. Thats why I took study on electrical Engineering. Instead of working on Electrical engineering field, I end up become web programmer. Something I found interesting when i was in college.</div>
<div style="text-align: justify;">
<br /></div>
<div>
That's old story. But lately I get bored and try to get another hobby. I have many hobbies and creating electronics stuff is one of it.</div>
<div>
<br /></div>
<div>
So I bought my self Arduino Uno and few electronic components to get started learning Arduino programming. So my first project is controlling RGB Led. Here what you need:</div>
<div>
<ol>
<li>Arduino Uno with usb data cable and Arduino IDE</li>
<li>Install Adafruit Neopixel library</li>
<li>3 PL9823 RGB led</li>
<li>Breadboard</li>
<li>Jumper cables (mostly male to male)</li>
</ol>
</div>
<div>
First you need to install Arduino IDE. You can download it <a href="https://www.arduino.cc/en/Main/Software" rel="nofollow" target="_blank">here</a>. That would depend on your operating system. I have Mac OS X version installed. Here what we have after installation.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHUCvTef0OsV4e8DdirfiBFTPjUmNcbxg-3jmaLjULos-jC478k8B9qzw4pAUtWv-uKdhdMJi6dtEODmsP71NDsWHO5jt1SX6YdrJUhNk9jBKyOnxM8lC62-9OrPrWObfLvb-J/s640/arduino-ide.png" width="512" /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Install Adafruit Neopixel library. From <b>Sketch > Include Library > Manage Libraries</b> and click install then restart IDE. You will need internet connection to do it.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="385" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLv-pgU9ewXDvMjgR7kG9mu2zf12BLrAfBz6ohFxgDT38rJjwmLEX_NGoE857aR7V_z9LVtCikdWJppZM88SKUs7M7pUtUykVAOyV9e5R0CgmCfihnQeUKmtjaO7PBrCOrEVO8/s640/arduino-library.png" width="640" /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
For RGB led, I use PL9823. Download the datasheet <a href="http://www.led-genial.de/mediafiles//Sonstiges/PL9823.pdf" rel="nofollow" target="_blank">here</a>. Make sure you have correct pinout connected to each other and power source. If not you will burn your LED and not usable anymore. Below is correct pin according to datasheet.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgThKl8OOZvuhX5NGL8rDWZ1Opu_ms7xXQ4wSQOZNys215f989Rc4-XuNNQEE2WZt3AvBMZno3qsr0wlSx8ZZIQKr32yqyPg-uHdkdZ4XQi4FyuHdTwW5DFopWxHxD7Kugm8x6k/s320/pinout.png" width="189" /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Check the breadboard wiring below.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="432" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifY6z6twrbFb4VQ0Q_JwhvFqlq01MNY23URuyU6g3PzF9-GJ9-hNMgrwuSFAFLIjHS2xVfWXL2vXWF7CeJuDUWBAd4TvJFjA3RMkwz_Qt_lkrV98H7LLZzDMvE3cTML27v6lUN/s640/pl9823_bb.png" width="640" /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
These RGB led are common cathode. Which mean the long led pin will be connected to ground. DIN first led connected to pin 6 Arduino digital output pin. Then DO will be connected to another DIN led and perform led strip. </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Power up your Arduino by inserting the USD cable data to the computer. Configure port and board type. Download my sketch for this <a href="https://github.com/satujamsaja/Arduino" rel="nofollow" target="_blank">here</a> then run and upload to Arduino.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<br />
Here is the demo:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/O126V8htGVs/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/O126V8htGVs?feature=player_embedded" width="320"></iframe></div>
<br />
Interesting right! I'll upload and post another article of my learning on Arduino. Good luck and Happy hacking!
<br />
<div>
<br />
Resources Link:<br />
<ol>
<li>PL9823 Datasheet: <a href="http://www.led-genial.de/mediafiles//Sonstiges/PL9823.pdf" rel="nofollow" target="_blank">http://www.led-genial.de/mediafiles//Sonstiges/PL9823.pdf</a></li>
<li>Adafruit Neopixel Library: <a href="https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library" rel="nofollow" target="_blank">https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library</a></li>
<li>Adafruit Neopixel Library Github: <a href="https://github.com/adafruit/Adafruit_NeoPixel" rel="nofollow" target="_blank">https://github.com/adafruit/Adafruit_NeoPixel</a></li>
<li>Sketch File: <a href="https://github.com/satujamsaja/Arduino/blob/master/pl9832.txt" target="_blank">https://github.com/satujamsaja/Arduino/blob/master/pl9832.txt</a></li>
</ol>
<div>
<br /></div>
</div>
Deni Saputrohttp://www.blogger.com/profile/01350628689977610014noreply@blogger.com0