How do I give a radio control car autonomous control


Closed Thread
Results 1 to 40 of 191

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default Getting somewhere...

    Thank you, John for answering my questions. I am out here in the middle of Massachusetts. Is there a robotics club around?

    My RC car is not the correct one for this job. It has 4 wheel drive and hence a drive belt down the middle where I would mount the PIC. I refer to it because that is all I have. If this idea takes wings a new car can be purchased.

    My first thoughts for autonomous control sensors is simple sonic proximity detectors. If they looked to the right and to toward the front, I'll bet I could program the car to follow a wall (close on its right side) until it found an opening (in a corner). Or something....

    I need to pick a PIC. I've been told that VEX uses Microchip's 18F8520. Our local technical high school has some VEX kits, but I do not have access to play with them. Any suggestions would be greatly appreciated.

    I am a retired digital hardware and software designer. I still have my Texas Instruments 7400 Series TTL catalog. I have not done hardware design since the early 1980's. I am way out of touch.

    Ken

  2. #2
    Join Date
    Feb 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post
    Thank you, John for answering my questions. I am out here in the middle of Massachusetts. Is there a robotics club around?

    My RC car is not the correct one for this job. It has 4 wheel drive and hence a drive belt down the middle where I would mount the PIC. I refer to it because that is all I have. If this idea takes wings a new car can be purchased.

    My first thoughts for autonomous control sensors is simple sonic proximity detectors. If they looked to the right and to toward the front, I'll bet I could program the car to follow a wall (close on its right side) until it found an opening (in a corner). Or something....

    I need to pick a PIC. I've been told that VEX uses Microchip's 18F8520. Our local technical high school has some VEX kits, but I do not have access to play with them. Any suggestions would be greatly appreciated.

    I am a retired digital hardware and software designer. I still have my Texas Instruments 7400 Series TTL catalog. I have not done hardware design since the early 1980's. I am way out of touch.

    Ken
    Hi Ken

    I'm out in Colorado, so don't know much about clubs in Mass, but you do have MIT there and they are well known for their work in robotics. You might see if you could connect with them. The laser scan I mentioned was at MIT. Here is a link you might enjoy:

    http://diydrones.com/profiles/blogs/...ter-with-laser

    I don't really know about VEX, but I have chosen my PICs based on numbers of hardware PWM channels, ADC channels etc...so depends on application. I never found I taxed the speed of the processor.

    One thing I started, but never really finished was to put a PING on a servo so I could rotate it left and right. I took a left/right scan and stored the distances to detected obstacles, basically making a map. I could then make decisions on where to go next. You can't really scan very fast though due to a couple of things. The first is that you need to make redundant measurements to filter noise out at each setting, and then the servo is constantly moving and can limit it's lifetime. So this isn't useful for a fast moving car, but maybe a crawler. I like the idea since it requires some math and algorithm development as a learning project.

  3. #3
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default What a great video!!

    John,

    Thank you for the pointer to the quadcopter video. It is spectacular.

    I am a member of the Cardinal and Gray. The alumni organization for those who graduated from MIT over fifty years ago. I have been looking unsuccessfully for an alumni robotics club.

    My impression is that the RC cars world (no microchip) and the VEX school competition world (both RC and autonomous but mostly RC) and the robotics world are completely separate. Then of course there is the land of production machine control.

    The RC cars motor can draw up to 80ampere. These cars have a 7.2 volt battery pack that feeds directly to the ESC which in turn gives a dribble of power to the RC receiver. If the micro proto board which has its own battery pack were to provide the PWM signal to the ESC might I not have a power problem?

    Really my problem is getting started. I thought the micro controller could be the middle of the car. The RC receiver gives it a low power PWM signal as per usual. When under RC control the micro interprets then passes this signal onto the ESC. If that were the design, the micro could take over control on its own without a command from the human.

    I need to pick a microcontroller either a fully packaged one like the VEX, the RCX or the NXT or a proto board. In my past I programmed in machine language and on RISC. More recently it was C, C++ and some higher level languages. That was alll in the work office environment. At home I am starting from scratch. If this looks promising I am pretty sure I can get some help. I need a basic design.

    Ken

  4. #4
    Join Date
    Feb 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Ken

    You probably need to decide if you want the flexibility of a bare PIC or a package that is already programmed. I went with the PIC since I can basically make it do anything I want.

    There is a price to be paid to get in that game however. Perhaps you already have all the infrastructure, if not you will need a programmer to write to the PIC, and then decide on the language. Since you are on this forum, you may have PICBasic. If not, you can go assembly (free), C (also free from MicroChip without optimization), or some other language (maybe free, maybe not). There are a lot of programmers out there. MicroChip has some, but other vendors too. I use an ICD2 clone from Sparkfun and PICBasic Pro for smaller PICs and the MicroChip C30 C compiler for dsp chips. I also program in asy, but I can get a lot more done with Basic or C.

    If you go the PIC route, I would just use a proto board to build up your circuits.

    I typically use an 11v LiPo battery to a BEC to get 5 volts for the board. You can actually take the power off the RX on the Red and Black wires of any channel. This is very low power drain compared to the motor and servos.

    Just a suggestion, but I would use an RC car or truck that has a very slow speed option. Fast isn't good when you are trying to debug sensors and code.

    One way to switch between manual RC and Auto is to use a channel of the RX that the PIC reads. If it is high, then manual, low then auto for instance. but you need a spare channel. I use a Specktrum DX-7 TX/RX with 7 channels for all the goodies I need to control. This approach is useful if the Auto goes nuts, you can switch to manual with the flick of a switch.

    This can get a little expensive to start, but if you plan to stick with it and do similar projects, I think the basic building block approach gives you the most fun....but then again I don;t know what the VEX etc are. And I do a lot of this on many different platforms.

    Did I understand you were involving students? It's a great learning project.

    John

  5. #5
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default autonomous ex-RC car that goes around the block

    The Tech Junkies have this video. They removed the RC control and made the car completely autonomous being guided by the gps satellites.

    Their Arduino proto board has a voltage regulator. It produced a 5 volt supply from the 9 volt battery. This would allow me to keep using the 7.2 volt battery pack. I was hoping to keep the speed capability of the RC car.

    Ken

  6. #6
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default

    You wrote:

    "One way to switch between manual RC and Auto is to use a channel of the RX that the PIC reads. If it is high, then manual, low then auto for instance. but you need a spare channel. I use a Specktrum DX-7 TX/RX with 7 channels for all the goodies I need to control. This approach is useful if the Auto goes nuts, you can switch to manual with the flick of a switch."

    Is that as easy as flipping a double pole double throw switch under PIC control?

    I have not chosen a PIC. Is the PICaxe Starter Kit for fifty bucks what you would recommend? It does not have any spare proto space. Are pretty much all the sensors I might need directly connectable? Will I need additional off board interface circuitry for, say, a servo or a simple on/off motor? Microchip sells a PIC18FXX20 Demo Board. It contains their 18F8720. I think VEX uses their 18F8520.

    I gotta purchase something and get started. One more thing. I have both Windows and Linux PC's at home. I assume that most everybody uses Windows.

    Ken

  7. #7
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default Tech Junkies Video

    I don't know how I did not post this URL yesterday

    http://ttjcrew.com/

  8. #8
    Join Date
    Feb 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Hi Ken

    Just looked at the video. Remarkably, this is very similar to what I did and described in my earlier post. Some similarities/differences...I used a larger RC truck platform with 4WD (a junker from Radio Shack), I also ripped all the electronics out and replace the old steering motor with a real servo, I ripped out the RX and motor controller, but kept the H Bridge to be used under PIC control. They put in a new H Bridge, but looks like it was on or off, mine had variable speed control determined by the TX input. They were purely autonomous GPS (only works outdoors). I used a Spektrum DX-7 TX/RX RC system so I could have both RC and Auto control. They used an Arduino board from Sparkfun, I used the MicroChip PIC and my own proto board.

    So you see there are many ways to go.

    I looked up the VEX system. This is pretty much a lot of plug and play modules that you can buy to do robotics. I think you may still need to buy a TX/RX to have RC control...can get pricey. But you will have to choose.

    I am not that acquainted with the various kits that Microchip sells...perhaps others can comment.

    I went entirely from the ground up. ICD2 programmer (there are others you can use), I started in assembly but then bought PICBasic Pro (also easy to convert a lot of my old Basic Stamp programs), some 16F88 and 16F627A PIC chips, some proto boards, and supporting electronics (voltage regulator, caps, resistors, jumper wires, header pins,,,,) and built up the hardware and software to make it all work. Most of the sensors from Sparkfun or Parallax will work off a PIC, but you have to read the spec sheets. You will need the usual lab stuff, soldering station, with general electronic parts, batteries, power supplies, and I found the Parallax USB oscilloscope to be absolutely essential in debugging the code. Plus I already had the DX-7 TX/RX. Starting from scratch, this is also pretty pricey way to go. But I had a lot of the stuff and I wanted to be able to modify the control systems at the PIC level for all my projects.

    I don't know what you have nor your skill level in this area. You can get some help here on the Forum, but if you go with a plug and play system, it is more turn key and probably forums for those as well. Looks like the Tech Junkie website will have all the code and schematics for what they did, but you would have to go with the Arduino boards which use Atmega chips, not PICs.

    Take a look at the DIYDrone website and the ArduPilot system there. this is a great site for autonomous systems, and it is all freeware with most of the parts from Sparkfun. They have lots of stuff you might be able to use and a forum to get a lot of answers....and it is all as cheap as you can get. check this out:

    http://diydrones.com/profiles/blogs/ardupilot-main-page

    I have a blog there on using a dsPIC IMU system for model helicopters, still PIC based but use C code and microcode C compiler.

    You will have to decide the route you take, but it can be a lot of fun.

    Good luck

    John

    Oh...your question on switching from manual to auto...the switch is on the TX. It sends either a short PWM or long PWM to the RX and the PIC reads this to decide if it passes TX signals directly to the servos (manual) or is in control of the truck (auto)....not DTDT switches. And I also use Windows.
    Last edited by John_Mac; - 14th November 2009 at 02:10.

Similar Threads

  1. Car radio (Car radio and electronics support forum)
    By freewillover in forum Forum Requests
    Replies: 1
    Last Post: - 1st July 2009, 19:41
  2. Remote Car Starter Safety
    By CocaColaKid in forum General
    Replies: 8
    Last Post: - 22nd November 2005, 09:10

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts