Author Topic: Converting Sharp Ranger to I2C  (Read 2049 times)

0 Members and 1 Guest are viewing this topic.

Offline shimniokTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
    • Bot Thoughts
Converting Sharp Ranger to I2C
« on: August 21, 2013, 04:12:45 PM »
I developed a board that converts Sharp (or any) analog to I2C with oversampling and filtering to reduce noise and stabilize the signal based on an AVR application note. I was really surprised at how well that approach works (no more averaging for me).

I originally built the board for my autonomous 20mph rover, Data Bus as well as for Pokey, my Trinity-style Firefighting robot that needs rangers but doesn't have enough analog ports. Then I realized, duh, I could stick a ranger or two on my RPi tele-rover to aid while driving over the web. So they are useful to me, at least :) I'm probably going to sell them on Tindie. We'll see how it goes.

I have been writing up code examples for Propeller, Arduino, mbed, and RPi thus far.



So far I've built a pseudo-theremin. So, not that exciting :)  Demo here:

PseudoTheremin, smart Analog to Digital adapter

Thanks,
Michael
Michael Shimniok
http://bot-thoughts.com/

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Converting Sharp Ranger to I2C
« Reply #1 on: August 21, 2013, 06:22:21 PM »
Good job! I find that an Attiny running I2C is a very convenient way to hook up other parts of a 'bot. Personally, I use it for battery monitoring and power control (turn motors, fans, servos, etc on/off)

Also, technically, averaging multiple samples *is* a kind of oversampling with filtering! Now you're offloading it to the sensor-specific controller, and using slightly fancier math than a plain rectangular window, which probably makes life a lot easier on the main controller.


Offline shimniokTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
    • Bot Thoughts
Re: Converting Sharp Ranger to I2C
« Reply #2 on: August 21, 2013, 08:22:23 PM »
Thanks. It is good to hear you're also taking this approach of offloading focused tasks to Tinys.

We've been talking about this on diyrovers gmail list -- encoder counting, NMEA parsing, stuff like that. There are advantages. My own rover had a fast enough MCU to do everything but the distributed/modular approach is intriguing.

Last night, in fact, I was also contemplating building a backplane board that would accept a bunch of these Tiny boards to control various aspects of a robot. I may have to explore that further.

The nice thing about oversampling, decimation, and low pass filtering vs. averaging is that you effectively lower the noise floor in the bandwidth of interest. http://www.tuxgraphics.org/common/src2/article10051/avr-oversampling.pdf

I found a couple local guys who are doing some Sharp Ranger projects so hopefully they can help me try out the latest revision.
Michael Shimniok
http://bot-thoughts.com/

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Converting Sharp Ranger to I2C
« Reply #3 on: August 22, 2013, 12:43:06 PM »
There's a diyrovers mailing list? I've got to get on that. One of my two bots is a four-wheel-individual-drive rover (intended for Magellan.)

Offline shimniokTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
    • Bot Thoughts
Re: Converting Sharp Ranger to I2C
« Reply #4 on: August 22, 2013, 12:54:02 PM »
Yes, do join us! It's a roll-your-own kind of group with AVC and Robomagellan competitors involved.

Here: https://groups.google.com/forum/#!forum/diyrovers
Michael Shimniok
http://bot-thoughts.com/

 


Get Your Ad Here