Pages: 1 [2]   Go Down
Author Topic: liquid level to 12 volt solonoid.  (Read 1790 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh yes....definitely an overflow, wouldn't dream of not having one.

So all is good if there is a failure on.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

a diagram would help me if you could point me towards one.

I was under the impression that my mega 2560 which im learning about was suitable for 12 volts...or does this only apply to the input voltage.

Regards.
I think you should be fine with using a 5v output from the Arduino, running that to the switch, and having a return directly to the input pin.  You will want to use a pull-up or -down resistor to hold the voltage to a steady on or off so that noise picked up by the wire isn't seen as a the switch opening or closing.  If the switch is normally open, then have a pull-down resistor so that when the switch is open, the input is held at 0 volts.

The circuit I described is this:


That is if 5v doesn't work for some reason, but I believe it should.  The capacitor isn't necessary because you don't need to smooth an an/off signal, but I got used to putting them there on the projects I've done that used a variable DC input and didn't notice I'd put it there till after I looked at the preview.

The 12v is only the power supply.  The actual inputs to the chip (and possibly the whole chip) will be damaged if you apply more than 5v to them.  I accidentally put a pull down resistor to the power rail on my breadboard (12v) and it just took out one pin, but since you have one where you can't replace the chip, I would be very careful.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Will this work?

Step 1 - supply 12 volts to the float switch from a separate source with the arduino grounded to the same source.

Step 2 - After the float switch and before the input pin on the arduino ....place a 12vdc to 5 vdc regulator so the input pin sees  a switched 5 volts. 

Step 3- Arduino to switch a Mosfet to supply 12vdc to solonoid valve.

http://www.jaycar.com.au/productView.asp?ID=MP3204&form=CAT2&SUBCATID=1002#12

http://www.freetronics.com/products/n-mosfet-driver-output-module

Regards



Step 1: feeding +12v to your float switch without even a series resistor means that sparks will fly if you get a short to ground at the float switch.

Step 2: using a regulator to step 12v down to 5v is overkill. If you don't want to use an optocoupler as I suggested, use a voltage divider.

Step 3: ok. Don't forget to include a diode across the solenoid to catch the back EMF when it switches off.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Step 1: feeding +12v to your float switch without even a series resistor means that sparks will fly if you get a short to ground at the float switch.
 -Thanks for the advice.

Step 2: using a regulator to step 12v down to 5v is overkill. If you don't want to use an optocoupler as I suggested, use a voltage divider.
 - I am so new to this my head is exploding from taking it all in, wiki is helpful etc.....I understand your way is more economical....but for the moment i thought this might be a simpler(easier) solution for me, tho looking on the web I'm getting my head around some of it now....maybe hope for me yet,lol.

Step 3 - Good advice again - thanks.

There seems to be multiple ways of doing this project and everyone's input is fantastic,I have set up a bench mount mega to test and prototype  before i get the parts and instal.

I have a switch mimicking a float switch, i have a breadboard and leds.
My aim is to have the leds run on after switch momentary on ( float switch )is activated and using the internal counter/timer for example 5 mins or more, mimicking solenoid open.
After i got this bit sorted I'll look at 2 level switches....low and high to keep the liquid between them.

I've been looking for sketches that do this...can't find any and looking for something i could modify....might be out of my league at the moment.
I am having trouble understanding all of this....not giving up tho...I'll keep googling till i find the solution....any help greatly appreciated.
This code stuff is hard to learn...am getting lost in it a bit...any guidance there?????once again i appreciate everyone's input.



Logged

Pages: 1 [2]   Go Up
Jump to: