Shop OBEX P1 Docs P2 Docs Learn Events
Propeller ActivityBoard Quadcopter - Page 2 — Parallax Forums

Propeller ActivityBoard Quadcopter

2»

Comments

  • Dakota WriterDakota Writer Posts: 34
    edited 2014-05-21 13:18
    Sorry JasonDorie, we were typing at the same time. Nice looking charger, thanks a lot.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-21 14:24
    I have a bunch of the exact battery you linked to. I use them in my ELEV-8 and in my hexacopter. There's some debate about the optimal size for a battery pack. Some like 4Ah packs rather than 5Ah packs. I'm pretty sure I've flown my ELEV-8 for 15 continuous minutes with a 5Ah pack.

    One reason I chose the 5Ah pack is so I could use two together to make a 6S 5Ah pack for my helicopter.

    I also like Jason's choice on a charger. I sure wish we had something like HobbyKing when I got started with RC aircraft. My first 6S 5Ah pack cost me more than $400.
  • Dakota WriterDakota Writer Posts: 34
    edited 2014-05-21 15:43
    Ouch! $400?
    Thanks for confirming the battery/charger combination. I'm thinking I'll go with that, then, seeing as the 5000mAh Turnigy battery is only marginally more costly than a 3300mAh one from Parallax.
    Just out of curiosity... I think I read that Parallax developed the Elev-8 with the help of forum members. Were any of you part of that team?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-21 15:52
    I think I read that Parallax developed the Elev-8 with the help of forum members. Were any of you part of that team?

    Nope, I learned what I know about quadcopters from the discussions around the Elev-8. My hexacopter is pretty much a six motor version of the Elev-8.
  • PublisonPublison Posts: 12,366
    edited 2014-05-21 16:34
    Just out of curiosity... I think I read that Parallax developed the Elev-8 with the help of forum members. Were any of you part of that team?

    Ken Gracey (President) pretty much developed the ELEV-8. He did ask a lot of questions along the way, but I believe it's his baby.

    That said, I going to offer a suggestion. Go with proven plans and kits for your first off. It will get you up and running in the shortest amount of time, and you will have support here.

    I have been working with recreational hovercraft since 1989, and I have seen time and time again where people would deviate from published plans, (because they thought they had a better idea), only to fail. The published plan were a work of 20 some odd years of trial and error.

    Now the quad copters do not that long of a history, but what is being sold is a culmination of years of trial and error.

    Do yourself a favor and get and ELEV-8. Get that running, get yourself familiar with the concept and hardware, then you can expand on it

    Forget the brushed motors and Ni-CADs. They are for ground based machines. Brushless Motors, ESC, and Li-po is the only way to go for an airborne machine.

    My personal opinions. I do not speak for Parallax. I am just a Moderator and not an employee.
  • Dakota WriterDakota Writer Posts: 34
    edited 2014-05-21 16:55
    Thanks Publison, but we already got in almost all the parts. Even if the whole thing decides not to work (and I've seen no reason yet why it wouldn't), the leftover parts will be usable for the rest of the class next year. Besides, I've already learned a lot - the real goal, I've been told - about motor types, battery types, XBee communication (I can now remote-control the ActivityBot with a joystick), etc. So, while I appreciate your advice to take the paved road, it's a little late for this go-around.
    And, barring price, I don't claim to have a better system. I'm sure that the Elev-8 will be able to fly better, just due to the exact reasons you listed. I just really want to program it myself.
    Brushless Motors, ESC, and Li-po is the only way to go for an airborne machine.
    Thanks, I now agree; I just didn't know that coming in to the project. Actually just sent the request for materials to my higher-ups a minute ago.
  • Dakota WriterDakota Writer Posts: 34
    edited 2014-06-04 15:09
    Hi all,

    Well, I'm back. I didn't give up on the project, and don't intend to do so. The ESCs just came in today, so I thought the time would be right to pose the question: what initial settings would you recommend for me to program into them? I'm going to be using the spin code in Open Propeller Project #4 to program the ESCs with the propeller board. Link is here: http://forums.parallax.com/showthread.php/154854-Open-Propeller-Project-4-Program-our-ESCs-with-a-Propeller .

    At first, I want my flight to be maximally safe, controlled / slow, and long, with priorities in that order. I'll be using the battery described earlier in this thread. The craft needn't get more than a few feet off the ground.

    I'll post pictures as soon as there is something to see.

    I'm planning that for version 1.0 of the craft, the controller will consist mainly of 4-5 dials, one master and one for each prop. It's more of a "Let's get this off the ground" version than a final product. No autostabilization in this one.
  • PublisonPublison Posts: 12,366
    edited 2014-06-04 15:45
    Hi all,

    Well, I'm back. I didn't give up on the project, and don't intend to do so. The ESCs just came in today, so I thought the time would be right to pose the question: what initial settings would you recommend for me to program into them? I'm going to be using the spin code in Open Propeller Project #4 to program the ESCs with the propeller board. Link is here: http://forums.parallax.com/showthread.php/154854-Open-Propeller-Project-4-Program-our-ESCs-with-a-Propeller .

    At first, I want my flight to be maximally safe, controlled / slow, and long, with priorities in that order. I'll be using the battery described earlier in this thread. The craft needn't get more than a few feet off the ground.

    I'll post pictures as soon as there is something to see.

    I'm planning that for version 1.0 of the craft, the controller will consist mainly of 4-5 dials, one master and one for each prop. It's more of a "Let's get this off the ground" version than a final product. No autostabilization in this one.

    Did you mean the settings in Post #5? Roy's setting work fine for the ESC's that Parallax sells. Which ESC's did you get?

    You can also go by Duane's post #14 if you have a programming card.
  • Dakota WriterDakota Writer Posts: 34
    edited 2014-06-04 16:08
    Yeah, post #5. I did get the parallax ESC's, but not the programming card.
    I can just use the default settings, then.
    I understand that there's some discussion as to which are the best settings, and I was curious if anyone wanted to chime in with personal favorites for long, low-power flight.
  • PublisonPublison Posts: 12,366
    edited 2014-06-04 16:56
    Yeah, post #5. I did get the parallax ESC's, but not the programming card.
    I can just use the default settings, then.
    I understand that there's some discussion as to which are the best settings, and I was curious if anyone wanted to chime in with personal favorites for long, low-power flight.

    I'm just getting mine finished, but fro talking with a few people, the settings that were posted should work fine. I don't think there is any tweaking that;s going to make a difference in performance. This is based on my experience with electric planes and helicopters. You preset the ESC and fly !
  • Dakota WriterDakota Writer Posts: 34
    edited 2014-06-04 17:22
    Awesome. Thanks.
  • Dakota WriterDakota Writer Posts: 34
    edited 2014-09-29 09:50
    Hey, ya'll. I'm still working on this project, believe it or not! As the school year is starting back up, I'm going to be concentrating on it increasingly.
    For the moment, I just had a quick question which I hoped the community here could answer. Remember, I'm running Propeller C (Not SPIN) on the ActivityBoard. I'm hoping to connect this Arduino LCD (which I got from a friend) to the ActivityBoard. At this point, I don't care to use all the features - I just want to display text. I'll postpone the discussion of how to use the buttons for a later date. Also, I'd like to use as few pins as possible, as always.
    I assume that it probably won't be so easy as the parallax LCD, but I'm just working with what I've got.
    Any ideas? Again, minimizing pins, Prop C Code. Any help appreciated.
  • ValeTValeT Posts: 308
    edited 2014-09-29 11:40
    I am not sure exactly, but I think you need 8 digital/analogue pins, not including vin, ground, 5v, and 3.3v. I hope that helps a little.
  • Dakota WriterDakota Writer Posts: 34
    edited 2014-09-29 12:12
    Hmm... the ActivityBoard doesn't have that many D/A pins. Is there any way to use a single serial pin like in the LCD tutorial to which I linked above? I'm not contradicting, just exploring.
  • ValeTValeT Posts: 308
    edited 2014-09-30 04:58
    I don't know. You are correct in that they only use 1 serial pin, but it just makes me wonder why they mention so many pins specifically in the tutorial section of the website. It seems that 2 pins are absolutely necessary regardless of what you want to do with it, in addition to the power, ground, vin etc.

    In one of the pieces of sample code, they create and lcd object and use pin 13. I suspect that the library manages all of the other pins, but I have no idea. Just throwing out ideas.
  • Dakota WriterDakota Writer Posts: 34
    edited 2014-09-30 07:45
    Do you think it would hurt to try wiring it like the one in the tutorial? Just to test if it works?
    Okay, here's another option. This seems to have been built for something like the Arduino Uno, which I have as well. I think it wouldn't be hard to integrate that as well. What I'm trying to figure out is how to transfer data from the prop to the arduino. I could wire up a common capacitor, charging it from the prop and measuring the discharge time on the arduino, using the discharge time as the data transfer mechanism... or try something similar with a transistor... or maybe there's a way to serially connect the one to the other - I don't know. I haven't looked into it.
    Oh, and is the object you mentioned a SPIN object? Because I'm in C.
    Thanks again.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-09-30 09:18
    LCDs similar to those are very common. The product page mentions it uses a four line parallel interface. Besides four data lines there are usually a couple of control lines. I'm not sure, but I'd be very surprised if the LCD could be controlled with less than six I/O pins.

    The Propeller and Arduino can easily talk to each other over a serial line. If the Arduino's UART isn't being used for something else, you can use it to communicate with the Propeller. The Propeller can have as many UARTs as you want so that's not a problem (as long as you have a cog to run the serial driver).

    If the Arduino is a 5V version, make sure and use at least a 3K ohm resistor between the Arduino's TX and the Prop's RX pins.

    The analog pin mentioned is for reading the button pad. IIRC, a single analog pin can read all the buttons.

    I don't know enough Prop C to help you with libraries.
  • Dakota WriterDakota Writer Posts: 34
    edited 2014-10-13 22:03
    Okay, I got the LCD working on the Arduino Uno without a lot of trouble. Now I just need to connect the Uno to the ActivityBoard. That's where I need help.
    To start, I'd like to send characters for the Uno to print out on the LCD. Would it work to load this code on to the Propeller...
    #include "simpletools.h"
    
    serial *uno;
    
    
    int main() {
      while(1){
        uno = serial_open(0, 0, 0, 9600);
       
        writeChar(uno, "A");
        pause(2000);
        writeChar(uno, "B");
        pause(5);
      }
    }
    

    ...And this onto the Arduino...
    int incomingByte = 0;
    
    void setup() {
      Serial.begin(9600);     // opens serial port, sets data rate to 9600 bps
    }
    
    void loop(){
      if (Serial.available() > 0) {
            // read the incoming byte:
            incomingByte = Serial.read();
    
      /*
           PROCESS BYTE OF DATA HERE
      */
      }
    }
    

    I tried something like the above, connecting pin 0 of the ActivityBoard to pin 0 (RX) of the Uno. Both boards were powered by a USB connection, and I had a wire connecting the grounds. It wasn't working; the incomingByte was not printing on the LCD as I told it to do. I expect that the two boards weren't synchronized somehow.

    For the record, the "PROCESS" above contained code to print the received char to the LCD screen, which was otherwise functioning correctly. The "A" and "B" were not printing.

    If you need clarification to help, please let me know. I can post the whole Arduino code if that would aid the process.

    Thanks in advance.
  • Dakota WriterDakota Writer Posts: 34
    edited 2014-10-15 12:42
    Cancel that order! I got the half-duplex serial communication working (which is all I need for the moment). I think that the Arduino had been trying to communicate with the computer instead of the Propeller, since I had it powered with the USB cable.


    For those who are interested in connecting an Arduino Uno to the Propeller ActivityBoard and sending one byte of character data at a time, here's how I did it:
    1) Run a wire to establish a common GND connection between the two boards.
    2) Plug in the RX pin of the Arduino to the TX pin (whichever you want to use) of the propeller. I used pin 0.
    3) Load code like this onto the Arduino (this code borrowed heavily from the PhysicalPixel example on the Arduino site):
    int incomingByte;      // holds collected Byte
    
    void setup() {
    
      // initialize serial communication:
      Serial.begin(9600);
    }
    
    void loop() {
      // see if there's incoming serial data:
      if (Serial.available() > 0) {
        
        // read the oldest byte in the serial buffer:
        incomingByte = Serial.read();
    
    
        //the byte you send from the Propeller can now be handled
      }
    }
    


    Load this, then plug in the Arduino via some way other than the USB cable (I just used batteries).


    4) Load this code onto the Propeller (I borrowed heavily from the Half-Duplex Serial tutorial):
    #include "simpletools.h"
    
    
    serial *uno; //serial object
    
    
    
    
    int main() {
      uno = serial_open(0, 0, 0, 9600); //the first two 0's should indicate the propeller's TX pin.  I just used pin 0 for convenience.
    
    
      //There are two possibilities here.  I would use the first for sending numeric data, and the second for sending character data
    
    
      serial_txChar(uno, 71);  //sends the value "71" to the Uno.
        /*                   OR                     */
      dprint(uno, "G");  //sends the character "G" to the Uno, which has a byte value of 71
    
    
      // In either case, the Uno gets the value 71, which correlates to the character "G"
      
    }
    


    5) Turn on the Arduino
    6) Turn on or refresh the Propeller
    7) Watch as the Propeller sends the data!


    Of course, in my program, I had the Arduino then print the incoming byte on the LCD screen using this code:
    #include <LiquidCrystal.h>
    
    LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
    
    int incomingByte;      // holds incoming Byte
    
    void setup() {
      lcd.begin(16,2);
      lcd.home();
      lcd.print("Program initiated");
    
      // initialize serial communication:
      Serial.begin(9600);
      // initialize the LED pin as an output:
    }
    
    void loop() {
      //set cursor to second line, first character
      lcd.setCursor(0,1);
      // see if there's incoming serial data:
      if (Serial.available() > 0) {
        //clear second line
        lcd.println("                 ");
        lcd.setCursor(0,1);
        
        // read the oldest byte in the serial buffer:
        incomingByte = Serial.read();
        // write incoming byte to bottom left corner of screen
        lcd.write(incomingByte);
      }
    }
    
    I hope this helps interested newbies like myself! In my project, I intend for the LCD to display options and, during flight, data I receive from the quadcopter, such as rotor pulse widths, temperature, gyroscope adjustments (I'm getting an MPU-6050 gyroscope), and more.
  • Dakota WriterDakota Writer Posts: 34
    edited 2014-11-03 15:04
    Okay, I've run into another programming challenge...

    I have connected an Inensense MPU-6050 gyroscope/accelerometer to an Arduino Uno, and that's working fine; however, I'd love to be able to run it right from the propeller. I currently have...
    > VCC pin connected to +5V
    > GND pin connected to the ActivityBoard's Ground
    > SCL pin connected to pin 5 and, through a 10Kohm resistor, to +5V
    > SDA pin connected to pin 4 and, through a 10Kohm resistor, to +5V

    I'm trying to read the sleep state of the sensor with the following code...
    #include "simpletools.h"
    
    i2c * MPU6050_bus = NULL;
    
    
    const int MPU6050_SCL = 5;
    const int MPU6050_SDA = 4;
    const int MPU6050_Mode = 0;
    const int MPU6050_Address = 0x68;
    
    
    int main(){
      i2c_open(MPU6050_bus, MPU6050_SCL, MPU6050_SDA, MPU6050_Mode);
      char deviceSleeping = 5;  //I've tried several arbitrary values here
      i2c_in(MPU6050_bus, MPU6050_Address, 0x6B, 1, &deviceSleeping, 1);
      print("%d", deviceSleeping);   //Always ends up printing previous value of deviceSleeping (in this case, "5"), before i2c_in() call
    }
    

    In the i2c_in( ... ) line, 0x6B is the address of the MPU-6050's PWR_MGMT_1 register. The full register map for the MPU-6050 is here.

    So, theoretically, I was hoping that this would tell me the sleep state of the gyroscope, which should (I thought) always default to 0. However, the values printed to the terminal instead just reflect the value of deviceSleeping before i2c_in() was called. In other words, i2c_in() does not change the value of deviceSleeping.

    What am I doing wrong? Or, probably more importantly, what must I do?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-11-03 15:14
    The MPU6050 boards I've used have been 3.3V devices. Are you sure you should be connecting your sensor to 5V?
  • David BetzDavid Betz Posts: 14,516
    edited 2014-11-03 15:19
    Okay, I've run into another programming challenge...

    I have connected an Inensense MPU-6050 gyroscope/accelerometer to an Arduino Uno, and that's working fine; however, I'd love to be able to run it right from the propeller. I currently have...
    > VCC pin connected to +5V
    > GND pin connected to the ActivityBoard's Ground
    > SCL pin connected to pin 5 and, through a 10Kohm resistor, to +5V
    > SDA pin connected to pin 4 and, through a 10Kohm resistor, to +5V

    I'm trying to read the sleep state of the sensor with the following code...
    #include "simpletools.h"
    
    i2c * MPU6050_bus = NULL;
    
    
    const int MPU6050_SCL = 5;
    const int MPU6050_SDA = 4;
    const int MPU6050_Mode = 0;
    const int MPU6050_Address = 0x68;
    
    
    int main(){
      i2c_open(MPU6050_bus, MPU6050_SCL, MPU6050_SDA, MPU6050_Mode);
      char deviceSleeping = 5;  //I've tried several arbitrary values here
      i2c_in(MPU6050_bus, MPU6050_Address, 0x6B, 1, &deviceSleeping, 1);
      print("%d", deviceSleeping);   //Always ends up printing previous value of deviceSleeping (in this case, "5"), before i2c_in() call
    }
    

    In the i2c_in( ... ) line, 0x6B is the address of the MPU-6050's PWR_MGMT_1 register. The full register map for the MPU-6050 is here.

    So, theoretically, I was hoping that this would tell me the sleep state of the gyroscope, which should (I thought) always default to 0. However, the values printed to the terminal instead just reflect the value of deviceSleeping before i2c_in() was called. In other words, i2c_in() does not change the value of deviceSleeping.

    What am I doing wrong? Or, probably more importantly, what must I do?
    I'm not sure how the Simple Library I2C code works but it looks suspicous to me that you're passing in MPU6050_bus, a NULL pointer, to i2c_open and i2c_in. Shouldn't that be initialized to point to a structure of type i2c?
  • Dakota WriterDakota Writer Posts: 34
    edited 2014-11-03 15:30
    Thanks for the quick responses.

    Duane Deign: One tutorial I saw said that 5V would work on the Arduino Uno, so I had wired it as such. It worked on the Arduino. On the Propeller, I just wired it the same way (with resistors). I did, however, just try it with 3.3 volts... to no avail, I'm afraid.

    David Betz: Thanks for that; I fixed the code to read as follows:
    int main(){  MPU6050_bus = i2c_newbus(MPU6050_SCL, MPU6050_SDA, MPU6050_Mode);
      i2c_open(MPU6050_bus, MPU6050_SCL, MPU6050_SDA, MPU6050_Mode);
      char deviceSleeping = 5;
      i2c_in(MPU6050_bus, MPU6050_Address, 0x6B, 1, &deviceSleeping, 1);
      print("%d", deviceSleeping);
    }
    
    Still, I'm getting the same problem. The code prints "5" (no quotes).
Sign In or Register to comment.