|
|
|
|
|
|
|
Spockie-Tech
Site Admin
Joined: 31 May 2004
Posts: 3160
Location: Melbourne, Australia
|
You can make your own failsafes with some PicAxe08's easily enough that will take up about as much room as a matchbox and cost about $5 each.
Remember, the failsafes arent for when the bot is in the arena.. it cant actually hurt anyone there..
They're for when you charge down your driveway showing it off to your mate, you hit stop on your control and the bot merrily keeps on heading out into the middle of the street into the oncoming traffic, weapon spinning, scaring crap out of a mother of 4 "babies on board" who promptly plants her 'burb-beater bimbo box into the tree on the side of the road trying to avoid your wacky creation.
Or you're demo'ing it at school, and just for fun "charge" the teachers car, or your least favourite person in school to scare them a little when your bot decides to suddenly develop selective hearing.
Stuff like that will make you wish you had a working failsafe. The PolyCarb arena walls dont really care that much, so its not for me, its for you.. _________________ Great minds discuss ideas. Average minds discuss events. Small minds discuss people
|
Thu Nov 10, 2005 6:51 am |
|
|
|
|
Knightrous
Site Admin
Joined: 15 Jun 2004
Posts: 8511
Location: NSW
|
Angus, Picaxe chips arn't hard to program. I just wrote some code for a failsafe module using a Picaxe 08M chip. 15mins work, and I'm no guru with picaxe
Code as follows:
;-------------------------------------------------------------;
;Team Distructive Technologies
;PicAxe 08M Failsafe
;Written by Aaron Knight
;Copyright 2005 Aaron Knight
;Last Updated: 10/11/2005
;Note: This is NOT a professional failsafe!
;-------------------------------------------------------------;
;-RC Channel Definitions
symbol fail_low = 90 ;0.9ms - failsafe below here
symbol fail_high = 210 ;2.1ms - failsafe above here
;-PicAxe Pin Definitions
symbol rx = 1 ;Pulsein from Reciever
symbol sx = 2 ;Servo output
;-PicAxe Register Definitions
symbol chan1 = b0
symbol fail = b1
symbol temp = b2
;-------------------------------------------------------------;
main:
pulsin 1,1,chan1
if chan1 <= fail_low then failsafe
if chan1 >= fail_high then failsafe
let fail = 0
let temp = chan1
servo 2,temp
goto main
;-------------------------------------------------------------;
failsafe:
fail = fail + 1
if fail <= 4 then main
if fail = 4 then shutdown
goto main
;-------------------------------------------------------------;
shutdown:
servo 2,150
pause 250
goto main
;-------------------------------------------------------------;
There might be a few bugs in that code because I haven't tested it myself, but I'm confident that it will work. Basically the code takes the signal from the reciever, screens it with my failsafe code, which checks to see if the signal is within the 90ms-210ms range (I made this a little bigger then the standard 100ms-200ms to cater for radios that are slightly out of tune) and then if it's not valid, it goes to the failsafe code.
In the failsafe code, it also counts, I've added it so it needs 4 invalid signals before it shutsdown, this should be fine for drive motors and slow weapons (crushers and lifters) as it will only let 80ms of time pass before shutting down but I would change this to 1 bad signal shutdown it if your going to use this on a flipper or spinner. Once it gets 4 bad signals, it tells the servo output to shift to the 150ms mark, which is centre. It then waits for 1/4second (250ms) to prevent the shuttering effect we notice with the IBC during repeated failsafeing.
Any questions?
EDIT: Fixed two things in the code _________________ https://www.halfdonethings.com/
|
Thu Nov 10, 2005 10:34 am |
|
|
|
Spockie-Tech
Site Admin
Joined: 31 May 2004
Posts: 3160
Location: Melbourne, Australia
|
Look at (and figure out what each section does) the circuit diagram on the last page of the IBC manual here
http://www.robowars.org/docs/ibc-docs-v0.1.pdf
The PicAxe wont be fast enough to do two channels of PWM motor control (and mixing, and failsafing, and weapon control) in the one chip, you need something at least as fast or faster than the Atmel 12mhz micro (which is programmed in machine code, much harder than basic).
You could probably use two seperate picaxes, one per motor channel, but you need to do the mixing in your radio then, since each wont know what the other is doing, so they cant do the steer mixing - unless tank steering is ok with you.
Or just use the Atmel Micro like we did. The code is available for free (for non commerical use), already written and debugged.
Read up on the data sheet for the HIP4081 chip, its the magic ingredient that makes driving a full H-Bridge of possible, and you need to *understand* how its FET voltage sensing, charge-pump powered gate switching, and Bridge switch timing aspects work properly if you dont want it to go boom.
Then, theres the (expensive and fiddly) low-voltage switchmode regulator (and associated coils, caps and switching diodes) which enable the IBC to keep ticking through a brownout (voltage sag) as the batteries get low. Without it, you need to either run your circuit from 24v, or somehow make sure it *always* stays above about 14v, or your driver will stop.
Now add in a 4x thick copper circuit board to handle the current, some blocks of aluminium, a bunch of fets, Tranzorbs for spike protection, and you're pretty much there.
Problem is, I'll bet you're up over $400 worth of parts, and you havent written/debugged any driving code yet.. Any mistakes in your program tend to cause expensive smoke when working with high power controllers, turning bugs into booms.
A better area to start with if you are new to motor power control, would be to aim to develop something like an electronize controller that uses relays for direction reversing, with a single FET to do the PWM speed control.
Much easier to get started with and less likely to go bang since you dont get into the complexities of driving an H-Bridge of Fet's, with their "variable high side gate drive voltage" problems and "crossover shoot-through" etc.
If you really want to build your own IBC, just copy the circuit diagram from the manual to a circuit board (working out the track routing in the process, unless you *really meant copy - in which case it would probably be easier to ask jason to buy a blank circuit board - but they're not cheap, thick double sided copper and all),
Then buy all the parts from somewhere like DigiKey (www.digikey.com). Pricey, but they should have everything - noone in Australia does. If you want to get the same price on parts the Jason gets you will need to buy them in lots of 200+ at a time.
Buy/Build yourself a Micro programmer (about $50), and setup the operating code and download software on your PC.
Polish up on your fine surface mount and heavy Fet-Track soldering skills.
and awaaay you go..
(It really isnt that easy, is it ? If you're motivation is to learn how to do it for interests sake and you dont care what it costs, I'll be pleased to help teach you how they work for free.. make sure you have some $ ready to buy lots of parts though.
If you think you're going to save yourself some time or $, Forget it. Theres only about $50 worth of Labour in the IBC's price, and thats a professionals time who can do the job about 20x faster than anyone else cause he's done hundreds of them and has all the tools and bits right there - If someone asked me to make them a "one-off", I'd put the price at something like $750 taking into account all the stuffing around to get 1's and 2's of everything.
or, Talk to Aaron about his Pulse-50 project that is closer to finished, that would be a much more achievable first controller for an electronic DIY'er. _________________ Great minds discuss ideas. Average minds discuss events. Small minds discuss people
|
Tue Nov 22, 2005 5:40 am |
|
|
|
|
|
|