heathtech Posted June 6, 2005 Report Share Posted June 6, 2005 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? Quote Link to comment Share on other sites More sharing options...
ante Posted June 6, 2005 Report Share Posted June 6, 2005 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 Quote Link to comment Share on other sites More sharing options...
heathtech Posted June 6, 2005 Author Report Share Posted June 6, 2005 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? Quote Link to comment Share on other sites More sharing options...
ante Posted June 7, 2005 Report Share Posted June 7, 2005 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) Quote Link to comment Share on other sites More sharing options...
heathtech Posted June 7, 2005 Author Report Share Posted June 7, 2005 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? Quote Link to comment Share on other sites More sharing options...
ante Posted June 7, 2005 Report Share Posted June 7, 2005 Hi heathtech,How about my other suggestions? The ceramic caps and the layout/shielding issue, have you tested? What’s the status? Quote Link to comment Share on other sites More sharing options...
heathtech Posted June 7, 2005 Author Report Share Posted June 7, 2005 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. Quote Link to comment Share on other sites More sharing options...
ante Posted June 7, 2005 Report Share Posted June 7, 2005 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. Quote Link to comment Share on other sites More sharing options...
heathtech Posted June 7, 2005 Author Report Share Posted June 7, 2005 i am going to try to post a schematic Quote Link to comment Share on other sites More sharing options...
ante Posted June 7, 2005 Report Share Posted June 7, 2005 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)? Quote Link to comment Share on other sites More sharing options...
heathtech Posted June 7, 2005 Author Report Share Posted June 7, 2005 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. Quote Link to comment Share on other sites More sharing options...
ante Posted June 7, 2005 Report Share Posted June 7, 2005 OK, here I have drawn the caps on the motor. Shortest possible leads are most effective. I hope the motor has a metal can or this will be hard to accomplish. Quote Link to comment Share on other sites More sharing options...
Guest Alun Posted June 7, 2005 Report Share Posted June 7, 2005 Ground the motor frame for best results. Quote Link to comment Share on other sites More sharing options...
ante Posted June 7, 2005 Report Share Posted June 7, 2005 Since the motor runs in both directions I don’t think it would reduce the interference if you ground the motor body. This is what the caps are for. Quote Link to comment Share on other sites More sharing options...
MP Posted June 11, 2005 Report Share Posted June 11, 2005 heathtech,I would start by getting rid of the three 100 ohm resistors and use a small 5 volt regulator to power the digital circuitry. This might cure the problem.MP Quote Link to comment Share on other sites More sharing options...
ante Posted June 11, 2005 Report Share Posted June 11, 2005 Hi MP,You are correct, it would definitely not hurt! A voltage divider is not the best choice here. Quote Link to comment Share on other sites More sharing options...
heathtech Posted June 14, 2005 Author Report Share Posted June 14, 2005 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. Quote Link to comment Share on other sites More sharing options...
ante Posted June 14, 2005 Report Share Posted June 14, 2005 Hi Heath,I am glad you to hear you are making progress. I am sure I speak for many when I say I would like to see some pictures and know a little about the background too when it's all good and ready! ;D Quote Link to comment Share on other sites More sharing options...
heathtech Posted June 21, 2005 Author Report Share Posted June 21, 2005 Hey folksAfter 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.