Maker Pro
Maker Pro

Optical Encoder Issue

MihirS

Jun 13, 2016
11
Joined
Jun 13, 2016
Messages
11
This is clearly a shielding and power supply problem. The switch-mode power supply is probably responsible for the interference. Try wrapping the sensor ribbon cable in aluminum foil and, using a short jumper wire with alligator clips on each end, connect the end of the foil farthest from the sensor module to circuit common. Do the same thing for the DC power cord from the "wall wart" power supply. If this "fixes" the problem you can replace these two cables with shielded cable.

Also, viewing the second video,I didn't see a single by-pass or power supply filtering capacitor on the main circuit board! What were you thinking? Do you have an oscilloscope you can use to look for this "noise" that is ruining an otherwise fine project? Nice circuit board construction, BTW.

Thanks for the quick reply and the compliment :)

I had tried using shielded wire for the encoder, however it did not solve the issue. As you said, maybe I need a shielded power supply cable..ill try that..
I have made provision on the PCB to attach filter capacitors and I did try various values 1uF, 10uF etc. but it did not affect the interference in the slightest way.. I am not sure how to find out which capacitor value to use. Unfortunately, I do not have an oscilloscope! :(

Image: Notice the two holes on the PCB between Arduino and terminal block? Thats where a capacitor can be inserted as shown in the next image...
 

Attachments

  • 1466747335046-1161082047.jpg
    1466747335046-1161082047.jpg
    256.9 KB · Views: 35
  • 1466747424755385472296.jpg
    1466747424755385472296.jpg
    251 KB · Views: 36

MihirS

Jun 13, 2016
11
Joined
Jun 13, 2016
Messages
11
Update: I tried using a diffetent adapter.. this time an old blackberry charger.. it is giving me much less interference..( X axis value jumped only once till now)

Update:
I measured and compared the current supplied by the cheap charger vs the blackberry charger. The cheap charger showed much less current supply.. This could also be a possible cause for the erratic circuit behaviour.
When the batteries were new, the circuit worked fine but soon values started jumping as the batteries drained..
Thus, insufficient current supply can also cause unwanted behaviour by the Arduino....
 

Attachments

  • 14667480253001675137378.jpg
    14667480253001675137378.jpg
    203.5 KB · Views: 29
Last edited:
Top