Shop OBEX P1 Docs P2 Docs Learn Events
Powering an IR receiver from VIN on a QuickStart board — Parallax Forums

Powering an IR receiver from VIN on a QuickStart board

David BetzDavid Betz Posts: 14,516
edited 2014-09-21 21:58 in Propeller 1
I bought a couple of Parallax IR receivers that I was hoping to use with the QuickStart board. I failed to notice before I ordered them that they require 5V and the QuickStart board only has a 3.3V supply. On the other hand, it looks like VIN is brought out to the QuickStart header so I'm wondering if it would be safe to use that to power the IR receiver. If I plug the QuickStart into a USB port I should be getting 5V on that line, right? Is that 5V stable enough to use as a power supply for the IR receiver?

Here is a link to the receiver I purchased: http://www.parallax.com/product/350-00039
«1

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2014-09-21 14:56
    Go for broke and try it with "3V" anyway.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 15:00
    PJ Allen wrote: »
    Go for broke and try it with "3V" anyway.
    You mean just power it from the 3.3v supply?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2014-09-21 15:08
    Yessir, from the 3.3V supply.
    Won't kill anything (I promise).
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 15:12
    If I run the IR receiver off of 3.3v, should I remove the 220 ohm resistor between its signal pin and the Propeller pin? I'm assuming this is there to deal with running a 5V sensor on a 3.3V Propeller pin.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2014-09-21 15:25
    The output is pulled up, I don't see it making much diff either way.
    Try it with and then try it without.
  • cavelambcavelamb Posts: 720
    edited 2014-09-21 16:11
    Ii ran mine off of Vin.
    I think I sorta remember that they wouldn't run from 3v
    But check it and see

    .
    QSIR-02A.JPG


    Be REALLY gentle with the pins.
    If you need to bend a pin, hold the device with needle nose pliars
    ABOVE the bend. Any mechanical movement of the pins at all
    breaks the internal connections.
    800 x 600 - 106K
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-09-21 17:10
    Vin when powered from USB should be able to power the IR receiver just fine. If you have trouble add a capacitor across Vin and Vss. I've run two small servos from Vin when powered from USB but I had to add a big cap to keep the board from resetting (for some reason that USB hub no longer works).
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 17:22
    Duane Degn wrote: »
    (for some reason that USB hub no longer works).
    This sounds pretty scary. Are you saying that the circuit fried your USB hub? I've been plugging Propeller boards directly into my laptop. Maybe it's better to put a powered hub in between?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2014-09-21 17:39
    Duane Degn wrote: »
    that USB hub no longer works.

    Servos are still motors, lots of current demand when overcoming inertia. Maybe that hub has a fuse.

    But, anyway, DB - any joy yet?
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 17:49
    PJ Allen wrote: »
    Servos are still motors, lots of current demand when overcoming inertia. Maybe that hub has a fuse.

    But, anyway, DB - any joy yet?
    Not yet but I'm still collecting parts to get this working. I now notice that the DEFCON badge uses a 33 ohm resistor in line with the IR LED. I don't think I have anything that small. May need to run to Radio Shack. :-)
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2014-09-21 17:55
    3 100Ω in parallel == 33Ω
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 17:58
    PJ Allen wrote: »
    3 100Ω in parallel == 33Ω
    Of course! Why didn't I think of that. Thanks.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 18:53
    Using VIN to power the IR receiver and a 220 ohm series resistor to connect to the Propeller pin seems to work. I also did as suggested and used three 100 ohm resistors in parallel in the IR LED circuit. The good news is that JonnyMac's IR test program passes. Now I just need to see if this can talk to a DEFCON badge which works at a different frequency.
  • JonnyMacJonnyMac Posts: 9,105
    edited 2014-09-21 19:00
    I'm assuming this is there to deal with running a 5V sensor on a 3.3V Propeller pin.

    No, that's not what it's there for -- for a 5V signal you need 2.8K or higher. What the 220 is doing is limiting the current out of the pin if you make it an output and high while the IR receiver is pulling the line low.

    That's the key here: the IR receiver is an open-collector device; and most use a 20K or higher pull-up which makes it safe to power the sensor from 5V and connect into the Propeller (20K > 2.8K). As PJ pointed out, many IR sensors have a wide operating voltage, so you might as well try it at 3.3V. Unfortunately, there is no data sheet attached to the product page. You may have to call Tech Support to get specifics on that part.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-09-21 19:01
    David Betz wrote: »
    This sounds pretty scary. Are you saying that the circuit fried your USB hub? I've been plugging Propeller boards directly into my laptop. Maybe it's better to put a powered hub in between?

    I'm not sure if the servos caused the hub to die. The hub didn't die while using the servos.

    Of course using a powered hub would be safer than not using one but as long as you don't do anything dumb (like powering servos) you shouldn't need one.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 19:02
    JonnyMac wrote: »
    No, that's not what it's there for -- for a 5V signal you need 2.8K or higher. What the 220 is doing is limiting the current out of the pin if you make it an output and high while the IR receiver is pulling the line low.

    That's the key here: the IR receiver is an open-collector device; and most use a 20K or higher pull-up which makes it safe to power the sensor from 5V and connect into the Propeller (20K > 2.8K). As PJ pointed out, many IR sensors have a wide operating voltage, so you might as well try it at 3.3V. Unfortunately, there is no data sheet attached to the product page. You may have to call Tech Support to get specifics on that part.
    It seems to work when connected to VIN. I'll try 3.3v next. Thanks.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 19:05
    JonnyMac wrote: »
    No, that's not what it's there for -- for a 5V signal you need 2.8K or higher. What the 220 is doing is limiting the current out of the pin if you make it an output and high while the IR receiver is pulling the line low.

    That's the key here: the IR receiver is an open-collector device; and most use a 20K or higher pull-up which makes it safe to power the sensor from 5V and connect into the Propeller (20K > 2.8K). As PJ pointed out, many IR sensors have a wide operating voltage, so you might as well try it at 3.3V. Unfortunately, there is no data sheet attached to the product page. You may have to call Tech Support to get specifics on that part.
    As you guessed, 3.3v works perfectly well with this IR receiver. Now I just need to try it with the real DEFCON badge to see if they can communicate.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 19:10
    Here is a picture of my "poor man's defcon badge".

    pseudo-badge.jpg
    1024 x 768 - 96K
  • YanomaniYanomani Posts: 1,524
    edited 2014-09-21 19:14
    Hi Duane Degn

    How big was the cap you had put at Vin? Kind of a super capacitor, whose value is measured in the order of Farads?

    Yanomani
    Duane Degn wrote: »
    Vin when powered from USB should be able to power the IR receiver just fine. If you have trouble add a capacitor across Vin and Vss. I've run two small servos from Vin when powered from USB but I had to add a big cap to keep the board from resetting (for some reason that USB hub no longer works).
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2014-09-21 19:30
    David Betz wrote: »
    3.3v works perfectly well with this IR receiver.

    Another job well done!
    Next step, World Peace.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 19:32
    PJ Allen wrote: »
    Another job well done!
    Next step, World Peace.
    I'll leave that one to JonnyMac. After all, he's the one who made the 3.3v suggestion. :-)
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2014-09-21 19:47
    David Betz wrote: »
    I'll leave that one to JonnyMac. After all, he's the one who made the 3.3v suggestion. :-)

    I thought that was me.
    Maybe I'm having an aneurysm.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 19:48
    PJ Allen wrote: »
    I thought that was me.
    Maybe I'm having an aneurysm.
    You're probably right. Anyway, it works and seems a bit safer than using VIN. So I guess you're on the hook for solving world peace!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-09-21 19:59
    BTW, putting a big cap on Vin is not a good idea unless there's inrush current protection (i.e. "soft start") on the USB supply.

    -Phil
  • JonnyMacJonnyMac Posts: 9,105
    edited 2014-09-21 20:08
    3.3V to the IR sensor was PJ's suggestion, and a sensible one at that. Glad you got it working.

    BTW... the center frequency of the IR filter on the badge is 36kHz. The center frequency on the device you have now is 38kHz. Not to work -- the badwidth on these devices is wide enough that you can use either and at close range it will work.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-09-21 20:17
    JonnyMac wrote: »
    3.3V to the IR sensor was PJ's suggestion, and a sensible one at that. Glad you got it working.

    BTW... the center frequency of the IR filter on the badge is 36kHz. The center frequency on the device you have now is 38kHz. Not to work -- the badwidth on these devices is wide enough that you can use either and at close range it will work.
    Yes, you warned me about the center frequency in an email. I'll try to see if I can get this quickstart clone working with the real badge. If not, I can make another quickstart clone and get them to talk to each other. That should verify that I have the IR handling correct in my C++ translation of your Spin code. Short of that, I need to find someone with two badges to test this.
  • YanomaniYanomani Posts: 1,524
    edited 2014-09-21 20:25
    Hi Phil Pilgrim

    That was just the reason I had questioned Duane Degn, about the use of some sort of super capacitor or not!

    Yanomani
    BTW, putting a big cap on Vin is not a good idea unless there's inrush current protection (i.e. "soft start") on the USB supply.

    -Phil
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-09-21 20:39
    Yanomani wrote: »
    Hi Phil Pilgrim

    That was just the reason I had questioned Duane Degn, about the use of some sort of super capacitor or not!

    Yanomani

    The capacitor was 1000uF. Too much?

    I was using the USB line to power my QuickStart servo tester.

    I generally don't power servos from USB.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-09-21 20:54
    Duane Degn wrote:
    The capacitor was 1000uF. Too much?
    If the USB specs are to be believed, 1000uF is way too much. According to this source:
    http://www.beyondlogic.org/usbnutshell/usb2.shtml

    "Other VBUS considerations are the Inrush current which must be limited. This is outlined in the USB specification paragraph 7.2.4.1 and is commonly overlooked. Inrush current is contributed to the amount of capacitance on your device between VBUS and ground. The spec therefore specifies that the maximum decoupling capacitance you can have on your device is 10uF . . .

    That's without external softstart circuitry to provide inrush current limiting. Ohterwise, that 1000uF cap will look like a dead short to the USB host system.

    -Phil
  • YanomaniYanomani Posts: 1,524
    edited 2014-09-21 21:27
    Thanks Phil, by bringing this information to the debate. I'll never thought a limit lower like this one as being the maximum, without needing soft start. Time to review my (limited) knowledge about using USB, before any attempt of careless powering general hardware. Yanomani
    If the USB specs are to be believed, 1000uF is way too much. According to this source:
    http://www.beyondlogic.org/usbnutshell/usb2.shtml "Other VBUS considerations are the Inrush current which must be limited. This is outlined in the USB specification paragraph 7.2.4.1 and is commonly overlooked. Inrush current is contributed to the amount of capacitance on your device between VBUS and ground. The spec therefore specifies that the maximum decoupling capacitance you can have on your device is 10uF . . .
    That's without external softstart circuitry to provide inrush current limiting. Ohterwise, that 1000uF cap will look like a dead short to the USB host system. -Phil
Sign In or Register to comment.