Shop OBEX P1 Docs P2 Docs Learn Events
Sharp IR Ranger => I2C — Parallax Forums

Sharp IR Ranger => I2C

shimniokshimniok Posts: 177
edited 2013-08-05 01:26 in General Discussion
I love Sharp rangers and wishing for a digital interface, I made one. It's a tiny board that converts analog to I2C. Looking at SPI, Serial, too.

IMG_9718.JPG

Now I can mate Propeller + Sharp rangers. Any of them.

My firefighting robot, Pokey, has few analog ports. Now it doesn't matter.

Oversampling, filtering and 125kSPS sampling produce a clean signal with reasonable bandwidth. Way better than simple ADC + averaging I've previously employed.

Is it hackable? Flexible? Yes. Easy to flash. I'm crafting it to easily bend to one's will.

I made a pseudo-theremin as a proof of concept. :) (Nerdy video here: http://youtu.be/6HEsA3RBoPc)

What would you do with one (or up to 27) of these? I want to build a radar--IRdar? Sharpdar? Might be fun to build a balancing robot. Sharp-based piano?

Sources: https://code.google.com/p/bot-thoughts-sharpi2c/

Michael

Comments

  • ercoerco Posts: 20,259
    edited 2013-08-01 08:01
    Nice, Michael!

    I also love the array of Sharp IR sensors and have used them in numerous places, including a balancing robot. My only "fail" so far was a quickie attempt at the world's simplest theremin, attempting to use a 555 timer as a VCO with the Sharp's output. It didn't work right away and I shelved it (I thought maybe the 555's current demands were too high for the sensor) but your very cool theremin demo makes me want to try it again.

    Great job, Boss!
  • shimniokshimniok Posts: 177
    edited 2013-08-01 10:56
    Thanks for the kind words erco!

    I realized last night-- I could've made the theremin with just the two adapter boards. 8-O

    One as an I2C master, have it read its own analog, read the other's output, adjust timer / pwm. Add amp, speaker...

    I am going to use these on my autonomous rover, Data Bus, for obstacle avoidance (mbed only has so many analog ports...).

    All this started with an ugly perfboard arduino clone used on the robot's curb sensor.

    Hm, I have a 5V radar module that spits out an IF... maybe I can slap one of these on it, too. Hmmmm....
  • MicksterMickster Posts: 2,719
    edited 2013-08-01 15:35
    Very cool indeed....are these commercially available (the I2C bit)

    I have a possible application.

    But what is the story with the SHARP sensor? I keep reading about them going out of production.

    Regards,

    Mickster
  • varnonvarnon Posts: 184
    edited 2013-08-01 22:36
    Mickster wrote: »
    I keep reading about them going out of production.

    Say it isn't so! I love these things.
    I have seen some of the models phased out, but I haven't seen anything about the entire line going away. I can't imagine it would.

    Shimniok,
    I feel like I have seen something similar offered on a commercial site, but I can't find it.
    This might be a neat item for a lot of people. Keep us posted.
    Also, a psuedotheramin was one of the first things I made with a distance sensor. They are fun.
  • MicksterMickster Posts: 2,719
    edited 2013-08-02 03:44
    varnon wrote: »
    I have seen some of the models phased out, but I haven't seen anything about the entire line going away. I can't imagine it would.

    This is more likely the case.




    I have had an idea for some time now about creating a machine monitoring system (not for operator safety for legal reasons) where things routinely go awry and the result is costly ($500+) downtime. In my particular application, an array of 30+ of these would be required.

    Regards,

    Mickster
  • shimniokshimniok Posts: 177
    edited 2013-08-02 09:26
    I'm going to start a Tindie Fundraiser soon. I think others can benefit, whether from having boatloads of sensors, clean signals, no-hassle ADC, or whatever else.

    @Mickster - maybe you are thinking of the GP2D12 which has been replaced by a newer design?

    Wow, 30+ ? No problem -- I'll let you in on a secret. ;) Though I say 27 per I2C bus, I am looking at making that unlimited. The solder jumpers support 27 unique addresses. But I'm looking to make the *base address* configurable, too, either through I2C command or burning EEPROM directly. Haven't gotten to that yet. :)

    @varnon - I know Solarbotics has "I2C-it" which is a converted GP2D12. Neat idea. Mine works with any of the Sharp sensors.

    If anyone is willing to help me test 'em out, offer suggestions, and/or help me work on the Propeller I2C code examples I could be persuaded to do a short run and send you one or two. :)
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-08-02 18:54
    Not sure if I could help you code, but I could definately help test them out. I have a Wild Thumper project going and these might foot the bill, or part of it any ways.
  • shimniokshimniok Posts: 177
    edited 2013-08-03 10:39
    Sounds fun! Let's give it a go, PM me?

    As far as coding, the challenge is to find an I2C driver that works right or make my own. I had issues with my FTDI+Linux then life got in the way. I guess I can get back to that now if I can't find a sucke---volunteer to help code. :D
  • shimniokshimniok Posts: 177
    edited 2013-08-05 01:26
    I've written a properly-behaving, pasm-based I2Cmaster object after a couple late night hacking sessions.

    It seems to be working properly with my I2C A2D module. I'll run a handful of additional tests then post up the object.

    After that we can talk about testing these devices in your projects. Stay tuned!
Sign In or Register to comment.