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 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Did you order a PIC or two?
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default I thought a PIC came with it.

    Dave and John,

    I think the second item in this description of a Debug Express is a PIC16F887. Isn't that the micro that I need?

    Features of PICkit 2 Debug Express:

    * PICkit 2 Development Programmer/Debugger
    * 44-pin demo board with PIC16F887 Midrange PIC microcontroller
    The PIC16F887 may be debugged directly without any additional hardware.
    * A series of 12 Lessons on assembly programming that cover I/O, A/D converters, timers, interrupts, and data tables (All source code files are provided)
    * A Debugging Tutorial on using the PICkit 2 as a debugger with the MPLAB IDE (Ch. 4 of the PICkit 2 User’s Guide)
    * Getting Started in C tutorial on developing and debugging in C with a FREE CCS PCM™ Midrange C Compiler Demo* for PIC16F887(contained on the PICkit 2 CD) *2kWord Program Limit.
    * Getting Started in C tutorial on developing and debugging in C with a FREE HI-TECH PICC™ LITE C Compiler with MPLAB IDE
    * FREE! Microchip’s MPLAB IDE software for a complete code development environment

    ----------------Yep. This should get me started--------------

    This powerful yet easy-to-program (only 35 single word instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC® architecture into an 40- or 44-pin package.The PIC16F887 features 256 bytes of EEPROM data memory, self programming, an ICD, 2 Comparators, 14 channels of 10-bit Analog-to-Digital (A/D) converter, 1 capture/compare/PWM and 1 Enhanced capture/compare/PWM functions, a synchronous serial port that can be configured as either 3-wire Serial Peripheral Interface (SPI™) or the 2-wire Inter-Integrated Circuit (I²C™) bus and an Enhanced Universal Asynchronous Receiver Transmitter (EUSART). All of these features make it ideal for more advanced level A/D applications in automotive, industrial, appliances or consumer applications.

    ----------------------------------
    I am going to need a power supply as I would rather the PIC not share the battery that drives the motor. It is a 7.2v and has plenty of work cut out for it just making the car go fast. Initially I think the PIC gets its power off the USB cord.

    I am going to need some relays and some surge eating capacitors.

    I am going to need to drive the relay.

    I'll need hook up wire and a soldering iron and solder and whatever the modern proto kit uses.

    I'll need a light sensor and a way to give it tunnel vision.

    What else??

    Ken

  3. #3
    Join Date
    Feb 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Ken

    I'm not sure what the demo board really is that comes with the PICKIT2. If it has to be soldered, you may want to consider getting a proto or bread board to do your prototyping. This is a board with holes into which you can place jumper wires (which you can buy a box of different lengths already cut and bent) and make connections without soldering Typically, I need to mess around with the circuit to make it work or optimize it. Soldering and unsoldering really impacts my ability to try different things and make progress. I save soldering once the circuit has been fully debugged. Also, I would typically put a voltage regulator IC such as the 7805 to provide clean regulated power to the PIC on the proto board. I also use In Circuit Serial Programming (ICSP) using a 6 pin header that the PICKIT2 plugs right into to program the PIC. I don't want to have to pull the chip out every time to program it.

    I usually break my project up into logical units and test individually. If you are going to control the throttle with the PIC, you could build a circuit to do this and the PWM code to control it. Same for steering, test out servo control with the kinds of inputs you expect. You may find that the PIC cannot actually drive a steering servo with its own power supply. You may have to provide the control signal from the PIC, but provide a separate power supply for the servo.

    Same is true for the light seeking hardware and control software (which will be a bit challenging I think) and your manual/auto relay switching.

    Only when all the pieces work, do I attempt to integrate. Even then, one at a time. Thus you can see the benefit of a proto board without soldering (at least for me).

    You are also quite right to isolate the power for the motor from the electronic control supply. There are big spikes on it and would be very hard to clean up.

    I found an oscilloscope extremely useful in debugging the PWM control circuit and hardware. You can learn a lot about the hardware and software if you can look at the signals.

    You may know all this, and can just wire it up, program it and it will all work. If my approach is different than what you want to do, just say so and I will back away from the keyboard

    Hope this helps

    John
    Last edited by John_Mac; - 20th November 2009 at 01:48.

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


    Did you find this post helpful? Yes | No

    Default Please do not back away from the keyboard

    Professionally I did digital hardware design, prototype, build and ship. That ended in 1973. I was working for CODEX. At that time I was promoted to management. I was that long ago? OMG!

    I did not like management. I stepped down after a few years (we had a parallel salary scale) and went into programming.

    I am now retired. I have forgotten more than I ever learned. I probably would not recognize a modern oscilloscope. Maybe I should go to a flea market to get one made by TI. I haven't seen them yet on Antique Road Show. (A friend of mine in that business mentioned the other day that Heath Kit radios are rising in value.)

    I have some design images in my mind for this RC/autonomous vehicle.
    The modern acronyms are driving me up he wall. I need to get something in my hands soon!

    Ken

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


    Did you find this post helpful? Yes | No

    Default Oops.

    I did not think that Texas Instruments sounded correct when I wrote that last post. They were, of course, Tektronics oscilloscopes that danced to my touch oh those many years ago.

    Ken

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


    Did you find this post helpful? Yes | No

    Default Here I am again - still

    I need acronym help.

    I need to purchase an appropriate DPDT switch. I plan to use this to switch the BWM signal going into the Electronic Speed Control (the driver of the propelling wheels motor) from either the output of the radio control receiver or the output of the PIC.

    Is this the correct set of specs for my proto? I need your judgment on the mounting method. I don't know what the PICkit dictates.
    Signal Relay
    NEWARK Electronics: Part #35K3233
    TYCO ELECTRONICS V23079B1201B301

    Coil Voltage VDC Nom:5V;
    Coil Resistance:178ohm;
    Number of Poles:2;
    ContactsPDT;
    Relay Mounting:PCB Surface Mount;
    Carry Current:5A;
    Coil Power VDC:140mW;
    Leaded Process Compatible:Yes;

    I'm headed over to our local Radio Shack. I am not impressed with the RS WEB page.

    Ken

  7. #7
    Join Date
    Feb 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Ken

    You should download the data sheet for your PIC from MicroChip website.

    Typically the max current any one pin can drive is 25mA, 100mA total for a port.

    So whatever relay you choose must stay below the 25mA level. That is what I told you a while back as a drawback to the relay approach. If you find that you are drawing too much current, you may have to wire up a transistor circuit that drives the current.

    The PICKIT2 programmer wont care how you wire things up (other than how it talks to the PIC), but you will need to connect the PICKIT2 programmer to your PIC, through the 6 pin ICSP header I described earlier.

    Are you going to use a separate proto or bread board as I mentioned???? Or the demo board that comes with it? I suggest the proto board if the demo board requires soldering (as I said before)

    It is very difficult to comment on your questions without a lot more info. You might consider drawing a schematic or something so we are talking off the same page. Also need to know a lot more about what controls you RC truck has on it. Some pictures would help too. Is it a RX with (how many) channels, with standard 3 wire servo cables? Some of the RC trucks have custom electronics to save money.

    If you have a standard setup with 3 wire servo cables, you need to switch the signal wire only (this has the PWM signal on it). The power (red typically) and ground (black typically) can be common to all the components. You will need a common ground for all this stuff.

    Basically, I just don't have enough info to give you specific guidance at this point...but happy to do so if you provide some info.

    Best,
    John
    Last edited by John_Mac; - 20th November 2009 at 23:35.

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