12 v flow sensor and arduino

hey

so trying to use a 12 v flow sensor with my arduino but i think i trayed it :frowning: so i'm asking a few questions before fraying the next one :wink:

so i have this 12 - 36 volt flowsensor with is giving 560 pules pr. liter i hooked it up with a 12 volt power + / - and the puls pin to pin 2 like in this example http://forum.arduino.cc/index.php/topic,8548.0.html but some thing went wrong and i goth no signal then i hooked the - 12 to grund and the arduino made strange nocies and i can't get it working now :frowning: forth the arduino cut handle input between 6 - 20 volt ...

so i ordered a new arduino uno r3.

is the way to handle this flow sensor to use a voltage devider to down to 5 and then use the same sketch as i liked above ??
if will this be a good why to go with r1 7 ohms and r2 5 ohms??

I would use a opto isolator in this situation.
Probably something like 4N35

so you wut due something like this metode 2 ??

You would not need the connection between pin 2 to pin 4
That looks good.
Larry

nice reference for external signals.

I looked at the rugged-duino. it protects all the I/O pins., at twice the cost of a UNO, it offers a few benefits.
http://www.ruggedcircuits.com/ruggeduino/

first, after you do something really stupid, you get to keep working and not have to wait for a new duino to arrive.

second, it is cheaper than messing up twice.

alas, for the busy shop, it would offer a level or protection and then you could move your work to a more common duino.

hey so i trayed to make a voltage devider to get the voltage down from the flow sensor ... but for some reason i'm getting some wired read outs from it
this is the sensor im using http://www.burkert.dk/DAN/search.php?type=8030&SearchText=8030

i hokked up the + 12 / -12 v to a power supply and the puls pin to the voltage devider and then to the arduino but im getting chaning read outs form the sensor with out activating the sensor any idear why ??

Does the one you own have the NPN output?

think it can have npn and pnp depinding on the pin connections not 100 % s

Well, it is important. You might want to verify this one way or the other. If it has the NPN option, you solution is very, very easy.

simondid:
hey so i trayed to make a voltage devider to get the voltage down from the flow sensor ... but for some reason i'm getting some wired read outs from it
this is the sensor im using Type 8030 - INLINE flowmåler til kontinuerlig måling

i hokked up the + 12 / -12 v to a power supply and the puls pin to the voltage devider and then to the arduino but im getting chaning read outs form the sensor with out activating the sensor any idear why ??

Like most sensors the output is open-collector - if you connect to the NPN output
you just need a 1k resistor to +5V and that's it, no level shifting needed.

A voltage divider cannot work from an output that only sinks current (open-collector)
of course...

And remember you always double-check a circuit before powering it up - a lot of
money is saved by doing this in the long run.

okay so the npn is +5 v and only need a low resistor but the pnp setup needs lvl shifting and so one??

If it has the NPN option, connect it up like in the attached drawing.

sens.jpg