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

    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

  2. #2
    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.

  3. #3
    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

  4. #4
    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.

  5. #5
    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

  6. #6
    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

  7. #7
    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

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


    Did you find this post helpful? Yes | No

    Default I want to seek out a bright light.

    John,

    I only mentioned the follow-a-line to indicate how simple my needs are. The $50 sensor has great pattern recognizing capability. All I need is something to attach to the front of the car which can tell it that it is going in the right direction. If this device had a lens that would be the best design. If it had a reasonably narrow lens angle then once the BOT found the light, it could stay well directed.

    Ken

  9. #9
    Join Date
    Feb 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Ah OK got it.

    The problem with a simple light detector and lens is that it gives you no positional information as to where to go to seek higher intensity. The linescan sensor you mentioned does due to its pixelated imager...but as you say expensive.

    One thing I did similar to this was to mount the detector on a servo that can scan left to right and back. I issued position commands to the servo, then read in the ADC value of the sensor, moved the servo, recorded data, etc. The servo positions were mapped to the forward axis of the truck. A steering correction could then be calculated. Only a few positions are needed to determine if you need to turn to a higher intensity direction, but you need to oversample to filter out noise. Make your steering correction, then start a new scan. You may need a digital filter on the corrections so that you don't oscillate around the proper direction.

    You can always buy a smart sensor, but why not make a simple (cheap) one and make it smart with your processor? Also more of a learning experience.

    Just a thought.

    John

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


    Did you find this post helpful? Yes | No

    Default

    Three photo-resistors set 30 to 45 degrees apart (one straight ahead)with a little shielding on each.
    Dave
    Always wear safety glasses while programming.

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