Showing posts with label drive circuit. Show all posts
Showing posts with label drive circuit. Show all posts

Saturday, April 9, 2011

H-bridge Board Complete

The H-bridge board is now complete! Time to go get heat sinks.




Sunday, April 3, 2011

H-bridge works!

All problems in the previous post has been solved! A single power supply can run the entire circuit without interruption by the motor. The FETs don't heat up anymore and driving them with a PWM signal actually varies the speed!

Below is the schematic for the working h-bridge. D1~D4 are 1N4007, which has a peak repetitive reverse voltage of 1000V. I am anticipating only a couple hundred volts being produced from switching the inductive load, but it's best to be safe since they cost about the same anyways.The resistors keep the h-bridge FETs all off when there is no input. The FETs are IRF530 and IRF9530, which can handle a much bigger load, but since these were the ones I initially ordered these are the ones that we're using. The inverters are actually NOR gates from a 4001 IC; this is to amplify the 3.3V/0V (High/Low) microcontroller output to 5V/0V (High/Low), which correspond to the power supply voltage for bridge.


Test program decremented pulse width, switched direction, then incremented pulse width again. The FETs did not get hot (motor unloaded). Other than that, I am not sure why the motor voltage is not symmetrical. The measure function is reading Vpp,max =10V, but it seems to work fine. Loading the motor (pressing axel with finger) did not affect the waveform significantly. I guess I just have to solder it now.


H-bridge trouble

Instead of just buying one off the shelf, I decided that I should try building a H-bridge myself. I do not have any experience actually designing one myself so I thought this would be a good experience. I later found out that it was not as easy as it looked. I was able to successfully drive a motor, but there were also many problems.

Here is a list of problems I ran into:
  1. Power supply affected by switching FETs > microcontroller resets :(
  2. PWM heats up the board (also doesn't work)
  3. Slow response of motor (~0.5 sec) > definitely why PWM doesn't work
(problem 1): I solved this by adding a separate power supply to the robot. This is not ideal since the robot can't support a large load.

(problem 2): This is possibly caused by two reasons. The first is that we may be switching the FETs in a bad order, causing a momentary short-circuit in between switches. The second is that I need to include a flyback diode. I believe that this is most likely the cause even though in the datasheet they say there is an internal diode (some times datasheets lie {also the diode's current tolerance may be under-spec}).

(problem 3): Having taken a course on control theory (doesn't help much), applying our knowledge we have decided to blame the time constant of the system. There are several issues that may be contributing to the slowness. I haven't removed the pull-up/down resistors from the gates from when I was testing it (to avoid floating inputs). In order to save power, I made them very large (100k Ohm), which means that the RC circuit created by the parasitic cap in the FET and the resistor has a massive time constant. The other problem may be that we are driving the motor at a voltage far off from what it's meant to be used at. It's also possible that the drain-source voltage of the FET is smashed (FET no longer in saturation region) and needs time to recover.

about flyback diodes: flyback diode wiki