Skip to main content
Topic: USB POV/Accelerometer Toy (Read 64536 times) previous topic - next topic

Re: USB POV/Accelerometer Toy

Reply #30
I was surprised to see the board for this one in one of ian's posts..i would like to ask what is the usb for? program downloading right? does it have its own battery ofsome kind?

about measuring speed..how about using an accelerometer perpendicular to the center of the board..
[]----------------------------------------------------------------------------o
^---this is the accelerometer                                                     ^-center of the rotarion of the board

if an accelerometer can be used to know the orientation then we can calculate for the angular speed on every point on the board..change in theta multiplied by the distance from the center..

just had that idea..but the board need to rotate about an axis.. and the accelerometer must be perpendicular to that axis..

did i make any sense?

 

Re: USB POV/Accelerometer Toy

Reply #31
The POV toy prototype is all soldered up (picture). I used the Bus Pirate to check the tiny LGA accelerometer chip to see if it was soldered and responding to commands, everything looks good.

Quote
I2C> W
Power supplies ON
I2C> v
Pinstates:
1.(BR)  2.(RD)  3.(OR)  4.(YW)  5.(GN)  6.(BL)  7.(PU)  8.(GR)  9.(WT)  0.(Blk)
GND     3.3V    5.0V    ADC     VPU     AUX     SCL     SDA     -       -
P       P       P       I       I       I       I       I       I       I
GND     3.29V   4.78V   0.00V   3.13V   L       L       L       L       L
I2C> C
a/A/@ controls CS pin
I2C> A
AUX HIGH
I2C> (1)
Searching I2C address space. Found devices at:
Warning: *Short or no pull-up

I2C> P
Pull-up resistors ON
I2C> (1)
Searching I2C address space. Found devices at:
0x3A(0x1D W) 0x3B(0x1D R)

I2C>

Yeah! now to try spi

Code: [Select]
I2C> m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)

(1)> 5
Set speed:
 1. 30KHz
 2. 125KHz
 3. 250KHz
 4. 1MHz

(1)>
Clock polarity:
 1. Idle low *default
 2. Idle high

(1)>
Output clock edge:
 1. Idle to active
 2. Active to idle *default

(2)>
Input sample phase:
 1. Middle *default
 2. End

(1)>
CS:
 1. CS
 2. /CS *default

(2)> 2
Select output type:
 1. Open drain (H=Hi-Z, L=GND)
 2. Normal (H=3.3V, L=GND)

(1)> 2
Ready
SPI> W
Power supplies ON
SPI> [
/CS ENABLED
SPI> ]
/CS DISABLED
SPI> [ 0b11010 r]
/CS ENABLED
WRITE: 0x1A
READ: 0x1D
/CS DISABLED
SPI> =0x1d
0x1D = 29 = 0b00011101
SPI>

Yeah, the read of the I2C address register is the same as the I2C address and the datasheet. It works! :)
Got a question? Please ask in the forum for the fastest answers.

Re: USB POV/Accelerometer Toy

Reply #32
Made a miniscope v3 compatible firmware for the POV toy so we could watch the output visually. Here's a screenshot, it's looking great.
Got a question? Please ask in the forum for the fastest answers.

Re: USB POV/Accelerometer Toy

Reply #33
[quote author="ian"]
The POV toy prototype is all soldered up (picture). I used the Bus Pirate to check the tiny LGA accelerometer chip to see if it was soldered and responding to commands, everything looks good.
[/quote]

Smashing work! I would love to get my hands on one of them. Any beta testers needed? I have a few POV projects that have been put on hold because I could not find a device just like this!

Kevin G.

Re: USB POV/Accelerometer Toy

Reply #34
Nice work, i am looking forward to these, hopefully you can get them out for christmas as i think my kids would love them.

Also i would like to see a blog post about the details of sodlering that tiny chip. both solder and desoldering. tools used , methods etc. would be good.

Re: USB POV/Accelerometer Toy

Reply #35
It was my first chip like that (not even exposed pads on the side like QFN). I'm doing another soon, I'll try to take a video too. Hopefully the second will go better than the first.
Got a question? Please ask in the forum for the fastest answers.

Re: USB POV/Accelerometer Toy

Reply #36
[quote author="ian"]
It was my first chip like that (not even exposed pads on the side like QFN). I'm doing another soon, I'll try to take a video too. Hopefully the second will go better than the first.
[/quote]

Do let us know how it goes. I am all freaked out when it comes to packages like that. I need all the help I can get. :)

Re: USB POV/Accelerometer Toy

Reply #37
I've done three of these now, and it gets easier every time. The last two went without problems.

