Introduction: Build a USB Orange Thrower Machine
It is based on the ancient Trebuchets although it is made of canes and doesn't have the sling. The electronics are very simple, it only needs an arduino and a servo to release the arm.
I used also an webcam so that it could throw the orange when it detected a certain color, using the application ComputerOnWheelsController which I created for many different projects like the following one - https://www.instructables.com/id/Make-a-simple-platform-and-give-mobility-to-your-c/, for example.
I built it just for fun and you can see it working here:
Step 1: Materials and Tools
- Some canes
- Sisal Rope (or zip ties)
- USB Cable
Step 2: Build the Structure
Notice that the canes form triangles, reinforcing the structure. This is called triangulation, have a look here: http://www.technologystudent.com/struct1/triag1.htm
- "A triangular form is one of the strongest shapes known to man. It is not surprising then that ‘triangulation’ is used in the construction of buildings and structures."
See the photos and take inspiration from them if you need.
Step 3: The Junctions
How you can see on the photos, firstly I drilled holes in the canes to put there a smaller piece so that they don't move in relation to each other.
Then used the sisal rope to don't let them take apart.
Step 4: Build the Arm
This is how I built the arm. I used three big canes and one smaller.
You can build your how you want, just be sure that is strong enough and that it fits the main structure.
Step 5: Put the Arm in Its Place
That's it, just put it on the top of the main structure, how you can see on the photos.
Step 6: Add the Electronics and the Counterweight
Place the servo on the main structure, but under the arm so that you can easily attach the rope lace.
I tried to use a sling but found that the easiest and the most functional way to throw the oranges was simply using a nail, how you can see on the photo.
Place the arduino and the webcam on secure places like the sides of it, but make sure that the camera has a clear view of the front of the machine.
Finally, add a counterweight like a simple rock, a brick or even a bucket full of water or sand.
Now the hardware part is done!
Step 7: Upload the Sketch
Connect the USB cable, open the arduino IDE and choose there your board and serial port.
Download and open the attached sketch, or create your own, if you prefer, and upload it to the arduino.
If you want to test it you can simply open the Serial Monitor and send a 'w' to move the servo and throw the orange.
Step 8: Run the Application
The machine can be controlled if you use this application: http://www.franciscodias.net/applications/openframeworks/computer-on-wheels-controller. I designed it to be easy and intuitive to use.
You just need to download it here (http://www.franciscodias.net/downloads/ComputerOnWheelsController.zip?attredirects=0&d=1), unzip it and run the .exe file on the bin folder. If you want to develop it you can open the Code::Blocks project file. If you have any doubts contact me.
The first screen you will see is the "Settings" one (2nd picture). There you will have to choose your webcam and the arduino's serial port. Then you have the "Manual Control" and you can choose the "Color Track" one.
If you use external software like TeamViewer and GlovePIE you can even control it using another computer, by a smartphone or by wiimote.
Just use what you prefer ;)
We have a be nice policy.
Please be positive and constructive.