Jump to content
Electronics-Lab.com Community

h-bridge dc motor control circuit Reworked


Recommended Posts

I am designing a simple dc motor control circuit using a single 4013 cmos edge triggered d-style flip flop with the q-bar output fed back to the data input. The set and reset inputs are at ground potential. The clock pulse input is being used to toggle the outputs of the flip flop. Each high input changes the flip-flop output state. This is driving an H-bridge which in turn is driving a dc gearmotor. My problem is that intermittently, the optic sensor I am using is passing the "hole" on my encoder without changing the polarity to my motor. This is quite infrequent but is causing problems. I am not an experienced engineer, rather, a repair technician. I am just trying to prototype a more complex instrument and this is just part of the overall design. Does anyone have experience with this?

Link to comment
Share on other sites


Hi heathtech,

Wellcome to our forum.

I would consider the possibility of either interference from light (if the encoder is IR or LED) or maybe the speed is in the higher range of the encoders capability.
This is just me guessing, but here is where I would start looking.
If you post the circuit someone might come up with more suggestions. ;D


Link to comment
Share on other sites

Thanks Ante,

The encoder is LED with an amplifier output. I need to do some modifications to the schematic, I'll try to post it later. However, I have turned off the room lights and encounter the same problem. Secondly, the motor is a gearmotor, i.e. the shaft turns at only 1/3 rev/ second. One additional note, the logic section works 100% when the motor is disconnected. I believe there might be intermittent back emf or something, but I am not sure the best way to filter it, if indeed this is it. My motor is constantly changing polarity/direction. When I put a capacitor across the motor leads it doesn't seem to help. Like I said before, I'm not a design engineer. This is a 24v brush motor being driven by 15 vdc (gives me desired speed/torque). The polarity changes at each 360 revolution of the shaft. I am using an LB1640 H-bridge IC to drive the motor. Any suggestions as to the best way to filter the noise?

Link to comment
Share on other sites

Hi heathtech,

I think maybe we have narrowed down the problem to interference from the motor. One way is to use a separate power supply for the motor circuit at least temporarily to find out for sure that this is the problem. To test this without any big changes is to put some caps on the motor. I would suggest as a test to use three ceramic 100nF for this, one of them between the two motor connections and one from each motor connection to the motor housing (can). There is also a possibility for the sensor circuit wiring to pick up magnetic pulses from the motor circuit and wiring, it’s then a matter of layout and shielding. I have one question; does the motor have time to stop completely between running right and left or is it just reversing at “full” speed? The reason for this question is that the harder you changeover the greater the pulses will be.  8)

Link to comment
Share on other sites

The switch from forward to reverse is intantaneous. There is no pause or delay between polarity changes. Another tech suggested that I condition my sensor signal with a scmitt trigger. He said the edge triggered flip flop might be sensitive to unclean input signals. What do you think? Any suggestions on the type of device and how to configure it?

Link to comment
Share on other sites

I am going to try adding the second power supply and testing the circuit. I know for a fact that when the leads to the motor are disconnected and the logic circuitry is allowed to work without a load (i.e. I interrupt the optical sensor with a piece of paper and read the voltage at the h-bridge output.), the circuit works 100% the way it is supposed to. I am certain that noise from the brushes is the culprit. I did add the schmitt trigger between the sensor and the flip-flop CP input, but it had minimal effect. I do need to filter the motor back emf, but I do not have any caps at my disposal in the nanofarad range. To be frank, I am not an engineer. I am a repair tech who is helping to design a prototype lab instrument. Can a cap in the microfarad range work? I have plenty of those.

Link to comment
Share on other sites

These caps I mentioned aren’t any exact science, so make a test with what you got to see if anything changes. Remember there are two possibilities for the brushes to interfere with the circuit, the radiation and the wire way! The motors back EMF should be taken care of in the H-bridge circuit by some diodes here, I don’t know your circuit but I am sure there are diodes to protect the transistors.

Link to comment
Share on other sites

Well, the LB1640 has a built in brake circuit so I wouldn’t worry too much about the EMF it’s taken care of inside the chip. But doesn’t it get hot from the abuse of changing direction without stopping, how big is your motor (W)?

Link to comment
Share on other sites

The motor is very small. I don't think it pulls many amps. The H-bridge IC is not getting very hot at all. It is a gearmotor, and is only turning at 1/3 rpm /second. I think it is dissipating the heat OK. I'll add a heatsink if this becomes a problem. Can you show me schematically how you might filter the motor? There is something definately going on with the motor, because when I remove it from the circuit and put a voltmeter on the H_bridge outputs, The entire circuit operates 100% correctly. It is only when the motor load is connected that it fails.

Link to comment
Share on other sites

Ok,
      thanks for all the posts and suggestions. I have taken all the comments from this forum and others and reworked my proto. It is working brilliantly (no skips on the encoder) I still have some minor quirks to fix, but, it is 99% working. I am going to revise the schematic to reflect all the changes and post it when I am finished. thanks.

Link to comment
Share on other sites

Hey folks
After several suggestions from other folks (2 guys named Len and L. Chung) on the net I have a new finished schematic to post. I tried putting caps on the motor, but that didn't do the trick. As you can see by the new schematic, I added a schmitt trigger and some caps on the board. The circuit is no longer skipping the hole intermittently. However, as Murphey would have it, a new, much smaller problem is occuring. When the circuit is first energizes, the motor oscillates quickly back and forth irrespective of the optical switch. After a minute give or take, everything lines out and it acts correctly. This problem is less troublesome, because I put a switch on the motor lead, and as long as I don't unplug the power supply, I can turn the motor on via the switch and it picks up where it left off. I suspect that the problem lies in the charge/discharge cycles of the caps somewhere. Maybe someone might see something I don't see. Thanks

post-9837-14279142294157_thumb.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...