gmcjetpilot
Member
Intro: 50 yrs old, masters in mechanical engineering, but I've been an electronics and amateur radio hobbyist since I was 10. I have a bench with scope and HP RF gear... plus the usual solder iron, DMM. I use to be a mad FORTRAN (don't laugh) programmer, but have not coded in decades.
So far I skimmed the three PICAXE manuals, downloaded the programmer and played a little with out much luck (I tried the flow chart). I have all the stuff on hand to program a chip and just need to buy a PICAXE-08A (Does Mouser have them? Best place to buy?).
The PROJECT... is to flash two 60 watt halogen lights (about 4-4.5 amps) alternating (50% duty, 90 cpm) AND also have them on both steady, as selected with a toggle switch. As well it should have an OFF position, so three patterns: Off, Steady (both), Alternating.
This is NOT in a car, but the power supply is automotive like, 14 volt DC. No doubt I will need some 5 volt regulator IC's (no big deal, suggestions?).
As far as switching the lights, it must be from the high side, so I am going to use to P channel MOSFETS (FQP27P06) driven by say two 2N2222.... the NPN's will trigger from a high signal and draw the MOSFET gate low to turn them on..... SO FAR SO GOOD.....
There are some more options I would like to explore, but the basic is one switch and three patterns (OFF, STEADY, ALTERNATE). The switch is a light duty (low amp) SPDT (center off) toggle switch. Not sure about what is better to switch with, Hi or Lo signal.... again keep in mind the power system is 12-14 volts.
Now the Questions: Is this even the right chip for this project? I already made a working 555 timer version. I also did it with multi-vibrator RC circuit with two transistors. I think the Microprocessor will simplify the circuit and give me far more flexibility and control.
Does any one have some canned code that I can copy to start with, save some time? Even if it is not exact it will be good to see how others do it.
Can the LOW direct from the PICAXE-08A pull a P-MOSFET down to trigger it direct, with out going through a bipolar signal transistor?
The baseline: OFF, STEADY (both) ,ALTERNATING (both, 50% at 90 cpm or 1.5 Hz), seems to be doable... but how much can I add? I figure with TWO OUT and THREE IN, I can have at least 7 patterns? I will need to use a rotor switch or more than one switch. The other patterns I would like to add to the baseline three is: STEADY (left only), STEADY (right only), ALTERNATING (at faster or slower rate**)
** Is there a way to add a momentary push button to
cycle through choices of ALTERNATING speeds.
Thanks for your help.... I am not expecting detailed help, but I don't want to re-invent the wheel. It seems like all this is doable from what I read. The coding will be the trick of course. Is there a good book or database on existing code to look at for ideas?
So far I skimmed the three PICAXE manuals, downloaded the programmer and played a little with out much luck (I tried the flow chart). I have all the stuff on hand to program a chip and just need to buy a PICAXE-08A (Does Mouser have them? Best place to buy?).
The PROJECT... is to flash two 60 watt halogen lights (about 4-4.5 amps) alternating (50% duty, 90 cpm) AND also have them on both steady, as selected with a toggle switch. As well it should have an OFF position, so three patterns: Off, Steady (both), Alternating.
This is NOT in a car, but the power supply is automotive like, 14 volt DC. No doubt I will need some 5 volt regulator IC's (no big deal, suggestions?).
As far as switching the lights, it must be from the high side, so I am going to use to P channel MOSFETS (FQP27P06) driven by say two 2N2222.... the NPN's will trigger from a high signal and draw the MOSFET gate low to turn them on..... SO FAR SO GOOD.....
There are some more options I would like to explore, but the basic is one switch and three patterns (OFF, STEADY, ALTERNATE). The switch is a light duty (low amp) SPDT (center off) toggle switch. Not sure about what is better to switch with, Hi or Lo signal.... again keep in mind the power system is 12-14 volts.
Now the Questions: Is this even the right chip for this project? I already made a working 555 timer version. I also did it with multi-vibrator RC circuit with two transistors. I think the Microprocessor will simplify the circuit and give me far more flexibility and control.
Does any one have some canned code that I can copy to start with, save some time? Even if it is not exact it will be good to see how others do it.
Can the LOW direct from the PICAXE-08A pull a P-MOSFET down to trigger it direct, with out going through a bipolar signal transistor?
The baseline: OFF, STEADY (both) ,ALTERNATING (both, 50% at 90 cpm or 1.5 Hz), seems to be doable... but how much can I add? I figure with TWO OUT and THREE IN, I can have at least 7 patterns? I will need to use a rotor switch or more than one switch. The other patterns I would like to add to the baseline three is: STEADY (left only), STEADY (right only), ALTERNATING (at faster or slower rate**)
** Is there a way to add a momentary push button to
cycle through choices of ALTERNATING speeds.
Thanks for your help.... I am not expecting detailed help, but I don't want to re-invent the wheel. It seems like all this is doable from what I read. The coding will be the trick of course. Is there a good book or database on existing code to look at for ideas?
Last edited: