Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Optical encoder nightmare!

Status
Not open for further replies.

jimbo750

New Member
Hi there!

I'm having a nightmare with a motor and an optical encoder,

When I test the setup with the motor I want to use (a planetary 12V DC, precious metal brushes), the optical encoder seems to generate additional false pulses whenever the motor is moving, so it creeps and looses its position very quickly.

The motor draws ~800ma at stall, but it seriously interferes with the encoder/uC communication even when rotating unloaded, where current draw will be <100ma I believe.

I have another, cheaper and dirtier 12V motor which is 50% more powerful, and it exhibits ZERO encoder errors/ creep when wired into the same circuit, even when moving very quickly. If I turn the encoder by hand, even very fast moves won't confuse it, the software side is working very well.

So, I assume that these false Encoder pulses generated when the DC motor is running are a result of EMI? This is my first serious encounter with EMI, I don't know the place to start looking in my circuit (see attached). Each IC is bypassed. I have tried with 1k and 10k pull-up resistors on the Encoder outputs, as it doesn't have them internally.

Any tips on where to start my EMI reduction journey, or have I missed something else entirely?

Jimbo
 

Attachments

  • Motor-Schematic.jpg
    Motor-Schematic.jpg
    40.7 KB · Views: 516
For a start you appear to have neglected to fit suppression components on the motor, that would be the first thing to do - look up suppression used on radio control model motors.
 
Cheers Nigel- following your lead, I stumbled upon a thread discussing using 3 capacitors for suppression-- one from each motor terminal to motor chassis, and another capacitor between terminals. My motor has a factory-fitted capacitor between terminals, so I tried a 2uF electrolytic capacitor from each terminal to motor chassis (the only size I have at hand). Erroneous edges in the encoder signals have reduced by approx 75%. I've been advised that a ~0.1uF ceramic would be much better for these types of EMI frequencies, so I've going to order some and give that a go!
 
You might also try high current RF chokes feeding the power to the motor - this, along with the three capacitors, makes a MUCH better low-pass filter - also solder a wire from the body of the motor to the chassis.
 
Thanks again, I had advice elsewhere about RC filtering the encoder, etc., but I really want to tackle the EMI at source-- your capacitor suggestion worked surprisingly well even with 2uF electrolytics, so hopefully it will be even better with ~0.1uF ceramics. RF chokes- do I wire one (or two, since the motor is bi-directional?) in series with the motor?
 
If the motor draws <100ma unloaded, and 800ma at stall, I presume a RF Choke rated to 1200ma would be ample? Or do I need to over-spec it?

Appreciate it.
 
What is the mechanical load the motor is driving? Is it a gear motor?

I have seen situations where there is mechanical oscillation especially when driving a bouncy load through gears, that made the optical encoder false trigger. This is worse when encoders have very fine resolution that may be smaller than the geartrain slop.

In a lot of cases it's good to debounce the encoder in software and even put RC filters on the 2 encoder inputs at the micro.
 
Nigel, if you don't mind, would this be suitable? EPCOS|B78148S1473J000|INDUCTOR, AXIAL, 47UH | Farnell United Kingdom

1uH, 1200ma (...Q=55, fQ=7.96MHz, fres min=205MHz...). Would a higher uH version help more? (they take less current, but still more than I need)

Mr RB- yeap it's a gear motor, and I had this thought too. We did a bunch of tests to rule it out, so unfortunately there's definitely more going on! When we drive the motor from a different power source/ circuit, the false encoder edges disappear. Also, if we disconnect the motor from the encoder physically (so they are both still wired electrically, with the motor turning but the encoder static), the encoder still generates false edges, i.e. it's 'position' starts creeping a few ticks a second even though it is physically stationary.

thanks!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top