Wireless communication with I2C sensor using ATTiny.

Thread Starter

manasij7479

Joined Dec 1, 2013
1
Hello everyone, this is my first post here !
I am working on a project that needs to send the data from an accelerometer to a computer.
So far, I have an arduino acessing the device (MMA7455) directly using the I2C bus.
But I need the sensor to be used wirelessly.
The scheme I have come up with, after some advice from a few helpful friends and strangers, is to use an ATTiny45 as the I2C master.
After receiving data from the sensor the ATTiny would flash an IRLED, and the arduino will receive the data, decode it and send it over to the computer over its usb .

I want some warnings about the problems I may run into.
The ones I have thought about are:

  1. Battery pack for powering the attiny and the sensor. How big? Where to buy?
  2. Infrared protocol.
  3. How to program the ATTiny to use the I2C bus? I have found online implementations that claim to be compatible with Arduino's Wire.h, but they have many users commenting about them being buggy. Is there a better way available ?
I want some views about the whole scheme, and suggest improvements.
If anyone of you have experience with a similar setup, I want some insight into what problems you have faced, so I do not make the same blunders.

(If the mods feel that this question may be better suited to the microcontroller/embedded sub board, please move it over there.)
 

JBernard

Joined Aug 8, 2013
46
so you're wanting a wireless accelerometer unit compatible with your arduino platform?
have you looked into the XBee yet? sounds like it would be a piece of cake using that, since people make remote temp/humidity sensors with them all the time.
 

sirch2

Joined Jan 21, 2013
1,037
Why not use an ATMega 328 rather than the ATTiny if you want I2C? It's not that expensive and has all the examples etc. Google "breadboard arduino". Buy yourself a USBTiny programmer and you are up and running. You can blow Arduino sketches to the chip without a bootloader.

Battery pack - how long do you want it to run for on batteries, is there a weight limit, why batteries at all?

Infrared protocol - what ever you want it to be, you could possibly drive the IR from the serial pins. As JBernard says there is XBee or there are other RF serial replacement modules that are cheaper - google "Wireless serial"
 
Top