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

    Smile Wall racers -er SONARs - are expensive.

    The point of my project is communicating "how things work" to pre-teens.

    Examples of today's difficulties: My Mom's natural gas powered oven was obvious. Ever try to explain a micro-wave? Souping up a car in my day included high lift cams, carborator changes, tuned straight through pipes. Today the first thing you do to hop up a car is change a computer.

    The dashboard on my 2004 GM car told me: "TIRE Pressure LR 23psi LOW". It also said, "TIRE Pressure RR 28psi OKAY". I pumped up my left rear tire. Then the car told me,"TIRE Pressure LR 23psi LOW" and "TIRE Pressure RR 33psi OKAY". WHAT??

    The garage mechanic told me each tire valve contains a pressure gauge and enough of a computer to maintain a connection to the car's internal wireless network. A previous owner of my car had rotated the tires. The mechanic also told me that my car, depending of accessories, carries some twenty computers.

    It seems to me that the first question in the mind of a future STEM professional is, "How does this thing work?"

    Ken

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


    Did you find this post helpful? Yes | No

    Default success with the model level car.

    Today at the gym I got two speed levels to negotiate the wall racing. I have divided my POT's full motion into six steps, 0 - 5. 0 is slowest. 5 is fastest.

    Today speed 0 and 2 worked fine. Speed 5 crashed a bit. This evening I increased the proportionality multipliers relating POT position to distance thresholds.

    If I can get this car up to speed, imagine racing with more than one on the track.

    Ken

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


    Did you find this post helpful? Yes | No

    Smile New video with some details

    I've added a new video to youtube.



    Check it out and please give me your advice. I think the car is not responding as fast as it can. I can list an abbreviated version on my code. I may have some fundamental incorrect.

    Ken

  4. #4
    Join Date
    Nov 2005
    Posts
    51


    Did you find this post helpful? Yes | No

    Default

    Hi Ken
    I've been watching and reading this thread with great interest and I've got to admire and take my hat off to you for your persistence. Don't give up your nearly there.
    Have you used interrupt's in your code ?
    If you have not may be the pic cannot proeccess the comamnds quick enough to repsoned. having watching some other video clips they seem to responed really quickly travelling at high speed.
    I was thinking of trying my Nitro car but I think that would be to fast.

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


    Did you find this post helpful? Yes | No

    Default No interrupts in my code

    chuck et al,

    My code has no interrupts. It loops through poling the sonars many times per second. They flash a red led when poled. This is visible.

    I use HPWM to generate the controlling signals. This is a stretch. The spec calls for one pulse each 20 msec. With the standard oscillator the PIC can't go that slowly. I learned what works by trial and error.

    When controlling the car using R/C I can make it behave at faster speeds than the PIC can. Why? It might be that the feed back loop through my eyes and fingers is inherently better. My PIC code only works with distances. My eyes and brain work with distance and rate (of closing speed and steering).

    Want to see some code?

    Ken

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


    Did you find this post helpful? Yes | No

    Default One other thing

    I have been wondering whether the HPWM code starts fresh each time it is called. My system calls it after every SONAR poling. This is many times per second. Could it be that each time HPWM is called it pulls the output pit down in order to create a new pulse stream and in so doing screws up the pulse stream it had been sending.

    Ken

  7. #7
    Join Date
    Nov 2005
    Posts
    51


    Did you find this post helpful? Yes | No

    Default

    Ken yes I would like to see some of your code,
    I'm not sure about the HWPM resetting, If I understand correct the pic is monitoring the distance so when it comes close to the object this decreases the HPWM signal ? to reduce spped and turn the wheels at the same time ?
    Are you sure that the pic to calaculating the distance fast enough to react with the object ?

    I would say that interrupts would be able to act faster than the standard code. it would be nice if you could see how fast the HPWM command is reacting or so fast the pic is processing the data fast enough from the SONAR's

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