3
\$\begingroup\$

I'm very newbie in electronics, so, I kindly asking the community to review my schematic. This is my most advanced project I ever did and I'm really unsure about particular points in my scheme and about overall design.

What I'm doing is a multi-channel DC-motor controller with external powering. The motors will be small 5v or so DC motors with current draw about few hundreds mA.

enter image description here

Here what about I'm unsure:

  • Is it correct to connect ULN2803 in parallel to achieve more max current per channel? Is it correct in my particular scheme?

  • Is it enough to just put capacitor in parallel to each motor to perform low-pass filtering? Or I should add extra resistors for explicit RC-filter? If resistors required, then where I should put them: to Vcc line to ULN2803's pin?

  • Maybe I should put RC-filter between MCU and input of Darlington pair?

  • Do I need extra fly-back diode or ULN2803's internal diode would be enough?

  • How well the "USB part"? Won't it burn my PC's port? Will it even work o_O? Do I need to put resistors in between tx-rx and rx-tx lines? Will it work fine with external power source?

  • I added rectifier to make polarity-agnostic board. How lame it is?

  • How to make over-current protection? Do I even need to do it?

  • Is it fine that there no resistors near J1 port (ISP programming)?

  • Should I pull-down (pull-up?) unused MCU's pins or it will be fine to left them in air?

  • How critical for USART reliability to use crystal frequency 11.0592Mhz or multiple? Will it work fine with 16Mhz?

\$\endgroup\$
  • 4
    \$\begingroup\$ First impression: The colors are horrible! What kind of software are you using here? \$\endgroup\$ – pipe Mar 18 '17 at 19:27
  • 2
    \$\begingroup\$ Phew, good thing I went with KiCad! \$\endgroup\$ – pipe Mar 18 '17 at 19:30
  • 2
    \$\begingroup\$ Tieing darlingtons together like that may not work as you expect it to. \$\endgroup\$ – Trevor_G Mar 18 '17 at 19:38
  • 1
    \$\begingroup\$ I think I would have used a single diode instead of the bridge.. if they wire it the wrong way.. it wont work, but it wont kill your board either. \$\endgroup\$ – Trevor_G Mar 18 '17 at 19:43
  • 1
    \$\begingroup\$ 7905 makes neg 5V \$\endgroup\$ – Autistic Mar 19 '17 at 6:06
5
\$\begingroup\$

Is it correct to connect ULN2803 in parallel to achieve more max current per channel?

See Tony's comment below.

However yo have another problem: ULN2803 has high VCEsat, so your 5V motor will only receive 3V or so (i.e. it will work... but only marginally).

I would use several dual MOSFETs in SO8 packages. These cost 50 cents each, they're small and easy to drive, but you'll have to add the diodes.

Alternate solution: http://www.ti.com/lit/ds/symlink/tpic6b595.pdf

Is it enough to just put capacitor in parallel to each motor to perform low-pass filtering?

No. Cap will filter HF noise a little... Motor inductance is enough to smooth your PWM.

I added rectifier to make polarity-agnostic board. How lame it is?

It is useless, just plug connector the right way!

Also, don't power your motors from regulated DC. Power them from input voltage... Poor 7805 is gonna get in trouble when all motors are on.

How to make over-current protection?

You already have it, since 7805 will overheat and shut down if one motor stalls.

This would usually be done with a small current shunt in series with each motor, and sampling it with your micro's ADC.

\$\endgroup\$
  • 1
    \$\begingroup\$ People were connecting ULN2003A and ULN2803 output channels in parallel for higher current output in the 1970s, so you can't answer 'no' to 'is it correct to...'. You can say it's inefficient, that you wouldn't and that there are better ways, like you have and as there are. But you can confuse OP/others because they may see schematics around showing it being done. We did it on solenoid drivers with ULN2003As, worked fine in 10Ks of machines. \$\endgroup\$ – TonyM Mar 20 '17 at 8:45
  • 1
    \$\begingroup\$ Thanks for fixing that, peufeu, have upvoted your good answer. \$\endgroup\$ – TonyM Mar 21 '17 at 8:13
