Yes, this is perfectly safe providing you follow AC line rules. Put the charge under the PIC's control. The best way to charge NiCd cells is intermittent constant current. That is, charge them up, let them discharge, then charge them again at a constant current. This is much better for the cells than trickle charging them. A 1C to 2C charge rate is good. You will need to monitor the cell voltage to know when they need to be charged. You can also use that same circuit to turn off the charge when they are full. The voltage peaks, and starts to come down again when the cells are fully charged. Adding a thermistor to your circuit will also give you the ability to turn the charge off when they get too warm. There are a lot of techniques and a lot of misinformation out there on NiCd charging. Have a go at it! Andy At 10:21 PM 11/16/02 -0500, you wrote: >I am currently working on a night light that measures light levels and when >it is dark it turns on some super bright LEDs. The device is actually >working according to my original design, but now I want to make it better. > >The device includes a 16F628 and runs off of two C batteries. It also >include a 555 timer, a photocell, and two LEDs. > >My new idea is to add a socket to charge the two NiCd batteries in the >device. I thought I could add a little jack and when the batteries run low >I can just plug a cord in to the side of the device and the batteries will >charge. Now I am not sure about two things: > >1. If the charger is contained in a separate box and simply plugs in to the >original circuit, is it safe to leave the PIC and the rest of the device >running? >2. What is the best way to charge NiCds. Do I want to use a processor like >the 16F628 which is already incorporated, or should I just use a circuit >that has been designed by someone else? > > >Thanks for your help, >Marc > >-- >http://www.piclist.com#nomail Going offline? Don't AutoReply us! >email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > ------------------------------------------------------------------- Race Boats - andy@RC-Hydros.com http://www.RC-Hydros.com Airplanes - andy@FlyingHobbies.com http://www.FlyingHobbies.com Electronics - andy@MontanaDesign.com http://www.MontanaDesign.com ------------------------------------------------------------------- -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu