Candle with remote control and Arduino Pro Mini

Here I present another project based on a addressable LEDs strip, based on WS2812b leds.

It consists of an 'electronic' candle, which lets you select set colors, adjust the intensity, and have different effects like rainbow, fade and fire. The project arose from the purchase of an IKEA lantern model BORBY ... the idea was to replace a candle of considerable size, for something more ... modern.

Candle with remote control and Arduino Pro Mini

Thanks to Neopixel strip LED (for more on these strips, you can see the previous post ), the circuit is very simple and only consists of an Arduino Pro Mini  (so that it can be hidden inside the 'fake' candle), a piece of addressable LED strip (5 leds in my case), a infrared receiver TSOP1738 (the TSOP1736 works well), a resistance of 330 OMHS, an electrolytic capacitor 4.7uF, a small switch and a battery holder.

This is the scheme:

Scheme  Candle with remote control and Arduino Pro Mini

For the candle I used a pot sweetener a known supermarket ... then I've dropped wax on top to give the desired look.

Candle with remote control and Arduino Pro Mini

The circuit I have mounted on a small prototyping board, attached to the battery holder

Circuit Candle with remote control and Arduino Pro Mini

The code

The program is based on the IRRemote libraries for remote and Adafruit Neopixel for LED strip.
The program executes a loop in which it reads the code on the remote control, and depending on these changes the status of the LEDs.
Should be noted that you need to use some delays and make several calls to the routine that reads the code to allow time to 'catch' the time just press a button on the remote.
Of course you could leave fixed the candle effect and would not require or remote control or receiver ... but would be more boring.

Here I leave the videos:

You can download the code here:

If you liked it, remember to share it on your favorite social network. Thanks

Kaleidoscope with Arduino and RGB LED strips

I present a new Arduino project: a Kaleidoscope (or something similar), with a list of the simplest materials.
You can see the result in the video. It can be used as decoration in a living room or as decoration for the baby's crib. The baby will be surprised ... Very relaxing if it accompanied  with Chill out music .
Thanks to the advent of addressable LED strips,  is extremely simple (and cheap) to create projects with multiple RGB LEDs.
These strips contain small RGB leds. Each led is accompanied by a WS2812 circuit capable of controlling an RGB LED with 256 levels for each color.
In the previous post (Christmas Tree shield for Arduino) I talk about the benefits of these chips
The strips have three connections +5 V, GND and data input (DI). Be careful because in the strips is indicated the data flow, the data must enter through DI and exit through DO (on the opposite side). To connect a strip piece with another, connect the DO of the first with the second DI.
The strips can be cut with simple scissors through the mark

The assembly is very simple, just a strip of LEDs 60 leds / m cut into 12 parts of 5 leds each, and mounted on a piece of PVC (forex). The strips are adhesive, so it is very simple.

Caleidoscopio con Arduino y tiras de leds

A sheet of opal Plexiglas handles diffuse the light of the LEDs and enhance the effect.

Caleidoscopio con Arduino y tiras de leds

The circuit is so simple it does not need schema ... just an output pin of the Arduino connected to the input of the strips (DI), and of course, the power supply (GND and 5V).
The code performs a series of symmetric random patterns to simulate the operation of a kaleidoscope.

You can download the code here: 

If you liked it, remember to share it on your favorite social network. thanks

Arduino Xmas tree Shield with WS2812

Christmas comes, and nothing more typical than riding a Christmas tree to give a bit of atmosphere. They come in many types, but this is intended for the most geeks, based on state of de art RGB LEDs and thought to 'planting' directly on an Arduino.

The scheme can not be more simple: an Arduino, 20 addressable LEDs WS2812b, few 100nF and a piezoelectric buzzer.

Arduino Xmas tree Shield with WS2812

The WS2812b are cascaded through a single wire, so that communication with Arduino is extremely simple, only one pin, the data are passed from one circuit to the next, and this enables each LED can be controlled independently. This creates strips or arrays of RGB LEDs easier than ever.
The WS2812b think without exaggeration that is a real gem. Internally includes three LEDs (R, G, B) and an integrated circuit WS2811, which is responsible for handling the data put a single pin, and send the next control each led with 256 levels of intensity.
Here you have a couple of photos I could do the above:

Arduino Xmas tree Shield with WS2812

Arduino Xmas tree Shield with WS2812

