Convert Sharp Ranger to I2C

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

It's like magic :D Oversampling, decimation and filtering, I mean.

I'm converting a Sharp analog output to I2C using an ATtiny44A following AVR121 (pdf) with a leaky integrator filter.

I built it because I always seem to run out of analog ports and basic averaging with analog libraries wasn't getting the most out of the Sharp sensors.

Here's a pseudo-theremin I put together with the boards. http://youtu.be/6HEsA3RBoPc

I'm using Donald R. Blake's I2C code tweaked to support registers so I can configure the board via I2C and easily read values, etc.

The I2C protocol is simple: read 1 or 2 bytes to return the 8 or 16-bit conversion result.

I expect it'll be useful for a variety of sensors. It's I2C now, I'm working on Serial and SPI (after adding an SS pin).

I've got working examples for mbed, Arduino, and Propeller.

Next AVR, RPi. .NET Micro Framework, STM32 discovery board(s), LPCXpresso, ...

I'm calling it A2D. (catchy :roll:)

Some prelim docs/code:
https://code.google.com/p/bot-th...

Do you have a project that could use this?

I'm building a few more for folks to play with.

It should work - bot-thoughts.com

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

Interesting idea Michael and nicely explained.

Ross McKenzie ValuSoft Melbourne Australia