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

    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 02:48.

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

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

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

  5. #5
    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; - 21st November 2009 at 00:35.

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


    Did you find this post helpful? Yes | No

    Default My RC car has one motor and one servo

    John,

    My RC hobby level car has one powerful motor and one servo. The motor drives both the front and the back tires. The servo positions the steering. The RC has three channels. One is not used.

    I do not know how to draw a circuit diagram on a computer. What application do you use?

    You mentioned a six pin ICSP header. I have no idea what that is. Wikipedia says, "Most PICs that Microchip currently sell feature ICSP (In Circuit ... special headers ". I can not picture that. I am acronym deprived.

    I got an email from Microchip today telling me that my order has been shipped. I will wait for it to arrive then go to Radio Shack to see what they sell that looks like what I got. The man there seemed very helpful.

    I plan to switch between the two PWM signal aimed at the ESC. Not the power to the motor.

    I am concerned about the power because the radio receiver on my car gets its power from the 7.2volt battery via the ESC. I do not want to power the PIC from that source. A common ground is no problem.

    You wrote:
    "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."

    I do not want the power to be common to all components. I want the PIC to have its own supply. Yes, it is the white signal line into the ESC that i wish to switch, but that implies common power.

    What application do you use to draw a circuit diagram?

    Ken

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


    Did you find this post helpful? Yes | No

    Default I get 28mA at 5 volts

    John,

    My calculation for the amperage into the TYCO V23079 DPDT switch is 28mA at 5volts.

    The spec says that the coil resistance is 178ohms. Isn't that close enough since this is not counting the output resistance of the PIC port.

    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