|
Spockie-Tech
Site Admin
Joined: 31 May 2004
Posts: 3160
Location: Melbourne, Australia
|
Unmarked triangles are strange.. normally grounds are either the three parallel lines facing down, or the rails are a flat line with the rail voltage facing up. I guess triangles for both are OK, provided they are labelled, but I would rearrange them so the power bus's are facing up.. its much clearer.
How best to drive the FET gates is the big trick in motor control.
If the Fets are lightly loaded, then you could probably just get away with a "pull-up" resistor on the gates to 12v, and allow the ULN2003 to pull them to ground. Simple change, but you need to make sure that your pull-ups are attached to the right voltage so you dont exceed your Vgs(max) spec (Maximum Voltage Gate-to-Source) for the Fet if you decide to run your motors at 24v or something.
The drawback of this technique is that the pull-ups need to be of a high enough resistance to allow the ULN2003 driver to pull the gates "down" when appropriate without having to soak up too much current from the pull-up resistor, but still be low enough to allow the pull-up resistor to flow enough current into the gates to turn them on again quickly when the drivers pull-down "lets go".
Its a bit of a balancing act and takes a bit of scoping to ge the right balance between too much pull-up resistance meaning a slow turn-on but a fast turn-off, and too little pull-up resistance meaning a fast turn-on, but a slow turn off.
It gets even tricker when you are running a full-bridge of Fet's, since you need to make sure that one Fet is off before you turn the other one on. Thats not a problem in your relay reverse controller though..
A better technique is to use a "push-pull" Gate drive, where instead of a switch one way (to ground in this case), with resistors pulling it the other (when the switch is off), you actually have a switch in both directions that pulls the gates down nice and fast, and a seperate switch that pulls them up again.
This *can* be done with a transistor on each side of the gate, but you need to get your transistor-base drive circut right then so they both switch on and off cleanly with no-overlap. Not too hard, but requires fiddling with a few resistors to get the base bias correct.
A better solution is to use a small relatively cheap specialised Mosfet gate drive IC that is designed specifically to drive the fiddly capacitive gates of mosfets properly. This greatly improves the Fets ability to handle high power when they are being cleanly switched on and off since they spend less time in the resistive partially-conducting region as they "transition" from on to off.
The one I have used in some test circuits is the TC4424. They only about $2 IIRC and are available from Farnell
http://au.farnell.com/
I have uploaded a datasheet for the 4424 here for you to have a look at.
http://www.robowars.org/temp/tc4424.pdf _________________ Great minds discuss ideas. Average minds discuss events. Small minds discuss people
|
Thu Aug 18, 2005 11:56 am |
|
|
|
|
|
|
|
Knightrous
Site Admin
Joined: 15 Jun 2004
Posts: 8511
Location: NSW
|
A few revisions have been made. Increased the stability of the failsafe code. Seems to work reliable now, Have yet to get it to pick up anything but the transmitters signals
Andrew (Dumhed) has kindly offered to make up some professional boards, thanks a million Andrew! I've also added some features into the design. Added BEC (Turned on via jumper) and I've added a dead band jumper. The idea of the deadband jumper will be to make the controller more suited to either drive or weapon channels. For drive channels, you want the drive turning on at around less then 1/4 stick. This will make it more responsive to your finger movements. While using it for a weapon, if you remove the deadband jumper, it will make the weapon switch on at around 1/2 stick, making it less likely that a a small accidental bump of the stick doesn't fire your weapon off.
Here is the component list so far:
TVR Relay Board Component List:
2 x TIP31 40v 3A Transistor - JayCar Part #ZT-2285 = $2.40
2 x Mylar Capacitors - JayCar Part #RG-5125 = $0.40
2 x 1Amp Diodes - JayCar Part #ZR-1020 = $0.95
2 x Jumper Shunts - JayCar Part #HM-3240 = $1.45 (10.pkt)
1 x 7805 5v Regulator - JayCar Part #ZV1505 = $1.20
1 x 7812 12v Regulator - JayCar Part #ZV1512 = $1.20
1 x 8-DIP Socket - JayCar Part #PI-6500 = $0.25
1 x Red LED - JayCar Part #ZD-0102 = $0.50
1 x Green LED - JayCar Part #ZD-0122 = $0.95
1 x 28pin Header Terminal - JayCar Part #HM-3211 = $0.55
1 x 50v Electrolytic Capacitor - JayCar Part #RE-6180 = $0.80
1 x .125watt 200 Ohm Resistor - JayCar Part #RR-0555 = $0.40
Total Onboard Costs: $11.05
Off Board Parts Required:
1 x PicAXE 08M chip [Micro-Zed = $5.00]
2 x 30amp SPDT Horn relays - JayCar Part #SY-4070 = $12.40
Off Board Costs: $17.40
Optional Parts:
2 x Horn Relay Bases - JayCar Part #SY-4069 = $5.90 (Makes wiring up the relays easier)
2 x 60amp SPDT Horn relays - JayCar Part #SY-4074 = $8.95(Handles double the current, use
instead of the 30Amp relays)
Here is the source code minus the new Failsafe LED code and Deadband code:
;-------------------------------------------------------------;
;Team Vertex Robotics
;PicAxe 08M Relay Controllers
;Written by Aaron Knight, with lots of help from Ajax & Spockie
;Copyright 2005 Aaron Knight
;Last Updated: 08/12/2005
;Note: This is NOT a professional controller!
;-------------------------------------------------------------;
;-RC Channel Definitions
symbol fail_low = 100 ;1ms - failsafe below here
symbol low_on = 135 ;low activate point
symbol low_off = 140 ;low deactivate point
symbol neutral = 150 ;where motor is off
symbol high_on = 160 ;high deactivate point
symbol high_off = 165 ;high activate point
symbol fail_high = 200 ;2ms - failsafe above here
;-PicAxe Pin Definitions
symbol led = 0 ;Failsafe LED
symbol reciver = 1 ;Pulsein from Reciever
symbol relay1 = 2 ;Relay 1 activate
symbol relay2 = 4 ;Relay 2 activate
;-PicAxe Register Definitions
symbol chan1 = b0
symbol fail = b1
symbol srt = b2
;-------------------------------------------------------------;
main:
pulsin 1,1,chan1
if chan1 <= fail_low then deny
if chan1 >= fail_high then deny
let fail = 0
goto accept
;-------------------------------------------------------------;
main2:
let srt = 0
if chan1 > low_off and chan1 < high_off then stp
if chan1 <= low_on then fwd
if chan1 >= high_on then rev
goto main
;-------------------------------------------------------------;
fwd:
high relay1
low relay2
goto main
;-------------------------------------------------------------;
rev:
low relay1
high relay2
goto main
;-------------------------------------------------------------;
stp:
low relay1
low relay2
goto main
;-------------------------------------------------------------;
;-Advanced Counting Failsafe
;-------------------------------------------------------------;
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
;-------------------------------------------------------------;
Well, I'll report when I get the boards and some more chips happening _________________ https://www.halfdonethings.com/
|
Thu Dec 15, 2005 12:33 pm |
|
|
|
|
|
|
|
|
|
|
|