Questions about OK5 in High-Noise Environment

  • Thread starter Thread starter Wetmelon
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 2K views
Wetmelon
Messages
154
Reaction score
1
Hi there!

In the circuit attached, I am curious about OK5 (the optocoupler on the right side). Is it ok to leave the collector like that, with no resistor limiting it? Should I set it up differently, with the pin attached to the collector and a pull-up resistor, grounding it when the LED is on? This is in a high noise environment, so I would like to clean up as much as possible.

P.s. Do you see any other issues that should be addressed in the circuit?
 

Attachments

  • AutomaticCar_006.png
    AutomaticCar_006.png
    15.4 KB · Views: 983
Engineering news on Phys.org
There should be a resistor to ground from the emitter of this transistor to pull the output to the Stamp low when the PWM is off. Maybe try a 4.7 K there and adjust on test.

Assuming the Stamp input is high impedance, even some slight leakage of this transistor would cause the Stamp input to go high without an external resistor to ground.
 
vk6kro said:
There should be a resistor to ground from the emitter of this transistor to pull the output to the Stamp low when the PWM is off. Maybe try a 4.7 K there and adjust on test.

Assuming the Stamp input is high impedance, even some slight leakage of this transistor would cause the Stamp input to go high without an external resistor to ground.

I'm curious why you picked the value of 4.7k ohms. I've not been instructed formally in the use of pull-up/pull-down resistors, and I have been generally assuming 10k is appropriate for what I'm doing. How should I be deciding on a resistance?
 
Just experience. It may be necessary to modify this, but 4.7 K would be a typical value.

You could try 10 K but I wouldn't try 100 K. It is just a figure to put you in the right ballpark.
4.7K means the maximum current of the transistor would be about 1 mA, so I expect you would have to make this resistor lower than 4.7 K if anything.

You could put in a 10 K pot as a rheostat and find the best value like that and then measure the resistance and substitute a suitable fixed resistor. Or just leave the pot in position.
Put a 470 ohm resistor in series with the pot to avoid the transistor being destroyed by too much current if the pot is set too low in resistance.

Incidentally, the collector should be bypassed at the chip. This is not shown, but you may intend to do it anyway.
It tends to stop digital garbage from other parts of the board getting into your opto coupler.

I use 0.1 uF monolithic ceramic capacitors and these seem to do a good job, although you can rip the legs off them pretty easily if you are too rough with them.