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

    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.

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

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

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


    Did you find this post helpful? Yes | No

    Default Talk about overwhelmed!

    In order to be able to draw an electronic schematic on this XP based computer downloaded the free version of McCAD Schematics Plus. It comes with a 279 page Adobe Reader Users Guide. I opened the McCAD window. It appears to be totally NOT intuitively obvious. Am I showing my age? Is there a better way?

    Ken

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


    Did you find this post helpful? Yes | No

    Default Attempting to post an attachment

    John,

    I want to see if I can send you a .jpg picture of my first scribbles with McCAD. I just uploaded McCADtest.jpg, Does it somehow get attached to this posting? From viewing the Preview apparently the answer is yes.

    Ken
    Attached Images Attached Images  

  6. #6
    Join Date
    Feb 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Hi Ken

    Sorry to have not been very responsive. I had a mother board fail on my server and have been spending my time rebuilding the hardware and software...fun fun fun.

    Yes I can read the schematic...

    Do you have a digital camera? Sometimes a picture is worth....well you know the saying. I'm still trying to figure out the actual hardware we are dealing with. Don't need hi-res or anything. If you already have the RC Truck, can you tell me the make and model. I could try and look it up.

    You might consider ordering some more PICs too, expecially if you are going to be running at or above max limits on the pin current for the relay. It might work fine, but you may not want to be down for a week if it doesn't.

    On the ICSP and PICKIT2 programmer....think of this as the interface between your PC and the PIC. The PICKIT2 programmer lets you download the HEX files generated by your compiler, as well as set configuration flags etc. It will write and verify that the code was written correctly. That is a very simplified version, but may help. The ICSP feature is just that you can hook the PICKIT2 programmer to your proto board thru this 6 pin header that it plugs into. It lets you program the PIC in place on the board, rather than pulling the chip and putting it on the demo board. The PICKIT2 probably comes with the 6 wire ICSP cable. It will mate onto 0.1" spaced header pins that you can order online or find at Fry's or equivalent. The header wires go to various locations on the board. Some to the PIC itself. The PIC has programming pins that get activated by the programmer, and also power and ground. I will try to dig up a ref to how to wire it, but MicroChip should have it on their site and the pins will be defined in the Data Sheet (be sure to download this).

    Hope this helps.

    John

  7. #7
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile Great project

    Quote Originally Posted by Kenjones1935 View Post
    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
    Hi Guys,

    Great project.

    You could hang a transistor on the PIC’s relay driving pin. The transistor will “amplify” the pin’s current. This is the common tried and true way to drive much “heaver” relays. It is a good tool to learn and put into your tool box.
    http://www.picbasic.co.uk/forum/show...17&postcount=6

    A quick fix might be to drive the 28 mA relay with two PIC pins in parallel.

    Either way, remember to use a suppression diode, directly on the relay coil, to drain any unwanted voltage spikes.

    Keep Trucking,
    -Adam-
    Ohm it's not just a good idea... it's the LAW !

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