High level switching with PNP darlington

I have just realised i have no series resistor for the zener so it will draw 1 amps for every volt over 10 which is well over its limit, in order to work out the value of the series resistor i need to know what sort of mA the arduino mega will draw looking around this seems to be ? 200mA max if so then a 50 ohm series resistor which would protect the zener will drop to much voltage at 200mA and the arduino will switch of but if i reduce the series resistor to 20 or 30 ohms then too mmuch current will pass through it ?? do i need a higher power zener or am i missing something ??

I have decided to use a In car USB power supply unit for the arduino as these seem to have 12-24 v regulators and protection and are v cheap.

Do you think I need protection for the Darlington transistors they are rated at 60 amps but apparently you can get 100+ volt transients but maybe they can cope with these I could get 100v darlingtons or use a transient suppression diode any thoughts ??

LEDs and bulbs won't need the flyback diode. They ARE NEEDED for inductive loads like motors, relays and solenoids. Putting them in won't hurt anything, they just won't do anything.

and when the starter motor kicks out,
and you get the 30 volt negative spike from the aulternator,
what will your darlingtons do then,

yes, car electronics are horrible,

OH, and cheap usb car adapters are just that,
cheap.

good luck,
just dont rely on the gear,

I'd at least put a rugged arduino in,
use MOSFET instead of Darlington,

and when the starter motor kicks out,
and you get the 30 volt negative spike from the aulternator,
what will your darlingtons do then,

Thanks for your help m latest plan is to use bidirectional TVS diode 40 V on main supply to all power :

mainly to suppress positive spikes but should suppress negative as well although could protect each power transistor with a large series diode do you think this is necessary ? could also use a big inductor if necessary

OH, and cheap usb car adapters are just that,
cheap.

i was thinking of using these :

http://www.ebay.co.uk/itm/181005107235?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

to power arduino i though looked quite robust

Do you think P channel MOSFETS will be more robust and forgiving than the darlingtons ? i couldn't really tell from the specs

Hi

large Mosfets are "normally" IMHE more rugged than darlingtons,
they for one dont have thermal run away, and are a lot lower 'resistance' when hard on,
and higher resistance when hard off, so assuming fast switching between on and off,
power dissipation of MOSFETS is also lower than darlingtons.

As for TRV's,
great things,
if you have a 12 volt supply, you dont need 40 volt tvs's,
rate them nearer to the expected voltage,

As for ebay items, from china, you take what u get.
I have had some fantastic stuff, and I have had some absolute corkers.
like a unit that is meant to work up to 24 volts input , which had 15 volt input capacitors,

diodes.
mosfets have an inherent reverse diode in them,
so if its possible for the supply to the load to go lower than the load voltage, you need a series reverse current limiter. A diode would suit.

u can take things to extream, depending how 'reliable' fault tolerant you want it,
remember also, the car shakes quite a bit, so everything needs to be well bolted down so it wont shake loose.

drjiohnsmith:
large Mosfets are "normally" IMHE more rugged than darlingtons,
they for one dont have thermal run away, and are a lot lower 'resistance' when hard on,
and higher resistance when hard off, so assuming fast switching between on and off,
power dissipation of MOSFETS is also lower than darlingtons.

True, however mosfets are easily damaged by excessive gate-source voltage. Either use an automotive mosfet with integral gate protection diodes (and an appropriate gate series resistor), or add external protection to ensure that the gate-source voltage stays within limits.

drjiohnsmith:
As for TRV's,
great things,
if you have a 12 volt supply, you dont need 40 volt tvs's,
rate them nearer to the expected voltage,

... allowing for the fact that when the battery is on charge, its voltage is nearer 14V than 12V.

drjiohnsmith:
diodes.
mosfets have an inherent reverse diode in them,
so if its possible for the supply to the load to go lower than the load voltage, you need a series reverse current limiter. A diode would suit.

Not quite sure what you mean there. Typical automotive loads such as lamps don't mind a reverse voltage; but for any that do, a diode is necessary.

thanks everyone will wait and see what arrives from china !! the reason i have done this is that i was getting overwhelmed with trying to work out this type of circuit myself.

the reason i chose the 40v diode was because the darlingtons where ok to 60v and wanted to allow possible 24 v boost

