PBP projects for R/C models


Closed Thread
Results 1 to 40 of 772

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

    Darn,
    I thought the SRF05 was the same thing as the PING. Now I see that the SRF05 takes a different trigger pulse.

    So it looks like I just wasted your time on that part.

    I guess on the good side rmteo noticed another possible problem.

    I wonder if a While/Wend loop using PWM would be the answer?
    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 PWM per Electronic Speed Control specs.

    Originally Posted by Kenjones1935 View Post
    The Electronic Speed Control wants this PWM signal to arrive at 50 hz.

    I was not clear in my last posting. The Electronic Speed Control PWM specification is for a single positive pulse no less than 1ms and no more than 2ms once per 20 ms, ie 50 pulses per second. The one to two millisecond pulse width is divided into 256 parts. 1.5 ms corresponds to 128 which corresponds to neutral in a servo.

    Neutral is steering straight on a steering servo. Neutral is stopped on a wheel driving servo.

    I discovered that using HPWM with the 4mhz default oscillator a pulse width of 100 to 110 gets the behavior of 'neutral' on my car. For example "HPWM 1, 100, 50" turns the front wheels of my car to straight. See the attached picture. Channel 2 is the HPWM version of neutral. Channel 3 is what the radio receiver sends.

    Ken
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Talking Progress - er, at least using my head.

    I have found a way to make short, 10 to 80 usec pulses while using the 4mhz oscillator. The SRF05 proximity detector wants at least 10 usec. If I give it super long pulses catching the following echo measurement can be a problem for PULSIN.

    Sooo the following makes an 80 usec positive pulse.

    SYMBOL trigright = PORTB.0
    LOW trigright
    HIGH trigright
    HIGH trigright
    HIGH trigright
    LOW trigright.

    One thing at a time.

    Ken

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


    Did you find this post helpful? Yes | No

    Question speed is elusive.

    I now have the sonic ping devices (SRF05's) flashing continuously. There is no blockage in the PIC's processing.

    Now the car is reacting too quickly. There is a bit of code that used to guarantee a 1/2 second backing up when backing up was necessary. Now the count down for this delay is instantaneous. While turning a corner the proximity sensor data gets confusing. Both the side sensors and the forward sensors are hearing important echos. I might need to adjust the positions of the two SRF05's or write some code especially for that situation. I am not sure - elusive. Like I said.


    Ken

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Hope you are not activating both sensors at the same time, right? Be sure to give some time for the echo to decline enough before confusses the other sensor.

    Ioannis

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


    Did you find this post helpful? Yes | No

    Cool No, but I never thought about echoing echos

    I've added a PAUSE of 1/10sec between the front trigger and the side trigger. This noticeably slows down the flashing of the LEDs on the SRF05s. In the audible range I can easily hear echos in a room. I have no experience with ultra-sound in the range that the SRF05 emits. The spec shows a time line in which the pulses seem to be a square wave of 2usec cycles. That is a little burst of 500,000 cycles per second sound that appears to last about 20 usec.

    This little project keeps gets interestinger and interestinger!

    If there were five cars racing near each other on this gymnasium track, would their SRF05's get confused. I don't think so, but I am not sure....

    Ken

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post
    If there were five cars racing near each other on this gymnasium track, would their SRF05's get confused. I don't think so, but I am not sure....
    They SURE would. That is what I noted on my previous post. Your sensors are hearing echoes that keep coming long after the transmission stopped. No matter which of the SRF05's did the transmission. Keep note of that.

    Maybe an IR sensor would be more appropriate here. Also faster.

    Ioannis

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 : 0

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