Phew - "
a little extreme for a picaxe" and then you link to an ATtiny!
Nah - pick any axe when needed. (ha ha)
And the ATmega stuff is good too (ie, Arduino).
Not that I'm that familiar with ATtiny requirements, but the PICAXE only requires a 5V regulated supply, and 2 resistors that are required for programming. They have very low power consumption, hence small 100mA V-Regs are usually fine. (Good too for power conservative projects - solar & battery etc.)
You then add whatever other components are needed, like automotive voltage protection (for the VReg = eg, reverse spike diodes, MOV or +ve spike limiters assuming 100V etc spikes), I/O (input/output) connectors and their filter or buffer circuits - eg, RC filter for inputs; resistor and MOSFET for outputs.
The MOSFET is like a transistor but is controlled by voltage instead of current. (Transistors have a gain - aka β or Beta - which is the (max) ratio of output-current
:to: Base (input) current.)
A FET only takes nA (nano-Amps) thru its Gate (equivalent to a transistor's Base) instead of the several mA etc by a transistor Base.
A FET requires typically ~4V-5V above its Source (equiv to transistor's Emitter) to turn it fully on. (+ve for N-channel, P-chanel requires 4-5V BELOW the Source voltage).
A FET's (MOSFET's) output is usually quoted as resistance, ie, RDSon (Resistance of Drain to Source when (fully) ON).
MOSFETs typically have well under 1R (1Ω) on resistance and often measured in mR (mΩ).
It's easiest using an N-channel MOSFET where its Gate needs to be (say) +5V higher than the Source to turn it on.
That's great because you'll probably want to use GND switching. (Many "control circuits use GND switching - eg, car alarms, immobilisers, computers, ignition coils, injectors. It's also known as "Open Collector Output" which means that it is grounded when on, and "floating" when off. I've written about that on the12volt as well as elsewhere, but there are lots of other references.)
The reason for GND or Open-Collector switching is that it doesn't mater what voltage the switched component is.
EG - your 5V uPC (PIC, AT, whatever) can't supply (say) +12V without difficulty, so instead have it turn on a
switch that grounds the target device (LEDs).
It does assume that you can isolate the LEDs from GND - ie, normal bulbs are often grounded thru their holder and the chassis/body. But I suspect that is not an issue in your case.
I wonder about your red LED voltage of ~3.6V, but I'll check up on that. Reds are usually ~2V but maybe these high output (and high Wattage - 0.5W) LEDs are different. Maybe they are whites with a red lens?
Normally I'd suggest 4 maybe 5 series red LEDs for 12V automotive systems, whereas it's usually only ~3 for whites (ie, ~3.5V each).
That's allowing for voltage dips below the usually battery voltage of ~12.6V (maybe down to 12V or 11V when idling with headlights on etc).
Of course it must also handle the normal long-term system voltage of 14.2V to (max) 14.4V, and maybe the odd 14.5-15V or 16V (after cranking etc). But that's where LED characteristics often tolerate such "over-voltages" - ie, if designed for your norm of (say) 14.2V but has
short duration over-voltages of 15V - 16V (ie, up to 30 seconds?).
For 3.6V LEDs, I'd use no more than 3 in series, hence 3x3.6 = 10.8V which provides enough margin for the resistor drop and any MOSFET drop.
Assuming 14.4V, that means 14.4-10.8V = 3.6V across the resistor. (Hence I might use 4 series LEDs, but many seem to prefer a resistor...)
Hence from V=IR (Ohm's Law), R = V/I = 3.6V/20ma = 180R. (Wow - bang on a preferred value. The other nearest are 220R & 150R. I might be tempted to use 150R is the FET adds a
reasonable voltage drop...)
It's wattage: 3.6V x 0.2A = 0.072W, hence a 1/8W (0.125W) or 1/4W etc. Traditionally I'd use a 1/2W resistor as these
use to be physically more robust, but last time I bought, 1/2W resistors were the same
size as the old 1/4W resistors. Get whichever is cheapest or common and suits your design.
(Or Wattage using a combined V=IR & P=VI formula, namely P=VV/R = IIR => 3.6 x 3.6 / 180 = 0.072W or .02A x .02A x 180 = 0.072W. See - it all agrees, otherwise I've made an error somewhere...)
Hence n-number of strings comprising 3 LEDs and a 180R resistor per string.
Total max current is 20mA times the number of strings (ie, n x 20mA or n x 0.02A).
The add the required dim resistor per string, OR sove a MOSFET between the -ve ends and 0v (GND) and have a uPC PWM for dim tails, fully on for brake, and modulating (flashing) for flashing stops.
That modulation could be between fully on (brakes) and PWM'd tails, or fully on and off.
Tails too dim or bright? Change the programmed PWM value.
Want to increase flash rate with speed? Program the speed sensor adjust the flash frequency.
Want to change the number of flashes or even the on-off ratio (duty cycle) - maybe with varying speed? You guessed it, just change the program.
Yes, these uPCs have a bit of an initial learning curve, but then almost anything can be done without the need to add or change resistors, capacitors, etc.
BTW - look at the PICAXE 08 series (8 pin), often designated by a PIC12Fxxx number depending on model.
The later 08M is quite good but the latest 08M2 has more improvements. Both have enough program space and features for what you want.
Incidentally, I'm looking at getting preferably the SMD (surface mount) AXE230 kit, though DIL [Dual In-Line (pins - ie, chips with leads/pins)] like the RKP08 (RKP08c) are also available.
Google the above numbers... Unfortunately some of the kit descriptions are vague - ie, does the AXE230 come with the 08M or 08M2 already soldered in place?
Probably the DIL version is best for testing etc. Production may call for the much smaller SMD version. (Isn't it ridiculous when the 2 programming resistors are as large as the entire PIC08 with it's thousands of transistors etc?)
Just another short reply...
PS - to clarify if not already
read or implicit, a voltage regulator should not be necessary for the LEDs. (But the uPC. PIC, AT, whatever, will need its voltage regulator.)
Though many seem to use voltage regulators or current limiting devices (a
single limiter for
several strings - if one string fails, what's the point??!) and write how successfully they have operated, I have yet to see any of them say how they operate whereas non-regulated circuits didn't. IE - they are usually those that
think LEDs have exacting voltage or current criterion, hence they travel down the complicated and more expensive
overkill path.
Look at OEM vehicle LED lighting. Nothing more than a resistor in series with LEDs. No other form of current (or voltage) regulation. Yet they seem to last ages. (Tell me if I'm wrong.) My only failure was a broken wire within an after-market LED stop/tail "bulb".