How do I give a radio control car autonomous control


Closed Thread
Results 1 to 40 of 191

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default

    Hmmm. You have a 16F887, right?

    The data sheet I have for it (41291F) is 328 pages and definitely has a table of contents....
    It looks like pages 233 - 241 deal with the instruction set.
    http://ww1.microchip.com/downloads/e...Doc/41291F.pdf

    But you've got PICBASIC PRO, right? I don't think there's too much need for you to learn ASM unless it's just for educational experience. Why make things harder for a "first project"?

    Before you go on a shopping spree, you should figure out what it takes to drive your motors and servos, etc and come up with a schematic or at least a block diagram of some kind.
    I assume your car has a DC motor for drive, and a servo for steering position? How much current does the motor draw? You'll probably want one or more logic level MOSFET's to drive it.
    I'd get a slab of punchboard to build your circuit on. You'll want a good selection of resistors and caps... If you use CDS cells to "see" light, then you'll want resistors to form voltage dividers with the CDS cells so you can easily measure with an ADC. Of course what values you need depends on many things... including which CDS cells you get. You'll probably want some fairly high value (100K) for gate to source resistors on your MOSFETS. You'll need some caps (maybe some .01 or .1 uF ceramic) for supply bypassing at your PIC and other chips.

    Errr... who knows what else you'll need! I think you need more of a game plan, and at least a rough schematic before you drive 50 miles to shop....


    steve

  2. #2
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Or you could use something like this during the learning/development phase (<$150 and should last you a lifetime) EasyPIC6 PIC® development system:


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


    Did you find this post helpful? Yes | No

    Default steve, I think you are correct.

    I have the car. It uses a Tomahawk Reverse Electronic Speed Controller(http://www.nosram.com). I want to use that system directly from the RC receiver for racing. It is proven and its response is sure. It would be nice if I could get the same three wire sockets that this device is accustomed to plug into, but that seems more than I can expect.

    I plan to use DPDT switches to toggle between RC receiver control and PIC control. I plan to use the third channel on the RC system to tell the PIC to flip the DPDT switches.

    The attached pictures of the car show that it is four wheel drive (there is a drive belt down the middle). This limits my ability to attach the PIC and attendant devices. Once the PIC control works I will be able to get more appropriate 1/10 scale cars or trucks.

    I hope the pictures came out OKAY.

    Ken
    Attached Images Attached Images      

  4. #4
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default Oh goody! PHOTOS!

    Hey Ken, thanks for the photos! I always love to SEE peoples projects.

    So the original control circuitry is clearly all sealed up, so it looks you can't hack into it and use any of it's electronics when yer buggy is under PIC control. No problem, I was just curious.

    FWIW, here's a simple circuit that uses a MOSFET to drive a motor and a DPDT relay for direction control. You would need one PIC pin to PWM a signal to the MOSFET for speed control, and one pin to drive the relay coil. Of course, depending on how much current your relay draws, you may need another MOSFET or bipolar transistor to drive the relay coil. And a protection diode across the coil always...

    Anyway, that would give you speed and direction control on your motor.




    steve

  5. #5
    Join Date
    Jan 2009
    Location
    California, USA
    Posts
    323


    Did you find this post helpful? Yes | No

    Default Hope I didn't sound to down on EagleCAD...

    Well, I see it's already too late to edit my original post (sigh), but I didn't want to give the wrong impression when I said I hated EagleCAD..

    I'm sure it's a fine program, and I know a LOT of folks use it and love it.

    I just found it to be rather... unfamiliar.. compared to other programs I've used, and I found it difficult and non-intuitive (to my brain) to learn.

    I stumbled across DipTrace one day and found it to be much more to my liking.

    Anyway, I didn't want to sound like I was bashing EagleCAD. I used it long enough to realize it's a good program... I just didn't like the way it felt. It's just a personal preference thing.. like what's yer favorite color.

    steve

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


    Did you find this post helpful? Yes | No

    Default I was planning to still use the ESC

    steve, thank you for your direct control suggestion.

    My thought is to hack into the present connection between the RC receiver and the ESC for the drive wheels. I figured with a DPDT switch I could toggle the two wires that are presently connecting the receiver to the ESC (the third wire is ground) between their present state and the PIC. Two wires, one DPDT switch. The red wire is PWM signal. The white one is Vcc. (Actually I think I should leave the white wire floating. Let the ESC use its own power to interpret the PWM signal.) Good idea? No? Insert a diode?

    The RC receiver gets its Vcc and gnd from the ESC. My ancient Triplett multimeter tells me that this Vcc is +5v. I know the battery is +7.2v. The ESC must have a 5v regulator on board.

    The other DPDT switch is needed to perform much the same operation on the Vcc and signal wires between the receiver and the steering servo motor. In this case the white Vcc wire is driving from the receiver. This one I will switch and drive from the PIC when it is in control.

    Thus when the PIC is in control the RC receiver's 5v comes from the
    PIC. When the third RC channel signal commands return to RC control the PIC will interpret that and flip the DPDT switches back.

    I have this on paper drawn by a #2 pencil. Unreadable by anyone but myself. I'll make you guys a schematic. That may take a couple days. I will be distracted tomorrow and I need to learn about CAPTURE ( I have a bootleg copy. I have to give it a try.)

    Ken

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


    Did you find this post helpful? Yes | No

    Default Problems with CAPTURE .OLB files

    Anybody using CAPTURE for schematics? I am trying, but I have been hit for a loss. I need the library file for the Microchip PIC16F887. I found just that at:

    http://f1.grp.yahoofs.com/v1/cKwuS-E...w/PIC16F88.OLB

    Trouble is when I download the file and try to open it with CAPTURE, the error window pops up saying: "Unable to load file 'C:\ORCADWIN\CAPTURE\LIBRARY\PIC16F88.OLB'. Object Not Found."

    The file really is there. I can open it with NOTEPAD, but a lot of good that is...

    Ken

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