Introduction: Simple Ambient RGB LEDs Lights With Visuino.
This little project is just something that was floating around in the back of my head for about 9 months and I can share it now, that I have a clear path to follow.
Should be relatively inexpensive to put together, here is what you'll need:
- Some sort of small Arduino type board, like a Pro Mini or a Pro Micro.
- A few Neo-Pixel type RGB LEDs on just single PCBs
- About 6' of some wire, I used network cable that I salvaged, it has 8 strands and I only used a few of them.
- 2 to 6 ping pong balls, from your local sporting goods store.
- A few Male to something jumper wires, if you want to test your progress along the way.
- Visuino and the Arduino IDE
Soldering Iron, solder, diagonal cutters, wire strippers, hobby knife, hot glue gun, and USB cable for programming the Arduino.
Step 1: Setting Up for Testing...
First, I wanted to test a single pixel with my board. So, I cut off the ends of a jumper wire, that are used for breadboards. Next soldered the 3 of them to one pixel.
Picture 1 shows the the connections. Orange is V, Yellow is the Data and Blue is GND
The Neo-Pixels and compatibles require 5V power, so, you should look for the 5V - 16MHz version of the Pro Mini or the Pro Micro. I tested the the Micro, due to the ease of connecting and uploading, the final version will be a Mini, because they are cheaper and I have more of them on hand. Also, of note if you are only driving about 2 to 4 of them you shouldn't need an additional power supply.
Picture 2 shows the connections on the Pro Micro side of things. Using Pin 2 for the Data.
Step 2: Testing and Setting Up...
So, I started testing a Visuino sketch with some simple components, first.
I added a Neo-PixelColorGroup.ColorPixel and then a Random Color Generator and a Clock Generator. Here, in Picture 2 you can see those components hooked up and this video shows the result. For my little mood ambiance RGB, that was going a little too fast and while I could slow it down it was still a little bit choppy for my vision of this.
For this test, I finally got some ping pong balls and then just cut an almost square hole, with a sharp hobby knife, but it had a rough edge on the last side I cut. Picture 3 shows the irregular cut-out, but I plan on hot-gluing it to the pixel PCB, so the odd shape won't show.
So, when you go to cut out the square hole, you want to line up the pixel and guess where to trace out the hole and just mark it with a fine/sharp pencil. [I use mechanical pencils for this kind of work, 0.5mm] As seen in Picture 5. Then just start scoring the surface with the knife until you get almost through, then carefully stick the point in and gently cut upwards so the piece doesn't fall into the ball. Picture 6 shows it placed into the hole, you might need to trim it a bit bigger so it fits in snuggly.
Step 3: Soldering Up the Pixels...
For the wire lengths here I choose them based on the width of my desk cabinet, which is about 3 feet. So, I cut my wires in half and will use the remaining amount to place the Arduino board so it is easily accessed.
When soldering these up, it's important to only have the iron on the pads for a minimum amount of time, about 3 seconds is normal and try not to exceed this without letting it cool down in between. In Picture 1, I first just added solder blobs to each pad on the DIN [data in] side of the first pixel. Then after letting it cool for about a minute, I apply the iron to each blob to add the wire to it. In Picture 2 you can see this is the finished result and I wrapped the 4th wire around the others to keep them in place while I soldered them.
Picture 3 shows the second pixel with the blobs of solder on the DOUT (data out) from the end, and this time I started on the DOUT [data out] and added the wires from the last pixel to it. Then in Picture 4, you can see the second pixel with both ends wired up.
Now we can hot glue the pixels to the ping pong balls. Pictures 5 & 6 show the hot glue, I tried to put it in the 'corners' so it would be the most stable.
Step 4: Setting Up the Sketch in Visuino...
So, in this first Visuino Step you'll need to open Visuino or Download it from here: Visuino.com and install it per the on-screen prompts.
Next, in the main window, you'll need to select the Arduino compatible boards that you will be using for this project. Picture 1 shows that I have the Pro Mini selected then click "OK"
Then you will want to to go to the Search box in the upper right-hand corner and type in 'clock' then select and drag the Clock Generator (Picture 2) and drag to the left of the Arduino board and space it away from it, as shown in Picture 3. The Clock generator will 'tick' the next component by whatever valuer we give it. So, next go to the "Properties" and find the "Frequency" option and type in, "0.1", (Picture 4) which will tick once every 10 seconds. This value can be changed later as you see fit.
Next, search for 'random' in the same search box above the components sidebar, (Picture 5) and find the 'Random Color' component (Picture 6) and drag it to your main window just the right of the 'Clock' component. See Picture 7 and connect it by dragging from the "Out" pin to the "Clock" pin on the 'Random Color'
Step 5: Setting Up the Sketch in Visuino... [continued]
Now well, continue adding the rest of the components, so search for 'Ramp' and drag, 'Ramp to Color Value'(Picture 1) on to the workspace to the right of the 'Random Color' that we just added. In the "Properties" for it find "Slope" and change it to "0.5" (Picture 2) this will be a gentle transition between the changes of colors. Then connect the "Out" to the "In" on the 'Ramp' component, please see Picture 3. This is optional, but I changed my Initial color to Purple, from the drop-down for "Initial Value"
Step 6: Setting Up the Sketch in Visuino... [continued With the Neo-Pixel Addition]
Next up is the Neo-Pixel component, search for "neo" and they'll be only one option here, Picture 1, so drag it down in between the 'Ramp' and the Arduino board. Now, double-click 6on it to bring up the "PixelGroups" window, and on the right-hand side find and double-click on 'Pixels'. (Picture 2) Now, 10 pixels will be added by default, but we'll change that now to 2, so with that window still open, go over to the "Properties" box and change "Count Pixels" to 2, see Picture 3. Now you can close "PixelGroups" and drag two connections from 'Ramp Out' to Pin  and  on the NeoPixel. See Picture 4. Then you can drag the final connection from the 'NeoPixel' to Pin B, in my case, on the Arduino Board, as in Picture 5.
Now upload your sketch via the F9 Key in Visuino and then upload to the board from the Arduino IDE with CTRL+U. Then you'll have a working version of this project too.
Step 7: Completion Video and Finished!
Play around with it, to see what else you can add to enhance this sketch, then let me know in the Comments.