It is way to long since i have played with arduino, but now i need it again, i have made a schematic, is is werry simple, powered by a car battery, 3 posetive inputs, and a PWM output with a FET, is my drawind possible ? i have used i LM7805 voltage regulator to power arduino with 5volts, shoud i drop that and power it directly? car batteri can go op to 14 volts, when generator runs, and the LED strip, is only on when car is stopped, thats why i dont have a regulator on that.. 2 of the inputs are short puls (lock and unlock central locking) and the last one is ignition voltage, that is on as long as the car is running... somthing that i need to change ???
Why the 7805.
There is already a 5volt regulator on the board, including the caps.
Use the DC jack. It has a reverse protection diode as a bonus.
If you want to be a bit safer, use an LM7808, and feed 8volt into the DC jack.
A simple 47ohm resistor between +batt and +DC jack could also work if you're not going to draw anything from the 5volt or 3.3volt pins. That drops ~2volt (on an Uno), and kills spikes.
The voltage divider is indeed backwards.
You drop 7volt to get 5volt.
On/off signals don't need analogue inputs. They are for measuring a variable voltage.
You can use digital inputs for on/off signals.
Use a ~1:2 voltage divider for the signals.
22k to the on/off signals and 10k to ground is ok.
Add a 10k resistor from pin3 to ground, and a 220ohm resistor between pin3 and gate.
Leo..
okay, first of all, i was drawing and writing from my memoryes, that tells me, that the input jack was only 9v, now i have read aboud it, (agree, I should have done that before writing) i can see that the limit is 20 volt but recommandet to be max 12V so i thing i will go for the 47ohm resistor.
the divider, was one i have found on google, for an arduino, i havent calculated it, i have never used it before, so i was blind and trusted what i found, i will use your advise, and try to calculate it my self to be sure..
I will move inputs to the other side to be digital.
The 10k and 220ohm resistors that you mention, i must be on the mosfet?
tomorrow i draw i new diagram and post it, just to be sure..
Thanks fore the help so far, and sorry for my bad spelling, bear with me, i am form Denmark..
Read the instructions for connecting the mosfet resistors again.
The gate of a mosfet is essentially a capacitor.
A 220ohm resistor between PWM pin and gate limits pin current during switching.
The 10k from pin to ground keeps the gate firmly grounded during Arduino's bootup (floating pin).
The 16NF06 doesn't seem to be a logic fet.
Some might work, others not (dim LEDs, hot mosfet).
A logic fet has a Vgs(th) of <2.5volt
Leo..
Ok, the 10k is moved to the other side of the 220, so now 10k is directly between PWM pin om arduino and ground and the 220 is between PWM pin and gate