Arm angle finder

We need a way to find the angle of our arm during a match, but we can’t use a gyro or a potentiometer due to either programming error or lack of pwm cables. Please help we need to do this without using said things.

i am not sure if you can. my only guess would be to use the camera to find height (by what it is seeing) and somehow deriving an angle from that.

otherwise, your choices are:

potentiometer
encoder (analog or digital)
gyro
magnet sensor (technically an encoder)

You could always guess… based on how long you have driven the arm… but it won’t be accurate.

Why can’t you use a pot? There really isn’t much programming error…

Also, another option is to use limit switches.

go and buy about 20 feet worth of triple PWM, and 10 ft of double

This.

If you can’t afford PWM, you’re beyond helping.

Well, it COULD be they ran out of slots on the IO Board.

Although, I believe you are allowed to use a second one…

Guys, this question is from the team that ran the “Brother’s Keeper” automode back in 2007. That automode is one of the most complex ones to ever be attempted to date, and only one team ever managed to run it successfully. Something is going wrong if they’re having trouble with both a gyro and a pot.

First question: What code are you using for pot/gyro reading?
Second question: What is the reason for the lack of PWM cables? Are you simply using CAN?

If you need a good temporary solution, I’d go with a gear tooth sensor of some form. (You could do it with a magnetic one, or build a beam-break sensor, or something much crazier.) You know which direction the arm is supposed to be moving, by motor direction command or by gravity in the absence of that command. You set the count to a known value at the start of the match, so you have a reference point. Now you count teeth. Each tooth is some number of degrees on the sprocket/gear/whatever you’re measuring with. Now you know how many degrees and which direction.

It’s not quite as good as a pot, but it should do the trick.