ChronoArt sells a very nice BKC for $179 that I would like duplicate using the Arduino Uno, with 7 random colors using RGB leds, tones Due to the construction of the clock face, each binary number would require 4 leds in unison except for the binary 1 for a total of 13 leds. I would like to use the Chronodot RTC and be able to set the time. This would require some "machine state" logic for a streamlined flow. I have found Chronodot, RGB random color, and machine state sketches, that I think could be set up as functions, to be called by a main Binary Clock sketch. I'm not sure how the multiple RGBs on each pin would be handled. Can leds be wired in parallel ?? This may be a tall order, but with help I hope it can be done. Here is an image that explains the concept more fully:
Well, it could be done, but will require some circuitry external to the Arduino.
It isn't just 13 LEDs. It's 13 RGB LEDs, for a total of 39 LEDs, (3 LEDs per RGB Led).
So here's the problem. If you want to only turn Each LED ON or OFF, limiting yourself to 8 possible combinations of colour (including all off), you can use 13 pins to do it. These would be digital pins, and each pin would control 1 of 3 LED colours per group (a group would be 1 binary bit out of 4 values 1, 2, 4, and 8). If you drive up to4 LEDs with 1 pin, You could control on/off for all your LEDs using 13 pins.
The bad news is that in order to control the brightness of each LED, increasing your range of colours, you will need to use PWM pins, and there are only 6 of them on the Uno.
Fortunately, there are 15 PWM pins on the Mega2560.
In order to drive 4 LEDs per pin, you will need to employ some external circuitry. You can use a transistor with sufficient current capability to drive 4 LEDs in parallel. You will also need to choose your current-limiting resistors carefully, as the Red, Green, and Blue LEDs take different voltages, but that's a minot matter.
Thanks. I just ordered a Mega2560, which will eliminate the PWM pin problem. When I get into the meat of this project, I will be back for help with coding problems. Thanks again.
Another option would have been a tlc5940 led driver chip, which could have been driven by an uno, or even an ATtiny85!
The advantages would have been would be no need for driver transistors or current limiting resistors. The chip could easily drive 4 leds in parallel on each of its 16 channels and has built-in current limiting.
PaulRB:
Another option would have been a tlc5940 led driver chip, which could have been driven by an uno, or even an ATtiny85!
The advantages would have been would be no need for driver transistors or current limiting resistors. The chip could easily drive 4 leds in parallel on each of its 16 channels and has built-in current limiting.
I wondered if there was a low chip-count solution! Thanks for the pointer. Just ordered 5 of them and 50 RGB LEDs. Got a little project in mind.