Topic: USB POV/Accelerometer Toy (Read 64948 times)

## Re: USB POV/Accelerometer Toy

##### Reply #15 – September 12, 2010, 03:38:37 pm
Why not. PM or mail is always welcome.

## Re: USB POV/Accelerometer Toy

##### Reply #16 – September 14, 2010, 06:52:16 am
[quote author="IPenguin"]
[quote author="tayken"]
You cannot measure speed with an accelerometer, you can only find how the board is oriented. Also you might sense the direction change with the jerk but that might be problematic. ...
[/quote]
I like this project idea!

For details on accelerometers: You can derive speed from acceleration a(t) dv(t)/dt --> dv(t) = a(t) * dt
I am not sure how you'd determine the orientation with an accelerometer only - so you may determine the direction of movement relative to the starting point.
[/quote]

[quote author="tayken"]
Yep the math is correct but in reality this is problematic. Accelerometers give out noisy signal outputs, and using the derivative or integral of a noisy signal is not a good idea as there are large errors. They caused lots and lots of problems during my research on UAVs: bias voltage, high sensitivity to vibrations, scaling etc. You can of course use some kind of filter but this will delay your response.
[/quote]

I also don't think that the speed can be measured accurately but at least it can be 'estimated' using the formula given above. Surely not enough for UAV applications but I think it is just enough for POV applications.

I was thinking about adding a 3-axis gyro to this one so that IMU applications can also be done. Not sure if it is a good idea because it will just make the project more expensive. Do you know any cheap gyro chips?

## Re: USB POV/Accelerometer Toy

##### Reply #17 – September 14, 2010, 12:57:09 pm
First thing that crossed my mind when I saw this project was not UAV... but head tracking and racing/flight simulations :| I would like one Accelerometer Toy on my head

## Re: USB POV/Accelerometer Toy

##### Reply #18 – September 14, 2010, 09:32:14 pm
[quote author="Jer"]
I also don't think that the speed can be measured accurately but at least it can be 'estimated' using the formula given above. Surely not enough for UAV applications but I think it is just enough for POV applications.
[/quote]
I was thinking about the possible glitches and other undesired effects of noise on the image. But possible to solve them with some math probably.

[quote author="Jer"]
I was thinking about adding a 3-axis gyro to this one so that IMU applications can also be done. Not sure if it is a good idea because it will just make the project more expensive. Do you know any cheap gyro chips?
[/quote]
Nothing comes up to my mind now. But there are 3-axis gyro chips available so prices for the older technology might be dropped a little. Also Wii has an expansion with 3-axis gyros for its controller, you might want to check it out, I'm planning to buy that one.

[quote author="siklosi"]
First thing that crossed my mind when I saw this project was not UAV... but head tracking and racing/flight simulations :| I would like one Accelerometer Toy on my head
[/quote]

## Re: USB POV/Accelerometer Toy

##### Reply #19 – September 16, 2010, 02:43:14 pm
Here is the new layout. Comments are welcome

* PIC18F24J50 MCU
* 3-axis accelerometer, I2C interface
* SPI EEPROM
* Option for thru-hole or SMD LEDs
* Header pins for I2C and SPI buses

## Re: USB POV/Accelerometer Toy

##### Reply #20 – September 16, 2010, 04:21:56 pm
[quote author="tayken"]
Yep the math is correct but in reality this is problematic. Accelerometers give out noisy signal outputs, and using the derivative or integral of a noisy signal is not a good idea as there are large errors. They caused lots and lots of problems during my research on UAVs: bias voltage, high sensitivity to vibrations, scaling etc. You can of course use some kind of filter but this will delay your response.[/quote]

My comment related to the subject of this thread "USB POV/Accelerometer Toy". UAVs and IMUs have completely different requirements regarding precision, noise reduction/filtering and many other details ...

However, for a USB POV Toy start of movement (acceleration/direction), change of direction and a rough estimate of the speed will suffice.  I like Jer's design, it's simple yet versatile and should be a good platform to implement and evaluate general accelrometer applications ... the POV Toy being just one of many.

Texas Instruments has a short basic introduction to accelerometers with some simple but valuable tips: http://www2.usfirst.org/2005comp/Manuals/Acceler1.pdf

