So as it stands, there is no current change between resistor fitted and not fitted, which points to the output transistors not switching.
Maybe use something like a 470 ohm pull ups and test (10ma) each.
Max.
Could it be that the distance between indents is so small that it's always stopping in the same position? Can you spin it with a drill or something and scope one of the outputs.
Hi,
With the 5K resistors:
First I raised the voltage to 10V, poor square waves showed on the oscilloscope, which fell back when the encoder stopped.
Changed to 1K, good square waves, and stayed when encoder stopped.
Changed voltage back down to 5V square waves, which stay.
So it's working
At 5V, how can I find the best resistance 'safely'
Will connecting the outputs to 5v damage them?
C.
The output transistors can probably handle 20mA max, so size resistors for something like 10mA or even 5mA. I don't know why it doesn't like 1mA though (5K at 5V).
More current means more heat/power which is bad. But you still want enough current to be able to charge the parasitic capacitances fast enough to get a good square wave. You don't want to get the resistance as low as possible as much as you want to be able to get away with as high a resistance as possible. Just enough to charge those capacitances, have good noise immunity, and good edges so you can minimize heat and power but still have things work.
As long as the transistors switch it really should not make much difference, within reason.
But I would expect to see at least a 10ma collector current.
Have you tried the 470 ohm at 5v?
Max.
As long as the transistors switch it really should not make much difference, within reason.
But I would expect to see at least a 10ma collector current.
Have you tried the 470 ohm at 5v?
Max.
No.
The anode of the zener needs to go to GND (0V). The encoder output connects to the zener cathode with the resistor and the PIC pin.
If you use a resistor divider, the bottom of the lower resistor goes to GND. the encoder goes to the midpoint. And if the upper resistor is 1K, the lower resistor needs to be 374 ohms to make 3.3V at the junction.
Why not just have encoder output - 10k resistor - pic input - 3.3k resistor GND.
Mike.
Edit, or replace the 3.3K with a 3.3V reverse biased zener.
Chris, are you assuming the outputs are OC? 12V directly to the zener (or pic pin) could produce a large current. Or did I misunderstand?
Why not just have encoder output - 10k resistor - pic input - 3.3k resistor GND.
Mike.
Edit, or replace the 3.3K with a 3.3V reverse biased zener.
Chris, are you assuming the outputs are OC? 12V directly to the zener (or pic pin) could produce a large current. Or did I misunderstand?