www.robowars.org

RoboWars Australia Forum Index -> Technical Chat

Pic Relay Controller
Goto page 1, 2, 3  Next

Post new topic   Reply to topic
  Author    Thread
the moth
Experienced Roboteer


Joined: 21 Dec 2004
Posts: 130
Location: Melbourne


 Reply with quote  
Pic Relay Controller

The experimental relay controller is a joint attempt between Robowars , Mothbots and other interested partys to produce a combat ready - cheap "entry level" motor controller with a successfully failsafe system . Based on a "picaxe" micro controller and using very few components the ultimate cost of this simple controller is hoped to be about $30.oo . The Pic-Relay-Controller (PRC) plugs directly into the radio receivers servo outputs and can be configured to supply power direct to the receiver .

Outputs are provided for the main drive relays ( 2 Channel ) and weapon drive relays ( 1 Channel ) and "channel mixing" is done in the software to greatly reduce set-up problems . Separate outputs are present for a power led , a "fail safe" led and mimic led's from the relay drives . Most of the components on the board are optional allowing a minimalist version to be built very cheaply . Designed to run from a wide range of voltages , the PRC is hoped to provide a simple and cheap solution to both new and old entrants . Options like opto-isolation , simple proportional control and separate power supplies are being considered for the "extended version" but this wont be available for some time yet .I will post updates here as the PRC progresses


The present parts list for the PRC is :
1 x picaxe 18x processor ( must be 18x)
1 x 7805 5v power regulator
1 x 220uf capacitor
1 x .1uf capacitor
1 x uln2003 driver chip
1 x led for power indicator
1 x led for failsafe indicator
2 x 220ohm resistors ( for leds )
suitable connection leads to the radio receiver
screw connectors for the relay outputs
header pin connector for the "in-circut" programming lead

Optional but recommended :
6 x leds to miminc relay drives (trouble shooting)
6 x 220 ohm resistors for leds

The PRC is presently built on "vero board" and a pre made board will not be available for some months
Photos and a wiring diagram are at my website
http://www.allsuburbs.com/robots/mothbots/relaycontrol/relay.html
The "picaxe 18x" processors are available from
http://www.microzed.com/
http://www.oatleyelectronics.com/
The programming software is available free after you "register" from
www.picaxe.co.uk
The serial programming lead and connector you have to make yourself - typically from the lead from a old mouse .

The rest of the parts are commonly available from Dick Smith , Jaycar etc
_________________
Some people pass cars - some people get passed by cars


Last edited by the moth on Sun May 15, 2005 1:37 am; edited 3 times in total

Post Sun May 01, 2005 9:13 am 
 View user's profile Send private message Send e-mail Visit poster's website
Glen
Experienced Roboteer


Joined: 16 Jun 2004
Posts: 9481
Location: Where you least expect


 Reply with quote  

are you going to sell a pre made PCB for it or do i still have to ghetto it up on vero board Smile
_________________
www.demon50s.com - Minimoto parts
http://www.youtube.com/user/HyzerGlen - Videoooozzz

Post Sun May 01, 2005 10:17 am 
 View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
the moth
Experienced Roboteer


Joined: 21 Dec 2004
Posts: 130
Location: Melbourne


 Reply with quote  

We will do a pre-made board when it is finalized or hopefully get a supplier like Oatley Electronics to make a kit from the final design , until then you will have to make it yourself . ( there is not a lot in it ) .We are considering some modifications to allow the micro to drive smaller relays first that then activate the "power" relays (any reasonable value you like) and power the pic , receiver and the low power relays from a receiver battery pack to reduce radio problems . I have found that the micro generates some radio noise - so it is best to keep it away from the receiver . Our present set-up uses a common ground to the main relays and the main relays do create some spikes that may be causing occasional glitches in the micro . I have fitted some large filter caps on the 12v power rail at the PRC but this hasn't fixed the problem . Fully isolated power may be the easiest and cheapest way to fix this. The micro should be able to drive 3 small relay coils and the drain on 4 AA ni-cads should be negliable , but we haven't tested this as yet.

