IR LED on GPIO

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi all!

as always this is my always good place to ask for help also on non related AVR issues.

I have a little micro (PIC) with an IR receiver (SFH-5110-38) connected to a GPIO preset as input. The IR receiver is actually not used but physically connected to GP3. It don't give always out a logic 0 or a 1, but sometime it gives a value in the middle. the result is that the micro, that is mostly in sleep, jump from 7uA to 40uA of consumption :( Anyone has some idea on how keep the consumption low ?

thanks
angelo

Angelo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's likely the digital buffer of the pin slightly crowbarring the power supply to ground.

Some AVRs allow to disable the digital buffer on an input, but I don't know if there such possibility on a PIC.

Another possibility is just to cut the trace on the PCB.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks jayjajy,
seems there is no chance to disable the buffer.

This little board is powered from serial port, and when disconnected, a battery keep the PIc powered, but not the IR. In this state i need a very low consumption, and since the IR led is not powered, his output pin has a random value in the middle between Vih and Vil.

The GP3 in this PIC is used also for programming it, so in any way i have to break the line otherwise i cannot program it.

I am thinking to put a resistor in serie, and just after a pull-down or up.

Angelo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Microchip user forum might have better answers than here.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So it is not an IR LED but an IR receiver module.

Would enabling software pull-up help? Although that would bring the pin down when IR module is not powered.

Besides two outputs (programming, IR module) cannot drive an IO pin at the same time, so you do have to isolate them.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't know which chip you're using, or which pin, but if the pin can be used as an analog input, even for a comparator, set the pin to analog in any time the IR module is powered down. This disables the digital input buffer, and eliminates the large currents drawn by a floating digital pin.