Got it, so optoisolation isn't really necessary then. Is it that hard to set it up so a HIGH output on the pin correlates to the solenoid being activated? Seems a lot of setups have it so you need to set output on the pin to LOW to switch the solenoid on.
1) Two separate power supplies are needed, a 12v one for the solenoid, and the arduino one. I don't want to use the 12v for the arduino because the vreg will get very hot.
Yea, I will have to test it again once I get the fet and solenoid. If it gets too hot I'll just use two supplies, or maybe find a way to heatsink the vreg.
My tests so far with a 12v supply have led to no problems with the vreg even getting warm. It must have been the LCD screen's current draw causing the heatup on a previous project where I attempted to use a 12V supply.
Anyway, I noticed when the power supply is disconnected and the board is only powered through usb, there is still ~50mv backfed through the barrel jack. I'm afraid if the pin switches the fet in this state, the solenoid will attempt to draw a lot of current from the 5v usb supply back through the barrel jack, which might burn something out in the board. Do I need to take this into account, or is there some kind of limiting in the arduino board which will prevent this?
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16