## Re: USB POV/Accelerometer Toy

##### Reply #21 – September 16, 2010, 07:53:15 pm
[quote author="Jer"]Here is the new layout. Comments are welcome

* PIC18F24J50 MCU
* 3-axis accelerometer, I2C interface
* SPI EEPROM
* Option for thru-hole or SMD LEDs
* Header pins for I2C and SPI buses
[/quote]Nice!

Have you guys standardized on the smaller SMD crystal that's in some recent projects?  I have no idea which is cheaper, readily available, and more manufacturable, but smaller is usually better.

The resistor packs are a great idea.  There are single parts with 8 resistors on a bus, instead of two parts with 4 discrete resistors.  Since the LED resistors are all grounded, you could use a 10-pin SMD resistor pack instead of two 8-pins.

The 24J50 and multi-site LEDs are perfect.

## Re: USB POV/Accelerometer Toy

##### Reply #22 – September 17, 2010, 03:30:11 am
I know of a company that makes the large telescopes that go up on top of mountains.  One of the installations had a problem with wind causing the telescope to vibrate.  The engineer on the project used a Wii as a sensor for the hardware to cancel out the vibration.  Once he proofed the concept he designed dedicated hardware to replace the Wii. [s:]I believe he used the same sensors as the Wii.  Also knowing him, he probably used a PIC for the controller.[/s:]

Edit:

Looking back over my notes I believe he used the ADXL330 and a PIC18F2553.
"Too many projects, so little time"

## Re: USB POV/Accelerometer Toy

##### Reply #23 – September 17, 2010, 05:32:26 am
Note that the MMA7455L only has typically 64 counts per G not 64 bits.  That means that the tilt resolution is about 0.896 deg at zero degrees and 10.142 deg at 90 deg.  The equation is

angle = asin(A/1 g)

This would affect the performance for use as a tilt sensor or UAV sensor.  Probably not be an issue as a accelerometer along the axis.  For the POV you would probably have to combine the three axis in some meaningful way.

"Too many projects, so little time"

## Re: USB POV/Accelerometer Toy

##### Reply #24 – October 11, 2010, 04:57:30 pm
I just want to share my previous project: http://voltsandbytes.com/tinypov-yet-another-avr-pov-project/. i do not know if that would be useful but I guess the GUI is a good starting point. I can't continue working on the GUI because I am bad at C#

## Re: USB POV/Accelerometer Toy

##### Reply #25 – October 11, 2010, 05:08:20 pm
Quote
I can't continue working on the GUI because I am bad at C#

I don't like desktop programming at all

I'd like to adopt the format of an existing open source tool that's active and well supported. I think we talked about a couple up thread. I saw one that seems really advanced on the blogs a while back.

Jamz can write us a small utility that logs readings to a text file/console display for Accel examinations.

## Re: USB POV/Accelerometer Toy

##### Reply #26 – October 22, 2010, 11:31:57 am
The PCBs for this arrived. I don't ahve the resistor arrays yet though.

## Re: USB POV/Accelerometer Toy

##### Reply #27 – October 25, 2010, 05:32:41 am
[quote author="ian"]
Quote
I can't continue working on the GUI because I am bad at C#

I don't like desktop programming at all

I'd like to adopt the format of an existing open source tool that's active and well supported. I think we talked about a couple up thread. I saw one that seems really advanced on the blogs a while back.

Jamz can write us a small utility that logs readings to a text file/console display for Accel examinations.
[/quote]

If you need some C# coding done, I can do it.  McZ
"Too many projects, so little time"

## Re: USB POV/Accelerometer Toy

##### Reply #28 – October 25, 2010, 05:46:12 am
BTW,  the MMA7455L is another one of those chips that is easy to connect to USB using the FT232RL.  The current is so low that the internal FT232RL regulator can supply the power.

Using the QFN package for the FT232RL you could build a module about 10x20 mm including the MiniUSB connector :-)

McZ
"Too many projects, so little time"

## Re: USB POV/Accelerometer Toy

##### Reply #29 – October 25, 2010, 07:48:15 am
I think we'll get lucky on this and have some standard apps to use. I just saw a new one on Adafruit the other day that probably supports whatever the minipov uses, so I've been assuming there's some existing 'standard' we can embrace.