Shop OBEX P1 Docs P2 Docs Learn Events
Sharp IR Sensor Tutorial for the Propeller Activity Board — Parallax Forums

Sharp IR Sensor Tutorial for the Propeller Activity Board

ChrisL8ChrisL8 Posts: 129
edited 2014-06-30 14:09 in Accessories
Parallax has this really nifty dual sensor stand with a PING))) and a Sharp IR Sensor:
http://www.parallax.com/product/725-28998


And Parallax has lots of documentation on the PING))) Sensor usage, including a great tutorial for electronic neophytes like myself.
http://learn.parallax.com/activitybot/build-and-test-ping-sensor-circuit


But I don't find anything similar for the Sharp IR Sensor.


So is there a tutorial for using the Sharp IR sensor with the Propeller Activity Board?
Or can we make one here?
Or is the Sharp IR sensor not a good investment?


I haven't bought any yet, but I thought I'd try some of these combo units to help my robots avoid "silent" obstacles, but only if I think I can make them work with the Propeller Activity Board without too much fuss.


Thanks! :)

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-06-28 17:38
    Those Sharp sensors output an analog voltage so the tutorial to read them is the tutorial to use use the ADC on the AB.

    I love Parallax but I'm also sucker for cheap ebay sensors. Similar sensors are available on ebay for seemingly impossible prices.
  • ChrisL8ChrisL8 Posts: 129
    edited 2014-06-30 13:39
    Thank you Duane, that answers my question.

    Yes, the threads with you and erco finding cheap ebay sensors are what came up when I searched the forum for this topic. Considering how many such threads there are, I imagine you two as some sort of sensor hoarders. :)
    I'll probably start with Parallax, because I appreciate the support and venture out once I am ready to start adding more and more sensors to my project.

    Regarding the onboard ADC on the AB, it has 4 ports, so does that mean it can only read 4 IR sensors?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-06-30 13:55
    clofland wrote: »
    Thank you Duane, that answers my question.

    Yes, the threads with you and erco finding cheap ebay sensors are what came up when I searched the forum for this topic. Considering how many such threads there are, I imagine you two as some sort of sensor hoarders. :)

    I've managed to collect an extremely large horde of sensors over the last six years. I'm sure my collection is small compared with many forum members.
    clofland wrote: »
    I'll probably start with Parallax, because I appreciate the support and venture out once I am ready to start adding more and more sensors to my project.

    I did the same thing. It's a good idea IMO since Parallax offers so much support on using their sensors. Once you've been doing this awhile it will be safer to try wild frontier of ebay.
    clofland wrote: »
    Regarding the onboard ADC on the AB, it has 4 ports, so does that mean it can only read 4 IR sensors?

    I don't have an AB but that's the way I understand it. You could always add another ADC chip. The MCP3208 has 8 analog inputs and can be controlled with three I/O pins.
  • PublisonPublison Posts: 12,366
    edited 2014-06-30 14:06
    clofland wrote: »
    Thank you Duane, that answers my question.

    Yes, the threads with you and erco finding cheap ebay sensors are what came up when I searched the forum for this topic. Considering how many such threads there are, I imagine you two as some sort of sensor hoarders. :)
    I'll probably start with Parallax, because I appreciate the support and venture out once I am ready to start adding more and more sensors to my project.

    Regarding the onboard ADC on the AB, it has 4 ports, so does that mean it can only read 4 IR sensors?

    Like Duane said, a MCP3208 will give you another 8 channels of analog input. I2C interface, which is pretty easy.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-06-30 14:09
    Publison wrote: »
    I2C interface,

    There are I2C ADC chips but the MCP3208 is SPI. (But still ones and zeros used to communicate.)

    IIRC The AB's ADC chip is also SPI. I think Parallax wanted the speed SPI can provide over I2C (which the PropBOE uses with its ADC chip).

    I2C can be used with two pins but you have to send an address of the device with each request for data (or at least the first request). SPI requires at least one additional pin but this extra pin is used to identify it's the chip being accessed so it doesn't require an address. Because of this (not sending an address), SPI is generally faster than I2C.
Sign In or Register to comment.