-
How to wire up a gyro
Can I ask a few newbie questions?
Does the gyro always output a countering effect to a rotation, or does it try to match the rotation to the joystick input?
That is (and Im a bit hazy on analogue remote control, since Ive always planned on doing things with radio modems and some embedded controllers, so forgive me if this is nonsense): assuming the turn amount is represented by a voltage level after the receiver has decoded it and before it goes into the speedo, and presuming the gyro outputs a voltage proportional to its rate of turn, do you end up with something trying to match the two voltages (so the rate of turn matches the requested rate of turn) or do you have the gyro pushing back against the joystick input? Or is it entirely down to how you wire it up?
I guess which is more desirable is partly down to the quality of your radio signal - if you can reliably get go in a straight line out of the receiver then getting the gyro to match it, enabling you to describe a smooth curve if you want one, would be nice. If you have trouble getting a clean straight line signal then having a range in which youre effectively locked to going straight (and after a bit of resistance you can then start rotating) might have benefits as well.
Im presuming the former (matching the output of the gyro to the turning signal) is what happens, but Im not so sure of myself that I think I shouldnt ask. :-)
Is my model of how a gyro behaves (voltage change according to rate of rotation) accurate? Im only ever likely to use one plumbed into the A/D converter on a PIC, but the chances of me using one there are quite high. Intelligence is nothing without control, and all that. Having to undo any in-built electronics which attempt to assist analogue control would be a pain.
Assuming the gyros we get are the ones pushed by the radio helicopter community (my understanding is that theyre pretty much obligatory there, unless youre *very* good), does that mean that we have some extra channels available - in addition to horizontal rotation (yaw) which presumably gets used on most robots, pitch and roll are available too? Or do model choppers just have three gyros? Not that I can see much of a use for the other channels, but itd be nice to plan before I go parts shopping. :-)
Hopefully Ive not just confused anyone reading this more than they were to begin with. Thanks to anyone who can put me out of my misery!
--
Fluppet
Maybe I should look into driven differentials...
-
How to wire up a gyro
Andrew
The ansewer to Does the gyro always output a countering effect to a rotation, or does it try to match the rotation to the joystick input? Is dependant on the gyro.
Your standard RC gyro does try to stop the vehical turning. Top of the range gyros have systems that try to get the vehicle to do what you input in the joystick so if you say straight ahead it goes straight ahead if you say gentle curve it does a gentle curve.
I believe that a lot of roboteers use the simpler gyros and simply turn them off or reduce their gain when they want to make a turn. However this means another radio channel.
The RC gyros that are used in robot wars dont work on voltage they work on a pulse system as do the servos. I believe that the pulses vary in length from one 1 millisecond at one end of travel on the servo to 2ms at the other end. These pulses are then repeated.
The gyro takes in this 1-2ms pulsing signal (RC signal) from the steering channel on the receiver. Looks at what this signal is asking the vehicle to do and what the vehicle is actually doing decides what it should tell the speed controller to do to correct for any discrepancy and puts out its own RC signal to the servo (or in a robots case a speed controller or some other interface).
As for how many channels you have on your radio control and receiver thats up to you and your design of robot. You may well need the following:
Drive speed
Steer
Weapon
Gyro on off (or possibly gain depending on the complexity of the gyro)
Main on off for robot (not in the rules and possibly not applicable if its a feather but it is advisable on heavies to have a way to kill the power to your robots weapon and drive remotely. This doesnt replace the removable link its just added safety in case your robot goes crazy.)
You can get transmitters with 2, 3, 4 ,6 or even more channels.
I hope this helps. If it doesnt make any sense you can always come and have a go at me at the East Anglia regional social.
Richard Wenman
Team Mayhem
-
How to wire up a gyro
Goodness thats probably the longest post Ive ever made.
-
How to wire up a gyro
Cheers Richard (I will, and Im clearly rubbing off on people!)
Im not sure if Id got the wrong end of the stick originally, or persuaded myself since - I thought the pulse width encoding only went as far as the receiver, and the speed controller worked purely as a step-up/mixer. I guess keeping things encoded longer is a bit more fail safe. Im not sure whether it helps or hinders my cunning plans for microcontrollers - lose an A/DC, gain an interrupt driven timing loop. Meh. Does this mean speed controllers also only have about 16 levels of gradation per channel, or are they completely analogue? (16 is a figure I think Ive seen for transceiver granularity, but I dont know how universal it is - it seems a bit coarse for the effects a gyro could have).
I guess Id presumed that the speed controller took all its input channels on independent wires, whereas the signal can be de-multiplexed internally this way.
Not that it helps with some of my dafter ideas (so many channels, so few speed controllers... *here* MOSFET MOSFET MOSFET) but youve deconfused me a lot, so thank you. :-)
Presumably if Im trying to get a reading out of a gyro (without hooking it to the receiver), this means I need to feed a neutral pulse into it?
I think my talk of channels regarding the gyro was a bit ambiguous - I wasnt talking R/C channels (at least, directly), I meant that I wondered if a radio controlled helicopter gyro would give a separate output for each axis of rotation (roll, pitch, yaw). What youd do with them on a ground-based robot is another matter, but I just wondered if they were there.
As for the number of channels I need: for my first robot, not many (Im occasionally practical - two analogue, two digital will be fine). As for interesting designs... my most effective (predicted) design has six (possibly seven) analogue and at least four (probably many more) transmitted digital channels; there are sixteen analogue outputs from the control system and at least twenty digital ones. Not counting telemetry. Youll know it when you see it (but not for a year or two)! Theres a reason Im leaning towards digital control. :-) (Oh, and its slightly more practical than it sounds.)
Thanks again for the help, and sorry to slightly subvert the subject (although Im nearer to on-topic than I usually manage when I do this!)
--
Fluppet
(Worryingly, *not* one of my longer posts.)
-
How to wire up a gyro
Certainly I know that the 1024 bit of the high end tranmitters (like the futaba 9 channel thingamy) represents a resolution of 1024 steps per channel. I think most normal kit works on 512. I may be wrong tho. Andrew, if you can modify your transmitter to transmit whatever you choose, and make a corresponding receiver, you will be on cloud 9 in terms of robot control. Any old serial protocol (RS232 for example) would be a great way of controlling your robot. Unlimited channels (or as good as), and of course much more functionality. I would certainly do this if I was more confident about taking my nice transmitter to bits :-)
-
How to wire up a gyro
I was thinking more in terms of building one from the parts (preferably *large* parts), in the sub-hundred quid range, rather than trashing a few hundred quids worth of unnecessary Futaba joysticks, potentiometers and encoders, but thank you for the reassurance. :-)
The extra resolution on standard kit is nice to know about. I suspect Ill be stuck with the standard parts for things like gyros, so knowing their limitations and pretending to be standard kit for the purposes of interfacing is all part of it. Not that Im at that stage yet!
--
Fluppet
(Must go home from work soon...)
-
How to wire up a gyro
While using an RS232 data stream does give you a lot of advantages, its not the perfect radio control solution. You can end up with a lot of extra latency (delay between pushing the joystick and seeing the motors spin) if youre not careful. Maybe cloud 6 or 7 :)
-
How to wire up a gyro
:-) I was kind of hoping for better than 9600 baud (with some error correction sorting out the mess). I know a bit about embedded systems and Im not going to have Windows in the way latency-wise, but therell definitely be an overhead (Im hoping whatever radio modem hardware is available isnt going to try to be clever). Anyone care to comment about the kind of data rates I can expect in an arena? Just so I dont build anything relying on a video feed. :-)
--
Fluppet
-
How to wire up a gyro
I get 300 baud :-) Thats with LPRS modules, which Ian Visser also uses. Im hoping to speak to him at the next FRA social as he seems to do alright with them. If you find a radio modem which can get better speeds in the arena, is acceptable to event organisers and below £200 for a TX/RX pair please let me know!
-
How to wire up a gyro
Oh dear. Weird and wacky encoding has it, then. :-) Ill look into some parts (as it were) and let you know if I get any alternative suggestions - although web searching for radio modems got me approximately nowhere.
That kind of money and bandwidth does say to me that I might be better just modifying an analogue setup (encoding all the messages as analogue inputs and decoding the receiver pulses myself), but maybe Im being too pessimistic. Might also be a bit harder to sort the telemetry, if the electronics isnt built to be small.
Let me know if you reach any conclusions having chatted to Ian? Im afraid youre a bit up north for me to make the trip to a social just to pester you about radio modems, at this stage. :-)
Sorry, Ive sidetracked the thread nicely there. Anyone got any comments on my question about multiple axis gyros? If they do it, I can try to think what to use it for (although a few devious ideas do spring to mind). :-)
--
Fluppet