Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 6 of 11 FirstFirst ... 45678 ... LastLast
Results 126 to 150 of 258

  1. #126

    Join Date
    Sep 2003
    Location
    ANYCITY, WA
    Posts
    161
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    Congrats and good luck with your new venture!!!
    Larry

  2. #127

    Join Date
    Dec 2009
    Location
    St.Catharines, ON, CANADA
    Posts
    20
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    can you at least tell us when they might be available for sale? I want something like this for my Jaguar.

    Rich

  3. #128

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    Gentlemen...we have a liftoff! Last night, the first tangible results from all the machining and bread-boarding finally paid off. My friend was able to program the code necessary to get (from what I can see) much of what Tomapowa was able to do. We were even able to reproduce the neat little backwards twist he'd added to one of his versions to prevent binding. That feature doesn't show on THIS video, this was just the first test. BUT, the cool thing is I have a working gear (at last) I can soon install in the model. I'm going to order a twin motor control board today and a smaller board that detects high and low signals from an RC transmitter...that should give me a complete tri-gear setup. There's a few more items to add to the code such as the addition of a stagger, but that shouldn't take too much more time. Hopefully within a week or so I should have a working version in the case installed in the airplane to test. Today will be spent wrapping up the rewiring of the wings and prepping them for the new gear...

    http://www.youtube.com/watch?v=kAA56svv1v8

  4. #129

    Join Date
    Dec 2001
    Location
    Chehalis, WA
    Posts
    568
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts


    ORIGINAL: Boeing314

    Gentlemen...we have a liftoff! Last night, the first tangible results from all the machining and bread-boarding finally paid off. My friend was able to program the code necessary to get (from what I can see) much of what Tomapowa was able to do. We were even able to reproduce the neat little backwards twist he'd added to one of his versions to prevent binding. That feature doesn't show on THIS video, this was just the first test. BUT, the cool thing is I have a working gear (at last) I can soon install in the model. I'm going to order a twin motor control board today and a smaller board that detects high and low signals from an RC transmitter...that should give me a complete tri-gear setup. There's a few more items to add to the code such as the addition of a stagger, but that shouldn't take too much more time. Hopefully within a week or so I should have a working version in the case installed in the airplane to test. Today will be spent wrapping up the rewiring of the wings and prepping them for the new gear...

    http://www.youtube.com/watch?v=kAA56svv1v8
    Congratulations!! Will you be able to share how the programming is done along with the boards used?
    Galen


  5. #130

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    As long as there are no objections from Tomapowa...this was his thread after all. But I'm willing to share what boards you need and the programming code to put into it....it might be just a matter of copy paste from a word document. If not, some minor typing into the programming on your part.

  6. #131

    Join Date
    Dec 2001
    Location
    Chehalis, WA
    Posts
    568
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    I have the Dual MC3387 motor driver carrier but don't recognize the blue board. I have no desire to infringe on Tomapowa's thread either so PM me and we can exchange email. Anything you can do to help I'd really appreciate it.

    Galen

  7. #132

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    OK, guys, real quick and dirty at this point. The boards I have bought so far as follows:

    This is the 'brain' of the system: http://www.pololu.com/catalog/product/1630 (The blue board) It holds the programming code and allows you to attach other boards to it for input/out data and monitors the motor carrier and 'tells' it start and stop your retract motors.

    The RC switch: http://www.pololu.com/catalog/product/752 This takes the RC retracts switch info from your transmitter and creates a hi/lo signal for the 'brain'.

    The motor controller: http://www.pololu.com/catalog/product/1212 Controls a single gear leg (nose gear).

    The main gear motor controller: http://www.pololu.com/catalog/product/1213 Use this board to control 2 gear (P-51).

    The code we have right now is preliminary. As my codewriter improves things I'll be able to make a more finalized version available. The good new is, the code can be distributed via word document, so you can copy/paste the code from the forum into the controller and once it's compiled you'll be ready to go. Right now only the basic up down control is written. Stagger control and other refinements to come soon.






  8. #133

    Join Date
    Oct 2002
    Location
    NEWPORT, RI,
    Posts
    328
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    ORIGINAL: booker-RCU

    I have the Dual MC3387 motor driver carrier but don't recognize the blue board. I have no desire to infringe on Tomapowa's thread either so PM me and we can exchange email. Anything you can do to help I'd really appreciate it.

    Galen
    Hey Folks... go at it! I certainly don't mind you guys using this thread to discuss other DIY options... I just can not discuss the specific design on my final actuators... or code specifics... other than what I have already disseminated here in this thread.

    Depending on what I actually "sell"... there's the possibility that I might be able to tell you guys more regarding the actuators (the key component) and possibly the code too.

    The outfit I am currently working with is not an R/C company by any stretch (robotics research co.) so I doubt they will be selling e-retracts any day soon. That said, I'm still not giving up on the e-retract idea as I still have another Co. (interested in my design) seriously thinking about prototyping an e-retract retrofit kits for converting air retracts to electric... time will tell I guess.

    Re: jackscrew actuators... I hate picking on Lado retracts but unless they made some marked improvements in their design, they will continue to break bearings over time (funny how you don't hear much about this issue... it's happening in front of our eyes but most appear to have big blinders on... O well... remember... I told you so! )
    TOMAPOWA

  9. #134

    Join Date
    Dec 2009
    Location
    St.Catharines, ON, CANADA
    Posts
    20
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    Boeing.............................I know this might be a bit much to ask, but would you be willing and/or able to give a step by step how to wire up the boards? I'm almost an electronics brain dead.................I have the ability, but not the know how. LOL. I'm sure there are others that are in the same boat as me. this is such a huge step ahead for all of us and it's ashame not to take full advantage of it. electronic is the way I want to go on my Jaguar build and this would fit right into my plans. I'm gonna order all the goodies you listed on your post and the mechanicals to build the retracts.

    being a jet, I wouldn't be interested in the stagger anyway, so the current programming would suit me just fine. they just need to go up and down.   this is great stuff though, so keep it up and we can get others going on this to give good feedback for all to benefit.

    Rich

  10. #135

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    Boeing.............................I know this might be a bit much to ask, but would you be willing and/or able to give a step by step how to wire up the boards? I'm almost an electronics brain dead.................I have the ability, but not the know how. LOL. I'm sure there are others that are in the same boat as me. this is such a huge step ahead for all of us and it's a shame not to take full advantage of it.
    Jag Fan:

    Sure thing! I plan to share a series of pictures and diagrams on how to put the boards together, to make it easy for others to do the same thing. Truthfully, this project is really a collaboration between myself and the person who writes the code, so I lean a lot on him for his knowledge on how to complete this project. An update: the code is coming along and should be in a workable format fairly soon. Since the person writing the code has to be out of town for a few weeks starting April 15th, we've decided to release a 'version 1' of the code for now, to get folks started. It will contain a cleaned up version of the program we wrote along with a few goodies, like a parameter you can change to add stagger to the gear. It will not, however, allow you to control anything else at this point (such as gear doors). Once you get your boards assembled, you'll need to copy the code from this column and paste it into the controller board via it's own software (freely down loadable from the Polulu site). We can provide instructions on how to do this of course. It's not hard, but it helps to have a step by step checklist.

    This should get us up and flying with our retract gear. In time, new versions could be made which add the additional features I talked about earlier. Or, someone could modify the source code on their own and add it themselves. The new software versions could be posted to the forum as updates, which could be pasted back into your controller through the USB port and recompiled. You could be up and running with the new software in no time.


    I may get the last of the boards I ordered today, allowing me to start constructing the final 'stack' to go inside the airplane this week. I've been building like a madman, installing gear doors and rewiring the Cessna so that I may fly the gear within a week, maybe two, to see if the 'in the field' tests go as well as the bench tests. I'll post a picture series of the project and videos as well, to give us a record we can look back on.

  11. #136

    Join Date
    Dec 2001
    Location
    Chehalis, WA
    Posts
    568
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    I also have the boards on order plus a couple of extra motors just in case. Thanks for what you are doing.

    I just finished re-assembling the E-flight retract that I dissembled for experimenting. Took some patience and one of the motor leads broke in the process but they work fine again.

    Galen


  12. #137

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    Good news! Version 1 of the software is ready for installing and testing in the real world! I just pulled the last 2 boards out of the mailbox and will be wiring everything up in the next few days. Meanwhile, I'll make available the code so you guys will have a copy for when you get your systems up to speed. There are a few things that could be done differently in future mods to clean up the code (mostly having to do with a different way in which the motor controller deals with the hi/lo signal), but we'll save that one for later testing. In the meantime, here's a shot of the additional motor controller boards and the tiny RC input board:
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Nk27874.jpg 
Views:	30 
Size:	151.8 KB 
ID:	1405276  

  13. #138

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    And here's the code in text format! The original format is .pde, and may make that available through email if you really need it. You should be able to copy this into the code editor of the Arduino Duemilanove and have it work from there:











    Electric Retract Beta Version 0.01
    Using The Arduino Duemilanove

    This version raises or lowers the gear based on a logic input to Digital Input0 on the Arduino Duemilanove board.

    Pin Assignments
    Motor controller Controller board

    VDD 5V
    GND GND
    IN2 Digital In 12
    IN1 Digital In 11
    EN Digital In 13
    FB Analog In 0


    */

    int GEN = 13; // Gear enable
    int GA1 = 12; // Gear A in 1
    int GA2 = 11; //Gear A in 2 PWM
    int GAO = 0; //Gear A overcurrent monitor
    int Current = 0; //Value of current
    int DIR = 0; //direction input port
    int UD = 0; //0=down 1=up
    int OldUD = 0; //Used to determine which direction was chosen the last time through the main loop
    float delayA = 0; //Variable used to count cycles for startup of motor
    int motionA =0; //if gear is supposed to be in motion
    int delayAactive=0; //to determine if the startup delay is currently acting to bypass current monitoring
    float StartDlyA=300; //Setpoint for time to ignore current monitoring to allow motor to start
    int OCLimitUpA=75; //Value that triggers motor to shutoff once it has reached endpoint
    int OCLimitDownA=75; //Value that triggers motor to shutoff once it has reached endpoint (motors often have different current draws depending on their direction of motion)

    // The setup() method runs once, when the sketch starts

    void setup() {
    pinMode(GEN, OUTPUT);
    pinMode(GA1, OUTPUT);
    pinMode(GA2, OUTPUT);
    pinMode(GAO, INPUT);
    pinMode(DIR, INPUT);

    }

    // the loop() method runs over and over again,
    // as long as the Arduino has power

    void loop()
    {

    UD = digitalRead(DIR); //read direction
    Current = analogRead(GAO); //Read current value on fedback pin
    digitalWrite(GEN, LOW); // Disable motor board

    if (UD==1)
    {
    if (OldUD==0) //Direction just changed this cycle to up from down
    {
    motionA=1 ; //Set motion bit active
    delayA=0; //reset gear delay
    delayAactive=1; //set the delay to be active
    }
    if (motionA==1) //If the motion bit has been set then start the motor
    {
    if (delayAactive==1) //motor startup delay active because motion just started
    {
    delayA=(delayA+1); //increment delay time
    if (delayA<=StartDlyA) //if delay duration is still below treshold
    {
    digitalWrite(GEN, HIGH); // Enable motor boards
    digitalWrite(GA1, LOW); // Pin does not support PWM
    analogWrite(GA2, 255); // Set motor speed
    }
    if (delayA>StartDlyA) //if delay duration is still below treshold
    {
    delayAactive=0; //disable the delay current ignoring
    }
    }
    if (delayAactive==0) //motor startup delay active because motion just started
    {
    if (Current<=OCLimitUpA) //if motor has hit end of limit
    {
    digitalWrite(GEN, HIGH); // Enable motor boards
    digitalWrite(GA1, LOW); // Pin does not support PWM
    analogWrite(GA2, 255); // Set motor speed
    }
    if (Current>OCLimitUpA) //if motor has hit end of limit
    {
    motionA=0; // stop further motion
    digitalWrite(GEN, LOW); // Disable motor boards
    digitalWrite(GA1, LOW); // Pin does not support PWM
    analogWrite(GA2, 0); // Set motor speed to stop (halt motor with bot input lines low
    }
    }
    }
    }


    if (UD==0)
    {
    if (OldUD==1) //Direction just changed this cycle to up from down
    {
    motionA=1 ; //Set motion bit active
    delayA=0; //reset gear delay
    delayAactive=1; //set the delay to be active
    }
    if (motionA==1) //If the motion bit has been set then start the motor
    {
    if (delayAactive==1) //motor startup delay active because motion just started
    {
    delayA=(delayA+1); //increment delay time
    if (delayA<=StartDlyA) //if delay duration is still below treshold
    {
    digitalWrite(GEN, HIGH); // Enable motor boards
    digitalWrite(GA1, HIGH); // Pin does not support PWM
    analogWrite(GA2, 0); // Set motor speed
    }
    if (delayA>StartDlyA) //if delay duration is still below treshold
    {
    delayAactive=0; //disable the delay current ignoring
    }
    }
    if (delayAactive==0) //motor startup delay active because motion just started
    {
    if (Current<=OCLimitDownA) //if motor has hit end of limit
    {
    digitalWrite(GEN, HIGH); // Enable motor boards
    digitalWrite(GA1, HIGH); // Pin does not support PWM
    analogWrite(GA2, 0); // Set motor speed
    }
    if (Current>OCLimitDownA) //if motor has hit end of limit
    {
    motionA=0; // stop further motion
    digitalWrite(GEN, LOW); // Disable motor boards
    digitalWrite(GA1, LOW); // Pin does not support PWM
    analogWrite(GA2, 0); // Set motor speed to stop (halt motor with bot input lines low
    }
    }
    }
    }

    OldUD=UD; //set direction after loop
    }

  14. #139

    Join Date
    Sep 2003
    Location
    ANYCITY, WA
    Posts
    161
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    It looks like the boards come with a USB port built in?

    If so - does that mean all I would need to program one of these setups is a cable and a computer?

    Someone said this programs were in text format - does that mean all you need is a text editor to write the programs?

    How do you send it to the board? Something like Hyperterminal in windows or is there some special software you need?
    Larry

  15. #140

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    It looks like the boards come with a USB port built in?
    Yes, it's on the board.

    If so - does that mean all I would need to program one of these setups is a cable and a computer?
    Yes. A USB cable like the kind used for printers (square tip on one end, rectangle on the other)

    Someone said this programs were in text format - does that mean all you need is a text editor to write the programs?
    Polulu has it's own editor you download and compile programs in. When you hook it up to your computer with XP, you have to find the driver for the device and install it. For Vista and Windows 7 if finds the device automatically.

    How do you send it to the board? Something like Hyperterminal in windows or is there some special software you need?
    You first download the zip file from Polulu's site. Unzip it to find the drivers and compiler. Once the drivers are installed, the device will be ready to use. Under device manager (in your computer) you'll have to locate which com port the board is assigned to (it will show up as a USB device). Open up the Polulu program and copy paste the retract program into it. Under tools, go to serial port and make sure the com port is the same one the USB polulu board is using. There is an arrow key to the left on the top task bar. Hit that. The Polulu board will compile for about 5 seconds, (little led's will blink on the board) and give you a message that all went well.

    I can give more detailed instructions and provide pictures soon. I'm working with the programmer on the assembly and am taking pictures as we go. The process is not difficult, you just need to know the steps.



  16. #141

    Join Date
    Sep 2003
    Location
    ANYCITY, WA
    Posts
    161
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    Outstanding!

    Thank you!!!!!!!!
    Larry

  17. #142

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    Just a heads up on the progress. We are tying the four boards together and the system is working as a standalone part...it just needs power leads and a few header pins to attach the RC trigger board.

    The program that I posted earlier is the Beta version only...at present it will cycle only one gear leg, which is fine for testing. To lift two or three gear, it would need to be copy pasted 1 or 2 more times respectively and have software changes made. That's the next step, and I'm hoping to have everything for a basic retract system all wrapped up by April 12, when my code writer will be out of town for a month. I myself will be gone for about a month from April 28-May 25. This is all a learning process, and already there are things we have found that would make setting the boards up easier in the future. I have several planes in which I plan to install the gear, so I may opt to buy several more boards to try out the new changes and share the results.

    On the mechanical side the nose gear door and retracts are up and running on the Cessna...I hope to post pics soon of the gear running of the electric retract board.

  18. #143

    Join Date
    Dec 2001
    Location
    Chehalis, WA
    Posts
    568
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    I believe I have all the boards now and down loaded the programming software arduino-0018. I was able to make the blink example work so I think Iā€™m on the right track. It would not however upload the code for the retracts. Looked like several syntax errors were the problem. As Iā€™m not familiar with the language I wasn't able to figure them out. But progress is being made and I thank you for all your help. If you could check the syntax and then produce a wiring diagram I think I'm there. Can't express how grateful I am for all this.

    Thanks again,

    Galen

  19. #144

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    It is possible there was an error in syntax in the earlier version. I'm not totally sure because we did have it up and working the first night. However, we have the newer, updated code that's nearly finished which operates all three gear, includes a stagger program, a line that lowers the gear in case of signal failure and quick turnaround in the middle of a retract sequence should you change your mind. It has a bug in it that needs to be corrected (only two out of three gear retracted properly when we tested it tonight). I'm hoping to have that issue resolved and load the updated program soon. We do have pictures of the board assembly and hope to post those soon as well.

  20. #145

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    After a week of hard work, version two of the retract software is now ready for release! It will work with either a two gear or tri-gear setup. The new version addresses some earlier issues and adds a few new features:

    1. This versions has a user definable stagger delay.
    2. It features a gear down command if signal is lost (can be disabled).
    3. If you retract the gear in the middle of a sequence, it ignores any stagger delay and immediately raise/lowers the gear.

    Future versions can contain still more functionality, but we're going to try flying this version in the field to determine what if anything needs to be tweaked.

    I'm uploading the second test video and will post a link once it's active.






    Electric Retract Beta Version 0.14
    Using The Arduino Duemilanove


    Pin Assignments
    Motor controller1 Controller board

    VIN VIN
    VDD 5V
    GND GND
    IN1 Digital Out 11
    IN2 GND
    EN Digital Out 13
    FB Analog In 0
    INV Digital Out 12

    Motor controller2 Controller board

    VIN VIN
    VDD 5V
    GND GND
    IN1A Digital Out 10
    IN2A GND
    IN1B Digital Out 9
    IN2B GND
    EN Digital Out 8
    FBA Analog In 1
    FBB Analog In 2
    INV Digital Out 7

    Motor controller2 Controller board

    VCC 5V
    GND GND
    Out Digital In 4
    Good Digital In 2


    */
    // Define Variables related to pin assignments

    int B1EN=13; //Enable pin for Motor controller board 1 (single)
    int B2EN=8; //Enable pin for Motor controller board 2 (Dual)
    int B1DIR=12; //Direction pin (INV) on Motor controller board 1
    int B2DIR=7; //Direction pin (INV) in Motor controller board 2
    int SpeedOutA=11; //Speed output for Gear A (Single board)
    int SpeedOutB=10; //Speed output for Gear B (Dual Board Ch1)
    int SpeedOutC=9; //Speed output for Gear C (Dual Board Ch2)
    int RCGood=2; //Signal from RC interface board when radio signal is present
    int RCDIR=4; //Signal from RC interface for up or down
    int CurrentSenseA=0; //Analog input fron Current sense Circuit on motor controller board for gear A (single board)
    int CurrentSenseB=1; //Analog input fron Current sense Circuit on motor controller board for gear B (dual board CH1)
    int CurrentSenseC=2; //Analog input fron Current sense Circuit on motor controller board for gear C (dual board CH2)

    //Variables that are used for loops and counters
    int CurrentA = 0; //Value of current
    int CurrentB = 0; //Value of current
    int CurrentC = 0; //Value of current
    int UD = 0; //0=down 1=up
    int OldUD = 0; //Used to determine which direction was chosen the last time through the main loop
    int motionA =0; //if gear is supposed to be in motion
    int motionB =0; //if gear is supposed to be in motion
    int motionC =0; //if gear is supposed to be in motion
    float delayA = 0; //Variable used to count cycles for startup of motor
    float delayB = 0; //Variable used to count cycles for startup of motor
    float delayC = 0; //Variable used to count cycles for startup of motor
    int delayAactive=0; //to determine if the startup delay is currently acting to bypass current monitoring
    int delayBactive=0; //to determine if the startup delay is currently acting to bypass current monitoring
    int delayCactive=0; //to determine if the startup delay is currently acting to bypass current monitoring
    int RCConnected=0; //holder for status of RC line 0=disconnected, send gear down, 1=act normally
    int StaggerDelayAActive = 0; //if stagger delay is currently active
    int StaggerDelayBActive = 0; //if stagger delay is currently active
    int StaggerDelayCActive = 0; //if stagger delay is currently active
    float staggerA=0; //variable used to count cycles for stagger delay
    float staggerB=0; //variable used to count cycles for stagger delay
    float staggerC=0; //variable used to count cycles for stagger delay


    //Variables that can be changed to affect parameters
    float StaggerDelayAUp=8000; //Delay after loop starts for stagger when Traveling Up
    float StaggerDelayADown=0; //Delay after loop starts for stagger when travveling Down
    float StartDlyA=200; //Setpoint for time to ignore current monitoring to allow motor to start
    int OCLimitUpA=60; //Value that triggers motor to shutoff once it has reached endpoint
    int OCLimitDownA=60; //Value that triggers motor to shutoff once it has reached endpoint (motors often have different current draws depending on their direction of motion)

    float StaggerDelayBUp=4000; //Delay after loop starts for stagger when Traveling Up
    float StaggerDelayBDown=4000; //Delay after loop starts for stagger when travveling Down
    float StartDlyB=200; //Setpoint for time to ignore current monitoring to allow motor to start
    int OCLimitUpB=60; //Value that triggers motor to shutoff once it has reached endpoint
    int OCLimitDownB=60; //Value that triggers motor to shutoff once it has reached endpoint (motors often have different current draws depending on their direction of motion)

    float StaggerDelayCUp=0; //Delay after loop starts for stagger when Traveling Up
    float StaggerDelayCDown=8000; //Delay after loop starts for stagger when travveling Down
    float StartDlyC=200; //Setpoint for time to ignore current monitoring to allow motor to start
    int OCLimitUpC=60; //Value that triggers motor to shutoff once it has reached endpoint
    int OCLimitDownC=60; //Value that triggers motor to shutoff once it has reached endpoint (motors often have different current draws depending on their direction of motion)

    int RCConnectedOld=1; //used to determine if gear down sequence has just started 1 will bring gear down if board powered with no radio, 0 will leave gear alone on powerup with radio disconnected, but still bring them down in the event of loss of radio signal


    // The setup() method runs once, when the sketch starts

    void setup() {
    pinMode(B1EN, OUTPUT);
    pinMode(B2EN, OUTPUT);
    pinMode(B1DIR, OUTPUT);
    pinMode(B2DIR, OUTPUT);
    pinMode(SpeedOutA, OUTPUT);
    pinMode(SpeedOutB, OUTPUT);
    pinMode(SpeedOutC, OUTPUT);
    pinMode(RCGood, INPUT);
    pinMode(RCDIR, INPUT);
    pinMode(CurrentSenseA, INPUT);
    pinMode(CurrentSenseB, INPUT);
    pinMode(CurrentSenseC, INPUT);

    }

    // the loop() method runs over and over again,
    // as long as the Arduino has power

    void loop()
    {


    CurrentA = analogRead(CurrentSenseA); //Read current value on fedback pin
    CurrentB = analogRead(CurrentSenseB); //Read current value on fedback pin
    CurrentC = analogRead(CurrentSenseC); //Read current value on fedback pin

    digitalWrite(B1EN, LOW); // Disable motor board
    digitalWrite(B2EN, LOW); // Disable motor board

    RCConnected = digitalRead(RCGood); //get status of RC connection

    if (RCConnected==1) // Act normally if RC Signal is good
    {
    UD = digitalRead(RCDIR); //read direction

    if (UD==1)
    {
    if (OldUD==0) //Direction just changed this cycle to up from down
    {
    if (motionA!=1) //Only set stagger delay if the motor has previously fully stopped, if Action =1 then motor was in mid transit when direction was chaged
    {
    StaggerDelayAActive=1; //set Stagger Delay loop active
    }
    if (motionB!=1) //Only set stagger delay if the motor has previously fully stopped, if Action =1 then motor was in mid transit when direction was chaged
    {
    StaggerDelayBActive=1; //set Stagger Delay loop active
    }
    if (motionC!=1) //Only set stagger delay if the motor has previously fully stopped, if Action =1 then motor was in mid transit when direction was chaged
    {
    StaggerDelayCActive=1; //set Stagger Delay loop active
    }

    motionA=1 ; //Set motion bit active
    motionB=1 ; //Set motion bit active
    motionC=1 ; //Set motion bit active

    delayA=0; //reset gear delay
    delayB=0; //reset gear delay
    delayC=0; //reset gear delay

    delayAactive=1; //set the delay to be active
    delayBactive=1; //set the delay to be active
    delayCactive=1; //set the delay to be active

    staggerA=0; //reset stagger delay
    staggerB=0; //reset stagger delay
    staggerC=0; //reset stagger delay

    }

    if (RCConnectedOld==0) //Resume from loss of RC signal
    {
    motionA=1 ; //Set motion bit active
    motionB=1 ; //Set motion bit active
    motionC=1 ; //Set motion bit active

    delayA=0; //reset gear delay
    delayB=0; //reset gear delay
    delayC=0; //reset gear delay

    delayAactive=1; //set the delay to be active
    delayBactive=1; //set the delay to be active
    delayCactive=1; //set the delay to be active
    //Stagger Delay not needed for resuming from radio fail
    }


    if (motionA==1) //If the motion bit has been set then start the motor
    {
    if (StaggerDelayAActive==1) //Stagger Delay active, so bypass normal motion
    {
    //Stop Motor incase it is in transit direction change mid deployment
    digitalWrite(B1EN, LOW); // Disable motor board
    //digitalWrite(B1DIR, LOW); // Set Motor Direction
    analogWrite(SpeedOutA, 0); // Set motor speed to stop (halt motor with bot input lines low

    staggerA=(staggerA+1); //increment value each time through
    if (staggerA >= StaggerDelayAUp) //if it has reached set point
    {
    StaggerDelayAActive=0; //Once time expired, set to zero so routine can continue
    }
    } //End Stagger Delay Active ==1

    if (StaggerDelayAActive==0) //If Stagger delay finished then act normally
    {


    if (delayAactive==1) //motor startup delay active because motion just started
    {
    delayA=(delayA+1); //increment delay time
    if (delayA<=StartDlyA) //if delay duration is still below treshold
    {
    digitalWrite(B1EN, HIGH); // Enable motor board
    digitalWrite(B1DIR, LOW); // Set Motor Direction
    analogWrite(SpeedOutA, 255); // Set motor speed
    }
    if (delayA>StartDlyA) //if delay duration is above treshold
    {
    delayAactive=0; //disable the delay current ignoring
    }
    } //end Delay Active==1
    if (delayAactive==0) //motor startup delay not active
    {
    if (CurrentA<=OCLimitUpA) //if motor has not hit end of limit
    {
    digitalWrite(B1EN, HIGH); // Enable motor boards
    digitalWrite(B1DIR, LOW); // Set Motor Direction
    analogWrite(SpeedOutA, 255); // Set motor speed
    }
    if (CurrentA>OCLimitUpA) //if motor has hit end of limit
    {
    motionA=0; // stop further motion
    //digitalWrite(B1EN, LOW); // Disable motor board
    //digitalWrite(B1DIR, LOW); // Set Motor Direction
    analogWrite(SpeedOutA, 0); // Set motor speed to stop (halt motor with bot input lines low
    }
    } //end Delay Active==0
    } // End Stagger Delay Active == 0
    } //end Motion ==1

    if (motionB==1) //If the motion bit has been set then start the motor
    {
    if (StaggerDelayBActive==1) //Stagger Delay active, so bypass normal motion
    {
    //Stop motor incase its mid transit
    //digitalWrite(B2DIR, LOW); // Set Motor Direction
    analogWrite(SpeedOutB, 0); // Set motor speed to stop (halt motor with bot input lines low
    staggerB=(staggerB+1); //Increment value each time through
    if (staggerB >= StaggerDelayBUp) //has it reached the set point
    {
    StaggerDelayBActive=0; //Once time expired, set to zero so routine can continue
    }
    } //End Stagger Delay Active ==1

    if (StaggerDelayBActive==0) //If Stagger delay finished then act normally
    {


    if (delayBactive==1) //motor startup delay active because motion just started
    {
    delayB=(delayB+1); //increment delay time
    if (delayB<=StartDlyB) //if delay duration is still below treshold
    {
    digitalWrite(B2EN, HIGH); // Enable motor board
    digitalWrite(B2DIR, LOW); // Set Motor Direction
    analogWrite(SpeedOutB, 255); // Set motor speed
    }
    if (delayB>StartDlyB) //if delay duration is above treshold
    {
    delayBactive=0; //disable the delay current ignoring
    }
    } //end Delay Active==1
    if (delayBactive==0) //motor startup delay not active
    {
    if (CurrentB<=OCLimitUpB) //if motor has not hit end of limit
    {
    digitalWrite(B2EN, HIGH); // Enable motor boards
    digitalWrite(B2DIR, LOW); // Set Motor Direction
    analogWrite(SpeedOutB, 255); // Set motor speed
    }
    if (CurrentB>OCLimitUpB) //if motor has hit end of limit
    {
    motionB=0; // stop further motion
    // CANNOT DISABLE BOARD UNTIL BOTH MOTORS ON BOARD 2 STOP digitalWrite(B1EN, LOW); // Disable motor board
    //digitalWrite(B2DIR, LOW); // Set Motor Direction
    analogWrite(SpeedOutB, 0); // Set motor speed to stop (halt motor with bot input lines low
    }
    } //end Delay Active==0
    } // End Stagger Delay Active ==0
    } //end Motion ==1


    if (motionC==1) //If the motion bit has been set then start the motor
    {
    if (StaggerDelayCActive==1) //Stagger Delay active, so bypass normal motion
    {
    //Stop motor incase its mid transit
    //digitalWrite(B2DIR, LOW); // Set Motor Direction
    analogWrite(SpeedOutC, 0); // Set motor speed to stop (halt motor with bot input lines low
    staggerC=(staggerC+1); //Increment value each time through
    if (staggerC >= StaggerDelayCUp) //has reached set point
    {
    StaggerDelayCActive=0; //Once time expired, set to zero so routine can continue
    }
    } //End Stagger Delay Active ==1

    if (StaggerDelayCActive==0) //If Stagger delay finished then act normally
    {

    if (delayCactive==1) //motor startup delay active because motion just started
    {
    delayC=(delayC+1); //increment delay time
    if (delayC<=StartDlyC) //if delay duration is still below treshold
    {
    digitalWrite(B2EN, HIGH); // Enable motor board
    digitalWrite(B2DIR, LOW); // Set Motor Direction
    analogWrite(SpeedOutC, 255); // Set motor speed
    }
    if (delayC>StartDlyC) //if delay duration is above treshold
    {
    delayCactive=0; //disable the delay current ignoring
    }
    } //end Delay Active==1
    if (delayCactive==0) //motor startup delay not active
    {
    if (CurrentC<=OCLimitUpC) //if motor has not hit end of limit
    {
    digitalWrite(B2EN, HIGH); // Enable motor boards
    digitalWrite(B2DIR, LOW); // Set Motor Direction
    analogWrite(SpeedOutC, 255); // Set motor speed
    }
    if (CurrentC>OCLimitUpC) //if motor has hit end of limit
    {
    motionC=0; // stop further motion
    // CANNOT DISABLE BOARD UNTIL BOTH MOTORS ON BOARD 2 STOP digitalWrite(B1EN, LOW); // Disable motor board
    //digitalWrite(B2DIR, LOW); // Set Motor Direction
    analogWrite(SpeedOutC, 0); // Set motor speed to stop (halt motor with bot input lines low
    }
    } //end Delay Active==0
    } // End Stagger Delay == 0
    } //end Motion ==1

    }// end UD==1


    if (UD==0)
    {
    if (OldUD==1) //Direction just changed this cycle to up from down
    {
    if (motionA!=1) //Only set stagger delay if the motor has previously fully stopped, if Action =1 then motor was in mid transit when direction was chaged
    {
    StaggerDelayAActive=1; //set Stagger Delay loop active
    }
    if (motionB!=1) //Only set stagger delay if the motor has previously fully stopped, if Action =1 then motor was in mid transit when direction was chaged
    {
    StaggerDelayBActive=1; //set Stagger Delay loop active
    }
    if (motionC!=1) //Only set stagger delay if the motor has previously fully stopped, if Action =1 then motor was in mid transit when direction was chaged
    {
    StaggerDelayCActive=1; //set Stagger Delay loop active
    }

    motionA=1 ; //Set motion bit active
    motionB=1 ; //Set motion bit active
    motionC=1 ; //Set motion bit active

    delayA=0; //reset gear delay
    delayB=0; //reset gear delay
    delayC=0; //reset gear delay

    delayAactive=1; //set the delay to be active
    delayBactive=1; //set the delay to be active
    delayCactive=1; //set the delay to be active

    staggerA=0; //reset stagger delay
    staggerB=0; //reset stagger delay
    staggerC=0; //reset stagger delay
    }

    if (RCConnectedOld==0) //Resume from loss of RC signal
    {
    motionA=1 ; //Set motion bit active
    motionB=1 ; //Set motion bit active
    motionC=1 ; //Set motion bit active

    delayA=0; //reset gear delay
    delayB=0; //reset gear delay
    delayC=0; //reset gear delay

    delayAactive=1; //set the delay to be active
    delayBactive=1; //set the delay to be active
    delayCactive=1; //set the delay to be active
    //stagger delay not needed for resuming from RC signal loss
    }

    if (motionA==1) //If the motion bit has been set then start the motor
    {
    if (StaggerDelayAActive==1) //Stagger Delay active, so bypass normal motion
    {
    //Stop Motor incase it is in transit direction change mid deployment
    //digitalWrite(B1EN, LOW); // Disable motor board
    //digitalWrite(B1DIR, HIGH); // Set Motor Direction
    analogWrite(SpeedOutA, 0); // Set motor speed to stop (halt motor with bot input lines low

    staggerA=(staggerA+1); //increment value each time through
    if (staggerA >= StaggerDelayADown) //if it has reached set point
    {
    StaggerDelayAActive=0; //Once time expired, set to zero so routine can continue
    }
    } //End Stagger Delay Active ==1

    if (StaggerDelayAActive==0) //If Stagger delay finished then act normally
    {
    if (delayAactive==1) //motor startup delay active because motion just started
    {
    delayA=(delayA+1); //increment delay time
    if (delayA<=StartDlyA) //if delay duration is still below treshold
    {
    digitalWrite(B1EN, HIGH); // Enable motor boards
    digitalWrite(B1DIR, HIGH); // Set Direction of Board 2
    analogWrite(SpeedOutA, 255); // Set motor speed
    }
    if (delayA>StartDlyA) //if delay duration is above treshold
    {
    delayAactive=0; //disable the delay current ignoring
    }
    } //end Delay Active==1
    if (delayAactive==0) //motor startup delay not active
    {
    if (CurrentA<=OCLimitDownA) //if motor has not hit end of limit
    {
    digitalWrite(B1EN, HIGH); // Enable motor board 2
    digitalWrite(B1DIR, HIGH); // Set Direction
    analogWrite(SpeedOutA, 255); // Set motor speed
    }
    if (CurrentA>OCLimitDownA) //if motor has hit end of limit
    {
    motionA=0; // stop further motion
    //digitalWrite(B1EN, LOW); // Disable motor boards
    //digitalWrite(B1DIR, LOW); // Set Direction
    analogWrite(SpeedOutA, 0); // Set motor speed to stop (halt motor with bot input lines low
    }
    } //end Delay Active==0
    } //end stagger delay active == 0

    } //end motion ==1

    if (motionB==1) //If the motion bit has been set then start the motor
    {
    if (StaggerDelayBActive==1) //Stagger Delay active, so bypass normal motion
    {
    //Stop Motor incase it is in transit direction change mid deployment
    //digitalWrite(B2DIR, HIGH); // Set Motor Direction
    analogWrite(SpeedOutB, 0); // Set motor speed to stop (halt motor with bot input lines low

    staggerB=(staggerB+1); //increment value each time through
    if (staggerB >= StaggerDelayBUp) //if it has reached set point
    {
    StaggerDelayBActive=0; //Once time expired, set to zero so routine can continue
    }
    } //End Stagger Delay Active ==1

    if (StaggerDelayBActive==0) //If Stagger delay finished then act normally
    {

    if (delayBactive==1) //motor startup delay active because motion just started
    {
    delayB=(delayB+1); //increment delay time
    if (delayB<=StartDlyB) //if delay duration is still below treshold
    {
    digitalWrite(B2EN, HIGH); // Enable motor boards
    digitalWrite(B2DIR, HIGH); // Set Direction of Board 2
    analogWrite(SpeedOutB, 255); // Set motor speed
    }
    if (delayB>StartDlyB) //if delay duration is above treshold
    {
    delayBactive=0; //disable the delay current ignoring
    }
    } //end Delay Active==1
    if (delayBactive==0) //motor startup delay not active
    {
    if (CurrentB<=OCLimitDownB) //if motor has not hit end of limit
    {
    digitalWrite(B2EN, HIGH); // Enable motor board 2
    digitalWrite(B2DIR, HIGH); // Set Direction
    analogWrite(SpeedOutB, 255); // Set motor speed
    }
    if (CurrentB>OCLimitDownB) //if motor has hit end of limit
    {
    motionB=0; // stop further motion
    // CANNOT DISABLE BOARD UNIL BOTH MOORS STOP digitalWrite(B1EN, LOW); // Disable motor boards
    //digitalWrite(B2DIR, LOW); // Set Direction
    analogWrite(SpeedOutB, 0); // Set motor speed to stop (halt motor with bot input lines low
    }
    } //end Delay Active==0
    } //End Stagger Delay ==0
    } //end motion ==1

    if (motionC==1) //If the motion bit has been set then start the motor
    {
    if (StaggerDelayCActive==1) //Stagger Delay active, so bypass normal motion
    {
    //Stop Motor incase it is in transit direction change mid deployment
    //digitalWrite(B2DIR, HIGH); // Set Motor Direction
    analogWrite(SpeedOutC, 0); // Set motor speed to stop (halt motor with bot input lines low

    staggerC=(staggerC+1); //increment value each time through
    if (staggerC >= StaggerDelayCDown) //if it has reached set point
    {
    StaggerDelayCActive=0; //Once time expired, set to zero so routine can continue
    }
    } //End Stagger Delay Active ==1

    if (StaggerDelayCActive==0) //If Stagger delay finished then act normally
    {

    if (delayCactive==1) //motor startup delay active because motion just started
    {
    delayC=(delayC+1); //increment delay time
    if (delayC<=StartDlyC) //if delay duration is still below treshold
    {
    digitalWrite(B2EN, HIGH); // Enable motor boards
    digitalWrite(B2DIR, HIGH); // Set Direction of Board 2
    analogWrite(SpeedOutC, 255); // Set motor speed
    }
    if (delayC>StartDlyC) //if delay duration is above treshold
    {
    delayCactive=0; //disable the delay current ignoring
    }
    } //end Delay Active==1
    if (delayCactive==0) //motor startup delay not active
    {
    if (CurrentC<=OCLimitDownC) //if motor has not hit end of limit
    {
    digitalWrite(B2EN, HIGH); // Enable motor board 2
    digitalWrite(B2DIR, HIGH); // Set Direction
    analogWrite(SpeedOutC, 255); // Set motor speed
    }
    if (CurrentC>OCLimitDownC) //if motor has hit end of limit
    {
    motionC=0; // stop further motion
    // CANNOT DISABLE BOARD UNIL BOTH MOORS STOP digitalWrite(B1EN, LOW); // Disable motor boards
    //digitalWrite(B2DIR, LOW); // Set Direction
    analogWrite(SpeedOutC, 0); // Set motor speed to stop (halt motor with bot input lines low
    }
    } //end Delay Active==0
    } // endStagger delay Active == 0
    } //end motion ==1



    } // end UD==0

    OldUD=UD; //set direction after loop

    } //eng RC Connected == 1

    if (RCConnected==0)
    {
    if (RCConnectedOld==1) //Connection to Radio lost, bring gear down
    {
    motionA=1 ; //Set motion bit active
    motionB=1 ; //Set motion bit active
    motionC=1 ; //Set motion bit active

    delayA=0; //reset gear delay
    delayB=0; //reset gear delay
    delayC=0; //reset gear delay

    delayAactive=1; //set the delay to be active
    delayBactive=1; //set the delay to be active
    delayCactive=1; //set the delay to be active
    }

    if (motionA==1) //If the motion bit has been set then start the motor
    {
    if (delayAactive==1) //motor startup delay active because motion just started
    {
    delayA=(delayA+1); //increment delay time
    if (delayA<=StartDlyA) //if delay duration is still below treshold
    {
    digitalWrite(B1EN, HIGH); // Enable motor boards
    digitalWrite(B1DIR, HIGH); // Set Direction of Board 2
    analogWrite(SpeedOutA, 255); // Set motor speed
    }
    if (delayA>StartDlyA) //if delay duration is above treshold
    {
    delayAactive=0; //disable the delay current ignoring
    }
    } //end Delay Active==1
    if (delayAactive==0) //motor startup delay not active
    {
    if (CurrentA<=OCLimitDownA) //if motor has not hit end of limit
    {
    digitalWrite(B1EN, HIGH); // Enable motor board 2
    digitalWrite(B1DIR, HIGH); // Set Direction
    analogWrite(SpeedOutA, 255); // Set motor speed
    }
    if (CurrentA>OCLimitDownA) //if motor has hit end of limit
    {
    motionA=0; // stop further motion
    //digitalWrite(B1EN, LOW); // Disable motor boards
    //digitalWrite(B1DIR, LOW); // Set Direction
    analogWrite(SpeedOutA, 0); // Set motor speed to stop (halt motor with bot input lines low
    }
    } //end Delay Active==0
    } //end motion ==1

    if (motionB==1) //If the motion bit has been set then start the motor
    {
    if (delayBactive==1) //motor startup delay active because motion just started
    {
    delayB=(delayB+1); //increment delay time
    if (delayB<=StartDlyB) //if delay duration is still below treshold
    {
    digitalWrite(B2EN, HIGH); // Enable motor boards
    digitalWrite(B2DIR, HIGH); // Set Direction of Board 2
    analogWrite(SpeedOutB, 255); // Set motor speed
    }
    if (delayB>StartDlyB) //if delay duration is above treshold
    {
    delayBactive=0; //disable the delay current ignoring
    }
    } //end Delay Active==1
    if (delayBactive==0) //motor startup delay not active
    {
    if (CurrentB<=OCLimitDownB) //if motor has not hit end of limit
    {
    digitalWrite(B2EN, HIGH); // Enable motor board 2
    digitalWrite(B2DIR, HIGH); // Set Direction
    analogWrite(SpeedOutB, 255); // Set motor speed
    }
    if (CurrentB>OCLimitDownB) //if motor has hit end of limit
    {
    motionB=0; // stop further motion
    // CANNOT DISABLE BOARD UNIL BOTH MOORS STOP digitalWrite(B1EN, LOW); // Disable motor boards
    //digitalWrite(B2DIR, LOW); // Set Direction
    analogWrite(SpeedOutB, 0); // Set motor speed to stop (halt motor with bot input lines low
    }
    } //end Delay Active==0
    } //end motion ==1

    if (motionC==1) //If the motion bit has been set then start the motor
    {
    if (delayCactive==1) //motor startup delay active because motion just started
    {
    delayC=(delayC+1); //increment delay time
    if (delayC<=StartDlyC) //if delay duration is still below treshold
    {
    digitalWrite(B2EN, HIGH); // Enable motor boards
    digitalWrite(B2DIR, HIGH); // Set Direction of Board 2
    analogWrite(SpeedOutC, 255); // Set motor speed
    }
    if (delayC>StartDlyC) //if delay duration is above treshold
    {
    delayCactive=0; //disable the delay current ignoring
    }
    } //end Delay Active==1
    if (delayCactive==0) //motor startup delay not active
    {
    if (CurrentC<=OCLimitDownC) //if motor has not hit end of limit
    {
    digitalWrite(B2EN, HIGH); // Enable motor board 2
    digitalWrite(B2DIR, HIGH); // Set Direction
    analogWrite(SpeedOutC, 255); // Set motor speed
    }
    if (CurrentC>OCLimitDownC) //if motor has hit end of limit
    {
    motionC=0; // stop further motion
    // CANNOT DISABLE BOARD UNIL BOTH MOORS STOP digitalWrite(B1EN, LOW); // Disable motor boards
    //digitalWrite(B2DIR, LOW); // Set Direction
    analogWrite(SpeedOutC, 0); // Set motor speed to stop (halt motor with bot input lines low
    }
    } //end Delay Active==0
    } //end motion ==1

    } //End of RC Connected == 0 RC signal lost lower Gear

    RCConnectedOld=RCConnected; //Set value for RC connected status last time through loop

    } // End of Loop

  21. #146

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    Here's the link to the video showing the stagger gear in operation, as well as the abort function and loss of signal.

    http://www.youtube.com/watch?v=D2bdJ-C1hVY




    Addendum to the above loaded code: We've noticed that during a momentary loss of signal (glitch), the gear will try to move downward as programmed, then start moving upwards again as soon as signal is restored. We're going to add another line of code to ignore glitches to prevent the gear from 'bouncing'.

    My programmer is going to take a well deserved rest today...he stayed up all night this week to 6am to finish the code. Work will begin soon on the schematic!

  22. #147

    Join Date
    Dec 2001
    Location
    Chehalis, WA
    Posts
    568
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    I copy and paste the code out of MS Word then try to compile it and I get the following:

    Error: Expected unqualified-id before '/' token in function 'void setup()':
    In function "void loop()':


    Perhaps I'm loading the compiler wrong?

    Your programmer deserves some kind of medal. What a job!!


    I just now eliminated */ at the beginning of the program and now it says : Binary sketch size: 6026 bites (of a 30725 bite maximum) Is this now loaded correctly?

    Galen


  23. #148

    Join Date
    Dec 2001
    Location
    Chehalis, WA
    Posts
    568
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    Boeing314


    After an evening of breadboarding and playing around I have the motor running but only one way. It stops with overload and will switch on again after moving the gear switch but it still goes the same way. I know you can't tell from the picture but just thought I'd throw it in just for show and tell. Any thoughts?

    Galen
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Lj22401.jpg 
Views:	21 
Size:	151.2 KB 
ID:	1408280  

  24. #149

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    It sounds like the RC OK signal is not set right. Force a hi signal on pin 2. That should bypass the RC good sense line.

    Here's the schematic for the boards I used:

    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Ge96353.jpg 
Views:	31 
Size:	131.3 KB 
ID:	1408281  

  25. #150

    Join Date
    Feb 2008
    Location
    Wheaton, IL
    Posts
    71
    Gallery
    My Gallery
    Models
    My Models
    Ratings
    My Feedback

    RE: Electric Retracts - Modifying existing Air/Servo-operated Retracts

    Booker, make sure you're using 6v to test your board...the board minimum voltage is 5v, and it will do funky things at lower voltages. I'm planning on using a 6v pack into the aux power port to run mine.

    My programmer laid out a prototype circuit board this morning and will be sending it out for test printing. It will be printed on both sides and be labeled for the three different boards I'm using for the tri-gear retract. The boards will run somewhere between $20-$30 if anyone is interested. Here's the diagram of it:
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Mk26128.jpg 
Views:	23 
Size:	272.2 KB 
ID:	1408379  


Page 6 of 11 FirstFirst ... 45678 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:17 PM.

SEO by vBSEO 3.6.1 ©2011, Crawlability, Inc.