Hello, I'm trying to make a project that I can send i quick burst/pulse of power to quickly turn a solenoid on then off, at button press to quickly create a pressurized burst of air for a project using Arduino Uno. I have no idea how to wire a circuit for it, or what code to make, I've tried several, I'm lost I'm trying to start simple first, trying it with an led. If you have an idea please help. thanks
A logic level N-MOSFET (e.g. IRLZ44) is a great choice for that. You need an inductive kick diode across the coil terminals to keep the coil turn-off pulse from destroying the MOSFET, as shown below in this example motor driver circuit.
code for this?
Hello twistex_iot
Post your current sketch to see how we can help.
Slow down a bit! A solenoid takes time to move and return. Normally the electromagnet makes the move and a spring returns the magnet core, the armature.
Air has mass and takes time to move. So be prepared to adjust your timings.
Tell us how often you will have the solenoid move because your quick burst of power will also generate heat.
this type of solinoid, a compressed c02 cartrige will be attached.
I just need to be able to send a quick power signal to quickly turn the valve on and off/open and close at a push of a button. So not like as long as you hold the button, but you push it no matter how long you hold it, and it sends a timed pulse, lets say 1000 ms each time, even if you push the button for 2 seconds.
pinMode(output_pin,OUTPUT);
digitalWrite(output_pin, HIGH);
delay(required_amount_of_time_in_milliseconds);
digitalWrite(output_pin,LOW);
Be sure the valve part is rated for the pressure you are applying. The pressure will try to keep the valve open once the solenoid opens it.
If you only have one valve, you can also use an NE555 as a monostable multivibrator.
Depending on your power supply you can make life easier by connecting the "motor power +" to your supply via a small resistor, and connecting a capacitor from "motor power +" to ground.
The capacitor provides a "kick" to turn on the relay, and depending on component values can then allow the solenoid to tun off.
You then dont need the other components (arduino, mosfet etc.) just the R and C will do the job with your push switch to close the circuit.
Failing that as @paulpaulson has said, a 555 will be a good option to drive the mosfet.
What is the voltage and current requirements of the solenoid you have.
DC 12 V and 4.8 W. current is not specified, so whatever current an 9v battery has?
Which Arduino UNO?
The current is 4.8W/12V = 0.4 Amperes.
9V PP3 batteries are intended for very low power devices like smoke alarms and are not useful for powering motors and solenoids.
So that is 400mA.
A good alkaline 9V can indeed supply the required current for the short bursts you need but 9V IS NOT 12V. You need a 12V supply for a 12V solenoid.
What happens when the 9 volt battery is connected to your solenoid valve? Does the valve open and let the gas escape? Bet is doesn't!