ULN2003A as servo driver - Page 1
Forum section: electronics / beginners

author: mr_byte31
author_rank: Regular Contributor
timestamp: October 17, 2024, 08:42:18 pm
content: Hi All,I am trying to use Microcontroller(3.3v logic) to generate 7 PWM signals to be used to control small servos or BLDC motors (via ESC).The microcontroller gpio pins can deliver up to 10-20 mA and I want to deliver more current for my servos ( 100-200 mA ).The motor's supply voltage would be 5v.I was thinking to use ULN2003A since once IC contains 7 channels (Darlington Transistors) with extra stuff ( zener, flyback diode, resistors). This shall make my PCB more compact and less effort to manufacture.I checked thedatasheetto see figure 5-4 and figure 5-5.My concern that with increasing dutycycle for 7 channels, the output current goes down!!in case of duty cycle equal to 80%, 90 and 100%, each channel can deliver only 50mA which is low in my opinion.I also noticed in figure 5-1 and figure 5-2, that V_ce will 1v @200mA. This mean the power delivered to the servo motors will decrease.did I understand the datasheet correctly or I overlooked something ?as an alternative solution, I was thinking to use SI2300 and add zenner, transistors, flyback diodes but I was thinking if there is an IC that I can use directly that would be better option.is there a better alternatives ?

author: RoGeorge
author_rank: Super Contributor
timestamp: October 17, 2024, 08:57:32 pm
content: Quote from: mr_byte31 on October 17, 2024, 08:42:18 pmYes, total power dissipated by the capsule is not enough for all 8 transistor fully ON. And at 3.3V you will lose considerable voltage (and power) percent because of the Vce sat of ULN2003.I would look for a driver with MOSFET transistors instead of BJT. MOSFETs can easily achieve miliohms Rds when fully ON. You need low Vgt MOSFETs that can fully turn on at Vg less than 3.3V (sometimes these are called "digital" MOSFET).

author: langwadt
author_rank: Super Contributor
timestamp: October 17, 2024, 09:00:25 pm
content: make no sense, the PWM for an ESC or servo is a logic signal, the supply is separate

author: mr_byte31
author_rank: Regular Contributor
timestamp: October 17, 2024, 09:01:16 pm
content: Many thanks for the answer.Yes, MOSFET can do the job. I only know about discrete components. do you know name of IC with has array and flyback diodes?

author: mr_byte31
author_rank: Regular Contributor
timestamp: October 17, 2024, 09:03:13 pm
content: Quote from: langwadt on October 17, 2024, 09:00:25 pmyour point is valid for BLDC with ESC but if I connect a servo, then I need current driver.I would like to use the same output of microcontroller to either servo or BLDC.

author: langwadt
author_rank: Super Contributor
timestamp: October 17, 2024, 09:06:34 pm
content: Quote from: mr_byte31 on October 17, 2024, 09:03:13 pmwhich servo?

author: RoGeorge
author_rank: Super Contributor
timestamp: October 17, 2024, 09:17:22 pm
content: Quote from: mr_byte31 on October 17, 2024, 09:01:16 pmMight be, but I don't know any.I would search for motor H bridge instead, some can control 2 motors, which might give for digital outputs (if they allow to be used as a half bridge). Texas Instruments has a lot of motor bridge drivers IC, maybe you find a low power one with more than two H bridges.

author: mr_byte31
author_rank: Regular Contributor
timestamp: October 17, 2024, 09:38:32 pm
content: Lets take SG90. The smallest and cheapest servo ever.In idle —> 10mAMoving —> 100-250 mAStalling —> 350 mA

author: RoGeorge
author_rank: Super Contributor
timestamp: October 17, 2024, 10:26:00 pm
content: Can't find any decent datasheet for SG90, but by their values, those you listed seem to be the currents for the motor (the Vcc current), not for the control input. I expect the PWM control input to be a CMOS, or a TTL compatible at worst, so less than 1mA.

author: Ian.M
author_rank: Super Contributor
timestamp: October 17, 2024, 10:48:22 pm
content: There are plenty of people driving a SG90 servo direct from a Raspberry Pi (3.3V logic on its GPIO pins) without any level conversion, so it seems likely the SG90 has a TTL compatible control input.

author: langwadt
author_rank: Super Contributor
timestamp: October 17, 2024, 11:31:11 pm
content: Quote from: mr_byte31 on October 17, 2024, 09:38:32 pmthat is supply current, not current on the pwm control pin

author: mr_byte31
author_rank: Regular Contributor
timestamp: October 18, 2024, 07:02:54 am
content: it seems I overlooked the motors.Yes. the control pins (PWM) doesn't provide the current to the servo nor BLDC motors.But since I opened the topic. I would still be interested for a solution for Leds or small DC motors. something like this:If I use all channels of ULN2003A. it still will not provide that much current.