24v encoder?

So I am semi new to electronics but have been studying like crazy "aka googling". So here is my problem. I have a 24v encoder and would like to read the pwm with the Arduino. Obviously i cannot connect 24v to the Arduino so how would I go about this? Ssr? Voltage divider? or am I completely missing something? I would like to find a simply solution mustly because I will be using 24v as a standard moving forward I work on machinery and 24v is there standard. i just really would like to start interface with some machines.

Encoder info 400p-r Response frequency 0-20 khz 24vdc Max mechanical speed 5000 rpm

Thanks in advanced for all you help!!!

There are many different types of encoders, if the outputs are open collector you may not need voltage level shift, we really need more info about your encoder to give you any advice, can you post a link to the manufacturers web site or a datasheet?

Look at this forum thread http://forum.arduino.cc/index.php?topic=172130.0 about using opto couplers from 24v to 5v logic levels.

Sadly must machinery manufacturers will not give you brand or part number so I do not have the datasheet is there a test I could do to find out this information?

Well..., what you are calling an encoder could be anything from a DC tach generator to a quadrature encoder to a grey code absolute encoder, to a simple pulse generator, to an AC resolver, etc. How many wires of what color? Can you post a picture?

ok let try it this way lets say I am going to use this encoder at 24v how would I go about it? Also is there some sorta document about all this I can read that you know of?

Also I was reading that post about Optocoupler I think this might be the way to go

Ps I would have to disassemble part of the machine to get a clear picture but I know I have red vcc black gnd yellow a- and blue b-

Thanks for your help!!

Give it a supply, possible pull-ups on the two outputs. But since it works from 5V why use 24V? [ It might even have an index output too, details are rather sketchy.]

These style of encoders are cheaper from eBay without a wheel attached!

The reason I need 24v is because must machines electronics run off of it and I don't want to replace components every time I want to interface with a machine. Also the encoder I am connecting to is 24v the one I linked is similar to mine but is not the one that's on the machine. Really the heart of what I am asking is how to read a 24v pwm single with a Arduino? Or the best approach to the problem?

Do you get PWM from your encoder? That is an unusual thing to get. Rhetorical actually because you don't, you are using the term incorrectly.

If the pulses are 24 V I would use a transistor. Resistor to base of 10K then on to your encoder. Emitter to ground, common Arduino / encoder. Collector to Arduino input with the internal pull ups enabled.

Mike thanks!! Sorry I am still learning all the correct terms I am machinery technician starting to get into electronics so sometimes I think I am using the correct words buttttt so is life I will give this a go tomorrow at work and see what happens thanks once again

I been reading about transistors for the last hour primarily about switching speed. Will I need to use a baker clamp "hope that is the right term"as part of the Circuit? Or will it switch fast enough on its own?

Never come across that word. So I googled it, never knew it was called that. I have always countered any charge storage issues by reducing the base current.

However :-

No in terms of electronics the pulses you get from an encoder are very slow.

So in my case that's why we are using a 10k resister from base to encoder? So if I have a issues I will need to increase the resister to lower my currant Correct ? I am trying to fully wrap my mind around all this (:

Thanks mike for all your help!!!

Yes that is right. With 24V you will get about 2.4mA of base current which is a good starting point.

And are you sure its not an open-collector (sometimes called "NPN") ?