Hi guys,
I'm new here, and I do have some electronics knowledge, but mostly limited to digital.
What I want to do is control my Christmas lights from an M16C microcontroller, which is a CMOS device (not sure of the significance of that vs TTL). I live in NZ which has 230V 50Hz mains supply.
I have lots of strings of lights and LEDs which all have the same 8-function control circuit. Photos of circuit board attached. There's some kind of integrated circuit on a daughterboard that reads clicks of the switch and changes the display mode. This daughterboard has 4 outputs, each of which drives a string of about 9 (LED+5Kresistor)s in series via a PCR 406 (Googling PCR 406 is what led me here!).
I've done some reverse-engineering of the circuit, and the 4 diodes at the bottom make up a full-wave (I think) rectifier, outputting about 220V DC. The outputs of the daughterboard are analog 0 - 0.6V, relative to 'ground' (which I guess is in reality is floating up and down +/-230V at 50Hz). 0V = LEDs off, 0.6V = bright LEDs. The output of the PCRs varies between 0V and 220V. The 220V DC supply is also fed out to the light strings. The third attachment on this post is a scan of my schematic.
I have an M16C development system (http://www.renesas.com/fmwk.jsp?cnt...p=/products/mpumcu/m16c_family/m16c60_series/) lying around, and I'm quite familiar with it, so I figure I might as well use it to control the lights. I'll maybe run a serial interface from my PC to it.
The bit I don't know how to do is to interface the M16C to the control board on the LED string.
My plan is to replace each of the daughterboard outputs with a CMOS 0/5V digital output from my M16C microcontroller, voltage-divided to 0.6V using a couple of resistors. That should allow me to turn on/off each string of LEDs from the uC, right? Or are these PCR406 devices controlled by current? In which case, I'd need a resistor/transistor pair in front of each one to provide the current needed? Or is there some other device that does what I want, but easier (and cheaper?)
The M16C board has an LM7805 regulator which can be supplied from a mains-powered wall-wart. Is there any issue with the 'ground' of the uC and the 'ground' of the control board? I guess I need to connect these two grounds together? Or should I not do that because it would blow the circuit boards to bits? Should I run the M16C from batteries instead?
If that all works, I think I'd also like to vary the brightness of the LEDs using PWM controlled by the uC. Is there a problem with this?
Is this feasible?
I'm new here, and I do have some electronics knowledge, but mostly limited to digital.
What I want to do is control my Christmas lights from an M16C microcontroller, which is a CMOS device (not sure of the significance of that vs TTL). I live in NZ which has 230V 50Hz mains supply.
I have lots of strings of lights and LEDs which all have the same 8-function control circuit. Photos of circuit board attached. There's some kind of integrated circuit on a daughterboard that reads clicks of the switch and changes the display mode. This daughterboard has 4 outputs, each of which drives a string of about 9 (LED+5Kresistor)s in series via a PCR 406 (Googling PCR 406 is what led me here!).
I've done some reverse-engineering of the circuit, and the 4 diodes at the bottom make up a full-wave (I think) rectifier, outputting about 220V DC. The outputs of the daughterboard are analog 0 - 0.6V, relative to 'ground' (which I guess is in reality is floating up and down +/-230V at 50Hz). 0V = LEDs off, 0.6V = bright LEDs. The output of the PCRs varies between 0V and 220V. The 220V DC supply is also fed out to the light strings. The third attachment on this post is a scan of my schematic.
I have an M16C development system (http://www.renesas.com/fmwk.jsp?cnt...p=/products/mpumcu/m16c_family/m16c60_series/) lying around, and I'm quite familiar with it, so I figure I might as well use it to control the lights. I'll maybe run a serial interface from my PC to it.
The bit I don't know how to do is to interface the M16C to the control board on the LED string.
My plan is to replace each of the daughterboard outputs with a CMOS 0/5V digital output from my M16C microcontroller, voltage-divided to 0.6V using a couple of resistors. That should allow me to turn on/off each string of LEDs from the uC, right? Or are these PCR406 devices controlled by current? In which case, I'd need a resistor/transistor pair in front of each one to provide the current needed? Or is there some other device that does what I want, but easier (and cheaper?)
The M16C board has an LM7805 regulator which can be supplied from a mains-powered wall-wart. Is there any issue with the 'ground' of the uC and the 'ground' of the control board? I guess I need to connect these two grounds together? Or should I not do that because it would blow the circuit boards to bits? Should I run the M16C from batteries instead?
If that all works, I think I'd also like to vary the brightness of the LEDs using PWM controlled by the uC. Is there a problem with this?
Is this feasible?
Attachments
-
1.6 KB Views: 130
-
2.4 KB Views: 122
-
21.5 KB Views: 204
Last edited: