Shop OBEX P1 Docs P2 Docs Learn Events
radio control — Parallax Forums

radio control

Bill SCBill SC Posts: 17
edited 2009-01-25 23:40 in BASIC Stamp
what I am currently using is a stamp/rc receiver, but what I want to move to, and I feel that many others here would benefit from the answer of this question, is the propellor.·I am struggling to find a way to make a bot radio control and autonomous as well. I have a 7 channel radio (spectrum) and I want the bot to know if I want it to be autonomous or Remotely operated. The gear switch strikes me as a great way to do this, although I am not totally sure how. A poll query seems right, but I don't know much about the prop. One of the great things about the propellor, it seems to me, is prop objects can be written for all that don't understand the subtleties much as people can use applets without a clue as to their true power. Any help here would be greatly appreciated.

Comments

  • Jim PatekJim Patek Posts: 15
    edited 2008-11-26 19:23
    I have a Bot that I am in the process of converting from Linux on a Via motherboard (along with a couple of Basic Stamps) to the Propeller. I'd like to claim that I have it working, but that is a ways off yet. The current bot uses a 900 MHz spread spectrum radio (Aerocomm ConnexLink) for communication and remote control (when in RC mode). It works great and I have gotten the Propeller to operate it with no problem (with a MAX232 level shifter). The bot and the base station (laptop) communicate with a protocol that I cobbled together that resembles NMEA0183. Of course, these "sentences" have to be processed and interpreted on the propeller. It is plenty fast enough for my application, but then the bot is a rather slow moving autonomous (when in AUTO mode) boat. Whether it would be fast enough for, say a helicopter ... don't know. For my application the radio has the additional advantage of being able to transmit up to 20 miles over water (manufactures claim, I have only tested it at a little over 17 miles ... worked fine at 57600 bps). The base station end has a control panel written in RealBASIC that can be operated from the keyboard or a Logitech game controller. Anyway, it works for me and looks like it will work on the propeller as well. Guess I'll find out in a few months (I hope).

    Jim
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-11-26 20:21
    Hello Bill,

    the members of this forum will surely help you.
    But YOU have to provide more specific information about your project.

    You wrote that you are currently using a stamp rc-receiver. What kind of signal
    does this receiver have? Simple TTL-Logic low/high 0V/5V ? or any other ?

    What do you want to do IN SUMMARY. Which functions shall be controlled via the rc-receiver
    The suggestions will depend on these functions.

    How much do you know about programming ?
    a.) newbie
    b.) I made some easy and short basic-stamp programs
    c.) I'm an advanced programmer in Stamp-basic but new to programming the propeller in SPIN

    best regards

    Stefan

    Post Edited (StefanL38) : 11/26/2008 8:28:39 PM GMT
  • Bill SCBill SC Posts: 17
    edited 2008-11-26 21:45
    Hi, StefanL38, thanks for replying. My receiver is currently the mate to the transmitter (Spektrum). I misspelled that before, sorry. It is the standard PWM RC setup (2.4 ghz DSM2) that most modern model aircraft use, with the digital spread spectrum stuff to prevent interference. Servo control signals, essentially. My current bot is geared motors (front, differentially driven, with castors on the back). It is pretty much the RC bot demonstrated by the excellent Parallax staff, maybe not as good. What I want is the drive controls to be remotely controlled, or autonomous, via a switch on the handset. There are some controls that are basically on or off (like the gear control... up or down) that I think would be good for this, but if there is a better way I am certainly open to any suggestions. I know many others out there envision a sentry out there, who would investigate a noise on command... isn't that one of the kinds of scenarios that attract many to this field? Obstacle avoidance, etc, is part of the drive idea, even in RC mode. I know that this is a big task, but a step at a time, eh? The step I am at is telling the MCU (prop now or later) that I want you to listen to me or to do what I told you to do on your own. My experience in programming would be that I have made some programs, not an expert by any means. My cat would thank you, she knows that the terminator is in the garage waiting on her...lol On a side note, many thanks to the parallax staff for their tireless dedication to us, that can't be found anywhere else.
  • Bill SCBill SC Posts: 17
    edited 2008-11-26 21:47
    Sorry, forgot to mention, I am using HB25s for the drives. Very good devices, they use the servo control signals. I highly recomend them to any on here looking for drives in the power range they are capeble of.
  • Tom CTom C Posts: 461
    edited 2008-11-27 01:07
    Bill SC,

    I happen to have a BS2p UAV program that monitors the rudder, and elevator channels which are pass through, and the gear switch channel to determine whether to be under manual control or be autonomous. I have attached the code below. I did not write the code and downloaded it from DIY Drones during their early attempts to develop an autopilot with the BS2p. It might help you to visualize an algorithm for the same process in Spin.

    Therefore monitoring the grear switch to determine the mode of operation is very viable.

    I also have some BS2 code that I downloaded off of the Robotic Forum that allows a user to·program a robot with GPS coordinates and then have the robot traverse the course autonomously. I have been working on converting the PBasic code to Spin, but since I am a Spin·beginner, it is going to take a while.

    I would like to have manual control·of the robot by R/C control and at appropriate locations record the GPS coordinates of the robot by using the gear switch channel as a record switch. Then in the normal operational mode, I could drive the robot to the starting coodrinates manually and then put it in the autonomous mode to run the GPS coordinate course. This would allow me to operat a camera on the robot or some kind of weapon system while the robot autonomously traverses the course.·I have also thought about using a TPA81 to track thermal targets in an autonomous mode. We have a problem with skunks here in North Texas and I would like to use a robot to ward them off without having to kill them.

    I also have a Spektrum R/C transmitter, DX6i, and a BR6000 receiver and I am planning on using them with the Propeller Control Board, used on the QuadRover, to provide manual and autonomous control of my rover robot.

    Parallax has made available Propeller code to decode R/C servo channels, process them, and then retransmit the necessary pulse widths. You can find the code here: http://www.parallax.com/Store/Robots/RollingRobots/tabid/128/CategoryID/3/List/0/SortField/0/Level/a/ProductID/502/Default.aspx

    Download the QuadRover Example Code Version 1.0.

    I hope that this helps and will encourage other programmers to help get this project going so that we can move it to the Completed Projects Forum.

    Have a happy Thanksgiving.

    Regards,
    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!

    Post Edited (Tom C) : 11/27/2008 2:33:22 AM GMT
  • Bill SCBill SC Posts: 17
    edited 2008-11-27 01:24
    Thanks a lot for the reply. I know that there are many out there who see this as a security/military/etc aplication once it is made easier to do. I really enjoy seeing the video (wireless security camera) of the bot skulking along on RC, but the idea of it doing so tirelessly (homing in on a beacon to recharge is another step in project) and then doing one's bidding once kids come into back yard with toilet paper for a trick vs treat.... many applications here, huh? Solar recharging... weed eating the fence line... one's imagination is only real limit. My range is supposed to be a half mile, but not nearly that is needed, unless the bot delivers the requested cup of sugar.. lol Current camera doesn't have that range, of course. I am looking at a wireless camera, transmitter solution, but that can wait. I am at the autonomous stage now, thank God for Parallax. And thank you for replying.
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-11-27 17:36
    Hello Bill,

    as english is not my native language I'm not sure if I understand your posting right in all details.
    you wrote "servo-signals essentially.."
    Does this mean your receiver's output are standard-servo-signals (rectangle pulses of 1.0-2.0 Milliseconds every 20 Milliseconds)?

    In the obex there is an object for READING servosignals
    Search for "servo" and you will find it.

    A step at a time is very good. So first step is to load a demo-program into the propeller and play around with it
    I recomend to integrate the FullDupkexSerial-object for debugging purposes right from the beginning
    This gives you the possability to get a detailed feedback from the propeller about what your program is doing
    The detail-depth is only limited by your patience to write the debug-messages and the 32kB RAM

    A step at a time is also a basic principle of good programming
    develop ONE thing at the time. Test ist until it works properly and then develop ONE next thing

    One thing here means: a sub-program (called "method" in SPIN) that does one senseful thing.

    As you described above: detect RC-switch position remote or automious

    first "one thing" integrate FullDuplexSerial" in a small demo program with a repeatloop sending "Hello World" to the PC
    (using pins 31,30 for rx,tx)

    second "one thing" send a value of a variable with a text-headline to the PC

    third thing replace the "vga_text"-object by FullDuplexSerial in the ServoInput_Demo.spin


    This is a short description of a starting point. It does NOT explain all details.
    I KNOW that this description leaves questions open.

    Try to follow this way and feel free to ask any concrete question on this way.
    Feel free to even ask VERY basic things. Indeed as more basic the question will be the faster you will get answers
    just bevause MORE people do know the answer and then even 5week-prop-programming-still-almost-newbees will
    enjoy to have the possabilitiy to write an answer to a posting too.

    (maybe your question is "where do I find the FullDuplexSerial-object?" or "how works this object where can I find a little demo-prg?"
    etc. etc. etc.

    feel free to aks all these questions.

    best regards

    Stefan
  • Bill SCBill SC Posts: 17
    edited 2008-11-28 04:25
    stefanl38, hi. Yes, the receiver is a standard run of the mill Radio Receiver like used to control model airplanes and helicopters, so the servo signals are exactly as you described. I made the bot basically a radio control car by hooking the hb25s straight to the receiver, which worked great. Next I hooked up a BS2 stamp to them and used the program by Chris Savage which he used to drive the square metal bot, and it worked great as well. I am still learning Spin, and hope to move on to Assembly after that, so I guess that is where I am at now. The autonomous question could be apply to a stamp as well as the prop, but the propellor is ultimately what I want to move to. Thank you very much for your suggestions. I am studying the uav program that Tom C was kind enough to provide, and I will be attempting to write my own soon. My current configuration is a square wooden deck with motors mounted underneath (direct drive) and a radio shack project box used to protect the MCU and other electronics save for the hb25s. I am afraid that they would overheat in an enclosure, even though that means they are exposed to the elements now. On learning the spin language, I will follow your suggestions, thanks.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-11-29 16:47
    This thread is not Propeller related and is bring moved to the BASIC Stamp Forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • DarkcornerDarkcorner Posts: 7
    edited 2009-01-24 04:44
    Bill
    You have peeked my interest.Are there any Clubs or organization that could pool the skills of different individuals towards building homeland security bots ? I am much better at just plain powerful robots, wheel Chair motors, and snow blower trac dive and the such like. For now it has the brains of the boebot with ping and IR running the basic roaming program.IT is switchable to a 7 channel RC for the bigger can't get around problems. It uses two 7 channel receivers. One to run in RC mode and the other uses FIRMTRONICS switches ( from the Robot Market Place ) to go back and forth into the basic stamp roaming program. For auto mode my next plan is to hack my dogs invisible fence and wire the collar into either basic stamp or propeller. So the bot will follow the fence line with senors at certain points for different chores. Inside the fence it should patrol and wart off the unfriendly with loud alarms all the while feeding live video to my site. Big robots come easy for me because I work for one of the best machine shops in my area. I am so happy that Parallax has this forum and hope it get's more people interested in the future.
  • Bill SCBill SC Posts: 17
    edited 2009-01-25 02:11
    Wow, that's a lot of questions. I am far from the most knowledgeble person on this board on any of those subjects. I have no experience with the Firmtronics stuff, just the stamps and a small amount of the propellor. Homeland Security stuff is way beyond me, but there are lots of people here for which it would not be. I like working with larger bots, but it sounds like you have way more experience with those as well. You can see a couple of them in the post, there are some real gurus on here, unfortunately I am not one of them. Too much to learn, and envious of your access to a machine shop too now. Oh well.
  • Tom CTom C Posts: 461
    edited 2009-01-25 23:40
    Darkcorner,

    If you like big robots, you might want to also visit the Projects sub-forum on the Lynxmotion Forum: http://www.lynxmotion.net/phpbb/viewforum.php?f=20&sid=4ac0c97342c57d4d71dc61ee9b1fae1c

    Some of the robots on the Projects forum are designed and built·by people who are in the security business. You will have to do a search to find them, but it will be well worth the effort.

    Regards,
    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!
Sign In or Register to comment.