How do i count a fluctuating 22v (11.5v) pulse from reed switch with Arduino?

Hello everyone.

It has come to my attention that my first description of my problem was very cryptic, so I have tried to rewrite it for better understanding.

I have an actuator that measures 8 pulses/rpm and there is 440 pulses in a stroke, the stroke length is 250mm and the speed of the actuator is 20mm/s which equals to 28,4 ms/pulse while running.

The actuator can accidentally stop with the reed switch activated and so there is 22.1V and 2,55mA running through it. (if not the signal is ofc. 0v).

When the actuator is running the signal drops to 11.5V and 1,35mA I need to get both these values down to a level that the Arduino can handle, which means that for the Arduino to see both signals as high they should be above 3v and under 5v.

How do I do that?

Thank you.

It has come to my attention that my first description of my problem was very cryptic, so I have tried to rewrite it for better understanding.

Start with the first line of the Bread song IF and you to could get a lollipop

Telly (Kojak) Savalas, did the best version.

Mark

Heres a picture of what I think would work.

Runenaldo: Heres a picture of what I think would work.

That capacitor will smooth out the pulses (probably not desired.) You could get by with less zener current, too, so a higher value of R1 may be better.

[quote author=Runaway Pancake link=msg=2140778 date=1426434427] That capacitor will smooth out the pulses (probably not desired.) You could get by with less zener current, too, so a higher value of R1 may be better.

[/quote]

Ja for now I don't know if the cap will be needed, but I put it in there "just in case". As I understand the desired size of the cap is to be 1/10th of the pulse time, so I though 1uF cap wouldn't hurt.

How much bigger would you make R1?

With the 1k you're at 20mA of zener current, with a 10k that's 2mA.

[quote author=Runaway Pancake link=msg=2140826 date=1426436140] With the 1k you're at 20mA of zener current, with a 10k that's 2mA.

[/quote]

The 500mW zener is capable of handling 106mA, so I thought a 170 ohm resistor was enough and that 1k would suffice?

Maybe I'm way off in my calculations?

Runenaldo: The 500mW zener is capable of handling 106mA, so I thought a 170 ohm resistor was enough and that 1k would suffice?

It is "capable of", yes. Is that your requirement? Just because my car is "capable of" 140 mph doesn't imply or require that I run it that hard to get to work - or anywhere else.

[quote author=Runaway Pancake link=msg=2141007 date=1426444165] It is "capable of", yes. Is that your requirement? Just because my car is "capable of" 140 mph doesn't imply or require that I run it that hard to get to work - or anywhere else.

[/quote]

Not at all, very little will do.

But I'm worried that if I pull it down too much, that it wont work when the supply voltage drops down to 11.5V.

Runenaldo: But I'm worried that if I pull it down too much, that it wont work when the supply voltage drops down to 11.5V.

With 11V and 10k there will be 5V across the zener and the rest, 6V, across the 10k, 0.6 mA An input pin is high impedance, there's very little draw. You can prove all this out with a 12V supply or, better, an adjustable lab supply. My figures from earlier require revision: with 22V and a 1k, there's (22V - 5V) / 1k = 17mA, with 10k it's 1.7 mA However you're happiest.

Hi,

The actuator can accidentally stop with the reed switch activated and so there is 22.1V and 2,55mA running through it. (if not the signal is ofc. 0v).

When the actuator is running the signal drops to 11.5V and 1,35mA I need to get both these values down to a level that the Arduino can handle, which means that for the Arduino to see both signals as high they should be above 3v and under 5v.

The 11.5V that you measure is while the actuator is running, am I right with a DMM in Vdc? The reed switch is switching 22.1V. You are measuring the average voltage with the DMM of the pulses, not the actual signal that is being produced.

The signal is pulses, going from as you stated 0V to 22V.

What do you want to measure? -That the actuator is moving? -Or the speed of the actuator?

Use the zener diode, or a potential divider to get the 22.1V peak down to 5V, this will produce 5V PULSES, then program the arduino to count or just detect them. Forget the 10uF Cap.

Tom..... :)

Sorry guys, 10 posts, but none read the OPs original post about pulses and reed switches, 22.1V to 11.5V and almost halving of the current. (Monday morning, wow, my first coffeeeeeeee..And I watched the DVD, "LUCY" yesterday) :fearful:

TomGeorge: Hi,

The 11.5V that you measure is while the actuator is running, am I right with a DMM in Vdc? The reed switch is switching 22.1V. You are measuring the average voltage with the DMM of the pulses, not the actual signal that is being produced.

The signal is pulses, going from as you stated 0V to 22V.

What do you want to measure? -That the actuator is moving? -Or the speed of the actuator?

Use the zener diode, or a potential divider to get the 22.1V peak down to 5V, this will produce 5V PULSES, then program the arduino to count or just detect them. Forget the 10uF Cap.

Tom..... :)

Sorry guys, 10 posts, but none read the OPs original post about pulses and reed switches, 22.1V to 11.5V and almost halving of the current. (Monday morning, wow, my first coffeeeeeeee..And I watched the DVD, "LUCY" yesterday) :fearful:

Ahh yes! you are completely right! derp derp!

I'm so not an electronics guy haha.

I just want the arduino to count the pulses and send a signal to stop the actuator when a set number of pulses is reached.