Bare bones head tracking shoulder cannon circuitry.

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

ksj

Well-Known Member
Slight update on this. I worked with the manufacturer and we discovered a library coding issue with the board. They are working to address it. As it stands the Alorium board will only support 4 servo pins. My setup will require about 10 servos in the final design. Waiting for a response on this.
 

Christopher1

New Member
I like to do everything on a cheap budget with things I can find in bulk or find easily. I tried for years to get this right and think I have a pretty stable version of a Shoulder cannon that tracks head movement in both Y and Z axis, and for cheap as I think I can get it with COTS items (Common Off The Shelf).
Here's the video:

It's not your typical caster cannon, but I feel the shoulder cannon is like the Jedi knight's light saber. It is built individually....and I liked the look of the 80/20 Aluminum bracketing.

I used an Arduino Uno, 2ea - 5vdc servos, an MPU6050 Arduino module (6 axis), a project box from Amazon, RJ45 (Ethernet) connectors with panel mounts, a panel mounted audio jack, a few things I had around my shop, and a 2000 maH rechargeable battery bank (the ones used for charging your phones...I will upgrade to 4000+ maH for more hours of use). I'll put the code I used in my next comment.
What torque spec is the 5VDC servo?
 

ksj

Well-Known Member
What torque spec is the 5VDC servo?
hs 645mg
and 785hb
hitec servos

Was looking at the go gilda servos but I slow down this time of year on things as I am saving for next year on things.

also I ran into some performance issues getting the mpu6050 to work properly. Especially with the amount of triggers I was running in the code.
 

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

ArthurChantz

New Member
I like to do everything on a cheap budget with things I can find in bulk or find easily. I tried for years to get this right and think I have a pretty stable version of a Shoulder cannon that tracks head movement in both Y and Z axis, and for cheap as I think I can get it with COTS items (Common Off The Shelf).
Here's the video:

It's not your typical caster cannon, but I feel the shoulder cannon is like the Jedi knight's light saber. It is built individually....and I liked the look of the 80/20 Aluminum bracketing.

I used an Arduino Uno, 2ea - 5vdc servos, an MPU6050 Arduino module (6 axis), a project box from Amazon, RJ45 (Ethernet) connectors with panel mounts, a panel mounted audio jack, a few things I had around my shop, and a 2000 maH rechargeable battery bank (the ones used for charging your phones...I will upgrade to 4000+ maH for more hours of use). I'll put the code I used in my next comment.


How much did this cost to build???
 

ksj

Well-Known Member
How much did this cost to build???

Message laellee for 3-d files for a reasonable price. He has a very, very nice cannon setup. Printing costs will vary depending upon how much you are printing and if you have to use a service such as treatstock.com. MoeSizzlac provided the cannon files. I would stress that reselling, recasting, or selling finished products from these files are a big no no. The files and market does not currently have a means to stop this outside of bans and black listing.

The servos you can get for 30 or so each. For servos you have to calculate inertia which is speed times weight and then calculate torque. Usually by stepping it over to newtons and then converting it to whatever measurement basis you are using (oz-in, kg-cm, ft-lb, etc...) I have been using hitch hs-645mg servos on mine with very few failures.

Hobby Town if you have a local store in your area carries servos. Some areas have a tower hobbies, but you are basically looking for a drone enthusiast or RC car enthusiast shop. They will carry servos you can use. I shop local when possible but have bought much from servocity.com and robotshop.com.

The mpg-6050 has been getting discontinued and is a little hard to get. Plus the libraries and hardware have some fundamental hardware and software library issues that are no longer being addressed. I have found if you do anything outside of his simple codebase things start refusing to work. Stick strictly to his setup and it works!

The bosch bno055 is another option and it is a bit more at about 40, but lowers processing overhead on the arduino. I am working on updating things and I am not happy with the slow input response on the wii nunchuck setup I am using and am switching over to a raspberry pi based setup.

The arduino is about 10 or so. That along with the bosch sensor can all be purchased on adafruit.com. I would strongly recommend purchasing as much as possible from there as they are US based and have a top notch support team.

avoid wish.com or banggood.com as I have had quality issues and anytime I buy from them I have to buy multiples as duds are not an unknown with them. I would advise on that same note that aliexpress.com and alibaba.com are ok resources for parts but only order once you are intimately familiar with what you need, want, and desire as some things can get lost in translation.

For budget, his budget setup is a 100 or less. Learning and breaking things and buying the wrong parts, factor in no more than 200. Space the purchases out over time and things are very affordable.
 
Last edited:

ksj

Well-Known Member
FYI, November of last year Adafruit took ownership of the libraries for the mpu-6050 and updated the design with qwiic connectors.


 

ksj

Well-Known Member
I used a slightly different board and integrated it with a raspberry pi and a servo bonnet. This code will remap gyroscope values to x and y values using the x and z axis.

import time
import os
import subprocess
import board
from board import SCL, SDA
import busio
from adafruit_pca9685 import PCA9685
i2c_bus = busio.I2C(SCL, SDA)
pca = PCA9685(i2c_bus)
pca.frequency = 50
from adafruit_servokit import ServoKit
kit = ServoKit(channels=16)
import adafruit_fxas21002c
i2c= busio.I2C(board.SCL, board.SDA
sensor1 = adafruit_fxas21002c.FXAS21002C(i2c)
kit.servo[5].angle=90
kit.servo[14].angle=90
while True:
gyro_x, gyro_y, gyro_z = sensor1.gyroscope
print(int(gyro_x))
print(int(gyro_z))
servox=(((int(gyro_x--256)/(256--256))*180))
print(servox)
kit.servo[14].angle = servox
servox=(((int(gyro_z--256)/(256--256))*180))
print(servoz)
kit.servo[5].angle = servoz
------------------------------------
 

ksj

Well-Known Member
The bno088 appears to have a comms issue of some form. I have ordered a pair of mpu-6050 with qwiic connectors built by adafruit. I will see if those work better.
 

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

Don't want to see this ad? Sign up for anRPF Premium Membershiptoday. Support the community. Stop the ads.

Top