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

    The photocell should work, not sending data, just a simple HIGH/LOW..

    Just in case you do not have the link.
    http://www.picbasic.co.uk/forum/showthread.php?t=5874
    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

    Question I'm not doing well w ith the control toggling light sensor

    I'm not getting my analog voltage comparator act together.

    I want the teacher, at race time, to certify that each car will respond correctly to the bright lights at the beginning and end of the maze.
    The photoresister R/C to PIC toggling threshold should be calibrated per car.

    The PICkit2 comes with a built in pot attached to pin RA0. Each car while being exposed to the bright light could have its pot turned with a long handled screw driver (avoiding shadows) to the point that the car's control toggles.

    This translates to a voltage comparison between the input of RA0 and RA1. The photoresister 10807 reduces its resistance in bright light from 5k down to near 500 ohms If I build a voltage divider with a 5k resistor to Vss = 5V and the 10807 to Gnd and attach it to RA1 will that do the trick? It would give the PIC a swing of about 2V not figuring the input impedance of the PIC.

    I've got a some of questions.

    First, does the above make sense?
    Second, do any of you know some PBP code that does a similar comparison?
    Three, I believe I will need to smooth out noise during the transition as the car comes into and leaves the bright light? How would you suggest I do that?

    Ken

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


    Did you find this post helpful? Yes | No

    Default

    First, does the above make sense?
    Yes.
    Second, do any of you know some PBP code that does a similar comparison?
    I do not have any code but here is how I might try setting it up.
    First add a switch on the car and code for the switch at power-up. Also add a LED for calibration indicator.
    If switch is HIGH then ADC_SETUP routine. The code will go here once and never loop back to it.
    Inside the SET_UP routine have the drive wheels turned off and sub loop reading the ADC from the light and the "calibration" pot.
    Have it coded so when the reading from the light and pot are equal with in a certain amount (exact will be difficult) the calibration LED come on.
    Then when the calibration switch is turned off the code will go to EXIT_SETUP. This routine will save the ADC reading from the pot to EEPROM then goto the main program.
    Now the main program will read the EEPROM to get the value to use for light checking. The reason for EEPROM writing is you will only have to "setup" once and not have to do the setup every time the car is turned on. Maze changes do another SET_UP.
    Three, I believe I will need to smooth out noise during the transition as the car comes into and leaves the bright light? How would you suggest I do that?
    Turn to the students and say "SSHHH"

    Are you meaning light noise? If so this is where the ADC needs to be with in a certain amount so a small range of "bright" light will do the triggering. This partwill take some experimentation for car speed and othe on site variables.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default Learn something new every day..

    I took the car to a TV studio today. It was going to be on Access television. I brought the laptop computer and the USB connector. I forgot the battery charger. The car had not been charged for a couple of days. Big mistake.

    At the beginning it did just as I thought I had told it, but then as time went on it crashed more, got stuck more. I chose not to do the TV shoot. It sort of worked, but not quite.

    I think as the battery discharges, even with the 5volt voltage regulator in the electronic speed control box, everything degrades before it finally refuses to move. I know the DC wheel power motor uses lots of juice

    Sound correct to you all?

    Ken

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


    Did you find this post helpful? Yes | No

    Default

    Sounds correct to me. When the voltage drops below a certain point all kinds of strange things can happen. The PIC ® is probably running "OK" at 8Mhz, but the 5 volt peripherals are probably not happy.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    To be honest I would never use the same power pack to power the electronics. Even when using electric helicopters I would use an RC pack for the receiver, with the main flight pack used just for driving the main motor. 4 x 1.2v Nicads provides a decent supply for the electronics

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


    Did you find this post helpful? Yes | No

    Default I agree with you

    I too initially designed with two battery packs. One for the servos and the other for the electronics. My problem is one of packaging. Getting a cheap kit that fits easily into a HPI Racing Touring Car Ready to Race package is way beyond my expertise. Why the HPI car? That is what I have. Also Ten80 Education

    ( Which I know as http://www.ten80eduction.com)

    specializes in using radio control cars for curriculum and lesson plans supporting STEM in our schools. One of that company's sponsors is HPI Racing. I hope to get ten80 support. One battery is much easier to mount than two.

    I took my car again for a run. It is using the "there is nothing within four feet of me, I must be under radio control" toggling algorithm. I liked the effect. It is important that the room have lots of room. Clearly a gymnasium fits that criteria. Adding the photoresistor system is more than I can deal with at this time.

    Two projects are looming. 1. Get help and advice on packaging (surface mount prototyping). 2. Create a video story board then shoot a video showing what I have built, why I built it, how to modify the code and why I think middle school students will jump to learn.

    I discovered a neat trick today. The studio has a small push cart with roller skate sized wheels. I put my car on the cart (back end facing me - it has no sonar sensor) and pushed it around the maze. I could easily see the reaction of the car to each position. It made very clear that the problems are speed, momentum and reaction time.

    Ken

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