Welcome, Guest. Please Login.
Surveyor Corporation Surveyor SRV-1
Home Help Search Login

Surveyor Robotics Forum

Welcome to the user support forum for Surveyor SRV-1 robots, SRV-1 robot controllers and SVS stereo vision systems. To register for this forum, please send an email to support@surveyor.com which includes your desired forum user name, your registration email address, and a brief explanation of why you wish to join, and we will create a forum account for you.

Please note that there is a Search button in the forum toolbar for forum topics. Another effective search method for the entire surveyor.com site is to use Google, e.g. "xyz site://www.surveyor.com" where "xyz" is the search topic.



Pages: 1 2 3 
Send Topic Print
driving other motor controllers from the Blackfin (Read 36676 times)
admin
YaBB Administrator
*****




Posts: 3602
driving other motor controllers from the Blackfin
01/29/08 at 7:38am
 
We just received this support question via email -
 
>My current project it to connect the blackfin board up to my existing
>chasis. It basicly consists of a sabertooth 2x10, higher rpm gearhead
>motors, and the lynxmotion tri-track chasis.
>
>Currently I am driving the sabertooth via an RC receiver using the mixed
>mode, but from looking at things you appear to send PWM in differential
>mode.. Is this true?
>
>Is it possible to send a mixed signal? (IE: S1 on Sabertooth controls Fwd,
>S2 controls rotation)..
 
I checked the specs on the Sabertooth 2x10, and it appears that you can drive it either way (mixed or independent), depending on DIP switch settings.  Our software is set up for differential mode, but there's no fundamental reason why you couldn't change that to mixed mode.  
 
Note that our current software drives the 2 PWM channels for "duty cycle modulation" to control motors via an H-bridge, while the Sabertooth and other R/C controllers require a "pulse position modulation" (PPM) timing pulse to control motor output.  This isn't a problem - the PWM channels can generate the PPM signals, and we're wrapping up a version of firmware that generates PPM, so you just need to define how you want the commands to be converted into control signals.  We will also have the ability to use the 2nd UART instead as an additional pair of PWM or servo channels.
 
This will be a compile-time option, but for users who don't want to modify firmware, we could generate some precompiled versions of firmware with this option.  Let us know your preference.
 
 
Back to top
 
« Last Edit: 01/29/08 at 7:40am by admin »  

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
osmogr
Junior Member
**




Posts: 67
Re: driving other motor controllers from the Black
Reply #1 - 01/29/08 at 10:50am
 
I will check the timings when I get home, but I believe they are as follows:
 
.9mS = Low Side
.15mS = Mid Stop
.25mS = High Side
 
I took this info from:
http://www.lynxmotion.com/images/html/servo01.htm
Servos are controlled with a 5vdc positive-going variable pulse width that repeats every 20mS. The pulse length determines the servo output shaft position but the 20mS frame rate is not position critical. The frame rate does need to repeat at least every 20mS or it will loose power or even stutter. The servo was designed for pulse widths that vary from 1.0mS to 2.0mS, where 1.5mS is centered. In the normal range the servo will move +/- 45 degrees from the centered (neutral) position.

 
Since I am using both RC and Blackfin, I would like to try and match the timings as close to the RC output as possible. The RC and Blackfin outputs would be switched via SPDT switch.
Back to top
 
 
osmogr   IP Logged
admin
YaBB Administrator
*****




Posts: 3602
Re: driving other motor controllers from the Black
Reply #2 - 01/29/08 at 11:56am
 
Quote from osmogr on 01/29/08 at 10:50am:
I will check the timings when I get home, but I believe they are as follows:

.9mS = Low Side
.15mS = Mid Stop
.25mS = High Side

 
Right - typical range for servos is a 1.0ms - 2.0ms pulse centered at 1.5ms, but sometimes the range is wider.  Only thing to note is that the Blackfin interfaces at 3.3V, though I haven't seen any problem driving 5V servos with a 3.3V timing signal.  The current code has a 50Hz (20ms) cycle.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
osmogr
Junior Member
**




Posts: 67
Re: driving other motor controllers from the Black
Reply #3 - 01/29/08 at 12:07pm
 
From past testing you can connect just GND and SIG to drive the servo, and supply 4.8-6V via red wire from a seperate power source. I use this on my RC Stuff to isolate digital servos from the Rx, as they usually more then what the rx can supply..  
 
So using past testing, I have driven the rx off 4.8v and driven servos off 6.0 without any issues.. But these were servos not the sabertooth so we will see. But looks VERY promising..  
 
As for the other PWM outputs, I am working on a PT asmembly for the camera. I have the base made and functional, but need to work on the tilt portion..
 
Ill post some pics tonight..
 
Back to top
 
 
osmogr   IP Logged
admin
YaBB Administrator
*****




Posts: 3602
Re: driving other motor controllers from the Black
Reply #4 - 01/29/08 at 1:12pm
 
Okay - I can generate a version of firmware for you to test when you're ready.  I need to wrap up the servo code anyhow.  Only detail is that my primary PWM signals are driving some brushless motor controllers that need to start with the timing pulses at one limit or the other, so I'll have to remember to change this, unless the Sabertooth has an initialization sequence.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
osmogr
Junior Member
**




Posts: 67
Re: driving other motor controllers from the Black
Reply #5 - 01/29/08 at 2:49pm
 
From the sabertooth docs, there are a few different ways to configure its startup, since i'm using the RC Mode, it automagicly centers and finds the min/max values of the pwm signal. I believe this just takes the first known signal width and uses for center, when you startup with trims set, it causes some drift..  
 
 
As soon as I recieve the board I will let you know.. Ordered last week so should be any time..
Back to top
 
 
osmogr   IP Logged
osmogr
Junior Member
**




