Monday, July 15, 2013

Decision time...

While I am in Hong Kong, I should be searching for some unique parts that might help out this project.
The predicament I'm working on currently, are the sensors.

The flex resistor:

courtesy of Sparkfun


I can use this as a voltage divider, so when flexed, will generate a voltage between 0v - 5v.
However, these are pretty expensive, and I'm not sure how sensitive they are to surface vibration (not flexing, as they will be smacked onto the back of a backboard, and on the rim.)



The piezo sensor:

courtesy of Sparkfun


These are cheap, these are commonly used, and these would be the first thing to come to mind when the two words "vibration sensor" popped-up.
There's a problem, however. They generate high voltages, for a very brief amount of time. These voltages are analog and above 5v, so my Attiny won't be able to read the whole range of voltage.
This is a good sensor to use when simply sensing vibrations, but not when it is needed to measure and compare vibrations.

I connected this sensor in parallel with a capacitor, (103, 104, I tried both, whatever was available) and it did well in lowering the analog signals that came through.

Serial.println(analogRead(A0));
like so.
The printed values ranged from 0 - 30. the maximum value Arduino can print is 1023.

I noticed, however (with and without the capacitor) that when the sensor was at a low state, the numbers kept creeping up, for example

1023
300
301
300
305
900
1023
1023
1023
350


Do you notice how the numbers just keep rising when it is at the low state (300 - 400)?
This isn't too good, as I will be comparing the voltages of two sensors. If this happens:

Backboard sensor: 301
Rim sensor: 304

the shot clock would reset. Not good.






Something else:

Maybe some expensive accelerometer might solve the problem, or something that will sense EXACTLY where the ball hit, just like humans can.




********************************************************************************
other than that, I am currently researching where to place the backboard sensor on the whole wide backboard. Does it matter; is there a significant difference to where I place it?

I'm finding out.




This is the shot clock that will change the game.





No comments:

Post a Comment