|
|
Valen
Experienced Roboteer
Joined: 07 Jul 2004
Posts: 4436
Location: Sydney
|
Progress
getting into the detailed design of doing an interrupt based servo output is becomming a pain. Its easy enough to think the logic up to drive it but implementing it looks like a pain in the behind. I wanted it to only interrupt either on a timer rollover or just when it needed to change a servo state.
Discoveries
Also i found out why that spectrum mob (and all the other radio people) have a max of 6 chans. its the most you can have before you have to start outputting servo pulses in parallell, basically all the times for the pulses add up such that if you put them out one after the other you take too long to put 50 per chan per second out.
Rant
Still the spectrum people presumablly could use some stupidly high rate interrupt and drive as many servo lines as they wanted off it. The IBC works in a simmilar way and its onrly running 12Mhz, put a scenix 75Mhz chip in and you could do anything you wanted (even if you have to deal with their daft banking arrangement)
Where Do We Go From Here
I'm going to go down the "Brain Transplant" path for now and directlly drive the HIP chips. The 16F877A has 2 hardware PWM outputs so my code can be just sitting there wating for radio data while the PWM is taking care of itself.
Down side to this is it'll be a pain to drive the Victor in a Plan-F style bot, what its coming to is needing some kind of "switch" like a network switch.
you could have a number of radios in the bot (say 2) and anywhere up to 6 motor controlls (all addressed serially in my wet dream) all of which have bi-directional data.
You either make some funky switchgear (4 ch uarts seem only to come in 64pin smt packages euuuch) or in a recent thaught, run the buss at say 115200BPS (max speed for the radio) and do some kinda token ring setup with all the serial points sharing a common buss.
Also have been thinking about using some kind of fiber optic comminications, (Think xmass tree fiber optic thingies), should make for RFI immunity and electical isolation for sensitive bits, might also help prevent one item taking down the whole buss, course you cant have a "multi drop" network with that its all point>point _________________ Mechanical engineers build weapons, civil engineers build targets
|
Mon Dec 26, 2005 12:05 pm |
|
|
|
Valen
Experienced Roboteer
Joined: 07 Jul 2004
Posts: 4436
Location: Sydney
|
Captains Log : Argh!
well a fair bit of progress to report
got the "Brain transplant" working ;->
all was going according to plan but then i re-organised the code to make it easier to read.
big mistake
the thing stops recieving data propperly or stops doing something anyway and end result is it just dosent work. 2 days of debugging later i decide "stuff it" and just get my last working bit of code and plonk that in, all works fine now. then i add in the other modules (transmit back to the PC and failsafing) and all is working well.
grrrr.
got myself an X-Box controller, hacked the end off (sob, theres something wrong about buying something then hacking it up before it even gets used once) and connected a USB plug, that all seems to be working now too so that will be the bot controller for robowars.
i would have liked a steering wheel to get the axes of controll seperated and to have a large range of movement for fine controll but we always had the problem of how one does throttle.
The best controller we can think of at this point in time is a flight yoke, as they have a return to centre on the push-pull axis.
actually fitting the radio into the space allowed is becoming difficult, the 40 PIN PIC isnt small when you add 2x diodes a 1K cap and a 3.3uF eletrolytic cap per a/d channell (of which there are and then you need to actually mount it somewhere.
We are thinking of monitoring
Left motor, current and temperature
Right motor, current and temperature
Quite happy with the failsafe, works exactly as advertised, half second worth of run on then it turns off over the next half second.
got 2 way information flowing, (IE the PIC sends dummy info back to the PC)
still to do
get the PIC reading the AD inputs,
make a board to mount the pic on and the radio
possibly another board to mount the A/D protection circutry on.
pictures and code to follow _________________ Mechanical engineers build weapons, civil engineers build targets
|
Sat Jan 07, 2006 5:25 pm |
|
|
|
|
|
|
|