I've got a solder-less bread-boarded prototype microcontroller with a few I2C devices that take some measurements on a motorcycle. For now, The MCU is powered by a LM7805 with decoupling caps near the device from a 12v source. The devices are working fine when the power is on, but when the engine is started the I2C devices become unresponsive, but SPI still works just fine.
There are only two wires which are connected between the MCU and the motorcycle. 12v power and ground. The rest of my devices are isolated.
How do I diagnose the issue? I've got a very basic scope, logic analyzer, and a nice multimeter. Where should I begin? What other information can I provide?
Is there any kind of filtering that I can try? Maybe Some type of Low-Pass Filter on the 12V feed?
Update: Per the comments and answers, it seems that the engine running engine is introducing some type of noise which is causing the issue.(I suspect the charging system/alternator, but I can't say). Also, with my lack of a pro-grade oscilloscope, I am unable to actually see the noise. Some possible solutions are:
- ditch the breadboard for a PCB
- better power supply/filtering
- I2C Bus isolation
- All of the above?
Update: I was thinking about some comments and EMI and remembered that the device worked when I had it on the bench but still connected to the motorcycle with the engine running. I had the breadboard fixed to the top of the gas tank and the I2C bus was not working. So, I just lifted the breadboard off of the gas tank about 3 inches above and the I2C bus became responsive after a power cycle of the system. When I moved the breadboard slowly back down toward the tank, the I2C would get corrupted! Note: The ignition coils are just beneath the tank as well.
So, is this an EMF/EMI issue? How Do I mitigate this?
Are there any low cost, easy to implement, low noise regulators that I could try instead of the the LM7805? What simple things could I try to fix this?
I've designed a PCB, but hesitant to order/make one unless I know this it's going to work in my case. Is there any type of PCB peer review where I could get an "OK" on my design?