PBP projects for R/C models


Closed Thread
Results 1 to 40 of 772

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default I think this ESC is different

    I agree with both of you on the size, shape and frequency of standard PWM signals. I have been running my car (an older version of this same HPI Sprint) successfully for the last couple of months. With the exception of frequency my HPWM pulses agree with your specs. I found the correct HPWM commands by trial and error.

    This new Transmitter, Receiver, ESC combo is different. Leaving out my PIC for the moment if I on the radio transmitter I give full forward (trigger full back) and suddenly go to full reverse (trigger full forward) the car goes from full forward to stop (neutral in the PWM sense) and stays there until I bring the trigger to neutral for at least two seconds. Then giving it full back will work fine.

    Somewhere in the system is protection against slamming the DC motor with reversed polarities. That is good, but when I tried to emulate that system in my code it did not work.

    Thank you sooo much for your support and interest. Oh, yes, the electronic speed control wheel driving system is not a classic servo. Steering is. Wheels used to be - in the day - but no longer.

    Ken

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post
    Leaving out my PIC for the moment if I on the radio transmitter I give full forward (trigger full back) and suddenly go to full reverse (trigger full forward) the car goes from full forward to stop (neutral in the PWM sense) and stays there until I bring the trigger to neutral for at least two seconds. Then giving it full back will work fine.

    Somewhere in the system is protection against slamming the DC motor with reversed polarities. That is good, but when I tried to emulate that system in my code it did not work.
    Ken
    Well, that's a completely different problem than what I thought you had. Why not talk to your friends at the R/C store and find out if they know of any controllers that let you go reverse from full forward. If they do, sell the controllers you have on Ebay, and buy the ones you want with the money?

    You might also be able to hack the speed controller if it is for a brushed motor. But you run the risk of breaking a $55 speed control. You could also build your own controller for a brushed motor, but easier to find one off the shelf that will do what you want, if it exists.
    Last edited by ScaleRobotics; - 29th July 2010 at 18:20.

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


    Did you find this post helpful? Yes | No

    Default Yea, but...

    I have been successful in attracting some support for my project. Check out
    http://www.ten80education.com

    They use HPI Sprint cars.
    If I can design a 'simple' enough PIC kit to add to the standard HPI product, the schools might get a pretty good deal. My new car was a support gift cost me nothing.

    Ken

  4. #4
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post

    This new Transmitter, Receiver, ESC combo is different. Leaving out my PIC for the moment if I on the radio transmitter I give full forward (trigger full back) and suddenly go to full reverse (trigger full forward) the car goes from full forward to stop (neutral in the PWM sense) and stays there until I bring the trigger to neutral for at least two seconds. Then giving it full back will work fine.

    Ken
    Electronic braking system. - You might be able to go into the programming mode and disable this function.

  5. #5
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c View Post
    Electronic braking system. - You might be able to go into the programming mode and disable this function.

    Uhmm maybe that's not an option. I can't see anything on programming the end points on this controller

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


    Did you find this post helpful? Yes | No

    Default Just got back into town...

    OKAY,

    I have discovered through the use of my oscilloscope that PAUSE stops the HPWM output pulses. In order to emulate the radio system I want to try giving the ESC two seconds worth of neutral PWM between switches back and forth between forward and reverse. This is a race car. It will not be going backwards very often, but it is necessary sometimes. Looks like I need to figure out how to set a two second interrupt. Hmmmm. NUTS!

    Ken

  7. #7
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post
    I have discovered through the use of my oscilloscope that PAUSE stops the HPWM output pulses.
    Hey Ken, welcome back to town.

    Do you mind posting some of your code for us to figure out what is going on? The HPWM command, or using the CCP hardware PWM with your own commands should both work independently of your code. I have a 2 second pause that is repeated, but HPWM keeps pumping out pulses the entire time. But if I repeatedly call HPWM and set it using PBP, it can give me some screwy results. Probably better setting the registers directly, like Bruce shows in this example: http://www.picbasic.co.uk/forum/show...1478#post61478

    What PIC hardware are you using?

    Thanks,

    Walter
    http://www.scalerobotics.com

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


    Did you find this post helpful? Yes | No

    Red face I'm using a 16F887

    Here is the first couple commands of my code. I deliberately start HPWM then PAUSE for four seconds. My oscilloscope shows a flat line for four seconds then springs in PWM action.

    I just looked at it again. I am no longer as certain as I was. Once I get into my code it seems to behave as I expect. I'll get back to you all tomorrow.

    Thanks, Ken

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


    Did you find this post helpful? Yes | No

    Default Here's some code.

    The outputs of PORTC.1 and PORTC.2 are high all the time.
    Why? In other code snippets PAUSE seems to allow action to continue. I hope you guys see that I am being stupid.

    Code:
    ' PORTC.0 'High is R/C.  Low is PIC control
    TRISC = %11110000
    
    main:
    low portc.0
    gosub straightforward
    pause 4000
    goto main
    end
    
    StraightForward:
    pwm 1,120,50
    pwm 2,120,50
    return

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. PBP Extensions, What are they?
    By PJALM in forum PBP Extensions
    Replies: 9
    Last Post: - 28th September 2021, 11:26
  3. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  4. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30
  5. Making PBP code more modular
    By forgie in forum General
    Replies: 30
    Last Post: - 25th October 2005, 16:24

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts