Sunday, June 1, 2014

Kaleidoscope with Arduino and RGB LED strips

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).

Kaleidoscope with Arduino schematics


The code performs a series of symmetric random patterns to simulate the operation of a kaleidoscope.



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

27 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. I saw this posted on hackaday. I've been working on a 'duino clone that is just for projects like this, where we need to embed an Arduino but have to use a breadboard or protoboard for connections. Would love to hear your thoughts on my 'duino which includes the VCC/GND pins for each signal pin. https://hackaday.io/project/2991

    ReplyDelete
  3. could you pls post a picture of the schematics and or a picture of the underside of the kalediscope with all of the wiring

    ReplyDelete
  4. @Anonymous
    OK, I have included a small schema in the post... schema

    ReplyDelete
  5. I was thinking of doing this for my engineering 12 project, and i was wondering if this could be sync'd to the beat of music

    ReplyDelete
  6. HI Jose,

    I came across this project while doing a search for beginner Arduino projects. Many blogs were referencing this and I am very interested in doing your DIY for this for my one of my first Arduino class projects. I would be using the Arduino Uno for my project. Do you see any problems with using the Uno for this? I see that you used an Arduino Nano/Mini but I am unsure how the wire configuration would work for the Arduino Uno. Also, what are you using/recommend using for the power source? I am trying to figure out what other hardware I need to order. Any help that you can give on this is greatly appreciated and I am happy to share my results with you for your work and give you credit as well.

    ReplyDelete
  7. @BBrush
    Hello

    It can work with Arduino one without problems.
    You only need a digital pin (7 in the code).
    For this project you can use a power supply (7-12 V), or directly feed by USB.
    The positive of led strip is connected to + 5V Arduino.

    ReplyDelete
  8. Hi,

    Does it work with an arduino pro mini?

    ReplyDelete
  9. @AnonymousOf course, the project is done with it.!!

    ReplyDelete
  10. good day you have a project to work with WS2811 via DMX

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete
  12. how can i make a bigger one with more led's 15 instead of 5

    ReplyDelete
  13. @chetana rao
    In the scheme not to do anything except add more LEDs.
    In the code .... you'll have to make some changes.
    1) Change 60 for the total number of leds
    2) Check where it appears 0,4 ... will surely be 0,14 (Random)
    3) Experiment and have fun

    ReplyDelete
  14. Hola Jose!
    ¿Este proyecto se podría hacer con una Tira Led smd 5050 12v?
    ¿Crees que tendría que cambiar mucho código? ¿Cómo sería la parte de hardware? Si puedes hacerme un esquema para entenderlo... te lo agradezco muchísimo!
    Un saludo

    ReplyDelete
  15. @Anonymous
    Hola
    Este proyecto se basa en que cada led se puede controlar individualmente gracias a los Neopixels.
    Si utilizas tiras de las normales RGB, no podrás cambiar el color de un led , sino de toda la tira.
    Además el código es muy diferente por que tendrías que controlar los tres colores R,G, y B por separado.
    Para el circuito, las tiras son de 12V, por lo que necesitas o bien transistores, o bien un UNL2003 por ejemplo para poder controlarlas.
    Mira por ejemplo este esquema Arduino RGB led manejado por control remoto

    ReplyDelete
  16. Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Nano, ATmega328"

    Using library Adafruit NeoPixel in folder: C:\Program Files (x86)\Arduino\libraries\Adafruit_NeoPixel-master



    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs -IC:\Program Files (x86)\Arduino\libraries\Adafruit_NeoPixel-master C:\Users\chinmay\AppData\Local\Temp\build7997323262829074639.tmp\Caleidoscopio.cpp -o C:\Users\chinmay\AppData\Local\Temp\build7997323262829074639.tmp\Caleidoscopio.cpp.o

    Caleidoscopio.ino: In function 'void setPixel(byte, byte, uint32_t)':
    Caleidoscopio.ino:17:7: error: 'strip' was not declared in this scope
    Caleidoscopio.ino: In function 'void rotar4()':
    Caleidoscopio.ino:67:16: error: 'strip' was not declared in this scope
    Caleidoscopio.ino: In function 'void avanzar4()':
    Caleidoscopio.ino:76:27: error: 'strip' was not declared in this scope
    Caleidoscopio.ino: In function 'void rotar3()':
    Caleidoscopio.ino:85:16: error: 'strip' was not declared in this scope
    Caleidoscopio.ino: In function 'void avanzar3()':
    Caleidoscopio.ino:94:27: error: 'strip' was not declared in this scope
    Caleidoscopio.ino: In function 'void clear()':
    Caleidoscopio.ino:102:5: error: 'strip' was not declared in this scope
    Caleidoscopio.ino: In function 'void setup()':
    Caleidoscopio.ino:111:3: error: 'strip' was not declared in this scope
    Caleidoscopio.ino: In function 'void loop()':
    Caleidoscopio.ino:123:3: error: 'strip' was not declared in this scope
    Caleidoscopio.ino: In function 'uint32_t CicloColor(byte)':
    Caleidoscopio.ino:145:11: error: 'strip' was not declared in this scope
    Caleidoscopio.ino:148:11: error: 'strip' was not declared in this scope
    Caleidoscopio.ino:151:11: error: 'strip' was not declared in this scope
    'strip' was not declared in this scope


    Getting this error how can i solve this ??

    ReplyDelete
  17. This comment has been removed by a blog administrator.

    ReplyDelete
  18. Hey, I would like to do this project but with less Leds (say like 5 strips of 8) but I'm a bit unsure of how to change the code to achieve this?

    ReplyDelete
  19. Very Exciting Project, How to do it with Arduino UNO R3, by atmega328
    How to change the software for errorless compilation
    Uttam

    ReplyDelete
  20. Fantastic! This is exactly the effect I'm trying to create for a theatre prop. It's my first project with Arduino, so I hope I can pull it off. Thank you for posting.

    ReplyDelete
  21. Hello, Im having problems loading the code into my arduino uno and it gives me the error message

    compilation terminated.
    exit status 1
    Error compiling for board Arduino/Genuino Uno.

    what can I do to make it work? Im new to this sorry.

    ReplyDelete
  22. This comment has been removed by the author.

    ReplyDelete
  23. Thanks for posting this project. I really enjoyed constructing it.

    Mo

    ReplyDelete
  24. Hi,
    very nice project,
    But why can not I select an ESP8266 01 controller?
    That is smaller and cheaper!

    Thank you and best regards
    erich

    ReplyDelete

Note: Only a member of this blog may post a comment.

Arduino Chromatic Clock, with Steampunk style

Arduino Chromatic Clock, with Steampunk  style Need a unique gift for Christmas? ... This watch unlike normal, uses colors instead of...