Weight sensor Hammer Game


I want to build myself a hammer game, like the old type where you hit it a spot with the hammer and the goal is to ring the bell. But I want to make it digital, and capture the data from a load cell. You hit the load cell with the hammer, it reads the data and shows you your score in lbs/kgs.

Is this possible with an Arduino? I found this video on YouTube, but the price of this setup sent me in this direction, almost 2k$ for the setup in his video.

I guess if I can find a cheap load cell that outputs enough data to get a reading in 0,2ms. The system he is using outputs 500 readings/sec according to the information on his site. If anyone has a tip to a decent priced high output load cell that could handle multiple hits with a sledgehammer, please let me know

You might investigate some sample and hold circuits with peak detection. This will hold the reading long enough to sample it and record it. However it will save the hardest part of the strike. This approach will give you time to do your calculations. I hope this helps.

Maybe a piezo instead of a load cell is a better approach. The output of those things depends on how hard they're hit. Not particularly accurate or precise but may be good enough for a little game.

My first attempt should be to use a car wheel tire, a pressure sensor, hit the tire with the hammer, measure the pressure peak (other inflatable means should work as well as long as they do not break).
A fast pressure sensor should be researched, how fast? I guess it should have around - or better than (less than) 1msec response. See this one: https://www.digikey.gr/product-detail/en/nxp-usa-inc/MPX5700GP/MPX5700GP-ND/464063
It also has to withstand and measure a great pressure (I guess over 5 bar)
How you will device your inflated bumper in a way that it will both inflate by an one-way valve - like a car tire valve - and use a "T" to connect the pressure sensor is up to your imagination and skills.
I guess the sampling speed of the Arduino's ADC will be adequate. If not try a circuit called "peak holder" like the one attached, with the only drawback that it will reduce your voltage reading by about 0.3V constantly

About load cells: The momentary force at the impact of your hammer is not well predictable, it could be in the region of a metric ton! They might break.

About piezos: They are brittle (they break) and produce HUUGEEEE voltage on a hammer hit (I mean KiloVolts). Otherwise they should be the great choice. They might have a chance if you dump the impact well lets say you place your piezo under an elastic (rubber?) material. A point of failure using a piezo might be that you have to hit with your hammer at the exact same point to get the same measurement.

More general and applicable knowledge in my newly released book: Practical Electronics and Arduino in 8 Hours 2020 edition
Enjoy !!!!!

The peak detector circuit is basically sound, but I do have a major concern. That 1µF may be too large a capacitor for the pressure sensor to charge to peak value (they may have a fairly large output impedance and the peak may last mere milliseconds), or otherwise simply overload and damage the sensor output. The diode drop itself may also be a concern, though it should be pretty constant and not affect your overall results much.

A major improvement would be to use an OpAmp as ideal diode - do look at the peak detector circuit given on that same page. You don't need the switch, the analog input pin of the Arduino can double as a switch: after reading the value, reset the circuit by setting the input to output, and driving it low. That's basically a direct connection to GND. Do that for a few milliseconds, and set it to input again for the next hit.

If you ask your friends to hit a car tyre with a sledge hammer, tell them to be prepared for the tyre to throw the hammer back at them... it won't absorb much if any of the energy!

HI! Thanks for all the reply's And a happy new year to you all.

Ok, so hitting a sensor dead on ether load or piezos is not the best idea then. My plan was to use a 5kg rubber mallet as the sledgehammer. I guess after a hitting it multiple times something would break.

The pressure sensor sounds interesting, and might be a good solution. But there is some engineering to be done. I. wanted the place you are hitting to be as solid as possible to get a good feedback through the sledge for the person hitting. Hitting a soft object is a bit weird and might throw the sledge in an unexpected direction witch could end bad for the person hitting it. And with then there is how to set up the air chamber that gets pressurized. Should the chamber have a pre set pressure as a calibration and trap the pressure you put in to it, or should it have zero pressure and you compress the chamber until the air cushion stops the sledge? It should also be as simple as possible to reset and also be able to operate in different temperatures. But I guess the sensor can read the pressure and calibrate through the Arduino for each hit.. Mabe a air spring from a truck is a good idea, have it pressurized, that might give less sledge bounce than a tire and then measure the pressure peak?

Thanks again for all the good ideas, appreciate it. Im not super good with Arduino yet, so I might ask for more help when I land on a solution. If you have more good ideas, please share.

Maybe another solution to mount the hit plate (that takes the impact and absorbs the energy) on top of three or four FSRs (one for each contact point to the structure below it). (FSR = force sensitive resistor). This are basically resistors that change value when they come under pressure. Not known for accuracy but a little calibration goes a long way, and you don't seem to care about the absolute hit, more like "this hit was harder than that one".

To measure the impact you have to sample at high speed; an Arduino can sample at just under 10k sps. In case of four FSRs that'd be some 2,500 sps for each - considering you always measure twice cut once (i.e. drop the first sample after switching channels due to crosstalk) that's just over 1,000 sps per channel. Note: if you want to go this route forget about the analogRead() function, you have to run the ADC conversions in the background and set an interrupts upon completion so you can read the result, switch channels as needed, and start the next conversion. While the sampling runs you can do your calculations, detecting hits and so.

Alternatively you have to connect the FSRs to an OpAmp with peak detection circuit on the output, then you can go slower in the sampling.

FSRs should be able to withstand this abuse much better than piezos.

Interesting, that might be the solution.

You are correct, it doesn’t need to be 100% accurate as long as the reading is not all over the place.

I was thinking of hitting a roundbar, around 100-150mm in diameter. Say I put that roundbar in a snugly fitting pipe, and place the 4 sensors in the the bottom of the pipe. These sensors can be placed directly between two steel faces?

I see this guy have made something similar to what you are talking about. Guess I need some FSRs that can handle more weight.

In your configuration a single FSR should do just fine - placed right under that round piece. The force will come in pretty much straight down thanks to the outside cylinder. You just have to get a good idea of the force you have to measure, can be pretty high.

Makes the analog sampling a lot easier. For this application I'd set the ADC in free running mode, interrupting when a conversion is done, and in the ISR store the reading in a variable if it's higher than the previous one (or lower if that shows stronger force - depending on how you wired it all up). Then in loop() you can read that value and take action as needed.

As the impact is short and an FSR is basically a resistor, you probably have to buffer the signal with an OpAmp, similar to what they did in that video (though I don't see why you should go through the trouble of getting a dual power supply).

The Tekscan A201 fsr can measure up to 1000 lbs. May be enough, especially if the round bar + pipe is fairly heavy. Do use the recommended puck and op amp circuit.

I don't think 1000lbs is enough, to be on the safe side the sensor should handle a bit more. But the FlexiForce A401 Sensor Large Force Sensing Resistor | FlexiForce A401 Sensor | Tekscan claims to do 7000lb, that could be a suitable one. With a puck and a snug fitting roundbar in the pipe that might work.

I see I have to put some time in to fully understanding all this Arduino stuff :slight_smile: Like calculating this op amp circuit ordering the right parts and get the right output for the impact of the sledge. There is a lot to learn. Thanks for all the help so far. I think I will try this method.