Warning! There is another version of the WS2812 equal to 6 pin WS2812b but in the power of the LEDs and the circuit are separate.
Given the boom have had, it is easy to find on ebay  in adhesive strips where only the input pin and the supply must be connected or loose as in this case.

For operation of the LEDs, I use a great library: Adafruit neopixel, can easily handle this type of LEDs.

The code

As I already mentioned, I use the Adafruit library to control the LEDs. Basically is the example 'strandtest' of the library, to which I added a first half in which the tune of 'Jingle Bells' is played using the tone function, and some more effect.
In case you do not want to constantly hear the melody, you need to make a bridge between pins 2 and 7 to ring.

This is the PCB design I've done:

PCB of Arduino Xmas tree Shield with WS2812

Although theoretically requires a bypass capacitor of 100 nF for each LED, I've put a few scattered around the circuit (if any LED gets lost in a given time and not think it will be very serious), so far I have not seen no failure.


You can download the code, the PCB and the schematic here: 

Project Photos HERE

Merry Christmas!

If you liked it, remember to share it on your favorite social network. Thanks

The SD structure

In this post I'll try to explain a little the code of  our 'Jukebox' Arduino hearted .
The main problem I found for this project, was the limitation SD library, with reduced FAT which only allowed the names in 8.3 format.
The solution was to create a small catalog in a text file from which to read the entries.

The directory structure on the SD has the following format:
 |   +-album.txt
 |   +-[ALBUM01]
 |   |   +-track.txt
 |   |   +-track001.mp3
 |   |   +-track002.mp3
 |   |   .....
 |   |   +-track0nn.mp3
 |   +-[ALBUM02]
 |   .......
 |   +-[ALBUMnn]

This means there are three levels: artist, album and track. Each level has a text file with the catalog entries (a line of text for each artist, album or song).
The names of the folders and files must be such as are in the scheme (you can always change the code).
It's a bit cumbersome to create the card, but ... worthwhile. I used a program that makes it much easier MP3Tag, enabling export to text tracks of a directory and rename mp3.

I present this new Arduino project: A full MP3 player based on Arduino.
As you can see in the photo, the idea was to build a standalone player, in the style of antique radios or 'tapes', in the age of Iphones ....
The player uses a small module based on the VS1002d chip (now discontinued, but who had a drawer). The module in question I bought at  Futurlec . Currently you can get similar modules on ebay for a bit more than 10$, although the chip is the VS1003 o VS1053. You can also use a SparkFun MP3 shield, but significantly more expensive (this shield already includes an SD slot).
The three chips are quite compatible in terms of programming, and indeed almost all initialization the I have taken from the library to the SparkFun MP3 Shield ;-)

<< Arduino light organ (II)- The circuit

WARNING: In this part is used mains voltage, which can carry risks. If you do not have enough experience or not you think trained, best uses few leds low voltage and evitate a scare. The author is not responsible for any damage caused by not taking proper security measures.

For the power stage I used  triacs of type BT137 controlled by optocouplers MOC3041. Depending on the power you need to control, you can change the type of TRIAC less powerful one (or more ...).

The optocouplers MOC3041 internally contain a control circuit for triggering the zero crossing, the triac is always close to zero voltage pass avoiding interference.
You can use other types of optocouplers respecting the circuit recommended by the manufacturer.

The scheme:
Power stage for Arduino organ light

And this appearance when mounted (in my case the stage is 4 channels)

Power stage of Arduino light organ

Note that a box is mounted on suitably isolated. The heatsinks are Triacs for high continuous loads (in this case support 8A, allowing about 1500W per channel).

The result:

Have fun ....

<< Arduino light organ (I) - Introduction             Arduino light organ (III) - Power stage >>

Obtaining the signal

As I mentioned in the previous post, in my case I am going to use a microphone as a signal source, this eliminates the need to connect directly and provides more freedom of movement.

I've used a Dealextreme module, the SKU: 135533, a sound detector module with digital output and analog. Here we use the latter.
As the level of the signal delivery is very small, I used an ancient u741 (but functional) that had a drawer, to adjust the input signal to the Arduino.
It is also possible to directly use an electret microphone, but we have to amplify it properly (you can find plenty of schemes on the internet), or use a module, and amplified as this

The scheme: (click images to enlarge):

Arduino light organ scheme

And the assembly:

Arduino light organ assembly


Search in this blog


Popular Posts

Versión española

Versión española
Arduino es Guay!!

Follow in Facebook

Powered by Blogger.