Here's my approach:
1. Flux the pads then add a little solder to the PCB, maybe mop it up if it's more than a thin layer.
2. Flux the chip and put a bit of solder on the pads. Mop up all of it with copper wick, you just want the pads tinned.
3. Flux the chip and the board
4. Head up the board and the chip with a hot air rework tool. The solder should turn liquid.
5. Now quickly pace the chip on the PCB, don;t worry about alignment yet
6. Heat it with hot air, keep it moving so you don't scortch the PCB. Tap the chip for alignment. I've heard you can tab the board and stuff snaps into place, but it doesn't work for me.
7. When it looks perfect, wait. If you move the board too soon it will misalign. This happened twice the first time :)
Got a question? Please ask in the forum for the fastest answers.

Re: USB POV/Accelerometer Toy

Reply #38
[quote author="ian"]
I've done three of these now, and it gets easier every time. The last two went without problems.

Here's my approach:
1. Flux the pads then add a little solder to the PCB, maybe mop it up if it's more than a thin layer.
2. Flux the chip and put a bit of solder on the pads. Mop up all of it with copper wick, you just want the pads tinned.
3. Flux the chip and the board
4. Head up the board and the chip with a hot air rework tool. The solder should turn liquid.
5. Now quickly pace the chip on the PCB, don;t worry about alignment yet
6. Heat it with hot air, keep it moving so you don't scortch the PCB. Tap the chip for alignment. I've heard you can tab the board and stuff snaps into place, but it doesn't work for me.
7. When it looks perfect, wait. If you move the board too soon it will misalign. This happened twice the first time :)
[/quote]

Ohh wow! That seems way to easy.  Thanks for the great tips and can't wait to see and ultimately get my hands on one  of your new toys. :)

Re: USB POV/Accelerometer Toy

Reply #39
I use a slightly different approach:

instead of using an hotair rework station I use an old clothing iron (without thermostat):

- I heat it up to approx soldring melting temperature and put the pcb on it.
- when the solder is molten, I put the chip on it and if done correctly some magical forces will line the chip with the pcb pads.

Succes rate is 50%: it will succeed or not ;)

Re: USB POV/Accelerometer Toy

Reply #40
@Philip

Know this is old, but,

Depending on how fast the arm is spinning, and the 'time constant' of the sensor, you could either monitor one axis for peaks that correspond to going past 'g', or just take an average of force along the axis of the arm. This is the reaction to the centripetal force and is proportional to angular velocity, hence rpm.

Re: USB POV/Accelerometer Toy

Reply #41
Hi Ian,

Are the Eagle schematic and board files available for the rev. 2 design? I've had one of these boards for a while, but I haven't built it yet as I could not find this documentation. I like to have this info to generate a parts list, and for parts placement during assembly.

Thanks,

John

Re: Re: USB POV/Accelerometer Toy

Reply #42
There's a wiki page in the in development section, but this is a work in progress so there is no documentation:
http://dangerousprototypes.com/docs/USB_POV_Toy

All the board files are in SVN, the new one is v1c. I can't give a web link because it is not shown on the google code web browser list.
Got a question? Please ask in the forum for the fastest answers.

Re: USB POV/Accelerometer Toy

Reply #43
Hi Ian,

OK, I got it! I'm going to make a parts order today, so I'll build my board next week, and start playing with it too!

Thanks!

John

Re: USB POV/Accelerometer Toy

Reply #44
We have developed a new software for USB POV Toy. These posts will give details of how the POV Toy software was implemented using MMA7455L Accelerometer. The code (which needs some cleanup) will be posted at the end of this series: 

[attachment=0]

a. The Accelerometer is configured for 2g sensitivity in an 8 bit mode.
b. The Accelerometer is calibrated for zero offset using the offset registers.
c. The X acceleration data is filtered before using for any decision making.
d. The X acceleration data is used for detecting when to start and when to end the scroll of bitmap.
e. Timer interrupts are used to display each column of the bitmap.

Part 1: Pre-processing Accelerometer data

The accelerometer data is very noisy. To make this data usable, some sort of filtering must be applied. A very common method is to apply a moving average with a buffer size of  say 10. In this case the average of last 10 samples is taken as current value of data. Obviously, we need to keep track of last 10 values using array.

In this implementation, we have used a First Order IIR low pass filter. This is denoted by an expression:

FilteredValue = (1 - k) * FilteredValue + k * CurrentValue. 

The accelerometer data is sampled at 250Hz. In our case, we have chosen k =  0.04 :

AccelXFiltered = 0.96 * AccelXFiltered + (0.04) * AccelX; 

This requires floating point arithmetic. The value of k was chosen by trying different values like 0.1, 0.2, 0.01, 0.02 etc.. . At 0.04 we got a smooth curve. The following plot will show the effect of the above filter on raw X data. The data is sampled @ 250Hz when waving the POV Toy.

[attachment=2]
[attachment=1]

Regards,
Viswa