Maker Pro
Maker Pro

Problem with inductive load

jozef007

Nov 9, 2019
28
Joined
Nov 9, 2019
Messages
28
Hi,
Im trying to control servo by PWM signal. Signal is generated by Xmega CPU, running on 3.3V. As per schematic I'm testing signal coming from T2 on oscilloscope everything looks ok, but when I'm trying to control servo I'm getting strong kickback from it. Oscilloscope showing distorted signal. I added protection with Schottky and Zener diodes. There is only insignificant change. Not sure a this point why is there so much interference. If someone can look into I will appreciate it. All datasheet are attached to this thread.

Thx
upload_2020-3-5_22-14-53.png
 

Attachments

  • 1N5333B-D-102336.pdf
    155.8 KB · Views: 5
  • IN5821.pdf
    84.7 KB · Views: 1
  • irlz34n.pdf
    109.4 KB · Views: 2
  • irf9540nspbf-1228169.pdf
    328.3 KB · Views: 1

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,720
Joined
Nov 17, 2011
Messages
12,720
I see a few issues:
  1. The servo requires 4.8 V to 6 V power supply. Diode D6 will drop > 0.3 V from the 5 V supply, thus leaving less than 4.8 V for the servo. Replace D6 by a direct connection.
  2. The control input typically expects a 5 V PWM signal. While Q5 will deliver > +4.5 V for the high level (less than 5 V due to D2), there is no path to ground to supply 0 V to the control input. You'll need to add a push-pull driver stage here.
  3. " I'm testing signal coming from T2" There is no T2 in the schematic shown. Do you mean Q5? If so, where on Q5 (S, D G)?
  4. A strong 3.3 V signal from the CPU should be good enough to drive the control input of the servo directly without the need for an intermediate stage (T1, Q2). If you need to use a level shifter, here are a few circuits of differing complexity. A single stage driver is sufficient. You can undo the polarity inversion of a single stage driver in software.
  5. The diodes around the servo are imho useless. The electronics within the servo has built-in protection from reverse voltaeg spikes of the motor. It is much mor euseful to add a small LC filter into the power supply (G, +5V) of the servo:
    - add a capacitor (10 µF) in parallel to the servos' supply.
    - add a ferrite bead (something like this) in series with the positive supply of the servo. Do not place a ferrite in the ground path!
 

jozef007

Nov 9, 2019
28
Joined
Nov 9, 2019
Messages
28
I see a few issues:
  1. The servo requires 4.8 V to 6 V power supply. Diode D6 will drop > 0.3 V from the 5 V supply, thus leaving less than 4.8 V for the servo. Replace D6 by a direct connection.
  2. The control input typically expects a 5 V PWM signal. While Q5 will deliver > +4.5 V for the high level (less than 5 V due to D2), there is no path to ground to supply 0 V to the control input. You'll need to add a push-pull driver stage here.
  3. " I'm testing signal coming from T2" There is no T2 in the schematic shown. Do you mean Q5? If so, where on Q5 (S, D G)?
  4. A strong 3.3 V signal from the CPU should be good enough to drive the control input of the servo directly without the need for an intermediate stage (T1, Q2). If you need to use a level shifter, here are a few circuits of differing complexity. A single stage driver is sufficient. You can undo the polarity inversion of a single stage driver in software.
  5. The diodes around the servo are imho useless. The electronics within the servo has built-in protection from reverse voltaeg spikes of the motor. It is much mor euseful to add a small LC filter into the power supply (G, +5V) of the servo:
    - add a capacitor (10 µF) in parallel to the servos' supply.
    - add a ferrite bead (something like this) in series with the positive supply of the servo. Do not place a ferrite in the ground path!
Hi Harald,
thank you for response. I need adjust few items from my statement, apologies if this cause confusion:
1, I'm driving little higher voltage (5.6V) so it is overcome forward voltage of diode. I will remove D6
2, So I have 5V in signal, R15 is acting as pull down , maybe I was suppose to put in front of diode?
3, You are correct T2 is Q5, +5V is connecting to S, D2 to D and G is fed by signal from T1
4, Never thought about Level shifter, good idea, as plan B I thought about Optocoupler fed by N-MOSFET due to current consumption.
5. I added diodes to due to spike I was geting from servo, I tried connect it to Arduino Uno directly (running on 5v) , the same issue and also to servo tester. Tester was was good for few turns, after that similar situation with interference, although on much smaller scale. I tried another 2 servos from the same kind, the same situation. I will try to add there RC filter, ferrite bead I will try to get hand on it (not available in local store). I', attaching screenshots from osciloscope. I will let you know how it looks like after changes (-diodes, +RC filter). Btw what values you recommend for R and C? thx
upload_2020-3-6_14-54-53.png
upload_2020-3-6_14-56-5.png
 

WHONOES

May 20, 2017
1,215
Joined
May 20, 2017
Messages
1,215
I see it is a Radio control servo. These don't normally require supply de-coupling though adding some will not hurt.
To drive from 3.3V, the most you will need is a level shifter which is dead simple needing just one transistor and 2 resistors. As suggested by Harald Kapp, you will need to invert the output sense from your CPU.
 
Last edited:

hevans1944

Hop - AC8NS
Jun 21, 2012
4,761
Joined
Jun 21, 2012
Messages
4,761
Is THIS what we are trying to drive with the Xmega CPU?

thumb_1444.jpg

Are you overthinking this? WIll the XMega output drive the servo dirctly, as @Harald Kapp suggested in post #2, his comment issue #4?
 

jozef007

Nov 9, 2019
28
Joined
Nov 9, 2019
Messages
28
I see it is a Radio control servo. These don't normally require supply de-coupling though adding some will not hurt.
To drive from 3.3V, the most you will need is a level shifter which is dead simple needing just one transistor and 2 resistors. As suggested by Harald Kapp, you will need to invert the output sense from your CPU.
I didn't have protection before, but since behaviour I described before, I tried some.
 

jozef007

Nov 9, 2019
28
Joined
Nov 9, 2019
Messages
28
Is THIS what we are trying to drive with the Xmega CPU?

thumb_1444.jpg

Are you overthinking this? WIll the XMega output drive the servo dirctly, as @Harald Kapp suggested in post #2, his comment issue #4?
I'm using xmega on 3.3V, so not enough for controlling servo so I used mosfet to help with it.
 

jozef007

Nov 9, 2019
28
Joined
Nov 9, 2019
Messages
28
Issue was resolved. For some unknown reason Lab power supply (0-30V,5A) was causing this interference. I taught that with such power and filtering should be impossible to have but I was wrong. I tried simple USB based power supply (3.3V and 5v) and it is working well.
Thx for all your help.
 
Top