family alarm clock project II

We are making progress on our alarm clock / boom box project.  Eli soldered the 220 ohm resistors to the cathodes of the LEDs for the hours and Addy soldered the common ground wire to the resistors, hot glued them to the clock face, and tested them with a 6V battery.  I re-purposed an old POW3U prototype board for the 10 74HC595 shift registers we will need for the LEDs (they hate when I help!).  We put together what we have of the cabinet so far, and it looks pretty cool.  Not only that, it THUMPS!  Tested it with Wildflower from The Cult.  The kids are more enthused with seeing the progress.

The PCF8523 RTC breakout came in.  I downloaded the RTC libraries from Adafruit and ran the example scripts.  I am very impressed.  I will definitely buy more for other projects.  I connected it to an old CHIP pro I have and experimented with it just using i2cget commands reading the different registers and it seems to be an easy , straightforward RTC IC to use.  It is really coming together.

array of 74HC595 shift registers to drive our LED clock on a POW3U prototype board
array of 74HC595 shift registers to drive our LED clock on a POW3U prototype board
alarm clock / boom box cabinet front
alarm clock / boom box cabinet front
cabinet back view with sub woofer

using pine64 gpio to control a 120VAC light bulb

I’ve used gpio on various SBCs to drive small signal relays  on a few projects, but never any high-current, high-voltage stuff.  The principle is exactly the same, I just hadn’t used it before.  The elegoo 37-sensor kit I just got had a handy break out board for a 10A 250VAC relay.  I used a gpio line on a pine64 to drive the relay coil using a PN2222A transistor circuit.  The script is no different than blinking an LED.

pine64 gpio driving a 10A 250VAC relay circuit using a PN2222A NPN transistor to provide ground

 

 

pine64 turning on and off light bulb
perl script for pine64 relay control

Next, I controlled the relay by reading the voltage drop across a photo resistor voltage divider using an MCP3004 10-bit ADC.  When the OP code from the ADC rose above 400, the light comes on (because it is dark).

Controlling a relay by reading the voltage drop across a photo resistor using an MCP3004 ADC
Controlling a relay by reading the voltage drop across a photo resistor using an MCP3004 ADC

family alarm clock project

Eli, Addy, and I are working on an arduino-based LED alarm clock project.  The design is totally Eli’s idea.  He wants 60 LEDs around the face of the clock for the minutes, and 12 LEDs on the top for the hour.  We gutted the audio system from one of their old gaming chairs that got tore up, and are using it for the sound.  I ordered a PCF8523 real time clock breakout board from adafruit to keep time, and are going to use a 5V 16MHz Trinket Pro for the brains. With over 72 LEDs to drive, we plan on using 10 74HC595 shift registers.  We are also going to use a 16X2 LCD display to show the time and maybe temperature.  So far, Eli has cut all the pieces out with a jig saw and he and Addy drilled all the holes for the LEDs.  Eli soldered a 220 Ohm resistor to the cathode of all the LEDs, and Addy used a glue gun to fasten them to the clock face.  I am new to arduino, so I am experimenting with using it to drive the LCD and the 74HC595’s.

Elegoo Uno driving a 16X2 LCD and 74595 shift register
family LED clock project