On Sat, 27 Feb 1999 10:27:26 -0700, you wrote: >First of all, thanks for all the help in the past on other projects. > >I am building a unit that must be powered by batteries. >The thought is to use 3V camera batteries. >The unit is desired to run for months on one battery set. > >The unit passes a beam of light through a clear plastic tube. >When the material inside the tube blocks the light, a 3 volt relay >is activated momentarily. The relay requires 1 amp. >Because of the material being sensed, the beam must be in the visible range. > Right now a CdS cell is being used. >The CdS cell is slow. (response is around 10 milliseconds) >It looks like the LED could be a major power sucker. >I am trying out the idea of charging a capacitor and dumping it across the LED. You'll need a big cap to supply the pulse to the relay (as you won't want to cause a brown-out on the battery supply when it fires), watch the leakage spec on this. Do you really need a whole amp for the relay? That's a pretty big relay. Have you considered a solid-state output, or a latching relay ? > >The sample rate is 3 times per second. >For each sample, the idea is to turn on the PIC, the CdS circuitry, pulse the LED, read >the resistance of the CdS cell, maybe do some calibration, determine if the relay should be pulsed. >the relay will only be pulsed a maximum of 5 times per day. Then turn everything off. > >Questions > >1) What could be used to economically switch power to the relay? Transistor or mosfet, base current & voltage drop shouldn't be too significant compared to the relay current for a transistor. If you use a mosfet, watch the gate voltage spec carefully - you'll have a hard time finding anything below about 2.7v, but you could use a simple (software clocked) charge-pump doubler to drive the gate - this would probably be the best solution at 3v. >2) Is 3 volts going to work as the supply voltage (especially since the >voltage will decline as the battery is discharged) Would a higher voltage be better? 6V would give you more headroom & make things a bit easier (e.g. driving a mosfet switch), but 3V should be do-able. Camera batteries would be a pretty good choice for this app. >3) Is there a clever way to reduce the on-time of the LED? >If I had a faster sensor (in the visible range), I could shorten the >LED on time. Is there a low power source-sensor pair for visible >light? Clever ideas on reducing the power required for sensing? If you use a phototransistor, the 'on; time should only need to be a few uS - connect the LED and the phototransistor's pullup resistor to the same pin to power them both at the same time. >4) Any cool suggestions on power management? Use the WDT to wake up from sleep mode - doesn't sound like the sample time is too critical. back-of-an envelope calculation of power consumption : PIC in standby (sleep, WDT on) = 30uA PIC @ 1mA on for 1mS, 3x per second = 3uA Led @ 10mA on for 10uS = 0.3uA relay @ 1 sec, 5 times a day = 50uA Round it up to 100uA, a 2CR5 6V camera battery @ 1300maH gives 13Khours, = 540 days call it a year to be on the safe side. Remember you may be able to use a higher voltage (= lower current) relay with a 6V supply. Also battery contact resistance (e.g. due to corrosion etc.) will be less of an issue at 6V.