Shop OBEX P1 Docs P2 Docs Learn Events
firefighting robot — Parallax Forums

firefighting robot

amse2008amse2008 Posts: 7
edited 2007-03-13 23:50 in BASIC Stamp
Hello everyone,

I've been working on a BASIC Stamp 2 project, and I'd like some feedback.
The goal is to create a robot that navigates a maze (4'x6' with 1' halls [noparse][[/noparse]approx.]) and searches for candles and puts them out.
I am using a Parallax digital thermometer, ping ultrasound sensor, and a few Parallax servos, as well as a CO2 pump that is operated by a servo.
Attached is my code, which is limited mostly by the number of variables available. I have attempted to compartmentalize the code to simulate lower-level programming languages' functions.

If you have any questions or comments, don't hesitate to contact me on the forum, or via amse08@gmail.com. I'm looking forward to seeing what you guys have to offer.

Comments

  • amse2008amse2008 Posts: 7
    edited 2007-03-10 21:01
    Attached is an updated version that I have tested more fully. The navigation works, but I haven't plugged in the digital thermometer yet.
    More about the robot: Two servos for differential steering with a third real wheel that rotates 360 like those of a shopping cart for balance. On top of this is a frame with a servo mounted with the rotating part parallel to the ground, which is the head. It rotates left 90 degrees, then 180 to the right, then 90 to the center. On it is the ultrasound sensor, the temperature sensor, and the CO2 output. Behind this is the Stamp, which is currently powered by a 7.5 Volt DC adapter.


    side view:
    +_==[noparse]/noparse
    O o

    O : servo
    o : wheel
    + : perpendicular servo with ultrasound and temperature sensors and CO2 output
    [noparse]/noparse : CO2 tank/pump
    ==: BASIC stamp 2

    top view:
    ==
    | + |||||[noparse]/noparse
    | + |||||[noparse]/noparse
    ==

    +
    +: perpendicular servo with ultrasound and temperature sensors and co2 output
    ==: servo
    [noparse]/noparse
    [noparse]/noparse: co2 tank/pump
    |||||
    |||||: BASIC Stamp 2

    I'll upload pictures as soon as I get my new camera in the mail. If you need help understanding the code or have any suggestions on improving it, I'm all ears, especially since I'm going to be presenting this to my peers on Wednesday March 14th.

    Thanks to everyone who replied (via email).
  • amse2008amse2008 Posts: 7
    edited 2007-03-13 23:50
    As allanlane5 was kind enough to alert me, I haven't asked any specific questions. With the new code, but still no pictures (I have attached a semi-complete AutoCAD 2007 .dwg of the maze and the robot), I have almost completed this project. The main problem is the fire extinguishing procedure. As everything else works perfectly, when it is wired correctly, I am looking for a way to improve my 'algorithm,' for lack of a better word, for eliminating the fire:
    extinguish:
      s_m_front = 20
      DO
        PULSOUT s_back, 750+20
        FOR s_m_counter = 1 TO 4
          PULSOUT s_front, 750 + s_m_front
          PAUSE 20
        NEXT
        GOSUB get_dt_data
        s_m_front = 0 - s_m_front
      LOOP UNTIL (dt_data <= dt_data_threshold)
    RETURN
    
    

    (quoted from attached file 'current.bs2')
    s_back is the CO2 pump, and s_front is the 'head.' get_dt_data returns dt_data, which is used to determine if the temperature has subsided to room temperature.

    I know this is flawed, but I do not know how else to do it. So, every time this occurs, the head pans back and forth and sprays CO2 at what is presumably a fire. Does anyone have any suggestions as to how to make this better/more precise? I am running out of variables (BASIC Stamp 2-IC "Out of variable space") but I have roughly 70% free memory, so an alternative-lengthy or not-using variables I already have would be nice. I am not used to PBASIC, as it is too high-level, and C/C++/JAVA/ASM, etc. are too low-level and I'm running out of time as well. Plus, the only online examples of a firefighting robot are beyond my level of experience. Any help would be appreciated.

    Thanks,
    Dr. Waters
Sign In or Register to comment.