The present Software code engages both motor-drives when turning hard (full tank steer) E.G. left turn - Left motor reverse , Right Motor Forward and although this seems like a good idea , I have found that this makes Vincent very vicious to steer at speed. Tests have shown that Vincent is far more drivable if you only engage one side at speed , although this results in a larger turning circle . E.g.: left turn - Left motor off , Right motor forward . I will probably have the code modified to allow for "single motor turns" on the forward and middle quadrants of the remote control and only allow “full rate” ,both motor turns on the lower quadrants of the remote . This should make driving at speed much easier whilst still allowing you to use a “death spin” move if you wish .


Other intended changes to the software , are mostly related to the fail-safe code as the F.S. is a little touchy at the moment . Unfortunately this will probably result in a partial re-write of the code. So this won't be done before the next Vic event .
_________________
Some people pass cars - some people get passed by cars


Last edited by the moth on Thu May 12, 2005 9:24 am; edited 1 time in total

Post Sun May 01, 2005 2:02 pm 
 View user's profile Send private message Send e-mail Visit poster's website
Glen
Experienced Roboteer


Joined: 16 Jun 2004
Posts: 9481
Location: Where you least expect


 Reply with quote  

cool. i can opto isolate the servo leads myself (did wonders for the IBC) and im guessing that running the thing of rx batteries is fairly simple?

who can i get the pre programmed micro from?
_________________
www.demon50s.com - Minimoto parts
http://www.youtube.com/user/HyzerGlen - Videoooozzz

Post Sun May 01, 2005 2:10 pm 
 View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
the moth
Experienced Roboteer


Joined: 21 Dec 2004
Posts: 130
Location: Melbourne


 Reply with quote  

Running the PRC and receiver from a seperate battery pack will probably make opto isolation unnecssary , but we are looking at suitable voltages and relays and we have yet to test them . I will try to "mod" vincent for the next Vic event (one week) to see if this makes a difference . I will get some micros burnt so that others can try it in its experimental stage if they wish . the micro is worth less than $20.oo each and this is the main cost of the controller. Obviously the code will change as we refine the controller , but you are welcome to try it out if you wish .
_________________
Some people pass cars - some people get passed by cars

Post Sun May 01, 2005 2:23 pm 
 View user's profile Send private message Send e-mail Visit poster's website
the moth
Experienced Roboteer


Joined: 21 Dec 2004
Posts: 130
Location: Melbourne


 Reply with quote  

During our last run of testing ,Vincent displayed a unusual and apparently unrepeatable fault …
When selecting full forward drive , some of the time Vincent would decide to engage one side of the drive system in both forward and reverse . This results in the motors stalling and the bot dragging it self around in circles . Originally I thought this was any number of things , but the mimic led’s defiantly showed the micro selecting the relays . The problem did not present itself on the bench , instead only appearing under range testing .

In the definitions section under “mixing mask” the line
symbol ch3_mask = %11001111  tries to mix failsafe led into channel 3 data
Should be
symbol ch3_mask = %10011111 Proper encoding for channel 3

I have also included a
pause 2000
pause 2000
after the definitions section before the main loop to create a 4 sec delay from initial turn on to stabilize the outputs as our weapon channel would engage initially

Anyone using the experimental controller should fix these problems .
_________________
Some people pass cars - some people get passed by cars

Post Thu May 05, 2005 10:21 pm 
 View user's profile Send private message Send e-mail Visit poster's website
Spockie-Tech
Site Admin


Joined: 31 May 2004
Posts: 3160
Location: Melbourne, Australia


 Reply with quote  

Thats some pretty good going Smile

Considering Rick hadnt even seen the PRC code until last weekend, just got the pic axe programming editor and a cable running about 3 days ago, and isnt an experienced micro programmer, unlike myself and Ajax who both missed that obscure and difficult to pinpoint bug that only occured on occasion.