3
\$\begingroup\$

Personally: drop the expensive FTDI FT chip, just use a microcontroller with USB functionality integrated; these usually come cheaper than ATMega 328. Drive the microcontroller off USB, and try make the energy transferred between the supply that powers the motors and the USB voltage as small as possible.

As said, an array of cheap MOSFETs will do much better here. ULN280X wasn't meant to be put in parallel.

Maybe I should put RC-filter between MCU and input of Darlington pair?

Usually: no. If anything, you'd want your transistors to switch as hard as possible – if they're "half" switched on, they have large resistance, and will get quite warm. IF you need to filter (ie. if your motors don't "flatten" your PWM enough), then do it LC-filtered after the driver transistors.

There's legitimate reasons to actually not fully switch on and off the transistors, but to operate them at a low-passed resistance range – but then, make sure you buy heat sinks large enough to get rid of the energy not spent in the motors but the transistors.

I added rectifier to make polarity-agnostic board. How lame it is?

not very lame, but pretty useless - it's hard to plug in a barrel connector the wrong way, and the very most barrel connectors have + on the center, - on the outer conductor. Whoever plugs in a barrel connector of a supply that doesn't follow that convention is to say the least a bit careless. It might still make sense to protect your circuitry from that mistake – but a single, low forward-voltage diode or a MOSFET in a proper configuration for that job might do that too, without burning 2x diode forward voltage just so that you can hypothetically plug in even strange 5V power supplies.

How to make over-current protection? Do I even need to do it?

Depends on who or what you need to protect. I'm sure you can even buy motor driver ICs that would obsolete your whole system (not looking for them for you, however) that include something like a per-channel current limit.

If you want to do it yourself: add low-side shunt resistors (couple hundred mΩ, typically), and use the voltage across these to turn of the MOSFET in the individual channel if the current gets too high (i.e. when the voltage over the shunt gets too high). Might need additional analog electronics.

Alternatively, use your MOSFETs on the low side of your motors, and monitor the voltage across the MOSFETs – it should either be (nearly) Vcc (MOSFET off), or very low (MOSFET solidly, no overcurrent). If the voltage across the MOSFET rises, turn it off. Might lead to much simpler analog electronics, since might, depending on availability of suitable MOSFET types, basically just be a resistor from gate to motor side of MOSFET. Simulate with e.g. LTSpice.

\$\endgroup\$
  • \$\begingroup\$ The micro / USB issue depends whether the system needs to operate without USB connected or not. I'd agree, if you will always have USB then a $1-2 ARM cpu with USB will be both cheaper and faster. Plus some of them give you the option to drag and drop over USB to program them which is always nice. But then things won't work without the USB. And I'm guessing being able to use arduino libraries is being considered a plus here. \$\endgroup\$ – Andrew Mar 20 '17 at 9:25
  • \$\begingroup\$ @Andrew about the Arduino Libraries... well, I'd rather have a small RTOS running on the MCU than Arduino, but then again, we know next to nothing about OP's project's needs. \$\endgroup\$ – Marcus Müller Mar 20 '17 at 11:12
  • \$\begingroup\$ I agree entirely, arduino wouldn't be my first choice for this or most other things, in fact it would be a long way down my list for most things. But then I'm not the person designing this or writing the software, if this is a low volume thing then a little more unit cost to avoid having to learn a new environment may be a good trade off, that comes down to details we don't know. \$\endgroup\$ – Andrew Mar 20 '17 at 13:05
3
\$\begingroup\$

You have a LM7905 shown in your schematic - that is a negative voltage regulator.

Note that the pinout is different from a LM7805.

You haven't shown what value C1 is - do you expect to use the circuit with AC input? If so you will need a large value capacitor - probably 1000's of microfarads.

How much current will the motors need - there may be significant power dissipation in the bridge rectifier (U1) - do you need AC input or reverse polarity protection?

Unless you want to do a some USB software I would recommend going with the FTDI approach rather than performing that function in the micro.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.