Ultrasonic gun from a gun toy with Arduino

Guns are always bad, I don’t like guns.
This is a summary of a project born to play. I’ve found an old toy gun with a very annoying sound among the toys of my daughters and I’ve decided to modify it to turn it into a gun-tool to measure distances.

Here is my toy gun transformed:

pistola-ultrasuoni-1-1080x675

It became a gun that makes ultrasounds like bats, shoots pulses inaudible to the human ear and reads the time it takes for the ultrasound wave bounced back on the obstacle.
By measuring the time elapsed it is possible to calculate the object distance.
Here the stuff I’ve used:

  • Arduino Nano
  • Ultrasonic sensor HC-SR04
  • backpack display 14 segments
  • two LEDs and two resistors
  • buzzer
  • 9V battery

First I’ve spent some time to make tests on a running prototype with the classical breadboard and Arduino Nano connected to the PC, then I’ve started to weld wires directly to the pins of the components, but it was a massacre! It’s really smarter and convenient to weld only where needed and use the common female-female connectors to link components with their pins.

I’ve opened the toy to be recycled and I’ve removed all the not needed anymore electronics, I’ve kept the the trigger circuit of the toy where I’ve connected the Arduino Nano.

The program I’ve made starts with the buzzer beeps, together with blinks and sends pulses with ultrasound. If he can make 3 steps with an error of plus or minus one cm in a row then shows the result on the display.

While making measurements on the display is an animation character.

More details, circuit and sources can be found here (in Italian, sorry).

Look how it works:

https://www.instagram.com/p/BK1bugBg8kM/

Anything to say?

Comments with Facebook or below with WordPress



Sorry, WordPress comments are closed on old posts.