Go Down

Topic: Connecting 24V inductive sensors to Arduino (Read 1 time) previous topic - next topic

Dear Arduino users, any of you out there that could answer some of my questions ?

My goal: to measure RPM of our ships diesel engine. Hardware: arduino mega 2560 + ethernet shield, inductive sensor (pepperl+fuchs, datasheet here: http://www.pepperl-fuchs.com/global/en/classid_143.htm?view=productdetails&prodid=296)

The engine can make 650rpm max but the sensor detects 4 holes in our huge flywheel so that generates a pulsetrain of max 44Hz.

I found lots of code for rpm calculations but I am at lost on how to connect the sensor to the Arduino for it puts out 24V.
I suspect that a voltage regulator (L7805ac-v) can not dissipate the voltage overshoot fast enough to keep up with the pulsetrain, maybe the same goes for a "ruggeduino" (tolerates 24V on its pins), not sure tough.

Any suggestions ?   Optocoupler ?   Transistor ?




Constantin

I'd recommend a optocoupler with a drop-down resistor to make it safe. In case the signal is AC, use a AC optocoupler. That's what I have used here with my air conditioning system (the signals for most residential AC control systems in America are 24VAC). Attach the opto to a digital input and then count the pulse train. Given how slow the signal is, you could use a ISR to do the counting and then let your Arduino refer back to the count whenever you want.

dc42

Yes, use the 24v output to drive an optocoupler through a series resistor. The sensor is powered from DC not AC (the datasheet says it has reverse polarity protection), so no need for an AC optocoupler, a cheap DC one will do.
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.

#3
Jan 20, 2012, 07:06 pm Last Edit: Jan 22, 2012, 11:15 am by sluiswacht Reason: 1
Thx dc42 & constantin. For those struggling with the same questions, found this schematic (see attachment).

PS: this post is edited twice, to simplify the circuit and to correct my nooby mistake. Thanks dc42 for your help & patience !! 

dc42

The 24v side of that looks OK although I don't know what 800E is supposed to mean. Most opto isolators want around 16mA current so I would make the resistor 1.5 Kohms.

On the Arduino side, it's a little simpler to connect the phototransistor side of the opto isolator between ground and the input pin, then enable the internal pullup resistor in software. This avoids the need for an external resistor. Again, I don't know what 22E means, and 22 ohms is certainly far too low a value for that resistor in that circuit.
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.

Thanks again dc42,  implemented your suggestions in the drawing. 

dc42

That's not quite right, you need to connect the emitter (lower right connection in your diagram) of the IR receiver to Arduino ground, and the collector (upper right connection) to the Arduino input pin.
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.

Go Up