Counting big tables of bits in those Binary mask definitions isnt easy either, and it looks like I slipped and was out a single bit in that mask..

Well done Rick ! - I hope Vincent shows the results of all your efforts in this weekends comp.. and thats one step closer to "production" status for the PRC.

(back to work on I.G... looking good for this weekend now.. Everyone ready to be Inspected ? Twisted Evil ?)
_________________
Great minds discuss ideas. Average minds discuss events. Small minds discuss people

Post Fri May 06, 2005 7:03 pm 
 View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
the moth
Experienced Roboteer


Joined: 21 Dec 2004
Posts: 130
Location: Melbourne


 Reply with quote  

The PRC worked great during the last Vic event . I have modded the code to allow only full rate turns on the lower quadrents of the remote and this has made the robot very driveable at full power (still touchy but very driveable) . I installed optoisolation between the PRC and the radio receiver but cannot say if that made any appreciatable difference . The failsafe light still flashed occasionally during combat , but it made no impact on the fighting ability of the robot . I will start work on the "floating failsafe" code suggested by Brett and we hope this will fully stablise the failsafe code .
_________________
Some people pass cars - some people get passed by cars

Post Sun May 08, 2005 4:01 pm 
 View user's profile Send private message Send e-mail Visit poster's website
the moth
Experienced Roboteer


Joined: 21 Dec 2004
Posts: 130
Location: Melbourne


 Reply with quote  

Our last vic event demonstrated that a hard turning relay driven bot caused the proportional controlled bots to use constant full stick to ovoid it .

The second (presently beta) version software with a "floating" failsafe is finished which may make it less suceptable to radio problems , but I have yet to start testing it . The code changes are far too many to list here - but if you 'mail me i can send you a copy of the new version.

New version 2 additions
block error rate system for failsafe detection
cpu frequency shifting code to improve response
failsafe led flashed during inital boot-up (3 sec) - Bretts idea
greater stability on initial startup
reduced sensitivity to glitches when failsafe engaged

I have started working on the final generation of the software with a "invert input" using a fourth channel which will reverse the controls .

Possibly later a companion version of software will allow you to use a second PRC to access up to 7 channels .
_________________
Some people pass cars - some people get passed by cars


Last edited by the moth on Thu May 12, 2005 9:28 am; edited 2 times in total

Post Thu May 12, 2005 12:59 am 
 View user's profile Send private message Send e-mail Visit poster's website
the moth
Experienced Roboteer


Joined: 21 Dec 2004
Posts: 130
Location: Melbourne


 Reply with quote  

The start post of this thread has been updated with more infomation and links
_________________
Some people pass cars - some people get passed by cars

Post Thu May 12, 2005 9:18 am 
 View user's profile Send private message Send e-mail Visit poster's website
Philip
Experienced Roboteer


Joined: 18 Jun 2004
Posts: 3842
Location: Queensland near Brisbane


 Reply with quote  

Do you still think that a complete PRC will be $30? I am thinking of trying to build a hobbyweight and your controller might be just the thing for it. Do you have an expected completion date?
_________________
So even the rain that falls isn't actually going to fill our dams and our river systems

Post Sun May 22, 2005 6:31 am 
 View user's profile Send private message
the moth
Experienced Roboteer


Joined: 21 Dec 2004
Posts: 130
Location: Melbourne


 Reply with quote  

The workable PRC setup is still being finalised.
A pre-made board / assemble your self version is still some time away , mainly due to the on going development . You are welcome to build the experimental version yourself and the opening post of this thread has all the parts etc info on it . I will add the software to my website in my next update , alternatively Brett may be able to sell you a micro pre-programmed .
_________________
Some people pass cars - some people get passed by cars

Post Sun May 22, 2005 10:03 am 
 View user's profile Send private message Send e-mail Visit poster's website
the moth
Experienced Roboteer


