|
|
|
|
Knightrous
Site Admin
Joined: 15 Jun 2004
Posts: 8511
Location: NSW
|
@Jake: I've written something similar with my PicAXE controller code. Basically mine is based on a plus/minus counting system.
quote:
;-------------------------------------------------------------;
accept:
srt = srt + 1
fail = fail - 1
if srt <= 3 then main
if srt = 4 then main2
goto main
;-------------------------------------------------------------;
deny:
fail = fail + 1
srt = srt - 1
if fail <= 3 then main
if fail = 4 then stp
goto main
;-------------------------------------------------------------;
Basically it requires 4 good pulses to start and 4 bad pulses to stop. The idea being that it will take at least 80ms to activate any of the controllers functions. If it picks up any bad signals, it will minus a point from the good pulse count. eg: If it recieved 3 good signals, then recieves 1 bad signal, the good signal count is shifted back to 2 and the bad signal count is shifted to 1. If it picks up another good signal, it will minus one from the bad pulses and add one to the good pulses.
This allows the controller to function moderately safe, it will ignore the odd bit of interferrence here and there, but remembers it(By counting it). If the bad pulses reach the failsafe level, it shuts down (Takes 80ms to do so, which remains pretty safe for drive motors). The main reason I wrote this into the code was to stop the on/off shuttering we get from the IBC's failsafing at times can be very tough on motors, drives and batteries. This prevents the possible damage, while making the controller still relatively safe(80ms is only going to let a 12v 550rpm drill motor do 0.75 of a revolution at most) _________________ https://www.halfdonethings.com/
|
Mon Dec 19, 2005 4:00 pm |
|
|
|
ffej
Experienced Roboteer
Joined: 22 Jun 2004
Posts: 595
Location: Kurrajong, NSW
|
Some Spektrum pics . . . . pretty dodgey because the cam on my phone hates low light, but meh, you get the idea. Great value I think, for $199US you get a 6 channel stick TX with nicads (in mode 2, doh), a micro reciever and 4x 8g servos. A word of warning, the charger that comes with it for the TX is 120V, so you'll have to either use a step down, or just cut the plug off and charge it on your peak detecting charger, which is easy cause they dont have any diodes inline( like most do, which means you have to get rid of the diode before your charger knows its there)
http://www.botclips.net/spektrum _________________ Jeff Ferrara
fb@ffej.net
ffej.net
|
Wed Jan 04, 2006 8:47 am |
|
|
|
|
|
|
|
|
|
|
|
|