Shop OBEX P1 Docs P2 Docs Learn Events
Quad Rover/ Propeller help requested - Page 3 — Parallax Forums

Quad Rover/ Propeller help requested

13

Comments

  • @Publison said:

    A 9 Volt Battery is not going to cut it. There is very little current in that battery. Get rid of that and connect the original 12 volt battery. Charge it if needed or buy a replacement so you are starting at new.

    If voltage at the BLACK wire measures 4.0 volts then something is connected backwards.

    Quad Rover Battery voltage is 12.2 v. This is backed down at the Propeller board to 5.0 volts. When the RC receiver is powered by the Quad Rover battery through the Propeller board, voltage from the receiver into the Propeller board is 5.0 volts. The red wire tests ‘hot’ and the black wire is ground as it should be.

  • PublisonPublison Posts: 12,366
    edited 2021-10-09 20:43

    That sounds good. Let's leave that setup and disconnect all other external batteries except the 12 volt main.
    We have to verify the receiver is getting 5 volt to the BAT input on the receiver. Can you put the meter on the + and - terminals on the BAT terminals with the power turned on?

  • With channels 1-4 plugged into the receiver, and POWER ON, what voltage do you see at the BAT connector + and - with nothing plugged in on that connector?

  • Mark KiblerMark Kibler Posts: 546
    edited 2021-10-09 22:38

    @Publison said:
    With channels 1-4 plugged into the receiver, and POWER ON, what voltage do you see at the BAT connector + and - with nothing plugged in on that connector?

    With channels 1-4 plugged into the receiver and Propeller POWER ON, the receiver also powers on. Voltage at the RC receiver’s three-pin battery plug-in measures 5.0 volts. So it looks like the receiver is getting adequate power through the Propeller board with no need for an external power source. Nominal operating range for the RC receiver is 3.5 to 9.0 volts. One problem solved.

    Now what…?

  • Hi

    Mark- I've just noticed your avatar- is that a quad rover? Never seen one before!

  • Hi

    ok try out this spin program. It was written in propbasic and compiled to spin.
    works for me using propellerIDE.
    It starts just by printing a few lines of 'this is a test' to make sure the serial is at the right speed and working and then displays the period of the positive pulse on each pin. Thats all. No clever stuff.
    If this works then all I can think is the software you have is corrupt?
    If it doesn't.....

    Dave

  • Nice program. Should work on the AUX I/O pins as the numbers on the connector line up with the Prop pin numbers. Servo out is a little more complicated with the extra IC in the mix. See Schematic.

    Schematic and Quadrover PDF's attach.

  • Mark KiblerMark Kibler Posts: 546
    edited 2021-10-10 01:44

    @tritonium said:
    Hi

    ok try out this spin program. It was written in propbasic and compiled to spin.
    works for me using propellerIDE.
    It starts just by printing a few lines of 'this is a test' to make sure the serial is at the right speed and working and then displays the period of the positive pulse on each pin. Thats all. No clever stuff.
    If this works then all I can think is the software you have is corrupt?
    If it doesn't.....

    Dave

    Dave,

    Error message when running your spin test program... "Unknown operator" (see red arrow)
    .

  • Mark KiblerMark Kibler Posts: 546
    edited 2021-10-10 01:43

    Dave,

    I changed the code lines that are highlighted in the red box, ran your program, and got the readout in the text window on the attached screen shot.

    ** I do not write code.** I have no idea what the changes I made, did. I just looked at the SetTrim program to see which commands were in ( ). Then I deleted two of the @@ marks that were highlighted as errors in the program and put the command lines in parentheses. Hmmmm...!

    So what does the readout on the text screen in the attached screen shot mean? It looks like the program is reading pins 8, 9, 10 and 11. Yes?

    There is no power from the Propeller board/ Quad Rover to the RC receiver when this program runs. Yes, my avatar is the Quad Rover.

  • Hi

    Oh boy- I've read about this but not experienced it.
    It seems propeller tool does not like the use of '@@@' to find address of variables.
    I have never used propeller tool- I used PropellerIDE.
    What to do.
    You could try downloading and installing PropellerIDE or I could supply a binary file.
    In fact that is what I have done. This is just the raw code so does not require compiling.

    Dave

  • PublisonPublison Posts: 12,366
    edited 2021-10-10 13:09

    @tritonium said:
    Hi

    Oh boy- I've read about this but not experienced it.
    It seems propeller tool does not like the use of '@@@' to find address of variables.
    I have never used propeller tool- I used PropellerIDE.
    What to do.
    You could try downloading and installing PropellerIDE or I could supply a binary file.
    In fact that is what I have done. This is just the raw code so does not require compiling.

    Dave

    Code compiled with FlexProp 5.93 just fine, It supports @@@ Uploaded to Propeller Project board and PST shows pin numbers fine, but with timeouts reported on each line.

    Probably need the receiver to be powered from the control board to report ms us output.

  • Mark KiblerMark Kibler Posts: 546
    edited 2021-10-10 14:05

    @Publison said:

    @tritonium said:

    Code compiled with FlexProp 5.93 just fine, It supports @@@ Uploaded to Propeller Project board and PST shows pin numbers fine, but with timeouts reported on each line.

    Probably need the receiver to be powered from the control board to report ms us output.

    The receiver is powered by the control board. I just ran the binary program you posted directly above but there was no read-out on the text screen. Do I have to convert it to Propeller language somehow? What are we trying to get it to do that the previous program isn’t doing?

  • @"Mark Kibler" said:

    @Publison said:

    @tritonium said:

    Code compiled with FlexProp 5.93 just fine, It supports @@@ Uploaded to Propeller Project board and PST shows pin numbers fine, but with timeouts reported on each line.

    Probably need the receiver to be powered from the control board to report ms us output.

    The receiver is powered by the control board. I just ran the binary program you posted directly above but there was no read-out on the text screen. Do I have to convert it to Propeller language somehow? What are we trying to get it to do that the previous program isn’t doing?

    You said "There is no power from the Propeller board/ Quad Rover to the RC receiver when this program runs. "

    Dave published the binary, not me. The new FlexProp compiles Dave's Basic just fine, with the @@@.

  • Mark KiblerMark Kibler Posts: 546
    edited 2021-10-10 15:31

    Dave published the binary, not me. The new FlexProp compiles Dave's Basic just fine, with the @@@.

    Are you suggesting that I compile Dave’s binary code using FlexProp? If you are, I’m not sure how to do that. Also, once we confirm that the receiver and Propeller board are connecting properly and move on to more advanced programming with the Quad Rover, which language is going to be easier and best to use? I foresee us (not me) rewriting all the old Quad Rover programs in a new language. Seems like this would take lots and lots of time.
    ** Keep in mind guys that I don’t know how to write code. **

  • PublisonPublison Posts: 12,366
    edited 2021-10-10 16:16

    Use the .spin file Dave published, not the binary, although that worked for me also. Do you have any programmers on your team. It seems you are trying to all this yourself, but you are not familiar to programming.

    Stay with the original SPIN programs as they have worked for 10 years. No need to move to a new language. The @@@ Dave used is not supported by SPIN at this time, but you don't have to use it.

    Flexprop available at:

    https://github.com/totalspectrum/flexprop/releases

  • Mark KiblerMark Kibler Posts: 546
    edited 2021-10-10 16:46

    @Publison said:
    Use the .spin file Dave published, not the binary, although that worked for me also. Do you have any programmers on your team. It seems you are trying to all this yourself, but you are not familiar to programming.

    >

    The spin program that Dave wrote and which I tweaked shows that pins 8-11 are working. The kids on the project team (and I) don’t know much about coding at all. My skills are very rudimentary. We’re more of a hardware team, reaching out to you folks who know deep level programming.

    In past projects we relied on Tracy Allen and Parallax folks like you to help us get the initial operating programs working. Then we learn from you how to tweak those commands and codes… line commands… to make the robot (or other project) and it it’s components go farther, or faster, or turn, or measure something at a certain time or altitude. Most of the project team are young middle and high school kids with (too many) other things on their plates.

    As in the past there will be a few who immerse themselves in the process and go on to study STEM at college and beyond, or at the very least use the problem solving, critical thinking and technical writing skills they learn to advance themselves, as several former project members have. These are the ones we’re trying to connect with and inspire.

    But first, I need to get the Quad Rover moving and figure out those key line commands and codes. I need to be one step ahead of them before I can explain things and I have to understand it first. Does this make sense?

  • Hi

    I don't know if I dare ask this but.... the transmitter was switched on when you did the test?

    Dave

  • Mark KiblerMark Kibler Posts: 546
    edited 2021-10-10 18:16

    @tritonium said:
    Hi

    I don't know if I dare ask this but.... the transmitter was switched on when you did the test?

    Dave

    Let me run the program again with, and without the receiver on and I’ll report back to you. I seem to recall that it powers on when I power up the Propeller board. But I want to cross-check this by running the program.
    Help me understand your troubleshooting thought process——- why do you ask?
    Thanks!

    ** After we got the gas powered motor on the Quad Rover running I was hoping that uploading the Propeller software to get the QR running would be a “simple” plug-and-play” matter. No such luck. ;-) That’s why we do these projects, to learn.

  • @tritonium said:
    Hi

    ok try out this spin program. It was written in propbasic and compiled to spin.
    works for me using propellerIDE.
    It starts just by printing a few lines of 'this is a test' to make sure the serial is at the right speed and working and then displays the period of the positive pulse on each pin. Thats all. No clever stuff.
    If this works then all I can think is the software you have is corrupt?
    If it doesn't.....

    Dave

    Dave, this work for me compiling on the latest FlexProp that supports @@@. I connected my Flysky 4 channel receiver to my Professional Development Board, (P1), and inputting changes from my Flysky transmitter, I could see changes in all 4 channels.

  • @Publison

    Thanks for going to the trouble to test that. That's good. I was wondering if I should give a longer timeout period- if I remember I set it to 50ms. I recall when I built my R/C stuff maybe 40 years ago the pulses were 1-2 ms long and repeated approx every 20ms. I am having trouble understanding Marks testing procedure as he doesn't seem to answer all our queries. The trouble is with technical stuff, is what is not said has to be assumed. If Mark did have his transmitter switched on when connecting the receiver up and running the software then there must be something VERY odd happening. Just wish I could get my test gear on it.

    Dave

  • Dave, this work for me compiling on the latest FlexProp that supports @@@. I connected my Flysky 4 channel receiver to my Professional Development Board, (P1), and inputting changes from my Flysky transmitter, I could see changes in all 4 channels.

    What specific changes did you see? What are we hoping the read-out will show?
    What’s the reason for shifting programming over to FlexProp if the Quad Rover’s original programs were written in Propeller and they work? Trying to wrap my head around this.

  • PublisonPublison Posts: 12,366
    edited 2021-10-10 21:20

    I was just testing out Dave's code. The PST shows cannel number and the uS sent from the transmitter. Varies from 1000us to 2000us depending where the sticks are. This makes sure my hardware is working.

    I just set up a P1 Professional Development Board with my Flysky 6-channel transmitter and a Flysky 4-channel receiver. Will test standard Parallax published Spin file on it.

  • Mark KiblerMark Kibler Posts: 546
    edited 2021-10-10 22:01

    @Publison said:
    I was just testing out Dave's code. The PST shows cannel number and the uS sent from the transmitter. Varies from 1000us to 2000us depending where the sticks are. This makes sure my hardware is working.

    I just set up a P1 Professional Development Board with my Flysky 6-channel transmitter and a Flysky 4-channel receiver. Will test standard Parallax published Spin file on it.

    Should I see similar outputs on the screen when I move the control sticks?
    Also, how do we convert Dave’s binary file to Flex Pro?

  • Mark

    I think you need to be doing a bit of research on R/C stuff.
    The transmitter communicates with servos by sending positive pulses of widths between 1ms and 2ms (via the receiver) depending on the transmitter stick position. Without the transmitter being switched on the receiver will output nothing at all and you will see that as 'timeout' from our software. At one point you said that is what you were seeing and so I asked if you had the transmitter switched on. These pulses are repeated endlessly with a time between pulses on one channel of around 20ms or so. Servos receive one pulse each in turn. The software shows the length of each pulse on each channel. Publison has tested my software out with a FlySky transmitter/ receiver setup and confirms everything works using my software. I would advise you not to alter the software if you don't know what its doing. By changing the code by deleting the number of '@' symbols will completely break the software and strange things will definitely happen. The binary code is the result you get after a correctly compiled program and only requires to be loaded into the P1 ram or rom. I only use the rom when the software has been proved and finalised and want to use it automatically when I next switch the processor on, otherwise I just download to ram and test and update. If you know your radio works when connected to servos, but not with our software there, is something very odd going on.
    Or we are getting our 'mental' wires crossed.

    Dave

  • Tracy AllenTracy Allen Posts: 6,656
    edited 2021-10-10 23:09

    Hi Mark,
    It's great to hear from you again! Last time, I recall you were off for a gig in Jordan, before that, a generation of rocketeers learning the BASIC Stamp in New Hampshire and Black Rock Desert. You write now from Cincinnati and say the collective "we". Are you teaching another class?

  • @tritonium said:
    Mark

    I think you need to be doing a bit of research on R/C stuff.
    The transmitter communicates with servos by sending positive pulses of widths between 1ms and 2ms (via the receiver) depending on the transmitter stick position. Without the transmitter being switched on the receiver will output nothing at all and you will see that as 'timeout' from our software. At one point you said that is what you were seeing and so I asked if you had the transmitter switched on. These pulses are repeated endlessly with a time between pulses on one channel of around 20ms or so. Servos receive one pulse each in turn. The software shows the length of each pulse on each channel. Publison has tested my software out with a FlySky transmitter/ receiver setup and confirms everything works using my software. I would advise you not to alter the software if you don't know what its doing. By changing the code by deleting the number of '@' symbols will completely break the software and strange things will definitely happen. The binary code is the result you get after a correctly compiled program and only requires to be loaded into the P1 ram or rom. I only use the rom when the software has been proved and finalised and want to use it automatically when I next switch the processor on, otherwise I just download to ram and test and update. If you know your radio works when connected to servos, but not with our software there, is something very odd going on.
    Or we are getting our 'mental' wires crossed.

    Dave

    Dave,

    Thanks for your help.

    I ran your original plshigh.spin program on Spin with the three @@@ in the command line highlighted above and it wouldn't run. The program supplies no power to the Propeller board and so I connected the stand-alone battery to the receiver and ran the program. It still wouldn't run because of @@@ error message.

    Next we ran plshigh.spin program with the two of the three @@@ removed in the command line. Then each command line and @ was put inside ( ).
    We connected a stand alone battery to the receiver and ran the program and it read the receiver. This (screen shot) is the output we saw scrolling on the screen: "8 is a test. 1100a test", "9 is a test. 1643a test", etc. for 10 and 11. The outputs did not change when we moved the transmitter control 'joy' sticks.

    We tried to ran your plshigh.binary program using the FlexProp program we downloaded and the text window said "Could not find a P2. Press enter to continue." plshigh.eeprom loaded to the Propeller board but it was cryptic on how to make it Run using FlexProp

    Thanks again for your help and for the information on how the receiver sends 1-2 mS pulses.

    Mark

  • Mark KiblerMark Kibler Posts: 546
    edited 2021-10-10 23:45

    @"Tracy Allen" said:
    Hi Mark,
    It's great to hear from you again! Last time, I recall you were off for a gig in Jordan, before that, a generation of rocketeers learning the BASIC Stamp in New Hampshire and Black Rock Desert. You write now from Cincinnati and say the collective "we". Are you teaching another class?

    Hi Tracy,

    It’s great to hear from you! I “retired” back home to Ohio after teaching in Jordan and at the Embassy school in Rome.
    Yes, I’m putting together a new project team of students here in rural Ohio for a currently undefined project using the Quad Rover as the platform. But first we have to get it running with forward, reverse, throttle and brakes. I’m trying to stay a step ahead of them as best I can.
    The project will involve high power rocketry again somehow. I’ve stayed in touch with Prof. Emeritus Robert Twiggs, who retired from Stanford and started a phenomenal aerospace program at Morehead State University, KY. He’s not from us at all. Stayed tuned for project details!
    FYI, one of the students you helped mentor graduated with honors in IT from Worcester Polytechnic Institute and he runs things at Boston Logan Airport. Another of your students graduated from Columbia Law School Phi Beta Kappa with highest honors and he’s a Law Clerk in the Supreme Court of Appeals in DC. Recall that these were just kids from a very small, rural, nondescript school.
    A third student, my son Christopher earned a full fellowship at UC Santa Barbara where he’s finishing his PhD in LiDAR and satellite mapping. Much of the credit for their success goes to you and your son and all the folks at Parallax who helped us and guided us along. I cannot thank you enough. :-)
    It’s great hearing from you Tracy and I hope all is well with you and your family.

    Mark

  • @"Mark Kibler" said:

    We tried to ran your plshigh.binary program using the FlexProp program we downloaded and the text window said "Could not find a P2. Press enter to continue." plshigh.eeprom loaded to the Propeller board but it was cryptic on how to make it Run using FlexProp


    In flexprop, you need to specify "P1 defaults" in order to compile & load to a P1...

  • Hi Tracey
    Thanks for that, we need all the help we cant get!

    Mark- nice to hear about the person behind the scenes...

    Dave

  • Publison,

    It's way off topic, but I was looking at the pic of the "propeller control board." Does Parallax use a thinner pin for something a servo interfaces to? On that pic it looked like a regular thick IDE pin. Do you guys find the servo connection a tight fit?

Sign In or Register to comment.