Hello Tom,
Tom>>I would like to make a really simple thing happen. I'd like to have a PIC control an on-off switch for a battery operated fan. The power switch on the fan is simple, it simply completes the circuit to power the fan from 4xAA batteries (~6V).<<
Many ways to do this...Depending upon the current... a simple Transister will do this for you... If more current is needed, purchase a N or P type Mosfet... then your PIC can "Tickle" the gate (like the base of a transistor), and pesto... Mosfets are CHEAP, and they can carry 12 amps of current... They can carry about 2 amps without a heat sink. I can't remember the cost of them... but I am guessing about 1.00 a piece
Tom>>Question is - how do I link an output pin of a PIC to some device which can switch this on and off. I've never used a relay, but suspect that might be what is needed? Is there anything simpler given the relatively low voltage and amperages?<<
Relays that will work perfectly with your PIC can be found at All Electronics... for about 50 cents a piece. Your max current on your PIC leg is 20 mills. Voltate is 5 volts, Thus you can choose the correct Relay quite easily...(if you go relay method).
Mosfet is also really nice...just as easy...tickle the gate, it acts like a relay... put a heat sink on it, and operate 12 amps through it.
Tom>>What if I wanted to turn on a household light?<<
Use a Relay or Triac...
Tom >>I think the PBP command might be the same as turning on or off an LED, but rather than an LED going HIGH or LOW it would be this exernal device which controls the power to the other device?<<
Absolutely correct...
Try a relay...and turn a light on and off via a relay (a diode will be fine).
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks