Selecting Transistor for Switching Servo

Thread Starter

red913

Joined Feb 4, 2018
2
I'm running a small servo off an ATTINY85. The servo pulls around 250mA and the MC maxes out at 40mA per pin. While testing I'm powering the Servo and MC off my adjustable power supply and only the pin for controlling the servo is connected to the MC and everything works fine. I currently only have a BC337 transistor and either I'm not wiring it up correctly (I'm still a bit of an amateur at this stuff) or the BC337 isn't correct for this application. My best guess is it doesn't switch fast enough for the quick pulses that are sent to control it. I'm not sure where the datasheet would tell me that. But the duty cycle of the servo is 1-2ms, so it would need to be able to switch that fast. Also I have the Collector/Base/Emitter wire up to PWM servo pin/ MC's output pin/GND(for servo,pwm) respectively. There's a 1k resistor in series with the collector and a 4.7 resistor in series with the base. So I need to know if it's wire up wrong or I the wrong transistor.
 

Thread Starter

red913

Joined Feb 4, 2018
2
You know what, I just realized I don't need a transistor. The only thing from the mc going to the servo is the pwm pin. If it doesn't need a transistor while it's on my breadboard, then it won't when I transition to a PCB and battery. The battery will power the servo in lieu of the power supply. Sorry, this thread should just be deleted.
 

ian field

Joined Oct 27, 2012
6,539
I'm running a small servo off an ATTINY85. The servo pulls around 250mA and the MC maxes out at 40mA per pin. While testing I'm powering the Servo and MC off my adjustable power supply and only the pin for controlling the servo is connected to the MC and everything works fine. I currently only have a BC337 transistor and either I'm not wiring it up correctly (I'm still a bit of an amateur at this stuff) or the BC337 isn't correct for this application. My best guess is it doesn't switch fast enough for the quick pulses that are sent to control it. I'm not sure where the datasheet would tell me that. But the duty cycle of the servo is 1-2ms, so it would need to be able to switch that fast. Also I have the Collector/Base/Emitter wire up to PWM servo pin/ MC's output pin/GND(for servo,pwm) respectively. There's a 1k resistor in series with the collector and a 4.7 resistor in series with the base. So I need to know if it's wire up wrong or I the wrong transistor.
you might try a darlington transistor for more gain, but the 2x Vbe could be a problem if its a 3.3V system.

A MOSFET is a better choice if you select one with a low enough VGSthr.
 

Reloadron

Joined Jan 15, 2015
4,908
The BC337 should work fine as will a 2N2222 or any NPN switching transistor. The transistor Emitter should go to ground and your servo motor between V+ and the Collector. Switching time should not be an issue. Try a 1K Ohm base resistor with a 10K Base to Common.
How to Use A Transistor as a Switch should be a good read for you to look at.

Ron
 
Top