Have you ever been to a golf range or a top golf where all you have to do is wave your golf club in front of a sensor and a golf ball dispenses right where you want to hit it? Are you tired of leaning over to pick up a golf ball and place it where you want to hit it? Are you lazy and just want the most convenient thing available? Well, now you can have a golf ball dispenser like those at top golf, right in your home!
Being a golf enthusiast, I had sought after making a golf related project for this midterm project. The idea came to me a few weeks before when I had been to top golf with a group of friends. In that moment I thought, how could would it be to have one of these for myself for my putting practice? With this device, you can receive a golf ball by waving your golf club in front of the sensor. The device gives you a little jingle for good luck on your putt, and then dispenses the golf ball.
This standalone dispenser is very simple to use for the golfer. First step is you set it on the ground in front of you where you are putting, or just at the range. Then all you have to do is wave your club in front of the sensor, and you and everyone around you will hear a beautiful jingle that notifies everyone that you’re about to hit the ball so that they’re ready to see your beautiful golf swing.
Along with the Pocketbeagle itself, there are three other main components to this device: The
PIR motion sensor
, and the
stereo enclosed speaker.
How to connect your standard servo:
1) Connect the yellow wire to one of the PWM pins on the pocket beagle (I chose P2_1)
2) Connect the black wire to ground on the breadboard (which then connects to ground on the Pocketbeagle)
3) Connect the red wire (VCC) to the 5V power rail on the breadboard (Which then connects to the 5V Vout on the Pocketbeagle)
How to connect your PIR motion sensor:
1) Connect the black wire (ground) to ground on the breadboard like the servo (which then connects to ground on the Pocketbeagle)
2) Connect the red wire (VCC) to the 5V power rail on the breadboard like the servo (Which then connects to the 5V Vout on the Pocketbeagle)
3) Connect the yellow wire, which gives signals to the pocket beagle, to a GPIO pin on the Pocketbeagle (I chose P2_4, and in my case, I had to connect the yellow wire to the breadboard, and connect a male/male jumper wire to P2_4 from the breadboard)
How to connect your stereo enclosed speaker:
1) With scissors, cut off one red and one black wire from one of the speakers, since you will only be using one.
2) Connect the red wire (PWM) from the remaining speaker to a GPIO pin on the Pocketbeagle (I chose P2_3)
3) Connect the black wire (GND) to ground on the breadboard (Which then connects to GND on the Pocketbeagle)
After running into problems with sharing internet from my computer to the Pocketbeagle, I was given a perfect solution by my professor. Using a wireless WiFi USB adapter, I was able to give the Pocketbeagle wifi without having to share it from my computer. (You need internet access to import the BBIO Libraries for ADC, GPIO, and PWM) Here is how I did it:
1) First off, you must solder two pins on the Pocketbeagle itself, together, twice. (See picture below)
To use the breakout board that was given to us in class that also contains a USB port, I had to solder the leftmost two pins together, and the rightmost two pins together, since the breakout board only had 4 pins.
2) After soldering those, you may connect the breakout board to the Pocketbeagle, and connect the WiFi USB adapter to the breakout board.
3) After completing this, follow the steps on this website:
This website will show you the code you need to type into cloud9 so that you can connect to WiFi wirelessly.
PIR motion sensor help:
Playing tones from the speaker:
The device enclosure began with a simple cardboard box. Changing it up to make my beautiful golf ball dispenser consisted of a lot of duct tape, and an exacto knife. I began with cutting off all the flaps on top, and raising the bottom two flaps slightly, so that on one end it is a ramp for the golf balls to sit on, and on the other, I could put the breadboard with all the wiring in it.
After adding a piece of cardboard to the servo so that it can raise the golf ball more effectively through the hole, the project was a success. I taped the speaker on the back, and put the PIR motion sensor in the leftmost hole of the device. (The tape on the back is purely for decoration so that its not just a cardboard box). Although this is just a prototype, it paves the way for a much more refined/finished product that could possibly be made of wood.
1) Boot up Pocketbeagle by plugging it in to your power source (computer)
2) Pocketbeagle autoboots the right program (Dispense2.py)
3) Make sure there are golf balls in the box
3) Wave your golf club in front of the PIR sensor on the device (Sound plays, then dispenses golf ball)
4) Hit a beautiful shot!
1) Better looking enclosure for the wiring and devices (using wood for example)
2) The addition of more sounds when dispensing
3) The ability to dispense more golf balls consecutively without having to reload the box.
Comments are not currently available for this post.