PBP projects for R/C models


Closed Thread
Results 1 to 40 of 772

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    All analog servos (not the newer digital ones) use a standard protocol. A pulse width from about 0.9mS to 1.1mS or so, pulsed every 20 mS.
    I was always led to believe it was typically 1ms to 2ms with a 20ms frame rate this gave 1.5ms pw for centre stick, at least that's what I've always based my SSC type projects on.

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

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

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

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

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

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

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

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

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c View Post
    I was always led to believe it was typically 1ms to 2ms with a 20ms frame rate this gave 1.5ms pw for centre stick, at least that's what I've always based my SSC type projects on.
    Edit: oops, yes I meant to say 2.1 as the highpoint, not 1.1. Thanks Malc!

    Hey Malc,
    Yeah, me too! As a basic rule it works. But then I built my first passthrough device, I built it for that range and it got discombobulated when the signals from my transmitter exceeded the 2 mS. My transmitter has endpoint adjustments, so it allows you to go beyond the 1 to 2 mS. Some transmitters will only give 1.1 to 1.9ms.

    Check out the HiTech web site regarding the signals:

    Quote Originally Posted by HiTech
    Q. What signal do servos require to operate?
    A. All Hitec servos require a 3-4V peak to peak square wave pulse. Pulse duration is from 0.9ms to 2.1ms with 1.5ms as center. The pulse refreshes at 50Hz (20ms).
    You are probably right, I just was not sure if a forward and reverse speed control would be centered at 1.5 mS. My planes don't have reverse.
    Last edited by ScaleRobotics; - 29th July 2010 at 16:04.

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