Posts: 67
Re: driving other motor controllers from the Black
Reply #6 - 01/29/08 at 7:09pm
 
Received board and I am now installing hardware.. I was looking at the motor board and it looks pretty blank, I didnt have a chance to check the wlan module but did you remove the h-bridge off this board?
 
Everything else is 100% awesome, great packing and such.. Much thanks!!
 
 
Back to top
 
 
osmogr   IP Logged
admin
YaBB Administrator
*****




Posts: 3602
Re: driving other motor controllers from the Black
Reply #7 - 01/29/08 at 7:27pm
 
The board set you ordered didn't include the motor control (that's not a current option on our shopping cart), but we can swap boards.  Now that I know what you're doing, I expect that you want a board that has a header for the external i/o anyhow.  We'll send another board tomorrow, and you can return the radio board without the Matchport after you receive it.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
osmogr
Junior Member
**




Posts: 67
Re: driving other motor controllers from the Black
Reply #8 - 01/29/08 at 10:04pm
 
thanks!! that would be awesome.. I was going to see if my extension for the camera p/t works. hopefully all will go well, I made a extension using a small ribbon cable, and I broke up each cable so it can flex better.. Its about 2.5" long..
 
 
Also, I checked driving a servo using different voltages tonight, with a shared ground, everything worked good at varrying voltages, the servo got mad after 3.5 volts..  
 
The timings I worked out of this rx were very similar to previously mentioned,
.98 low, .15 mid, .25 high. so im guessing your thoughts on the 1, 1.5, 2 for pwm should work..
 
Back to top
 
 
osmogr   IP Logged
admin
YaBB Administrator
*****




Posts: 3602
Re: driving other motor controllers from the Black
Reply #9 - 01/30/08 at 7:47am
 
Here's one of my servo control projects - it's "work in progress", so there are wires all over the place, but hopefully you get the idea.
 

 
I likewise broke out the servo leads and created a 5V power bus for the servos using a standard male two-row header with 0.100" pin spacing (the 5V source is a 7805 5V regulator running off the 8V Lipoly battery).  There's a piece of cardboard separating the 5V lines from the GND lines - I'll clean this up later.
 
The servo control wires are then plugged into the Blackfin header on the bottom of the radio board.  Again, I need to add some shrink-wrap tubing or other insulation to separate the signals.
 

 
Here's the airframe onto which everything is mounted with the rat's nest of wires. There's a pair of motors mounted coaxially to drive the 2 counter-rotating props, and the battery pack is actually mounted on a gimbal controlled by 2 servos - the weight-shifting steers the aircraft.  You can see a video of an earlier prototype that was controlled using R/C.
 
===============
 
http://www.youtube.com/watch?v=cZmULlkOE3o
 
===============
 
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
osmogr
Junior Member
**




Posts: 67
Re: driving other motor controllers from the Black
Reply #10 - 01/30/08 at 3:04pm
 
Nice.. To control yaw are you using any gyro? I have a 4 bladed heli (Like the X-BL-4D) that uses the blade rotation to correct and change the yaw.. Speed up one motor and slow the other.
 
Back to top
 
 
osmogr   IP Logged
admin
YaBB Administrator
*****




Posts: 3602
Re: driving other motor controllers from the Black
Reply #11 - 01/30/08 at 3:29pm
 
Initially, I have an Analog Devices ADXL202E 2-axis accelerometer for pitch/roll, and will later try the LIS3LV I2C 3-axis accel.  It's easy enough to manually trim the yaw by controlling rotation speed, but stabilizing pitch and roll are not so simple.  In any case, a gyro will eventually be added for yaw control.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
osmogr
Junior Member
**




Posts: 67
Re: driving other motor controllers from the Black
Reply #12 - 01/30/08 at 8:51pm
 
Quote from admin on 01/29/08 at 1:12pm:
Okay - I can generate a version of firmware for you to test when you're ready.  I need to wrap up the servo code anyhow.  Only detail is that my primary PWM signals are driving some brushless motor controllers that need to start with the timing pulses at one limit or the other, so I'll have to remember to change this, unless the Sabertooth has an initialization sequence.

 
I am ready for the firmware, could you set the default start points at 1.5. High side at 2 and low side at 1. That should work great..
 
Back to top
 
 
osmogr   IP Logged
admin
YaBB Administrator
*****




Posts: 3602
Re: driving other motor controllers from the Black
Reply #13 - 01/31/08 at 8:40am
 
Quote from osmogr on 01/30/08 at 8:51pm:

I am ready for the firmware, could you set the default start points at 1.5. High side at 2 and low side at 1. That should work great..

 
Bear with me for a bit - the original plan was to use #IFDEF statements in the code, and recompile depending on whether there the drive is an PWM H-bridge or PPM servo.  After looking at the specific code, I now think it would be better to select the device type at the command (SRV_protocol) level, so that a single version of firmware supports PWM or PPM.  
 
At the control loop level, just as we currently have the 'M' command to set PWM power levels, we could add new commands to set PPM timing for each servo pair.  The user could redefine the The code would detect whether the user is requesting PWM or PPM functions, and initialize the timer channels accordingly.  The trick is deciding what to do about the keypad commands ('8' forward, '5' stop, '2' back, etc).
 
Anyhow, let me think this through a bit further - I definitely prefer the idea of supporting a single version of firmware rather than branching versions for different hardware configurations.
 
 
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
osmogr
Junior Member
**




Posts: 67
Re: driving other motor controllers from the Black
Reply #14 - 01/31/08 at 11:59am
 
This works perfectly.. I wont have the new board for a few days so this will give me time to clean things up and test out my charge circuit..
 
Back to top
 
 
osmogr   IP Logged
Pages: 1 2 3 
Send Topic Print