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 My C: drive crashed this afternoon

    Nuts! is appropriate.

    A diversion. The PC into which I had installed MPLAB and PIC BASIC PRO stopped working this afternoon.

    There will be a delay in my pursuit of PICkit perfection.

    Ken

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


    Did you find this post helpful? Yes | No

    Smile Hello, I'm back

    Hello everyone.

    My machine is back.

    I need to know where PIC assembly language is defined. In what document?

    I discovered while playing with a blinking program that

    LOW PORTD.0
    HIGH PORTD.1

    and

    PORTD = %10

    Do not do the same thing. In particular PORTD = %10 clears all the rest of PORTD while the LOW and the HIGH BASIC commands only affects pins 0 and 1. (see below)

    Another question. Is there an available document that would provide me with the assembly language interpretation for each PICBASIC PRO command? I found my answer in the .asm code, but I was hoping for an easier all encompassing document.

    ----snip from COMPLICATED_BLINK.asm--------
    #define _PORTD??4 PORTD, 004h
    #define _PORTD??5 PORTD, 005h
    #define _PORTD??6 PORTD, 006h
    #define _PORTD??7 PORTD, 007h
    #define _PORTD??0 PORTD, 000h
    #define _PORTD??1 PORTD, 001h
    INCLUDE "COMPLI~1.MAC"
    INCLUDE "PBPPIC14.LIB"

    MOVE?CB 0C0h, ADCON0
    HIGH?T _PORTD??4
    HIGH?T _PORTD??5
    HIGH?T _PORTD??6
    HIGH?T _PORTD??7
    -------end snip------------

    My two Devantech Ultrasonic Range Finder SRF05 units just arrived by Fedex.
    Soldering iron - here I come.

    Ken

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


    Did you find this post helpful? Yes | No

    Default

    Hey, good you made it back!

    I'm afraid I try and avoid .ASM as much as possible, but if I was looking for the document where PIC ASM is defined.... I'd start with the data sheet for your PIC, in the section titled "Instruction set summary".

    steve

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


    Did you find this post helpful? Yes | No

    Default Found it! ASM explained!

    I have printed 300 (ran out of paper) of 384 pages of the PIC16F88x Data Sheet 41291D. On page 231 I found "15.0 INSTRUCTION SET SUMMARY". This document has no Table of Contents.

    I need help getting onto hardware prototyping. I am fifty miles from the nearest well stocked electronics components store. What I need is a list of items to purchase when I make the trip. If anyone has a photo I would greatly appreciate it.

    I imagine soldering onto my PICKIT 2 connection wires with plugs or sockets. (male or female depending on which wire is 'hot') One or some for A/D converters, PWM input, PWM output, various sensors (sonic range finder and visual spectrum light sensor) and whatever else I might need (suggestions please).

    I imagine attaching these various items to my inline proto boards again with wire and matching plugs or sockets.

    What off the shelf items would make this 100 mile round trip fruitful.

    Ken

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

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


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

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


    Did you find this post helpful? Yes | No

    Default A circuit diagram. My kingdom for a circuit diagram

    First things first.
    I can try to make myself a circuit diagram with a pencil. Better yet I can learn how to use CAPTURE. Then I can share it. I'll give that a shot.

    Microchip seems to make many products that interface directly with the 16F887. I have a problem picking out which are appropriate.

    Thanks.

    Ken

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post
    First things first.
    I can try to make myself a circuit diagram with a pencil. Better yet I can learn how to use CAPTURE. Then I can share it. I'll give that a shot.

    Microchip seems to make many products that interface directly with the 16F887. I have a problem picking out which are appropriate.

    Thanks.

    Ken
    I don't think you're gonna need all that much stuff.
    You've got the ultrasonic sensors already. A handful of cheap CDS and some resistors takes care of seeing a visible light source.

    You'll need to build whatever it takes to drive your motors. Or figure out how to adapt whatever the car has already.

    Maybe it would be fun if you posted some pictures of the car you are using, all opened up so we can see what drive motors and control electronics it's got in it already?

    Yes, definitely come up with a way to draw and share schematics... even if it's just a pencil and paper and a scanner...


    steve

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


    Did you find this post helpful? Yes | No

    Default

    Hey Ken,

    I dunno if this is any good, but the price is right... Maybe worth a try for drawing schematics?

    http://tinycad.sourceforge.net/


    steve

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