My brother is a highschool student tasked with making a DC motor. It is finished and works however I thought for the sake of learning and the additional cool factor (I'm relatively new to this field), I could make an optical RPM sensor which I could tack on.
It works perfectly and I have tested it on an un-powered motor (using a drill). The problem arises the second the motor starts turning with electricity as the power source. I'm guessing the sparking commutators?
Either way, it causes the arduino to go haywire if it is within 50cm of the motor, and eventually corrupts forcing me to hard reset it. This happens almost instantly.
Something to note, the motor and the arduino are powered seperately.
I tried shielding the components with aluminium and had no luck. This project is due in a few days so I have to try fix this ASAP with what I have on hand. Worst case scenario, he submits it without the electronics.
Hopefully shielding isn't the only way. Is there an electrical engineering solution I can apply to the sensor above or the motor itself to dissipate this noise? I have a large range of capacitors/inductors/resistors/transistors on hand.
Also something I have tried to no avail: I have tried 2x 10nF ceramic capacitors attached to the motors commutators. I have tried using a 33uH inductor in series with the VCC of the motor. I have tried connecting the iron core holding the magnets to the ground of the arduino and the ground of the motor power supply. The motor is running on 6xAA batteries.