how to convert 24volt pulses into 5v ip without affecting frequency

im a newbie . id really appreciate if you could help me out on this issue.

i have a 24v operated pulse generator that i want fed into the arduino working at 5v. how do i change the voltage level without changing the frequency of the pulses.

It goes up to a maximum of 5k per second. These pulses are from an open collector output of 24VDC . So to accept the pulses in our controller wel have to reduce the voltage to around 5 without changing the frequency.

I was thinking that an optocoupler would be appropriate for the purpose but couldn't get enough information on which one I can use
Could u be able to help us with it?will an optocoupler be the best one and if yes then which do u suggest?or if you think any other option would be better?

thank you in advance for your help!

Shows how. Any basic opto will work.

Weedpharma

thank you @weedpharma.

can we use a voltage divider in this case?.or will using voltage divider be a problem in this case.

thanks in advance.

Hi,
If you have open collector , then how are you getting 24V pulses?

Tom.... :slight_smile:

As Tom has said, with open collector you only have 24v if you connect 24v to the output. The open collector is effectively a switch to gnd.

Weedpharma

my main query is will a voltage divider affect the pulses because my. primary aim is to count pulses

the rate of the pulses change according to the flow of the liquid under considerations. hence the frequency changes.

thanks in advance.

Voltage divider will just lower the voltage of the pulses.

That said, there is an inconsistency here, and the whole thing may in fact be simpler than you think!

If the output is open collector, that means the output is simply connected to the collector of a BJT - unless the device also has a pullup to 24v in it, you don't need to do anything to lower the voltage - just connect the pullup resistor to 5v, and you're good to go.

I suspect the 24v is the maximum voltage it can switch like that - one of the things that makes open collector such an attractive way to design the output of a chip is that you can have the chip running at one voltage, and the output at a higher or lower voltage, just by choosing what to connect the pullup resistor to.

Clarification: a voltage divider reduces the level (volume) of the signal, without changing its frequency. When you adjust the volume (voltage) on your MP3 player, TV set (...), the sound is not shifted to another frequency.