Electronic – Effects of not enough current for a microcontroller

picaxesensor

I have a picaxe 28-x1 and a Sharp Distance Sensor. When I try to program the PIC with the sensor plugged in it can't find the PIC but when I unplug the sensor it finds it. Is it possible that the sensor is using all the current and there isn't enough for the PIC? When I test the separate parts they work. Is it another problem, if so what?

Best Answer

It's possible, but I think it's probably more likely that the pin you've connected the sensor to is related to the PIC's programming pins and/or reset function, and that the sensor is interfering with the programming protocol as a result.

That being said, if some component is overloading the power source (drawing too much current), the effect would be that the voltage that the power source was providing would dip. If it dips below the PIC's power-on voltage, you certainly won't be able to program it.

The PIC might also draw more current during the programming operation than it normally would, and the combination of that and the sensor load might have the same effect of critically dropping the voltage of your source (most likely resulting in an untimely reset of the PIC).

Best way to diagnose this is with a multimeter weasuring the source voltage with and without the sensor and with and without programmer attamhed (and with and without programming going on). If you observe a voltage drop, try it with a higher current-rated power source and see if you still get a drop.