Measuring an object that starts at rest, moves more a time, then stops


I have started on my open source project journey with a Rasperry Pi. Now I'm learning about Arduino and sensors.

I have a block of wood that at most times is sitting still, but I want to attach a sensor(s).. to help me detect it's motion. This wood piece get's picked up, moved around in the air .. and I want to trace it's movement and have that control a set of colored lights.

It sounds like the accelerometers coupled with magnometers will be my best bet.. but do you all recommend I get any arduino dev board(s)? Any literature on hooking this up to a Raspberry Pi?

This could go into a sort of light show where I toss objects out into the crowd and that allows fans to control part of the show.. get them more connected with what we're doing.

If you are not too concerned about the absolute position of the object, e.g. distance from the ground and distance from the stage etc etc, then I think it would be possible to create such an item.

If you use a MPU-9510 module (see

With an Arduino pro mini

A small battery and some method to transmit the data e.g.

You should be able to send the data from the sensor back to a base station (another Arduino) e.g. use a Uno

Use Virtual wire to send your data.

The main problem I think you will have, is sending the data, as the data rate normally used with these 433Mhz AM transmitters is not that high, and you want multiple units sending data at the same time (in reality each one would need to send at a slight different time).

You may need to use a more complex transmission system e.g. on 2.4Ghz instead of 433Mhz, as this would give you a higher data rate, but the range of the normal 2.4GHz devices is not good, but may be worth experimenting with eg NRF24L01

Or possibly use a 433Mhz FM unit like the Hope RFM12B or the newer versions of that module

Then on the base station end you need to get it to send the data from all 3 sensors, probably to a PC to analyze and then to control your lighting rig

Sounds a very cool project.

BTW, you will need to mount these things inside something, e.g perhaps some sort of foam rubber ball ??


Bluetooth may also be usable for the data transmission, eg straight back to a laptop. However the range can be somewhat limited (but it may be enough for your use).

I think the main problem will be to determine the orientation of the accelerometer/gyro/magnetometer..

Moving a block of wood around on a flat surface and calculating its position is fairly straightforward, but doing it with something that is tossed into a crowd is many orders of magnitude more difficult. If you don't know the orientation of the sensor, you cannot use the acclerometer outputs to tell which direction it is travelling. You could possibly find its orientation with a gyro, but just imagine the data involved in tracking a spinning ball that is tossed from one person to another.


The module has a compass (magnetometer) and they can tell you which way up the module is (as long has its been initially calibrated)

Well when I say, its been calibrated, I mean that the Arduino has run some code to calibrate the data for the full 360 orientations in X Y and Z planes.

After that, the code should be able to determine which way up the "block of wood" is.

Also the AFIK the accelerometer / gyros may give you a pretty good idea of which way up the device is, while its not moving too quickly, because the accelerometers register the earths G pull downwards and read 9.8 in that direction.

I don't think the total result of computing all the data will give you a totally accurate result, but I think it would probably be good enough for some funky way to control a light show.

Consider an item tossed into a crowd. Assume for the moment that the item remains in the same orientation from the time it's tossed until the time it's caught. The axis that would read 1g will only read 1g while the item is at rest, or moving horizontally with respect to the eath's surface. While it'e being accelerated upward, it will read more than 1g.and after release, less than 1g, increasing to 1g at the top of its trajectory... I don't think I need to detail it all. Now get rid of the assumptions, and allow the object to tumble, spin, be subjected to random forces in any and all directions, and I think you'll agree that it's a far more complex problem than the block of wood being moved around by picking it up, moving, and setting it down.

And even then, I have not taken into account the position of the sensor with respect to the CofG of the item holding it,

Yes, I agree that such an item could be used as an input for a light show, but to hope that you could even come close to making something display lights based on the position of the obect, using some combination of accelerometer, magnetometer, and gyro, is optimistic, I think.

Hi Larry,

I’m not sure how well it would work, but I’ll let you know in a few weeks, as I’ve just ordered 2 modules from eBay, from Hong Kong , for $10 each, and I have loads of mini Arduino’s kicking around and a several types of transmitter modules kicking around, so I’ll build something, stick it inside a large foam rubber ball and let you know how it goes !

rogerClark: I'm not sure how well it would work, but I'll let you know in a few weeks, as I've just ordered 2 modules from eBay, from Hong Kong , for $10 each, and I have loads of mini Arduino's kicking around and a several types of transmitter modules kicking around, so I'll build something, stick it inside a large foam rubber ball and let you know how it goes !

Definitely looking forward to that! PM me when you get it posted. I am missing lots of posts due to workload.

Hi Larry,

No worries.

But don't hold your breath, I've been waiting 4 weeks for an Arduino Due from one supplier on eBay, and its still not here, I suspect its been lost in the post, but its far cheaper for me to buy stuff from Hong Kong e.g. on eBay or AliExpress, than to try to get it locally in Australia, as there are no economies of scale over here, local suppliers tend to cost at least twice as much as buying overseas.

I often find its cheaper to get from the US or UK etc than to buy locally ;-(