Joined: 21 Dec 2004
Posts: 130
Location: Melbourne


 Reply with quote  

PRC update (22 May 05)

In our last event ( an exhibition event at the Junkyard) , the new code changes allowed us to see some problems . One of the latest code changes involved the "startup code" , creating a flashing effect on the failsafe led during initial program start . Apart from the safety aspect of this - it also allows me to see if the micro reboots .

Occasionally , when the batteries were starting to get tired and the fighting / motor load was still intense , the micro would reboot ( as indicated by the flashing led ) without reason .

On one occasion , immediately at power up the PRC jammed on full right turn - and refused to respond to any signals . This happened once during testing just before Robowars II , and after 4 mins of "death spin" finally righted itself . Likely the micro rebooted , but we had no way of knowing this then .

Presently the radio receiver is powered separately and opto-isolation is used between the PRC and the receiver - I don’t think this is needed , but the re-boots may be caused by spikes on the power rails.

The next mod will be to power the PRC and the receiver from the same (small) battery pack . Then power the main drives etc from a totally separate set of batteries . This will electrically isolate the PRC and receiver from any spikes that may be on the main power rails and hopefully stop the micro from "rebooting"
_________________
Some people pass cars - some people get passed by cars

Post Sun May 22, 2005 10:28 am 
 View user's profile Send private message Send e-mail Visit poster's website
the moth
Experienced Roboteer


Joined: 21 Dec 2004
Posts: 130
Location: Melbourne


 Reply with quote  

Rye exhibition event? 04-06-05 update

My time has been limited recently , so I didn't make any mods to the PRC before this event . We now believe the "reboots" are now being caused by voltage "dips" as the batteries drain under excessive load , and this was more apparent during this event . I hope to cure this problem by powering the PRC from the same battery pack as the receiver - obviously I will remove the opto isolators during this mod .

Static dis-charge was noticed during the handling of the robot during this event ( likely helped by the wood floor used in all the Victorian arenas ) . The PRC sits open and exposed in the robot at this point and at the very end of the event the micro died again ( 2nd time ) . During the next rebuild - I will encase the PRC to help to protect it against static charges , hopefully this will stop any further micro deaths .
_________________
Some people pass cars - some people get passed by cars

Post Mon Jun 13, 2005 8:48 pm 
 View user's profile Send private message Send e-mail Visit poster's website
Grotto



Joined: 30 Aug 2005
Posts: 38
Location: Morisset NSW


 Reply with quote  
Is this thread still live??

If this thread still lives, has there been any update
on this project lately? Question

I was wondering if it was possible to get my hands on
your picaxe code (any version), even if this has become
a dead project. Crying or Very sad

I was working on a similar project for multiple weapons control
only and ran into difficulties reading more than 1 input channel
without severely losing response times. Mad So I was hoping to see how
you got around it.

And I was wondering if it is still a live project, how the separate
supplies helped the resetting issue.
I have a couple of suggestions to try it it didnt help.

1) Tie pin 4 (reset) STRAIGHT to pin 14(V+) with no resistor

2) Put a de-coupling cap across pins 5+14. 0.1 to 0.01 uf (value
is not critical) as close as possible to the chip, preferably
straddling the chip or under the board. The closer the better.

3) Put a 5.1v zener across pins 5+14 to help reduce high-spike
interference and add (some) static protection.

All these points have been tried and tested on multiple picaxe
projects (on 08, 08m, 18a, 18x chips) and found to be effective
in REDUCING spike and dip interferance/resetting by myself.

Hope youre still around and this is a live thread. Very Happy
_________________
"The future is not set. There is no fate but what WE make."
........CEO Cyberdyne Systems

Post Fri Jan 06, 2006 5:32 am 
 View user's profile Send private message Send e-mail
  Display posts from previous:      

Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 3

Goto page 1, 2, 3  Next

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Last Thread | Next Thread  >
Powered by phpBB: © 2001 phpBB Group
millenniumFalcon Template By Vereor.