Home » Java » Archive by category "Pi4J"

dealing DC motor noise

To come back on my previous post.  So putting a ceramic 100nF capacitor on the DC motor solved the interference (noise) issues.  I did a lot of reading on the internet.  Google was indeed my friend.  I had no clue what size of capacitor to use but I ready few articles where 100nF was proposed which was the size I tested and solved my issue.  The circuit is 5 Volt.  Since the capacitor solved my issue I did not pay attention to test other values.  Probably other values would have worked too.  I have no electronis background so I cannot explain.  I try to believe what others say and try it out myself.

In the meanwhile I have put together my remote car circuit (2 DC motors) and tried my application and it worked.  I had completely disassembled the car circuit to the bear minimum in my investigations.


Well thank god that has been resolved, now I can have a look on further improvements, especially on my code.

Continue reading »

IR with DC motor working !!!!

I did it !!!! I got the IR with DC motor working. I have put a ceramic capacitor on the DC motor and that made the noise go away. I used a 100nF capacitor. I had been reading about it but months ago I made the mistake not to use the right capacitor. I realized this after lots of reading and googling where the point of using a capacitor always popped up as solution. The clue was to use a ceramic capacitor. Don’t ask me why. I will now have to clean up my code and try to put back my car again because I had removed lots of pieces to come to a basic circuit with this issue to exclude other potential causes. Thank God it worked.


Continue reading »

Breakthrough ??

After trying a lot of things to solve the noise issue from the DC motor, I finally decided being without ideas to replace the DC motor. And guess what. Now the infrared reader keeps receiving correct values. The big question is now of course what is the difference between those 2 DC motors. Maybe too much Volts ? As a next experiment I will put use less AA batteries to support the DC-motor. At this moment I use 6 Volts (5 AA batteries of 1.2V). I have now ordered batteryholders (4 AA, 3 AA, 2 AA batteries) and will verify whether I see any change with the DC-motor I initially used.
I will come back with more news as soon as I got the battery holders from China. Might take a while.

Continue reading »


I have been done a lot of research and reading the last few days to figure out how I can solve my problem.  Finally I ended up at the following page about DC Motors.  See DC-Motors.

There is a part about noise caused by the DC motors.  To isolate both circuits (Raspberry Pi linked/Battery holder linked (l298n->DC-motor))  I have to use an opto isolator (opto coupler).  I did some further investigation and yes, that’s the way I wanna go.  It explains the issue that I have.  So I immediately decided to buy a couple of those opto isolators(4n35 FSC Optocoupler) on EBAY.  I can’t wait to get to work but I’ll have to work delivery which will take a few weeks :-(.  The opto couplers are on their way from China.



Continue reading »