I have a project that is high volume so keeping the cost per unit and simplicity is key. I am using a nano to open a n/c solenoid (12v 100ma). I know I cant do this with a simple pin output. I am hoping to avoid using a relay or mosfet. my question is can I use multiple pins in parallel on the ground side trough a resistor (to lower voltage) and apply 12v+ to other side of the coil? I am also open to other ideas. I am also wondering if anyone has ideas for cheap easy way to mount parts i.e. bread boards. agin cheep is key I need to keep the whole thing well below $10 a piece. thank you all.
Several problems with your approach. You cannot apply a voltage higher than the MCU supply voltage to any pin. Placing 12 volts on a pin will burn out the pin protection diodes and probably damage the drivers. If you try to source 100mA from several pins using digtalWrite() then you are turning one pin on at a time, with the first one taking the full load.
When driving a solenoid you must have a kickback diode to protect the output drivers, why not use a mosfet with the diode already in it?
Due_unto:
When driving a solenoid you must have a kickback diode to protect the output drivers, why not use a mosfet with the diode already in it?
That assumes a diode across the solenoid is not needed.
Unfortunately that internal diode is in the wrong place.
You must use a diode across the solenoid.
That could be a 1N4004, since you're not using PWM.
The transistor could be a 2N2222 if the solenoid is only 100mA.
That, and a 220ohm base resistor, will add $1 to your $2 Nano clone.
Leo..
mosfet is $2 probably the easiest and safest. I can run 5v to Arduino and 12+ to solenoid closing the ground with the mosfet right?