will keep everyone p[osted

Hi Guys have spent the last 4 months testing the above till i was happy then getting a nice shiney white fritzing board made with 16 of these circuits on one board:

It is working a treat however there is one strange effect that i wanted to get some ideas on i have yet to put it in the kit car (as we are still building it) so I have been trying it on the kitchen table the problem I get is that when i attach a halogen headlamp to one of the outputs everything goes off for a split second or so then it all come back on i wondered if this is a power supply problem my power supply is rated to 5A at 16v and this is pushing it as the lamp is rated to 60w (so 5amps at 12v) the output display on the PSU certainly drops to 9V but no lower than this the arduino is powered separately, is it possible that the lamp when cold draws alot more current and so for a small time the power supply does not output enough current for the other channels even the the current display doesn't go below 9V. If it is likely to be this then i am not worried as the car battery should presumably be happy to manage this all ok, but any thought would be gratefully received.

some photos of the board if interested

  1. Halogen lamps take much more current for a short while when you first turn them on. That is temporarily overloading your power supply.

2.You may have difficulty keeping your TIP125s cool enough if you put 5A through them, even with the heatsinks. Mosfets would normally be used for this application, because they dissipate much less power when switching high currents, so if chosen carefully they would not need heatsinks at all.

Ok so hopefully when in the car the battery should have the beef to provide the startup current for the halogen lamps. I only have 1 circuit with hologen lamps on it, both the main beams, which would be 10 amps in total which could be on for hours so i plan to use a relay on this one circuit, all the other outputs are less a than 1 amp so with the heatsinks I think the darlingtons will be ok. I have a voltage drop of about 0.8 - 1 v on the darlingtons which does not led to noticable dimming of any of the lamps, i did read an article that seemed to be saying that darlingtons are more robust in the face of the normal automotive transients etc vs mosfets ?

I also plan to make a mega shield with ruggeduino type protection (zenner + thermister) for all the I/O pins as there does not seem to be a ruggeduino mega ? The power supply for the ardiuno is via a USB power socket designed for car electrics.

thanks for the input all very helpful as usual

we'd all love a ruged arduino mega, but thats not going to happen now.

great to see the board, it looks good.

do your leds have built in current limiting resistors ?

Why is that not going to happen is there something I've missed .??

And yep all 5v or 12 v LEDs with built in resistors , I also have swapped the 10k resistor from the arduino output pins into the npn with 1 k as this gave me the smallest v drop across the Darlington so I assume it wasn't saturating the npn and therefore not completely saturating the Darlington with 10k, this means that I could drain potentially 16 x 5 = 80mamps from all output pins which I think is ok ?? Although it would be unlikely that all channels would be on at the same time foggy,breaking,reversing,flashers on, oil leak , pressing horn ,dark etc

Thanks for you help guys

dc42:

  1. Halogen lamps take much more current for a short while when you first turn them on. That is temporarily overloading your power supply.

All tungsten lighting does this, because the resistance of tungsten increases with
temperature, not unique to halogen. About 8 times the hot current.

Failing to provide enough current can cause the lamp to stall at a much lower
temperature drawing full supply current but dissipating less than the rated power
because of supply voltage droop.

this means that I could drain potentially 16 x 5 = 80mamps from all output pins which I think is ok ?? Although it would be unlikely that all channels would be on at the same time

80mA for the whole chip is OK. Chip supply or ground are both limited to 200mA and
various groups of pins have a combined limit of 150mA source, 100mA sink (table 28.1
footnotes in datasheet for more details)

I had worked up & posted a "hardened" Mega shield, only had interest from 1 person in it, so I didn't make any.
http://forum.arduino.cc/index.php?topic=185501.0

The hardened mega looks great, i am wanting to connect my power board to the arduino mega via a ribbon cable so i think i will try to make my own on fritzing. Do you know if you can get the ptc's and zenner diodes you have used as through hole parts ? or if not do you think they would be v fiddly to solder by hand ??

Not available as leaded parts.
Very small sizes selected to fit the space selected. I could not place that many by hand without issues.

ok i have decided for now just to focus on protecting my input pins as these will connect to switches all over the car which could potentially get connected to 12 v by mistake etc etc. My output pins are reasonable sfe as they connect via 1k to the board and and then to a npn base.

I was planning to use an optocoupler for each of the 16 input pins with 4 of these 4 ch optocouplers:

http://www.vishay.com/optocouplers/list/product-83526/

and drive the led side from the 12v supply on the power board as each input needs >20mA so would overload the 5v arduino pin,this is my plan:

any comments on whether this would work greatfully received and also whether i am right about not worrying so much about my output pins?

Also i plan to try using a p channel mosfet as a reverse voltage (connect the car battery round the wrong way ) protection for the whole setup.

looks good for an input,

I prefer to see switch on the high side of the opto, not the low side,
so when switch open, no 12 volts on the board,
( you open the switches to work on the arduino and short something it goes bang )

you dont need to join the grounds at the opto,
the right and left sides are isolated,
provided the led in the opt lights , the opto works,

btw : check that 300 ohm value, the opto is only going to need a few mA, check the data sheet the resistor might be a bit low.

as for outputs, I cant remeber what your using ,sorry