Arduino + Accelerometer/Vibrating Sensor + Sound

Hello,
I am a total beginner and want to buy an arduino (usb) for the following project:
I am going regular to the gym, and lifting bars many many times. So I do not want to count every other day 18 (machines) * 3 (sets, each 20-30[it depends which machine] repetitions) from 1 to 20 [or 30].

So:
I want an arduino to count for me to 20 (or 30). I lift the bars up&down. For this I will be needing a sensor, is a vibrating sensor sufficient to DETECT the turning points, or will I need an accelerometer?
|
|
X Turning point 1
|
Bar with Arduino + Sensor
|
|
X Turning point 2
|
------- (ground)

And I want an accustic signal, just a sound to be played if the arduino has counted to 20.

Usage:
I have 2 Buttons. One triggers to count to 20, one to count to 30.
And at best 2 LEDs to signal what I have chosen. LED1: 20^^. LED2: 30^^.

Then both LEDs are ON, to show that it is counting. And both LEDS go OFF if it finished counting AND a sound is produced.

HARDWARE:
What hardware do I need for this? And where do I get it? (delivery to Europe possible)

  • Arduino Diecimila
    -...??

That's a hell of a project for a beginner.
It sounds easy but it will be tricky getting it to work in a real life gym rather than just on the bench.

I would go with the accelerometer but these have a noisy output so you might struggle in practice and you will defiantly have to resort to some smoothing. You can get one from here:-
http://tinker.it/ukstore/index.php?cPath=32&osCsid=43cebb85954f3d542d4a6b4947733fab
As well as getting the Arduino from the same source.

For the sound a pietezo electric sounder will give you a bleep direct from an output, get one from Maplin.

Best of luck.

Thank you.

The accelerometer is an analog sensor, that's why it's noisy? Won't the turning points switch the voltage at the sensor from+ to -, and from - to +(Turning point 1 and Tp 2 respectively)?
So I just have to get the values and check if the new value has changed the sign (+-). If it has counter++. If counter>= 20 (or 30) -->beep. ??

The accelerometer is an analog sensor, that's why it's noisy?

Well yes and no. The sensor itself is analogue but the interface is digital so there is nothing you can do about the noise at source. It will have to be done by doing some sums on the numbers when you get them out. Around the zero point the noise will take it both above and below giving the same sort of problem as contact bounce and the make or break point of the project will be if the slow turning point of the lift is bigger that the noise it is buried in.
Have you looked at the output from a Wii controller? In fact you could use a Nunchuck adapter and a Nunchuck as this has an accelerometer built in. It sounds easy but just you try it.

The nukechuke has the advantage of using it in other projects when I get bored with this one, or why do you suggest it? Or is it cheaper than an ordinary accelerometer?

I will try it, but I hope you (or somoneelse too) can tell me what I need. Inlcuding cables, LEDS, resistors, something to give the arduino power, some batterie adapters and where I can get these. Not that I am missing something of these. I want to place an order in? an us(a) shop because it's much cheaper (even with shipping rates) and I get many components I get here in Europe with great difficulty (or at least: not so easily).

Back to the accelerometer:
If I move it one direction, and then in the opposite direction. Won't the values be + in one direction, and - in the opposite direction? So I could just work with this "event"?

It's an accelerometer not a motion detector. So if you are moving at a constant speed in one direction the output will be zero. If you change direction you will get a small blip which will settle down to zero when you reach a constant speed again. The polarity of the blip will depend on the change in direction.
If you are moving very slowly, like you will be doing lifting weights, the size of the blip will be very small. You might not be able to detect this through the noise.
There is a world of difference between what you would like to get from a sensor and what you do get. That is why these sensors are great for large sudden movements like you get when playing a game but will be tricky for what you want to do. However it is probably your best bet at detecting it, just don't think it will be easy.

This means, if the noise wouldn't be there and the sensor had an excellent sensitivity it would be a piece of cake?

But can I use than a vibrating sensor, the circuit board is connected via a very short cable to a circular object. This object would move down if I lift the weights, and would move up if I move the weights down? But this might also be only in an idealistic world, or not?

Still I can't figure out why the following IS working:

How about a different route: Mount a magnet to the bar, and use a Hall Effect sensor or a reed switch (or two, to determine direction) to sense the passing of the magnet?

Okay, but the arduino "sits" on the weight I lift. And I do not know how I could "stick" a magnet at the back of the case of the machine (that's just behind the weights)

Just for understanding purposes: Here are the machines I work with: http://www.technogym.com/gb/viewdoc.asp?co_id=1328&target=commercial&
But the cases are open at the front. So I see the whole "weight objects" and not only 10% of them.

I also thought about an IR distance sensor. Just putting the arduino, with the sensor on top of the arduino..on the far right of the "weight object". Above a BAR (or pole) is blocking the view of the wall. So some sensors can measure distances up to 80 cm I read. May be the noise is not so annoying with an ir distance sensor?

I want an solution which I can finally put in a self-made CASE and I have just to put the CASE on top of the weights and press the start button and it works.

Still I can't figure out why the following IS working:
http://www.youtube.com/watch?v=z2LescrWzAs&feature=related

Because it is measuring the change in orientation with regard to a static force field (gravity). That is rotation around one of it's three axis. It is not measuring movement in a liner direction.
These sensors work by small flaps bending under gravity. Acceleration is also manafast as the same force.

What about this http://www.hvwtech.com/products_view.asp?ProductID=91 and that http://www.hvwtech.com/products_view.asp?ProductID=665 or that http://www.hvwtech.com/products_view.asp?ProductID=88 ??

What sensor would you choose?

I would choose the digital one (productID=91) to try.
With it pointing up you might get interference from lights or you might get trouble in getting a reliable reflection. It is one you will have to try.

If you are doing bench or military press, what about sonar ranging? Look for the furthest excursions. One problem with that is you'd need to keep the sensor oriented....

I also like the idea of a Hall Effect -- stick the Arduino on your chest and count each time the bar passes it.

Still, accelerometer has promise. I think the fine-tuning (in software) might involve figuring out a rough template for the curve you are trying to detect, and doing best-fit of the actual data collected. Say, if it has detected the lower turn-around, it knows the upper turn-around won't occur for at least a certain minimum time...

What about an IR Receiver and an IR LED solution?

The arduino has the ir receiver. And I have a clip or cramp, and I stick on it the IR LED and a small battery. I stick this clip on the site of the case of the machine. And on the weights I put the arduino with the IR receiver.

The IR LED points to the IR receiver.

See this picture:

Will this work?