Maker Pro
Maker Pro

Switching DC motor with TIP122 and Arduino

emirtnrvr

Feb 16, 2023
13
Joined
Feb 16, 2023
Messages
13
Hi, PCB has been received from the manufacturer. I tested it first I thought there was no problem but after 2-3 tries Arduino didn't operate the system properly. Servo, brushed motor and DC motor are opening and suddenly closing. Most of the time even they don't start. I can't upload code to Arduino when it is connected to PCB even PCB is unplugged from the battery. But when I disconnect the Arduino from PCB, Arduino is working well. Also, I can measure 0,5V from the main voltage line when PCB is unplugged from the battery. MOSFET side I am measuring -0,12V from +9V-drain when PCB is unplugged. I tried to attach the diode to the ESC power line but it didn't work. I will try to change MOSFET maybe I damaged the MOSFET. I think something wrong with the DC motor switching circuit. I need help. Thank you.

FCU_DATA: PWM data from Flight Controller Unit
Sacma_Power: ESC power line
Sacma_Data: ESC data line
Titresim_Power: DC motor power line
Ard_regulator: Arduino Voltage Regulator 24Vto12V L7812
Servo 5V: Servo's regulator MP1584 adjusted to 5V
Titresim 9V: DC motor's regulator MP1584 adjusted to 9V
VCC_Batt: 6S Battery
Ignore the 3D model's "TIP120" writing. Parts changed but I didn't change the 3D model.

Schematic.png3d.jpegBoard trace.PNG

Board Bottom.pngBoard Front.png
Best Regards,
Emir Tanriver
 

danadak

Feb 19, 2021
767
Joined
Feb 19, 2021
Messages
767
No cap on the 9V supply ?

Same for 5V, even though Nano has one on its board a cap should be close to servo.

Thinking 5 uF each or more depending on servo current and motor current.

Does the servo need a back emf diode ?

For troubleshooting you could sub a power R for each of the loads, motor and servo,
to see if everything runs w/o error, to get clue what is root cause of problem. Also use DSO
scope, when servo and motor connected, set on level trigger, one shot, on Nano power line
and outputs to servo, motor. Set to trigger a diode drop above 5V or a diode drop below
ground, to see if you get triggers.

Cap choice, not all caps, for same value of C, have same ESR performance :

1678444268303.png

OSCON is polymer tantalum.


Regards, Dana.
 
Last edited:

emirtnrvr

Feb 16, 2023
13
Joined
Feb 16, 2023
Messages
13
No cap on the 9V supply ?

Same for 5V, even though Nano has one on its board a cap should be close to servo.

Thinking 5 uF each or more depending on servo current and motor current.

Does the servo need a back emf diode ?

For troubleshooting you could sub a power R for each of the loads, motor and servo,
to see if everything runs w/o error, to get clue what is root cause of problem. Also use DSO
scope, when servo and motor connected, set on level trigger, one shot, on Nano power line
and outputs to servo, motor. Set to trigger a diode drop above 5V or a diode drop below
ground, to see if you get triggers.

Cap choice, not all caps, for same value of C, have same ESR performance :

View attachment 58376

OSCON is polymer tantalum.


Regards, Dana.
Thanks for your reply. But I can't understand clearly why I can measure voltage from the circuit when PCB is unplugged. and I am a beginner so I don't know how to choose a capacitor or where should I use it. Can you explain more clearly please?
Brushless Motor: 6S 2A
Brushed DC Motor: 9V 2A
Servo:5V 2A
 

danadak

Feb 19, 2021
767
Joined
Feb 19, 2021
Messages
767
Thanks for your reply. But I can't understand clearly why I can measure voltage from the circuit when PCB is unplugged. and I am a beginner so I don't know how to choose a capacitor or where should I use it. Can you explain more clearly please?
Brushless Motor: 6S 2A
Brushed DC Motor: 9V 2A
Servo:5V 2A
When you are unplugged from battery, but have usb plugged in, usb will supply board with
5V thru D1, on this Nano board schematic.

1678447754218.png

How do you figure C size....

Basically you have the following electrical description of a cap. Q = C x V, Q is charge. dQ/dt = C x dV/dt = I = Current
needed by load when its turned on. So you want to determine C, solving for C = I / dV/dt. So if you want to limit the drop
in V when a 2A load is applied, say 100 mV, you have to look at response time reg takes to adapt to change. So during
that time we need C to supply charge until it does. Your regulators, the MP1584, I cannot tell from datasheet its time to
respond to a load change. You could do a jig test using scope to determine this. So lets use 10 mS as example. Then
reg takes over, we have C = 2 / (.1V/.01 sec) = .2 Farad. Huge cap, but we have a battery that will supply charge, and
its response time limited mainly by small amount of L in wiring/PCB trace. So battery will mitigate size of cap needed.
So you will have to experiment with cap size so that dip in 5V is minimal. That being said we now need to look at cap
type. "Normally" one uses a bulk cap to handle large current needs, and a ceramic type cap, say .1uF, to handle fast
transient needs.

You could write a quick and dirty Nano code to pulse Servo MOSFET in a tight loop, say 100 mS rate, and look at
scope dip in V, circuits response, and try caps to achieve goal. Dip in V is determined by specs on Nano board-``

Regards, Dana.
 
Last edited:

emirtnrvr

Feb 16, 2023
13
Joined
Feb 16, 2023
Messages
13
I will try using cap but I don't know where should I place and which size cap should I use. Can you help me?
 

danadak

Feb 19, 2021
767
Joined
Feb 19, 2021
Messages
767
Do you have a scope ? If so model number ?

When no battery is connected, or USB, what points in circuit and V are you measuring ?
You are measuring DC right. Could be you are just picking up AC in your lab due to
things like fluorescent lighting, AC wiring.....

Regards, Dana
 
Top