PBP projects for R/C models


Closed Thread
Results 1 to 40 of 772

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Since you will have a Laptop with you, how about getting telemetry data from your car to analyze them? Like echo, steering acceleration/braking.

    Ioannis

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


    Did you find this post helpful? Yes | No

    Red face The code is very simple

    The code is a very simple state machine. I shall post a flow diagram if I can figure out an appropriate CAD tool.

    Can (should?) middle school kids be asked to deal with the uncertainties of the real world? I think this TOY level car demonstrates that ambiguity in an appealing and dramatic fashion.

    The code consists of a set of hardware related constants which need not be changed.

    11 Variable definitions and the following four car behavior constants.

    frontdanger - 12 inches
    stopreversing - 26 inches
    frontfree - 72 inches
    desiredtrack - 36 inches

    A routine that triggers the SONARS and puts the code in a tight loop when the radio transmitter has been turned on.

    Six IF statements. These are each state machines. They evaluate the SENSOR data and tell the wheels what to do. Their labels are:

    CheckIfInDanger
    TryLeftTurn
    TooCloseToWall
    TooFarFromWall
    ReverseOutOfTrouble
    Keepreversing

    At one level all the students need to modify are the constants. At another level they can modify these six IF statements. An advanced student could add more states.

    Ken
    Last edited by Kenjones1935; - 17th December 2010 at 19:08.

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


    Did you find this post helpful? Yes | No

    Smile New video

    It's a race. Which car wins? Depends......


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


    Did you find this post helpful? Yes | No

    Smile What is the next step?

    I suspect a major resistance to getting my robocar into public education is insecurity and uncertainty on the part of the teachers. We are talking about 'how things work' in 2011. My 2004 General Motors automobile contains upwards of 20 PICs. Each tire air valve has a pressure sensor and enough of a computer to maintain a presence on the car's internal wireless network. How did I discover this? I could not make sense of the little tire pressure warning messages on the dash board. A previous owner had rotated the tires. How many public school teachers could explain that in a hands-on way?

    Ever tried to explain to a thirteen year old how a microwave oven works?

    My robocars are very hands-on and available. All the components are visible including the hook up wire. The little cars react dramatically to programming changes. How do I communicate that to adults schooled in Education, not Engineering or Computer Science.

    Ken

  5. #5
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post
    ....Ever tried to explain to a thirteen year old how a microwave oven works?

    Ken
    How Microwave Cooking Works

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Do not under estimate their ability, the kids that is.
    One example.
    http://www.picbasic.co.uk/forum/showthread.php?t=10200

    When YOU take the attitude that something is going to be difficult for someone to learn, then as long as YOU are doing the teaching it will be hard for them to learn.

    Children are much easier to teach new concepts to than adults are. Adults "think" they know how things work. Remember the trouble you had with BASIC? That was because your understanding was based on pre-conceived notions from what you learned in the past. Children will not have that problem.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Cool I certainly do agree about kids learning....

    However, the only way to reach the students in a public school is through the teachers and the administrators. My question is what is the best way to communicate to them. It is a marketing issue. A teach-the-teacher issue.

    Ken

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


    Did you find this post helpful? Yes | No

    Default Re: PBP projects for R/C models

    At high speed, I worry that without some sort of reference point, your car will get "lost". If you add a cheap line sensor, you could add something like a 4" black tape reference point to one of the walls or floor beside one of the 4 walls. How accurate are your sonar readings? Can it measure the room from each corner successfully? If not, then you may need to add a cheap wheel sensor to measure distance. Really both of these would be dirt cheap, but yet add a new dimension to your car finding itself, as well as sensing it's speed. (although you could use your sonar to get speed. It would not be accurate as you turn a corner though. It will think you are going backwards as it senses the wall getting further away)

    Has the "Robotics for Dummies" paper back been published?
    I think it's scheduled to be released right after Pic Basic Pro for dummies.
    Last edited by ScaleRobotics; - 28th February 2011 at 18:21.

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


    Did you find this post helpful? Yes | No

    Lightbulb My latest idea focuses on a hockey rink

    The WEB says that a standard hockey rink is 200' by 85' with curved corners on a 10' radius. Here in Fitchburg we have both indoor ice hockey rinks and outdoor street hockey rinks where the players use roller blade skates. The rinks are bounded by an approximately 4' high solid wooden wall.

    The advantage here is speed is possible; 25mph +- for electric cars well over that for nitro powered gas engined cars.

    I just found a WEB site extolling the 2D IR proximity sensor. Two potential problems - outdoors in bright sunlight and multiple cars. What do you think?

    I did not read the specs for IR sensing. They are talking inches to a few feet. I need at least ten feet, probably more.

    http://www.societyofrobots.com/senso...pirrange.shtml

    Ken
    Last edited by Kenjones1935; - 28th February 2011 at 21:20. Reason: IR too short range

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


    Did you find this post helpful? Yes | No

    Default Re: PBP projects for R/C models

    Hey Ken, I am often caught taking things too literally, so this may just be another case of that. But from the data sheet for the sensor you are using, it says:
    The SRF05 can be triggered as fast as every 50mS, or 20 times each second. You should wait 50ms before the next trigger, even if the SRF05 detects a close object and the echo pulse is shorter. This is to ensure the ultrasonic "beep" has faded away and will not cause a false echo on the next ranging.
    So me taking that literally, since you have two sensors, the best you could get following the data sheet, is every 100 ms. At 20 mph, that's 30 feet per second, or about 3 feet in 100 ms. But maybe 20 mph is a bit fast anyway.

    At that rate, you would only be able to steer the servo's every 5 servo pulses, before you got new information from the sensors. But looking on the bright side, you would have time for 500,000 instructions to chew on the data you collected.
    Last edited by ScaleRobotics; - 28th February 2011 at 17:45. Reason: actually every 5 servo pulses, you would get new data from sensors

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


    Did you find this post helpful? Yes | No

    Cool Darn! I can't fault your logic.

    Yes, that is what my SRF05 says too. Presently my code has been pinging at about 5 times per second for each SONAR. I can up that rate.

    My thoughts have been that more sophisticated math might give my car better control. I am thinking about mapping - sort of. If the car knows what it is trying to do, where it is relative to the walls and how fast it is going, it may not need so many SONAR pings. I may be just dreaming. I know nothing about classical robot positional and navigational code.

    Hmmmmm.... Suggestions anyone? Has the "Robotics for Dummies" paper back been published?

    Ken
    Last edited by Kenjones1935; - 28th February 2011 at 18:02. Reason: missed a phrase

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