How do I give a radio control car autonomous control


Closed Thread
Results 1 to 40 of 191

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Personally I would go with what I described....software control. But someone might come up with an elegant solution. I really don't think you have to keep up with the 25ms servo rate. I have done several applications at lower rates and it works fine. So most processor will work just fine in this mode.
    Last edited by John_Mac; - 16th November 2009 at 23:28.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    John made some good points as to why a hardware solution may not be to your liking.

    On the flip side side, a software solution can also have some draw backs. I am coming from an industrial point of view so maybe something non-critical as a RC car could be looked at differently...

    To go from manual to auto with software at least one ASM interrupt is needed, depending on the application you may want more from different sources. In your case on should be enough. If the operator can not see the car then switch to auto. Using software the code can be cumbersome. Say you are running in manual. Are you still keeping track of the sensors? That can get to be a neat trick, code space and all. If you do a hardware switch, the auto part can keep monitoring the inputs just as it would if it was in control. This way, when auto does take over it is near seamless.

    Good and bad both ways.

    If you do go with the hardware solution and the RC part of the car (manual) is still intact then you are halfway there. Find were the inputs to the MOSFET bank are or the motor controller and that is where the DPDT relay will go. Being the control signal is the only thing that is switching the only surge you will have to worry about is from the relay coil. A flyback diode will take care of that.

    But either way you go, keep us posted. I have some young ones I am also teaching.

    BTW.... I only use windows when I have to...
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Feb 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Hi Dave

    I agree it depends on the level of glitches you are willing to put up with. I have done what Ken describes with a PIC in a single loop. The call to read PWMs is one element. Sensor analysis is other.

    I don't use an interrupt on the lower level PICs. I simply read the mode channel PWM. If it is below some value I jump to manual, if above then to auto. Very simple.

    I do much more in the dsPIC which actually interrupts every PWM pulse, but that is way beyond what Ken is talking about. Without interrupts on a mid-range PIC, the throttle will seem a little sluggish in response to changes, this is due to the fact that it is being sampled at less than its normal 25ms rate. But this really isn't a big deal for an RC car. Same is true with steering.

    I would think that the sensor calls would only be in auto mode. So no real impact to manual response times. All depends on the details of what Ken ends up doing. I think a simple start is best. There is a big learning curve.

    John

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by John_Mac View Post
    I think a simple start is best. There is a big learning curve.
    Yup, as I was advised a while back when I asked "ASM or PBP first?" the general consensus was to make things as simple as possible so the students would not lose interest.

    Keeping the kids excited about something makes MCUs seem easy
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default I'll go with the least complicated.

    Seems that using DPDT relays is the easiest approach to get this car on the road -er gym.

    Parallax has been suggested.

    If I go with Parallax I need:

    BASIC Stamp 2e Module $54.00
    either:
    BASIC Stamp 2pe Motherboard $70.00
    or
    Board of Education (USB) - Full Kit $100.00

    From TYCO or, 2 AXICOM V23105 dpdt DC relay ~$5.00 each

    Maybe some parts from Radio Shack like 7.5 volt power supply and a USB cable.

    What else besides my RC car a work bench and some time?

    Ken

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Ken,
    Do you have a copy of PicBasic? If so then a PICKIT2 from microchip is less than the cost of a stamp. Micrchip also has a samples option for some of their chips.

    The syntax between PB and stamp basic is minimal. But you have many more options with straight PICs. $54.00 for each project

    I bet if you explained what you are doing in a letter on your schools letter head you might get some help from Microchip and Melabs.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default I think the DPDT approach is worth further study.

    Seems that using DPDT relays is the easiest approach to get this car on the road -er gym.

    Parallax has been suggested.

    If I go with Parallax I need:

    BASIC Stamp 2e Module $54.00
    either:
    BASIC Stamp 2pe Motherboard $70.00
    or
    Board of Education (USB) - Full Kit $100.00

    From TYCO or, 2 AXICOM V23105 dpdt DC relay ~$5.00 each

    Maybe some parts from Radio Shack like 7.5 volt power supply and a USB cable.

    I also need a one dimensional light sensor if my BOT is going to find a glowing light bulb on the floor by the exit door.

    Parallax has the:
    TSL1401 Linescan Imaging Sensor Daughterboard $50.00

    What else besides my RC car a work bench and some time?

    Ken

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


    Did you find this post helpful? Yes | No

    Default Is the TSL1401 too much for my job?

    After reading the details of the Parallax
    TSL1401 Linescan Imaging Sensor Daughterboard
    it seems like overkill. All I want to do is detect that my BOT is pointed at the brightest light in the room. A simple light detector like is used to follow a black line on the floor should be good enough.

    Suggestions?

    Ken

  9. #9
    Join Date
    Feb 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Take a look at the QTI Sensor on the Parallax site...only 6 bucks, emits and receives IR to follow line.

    But I'm not sure if you want to follow a line or seek out a bright light??????

    John

Similar Threads

  1. Car radio (Car radio and electronics support forum)
    By freewillover in forum Forum Requests
    Replies: 1
    Last Post: - 1st July 2009, 20:41
  2. Remote Car Starter Safety
    By CocaColaKid in forum General
    Replies: 8
    Last Post: - 22nd November 2005, 10: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