Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp not powering the robot while in the pool (Urgent Help Needed!) — Parallax Forums

Basic Stamp not powering the robot while in the pool (Urgent Help Needed!)

ACKACK Posts: 12
edited 2009-05-08 04:05 in BASIC Stamp
Hello,

I was hoping someone would be able to help me out with this detrimental problem I have been having with the Basic Stamp 2. I have been constructing a Marine Remotely Operated Vehicle over the past couple of months, and I have been using the BS2 to control it. Basically, the set up goes as follows. The Basic Stamp sits in a waterproof container on the vehicle, and is connected to a series of relays, which are then connected to a series of motors and thrusters. The Basic Stamp is connected via a 50 foot CAT5 cable from the ROV to the laptop (USB to CAT5 adapters are used). The code was written so that when a key is pressed on a keyboard, a certain motor is turned on. W, A, S, D, would make the robot go Forward, Left, Back, and Right respectively. The robot works 100% of the time when it is connected to the 50 foot·CAT5 cable and·placed on the lab bench (Out of the water), and the key commands cause the motors to run. The robot is powered by a 12V car battery, and a 8 volt regulator with diodes·make 9 volts·go to·the basic stamp. Though, when the robot is placed into the water, it works for roughly 10 seconds, and then it fails to recognize the commands and seems to have a mind of its own. We have already tested the idea of mutual induction with the power cables, seeing if the magnetic field created by the power wires screw up the communication signal,·and that does not seem to have an effect. We are positively stumped. It obviously has something to do with the motors drawing more current while in the water, but we're not sure how it should effect the basic stamp and the communication protocol. Does anyone have any insight into this particular problem? We already called the parallax hotline, and still were not able to come up with a solution, and we're hoping that the nice folks on the forum will be able to cure our massive headache.

Thank you for your time!

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-05-05 15:52
    You may be getting a brownout. Try powering the BS2 from a separate battery, and see if that fixes things.
  • ACKACK Posts: 12
    edited 2009-05-05 16:01
    Thanks for the quick reply! I also forgot to mention, I can't adjust the length of the wire. It has to be 50 feet. I'm not sure about a brown out in our situation, because the board still runs a program, the motors never cut out and signals are always going to the ROV.·Sometimes the robot will just spin in circles or continue forwards, and just won't respond to any other commands like a "Turn off All". Also, the way the competition is designed, we have to have all power going to the ROV, we can't have any seperate power supplies like batteries.
  • W9GFOW9GFO Posts: 4,010
    edited 2009-05-05 16:09
    The battery is in the ROV right? If you are supplying the power for the motors through the Cat5 then I am sure that could be a problem. You can try a separate battery on the BOE just to test if it is brown-outs or not. Then, you'll have to solve how to fix it for the competition.

    Can you provide more details on the motors you are using and how they are getting power?

    Rich H
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2009-05-05 16:18
    Could there be a conduction path through the motors via the water somehow making it's way back to the Stamp? What does the schematic look like from the motors to the Stamp?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • ACKACK Posts: 12
    edited 2009-05-05 16:24
    Sure thing!

    Basically, there is a car battery sitting poolside. The ROV is connected to the battery using Banana Plugs. A video cable and a CAT5 cable are also running off the ROV, so in total, there are 4, 50 foot cables running off the ROV: Positive Power, Negative Power, Video Out, and the CAT5 cable. All these cables run into a black project box that is submerged in wax to keep it waterproof. Inside this black project box is a circuit board with relays to switch the polarity of the motors, an 8 volt regulator with diodes, and the video out cable. The positive and negative power cables run directly to this circuit board to the 8 volt regulator with diodes, and this causes 9 volts to go to the Basic Stamp, and 9 volts to go to cameras. The unregulated 12V is also run to the relays to power the motors. The motors are connected to the relays via barrier strip. There are 5 motors on the ROV, all of which are bilge pumps. There are two larger bilge pumps on either side of the ROV, each rated at 12 Volts, 1100 GPH, and rated from 2 - 4 amps (depending on whether they are in the water or not). These bilge pumps have been modified with propellers for a boost of thrust. They control the horizontal movement of the ROV. There are 3 smaller replacement bilge pumps located at the bottom to control the vertical movement of the ROV. They are also modified with propellers and are rated at 2 amps, and 500 GPH.

    In summary, the car battery supplies power to the BS2 board, the cameras, and the motors. All the commands work well when the ROV is not in the water, but as soon as there is an opposing torque on the motors, the BS2 freaks out, and won't respond to any commands after like 10 seconds. I know its not water damage, because you can pull the ROV out of the water, and it will work perfectly fine. Its also not mutual induction because we made sure that the power cables and the video cables were seperate from the CAT5 cables. There is no power going through the CAT5 cable, its solely used for communication between the laptop and the BOE.

    Anyone have any ideas on the situation? We're really scratching our heads here.

    Thanks!
  • ACKACK Posts: 12
    edited 2009-05-05 16:28
    There shouldn't be any conductivity in the water, because between the stamp is in a waterproof box. I can try to provide a schematic from one of my team members, but its the relays that are connected to the BOE's output pins, and the commands simply change from High to Low, to change the direction of the relay, and turn the motors on.

    Like I said before, the ROV works PERFECTLY when its out of the water. It responds to all the commands like it should! Its got to be a current drain when there's an opposing torque on the motors, but I'm not sure what that has to do with the board, and how I can fix it, because the car battery SHOULD be able to supply enough current.

    Thanks!
  • ManetherenManetheren Posts: 117
    edited 2009-05-05 16:34
    It would be cool to see a schematic and pics of this once it is finished. What are the regulators current supposed to be at for the most draw, when it is in the water it could be overdrawing the current to the motors or pumps and causing a brownout on the basic??

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tia'Shar Manetheren
  • ACKACK Posts: 12
    edited 2009-05-05 16:40
    The ROV is all finished! Diagrams and pictures will follow soon. We're just scratching our heads at this massive communication issue.
  • W9GFOW9GFO Posts: 4,010
    edited 2009-05-05 16:47
    ACK said...
    There are 5 motors on the ROV, all of which are bilge pumps. There are two larger bilge pumps on either side of the ROV, each rated at 12 Volts, 1100 GPH, and rated from 2 - 4 amps (depending on whether they are in the water or not). These bilge pumps have been modified with propellers for a boost of thrust. They control the horizontal movement of the ROV. There are 3 smaller replacement bilge pumps located at the bottom to control the vertical movement of the ROV. They are also modified with propellers and are rated at 2 amps, and 500 GPH.

    Bilge pumps typically have a small impeller running at high rpm. When modified with a propeller (larger diameter) it may be drawing far more amps than it's rated for. Have you tested the amp draw of these motors when they are under load?

    What size are the 50 ft power cables? If not large enough there can be a significant voltage drop - leading to brown out.

    How does adding diodes to an 8 volt regulator give you 9 volts?

    Rich H
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2009-05-05 19:04
    ACK,

    Try placing a 1K resistor from the ATN (Pin3) to VSS (Pin4) on the BS2.... This will help reduce false resets due to noise with long (antenna) programming cables left intact.

    My suspicion is that the higher load on the motors under water causes them to effectively become "bigger" inductors making and breaking across the contacts in the motor armature. This is probably causing voltage spikes that are resetting the BS2 causing it to not function properly... and/or those spikes are causing the data being sent from the laptop over the 50foot length to become corrupted by the time the BS2 reads the data.

    I would mainly focus on to things:
    What kind of error checking are you doing in software?
    ...and what kind of power filtering do you have for the BS2

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2009-05-06 02:13
    ACK--

    I don't think you mentioned if you are using the SAME cables when you bench-test. Additionally, couldn't you rig up a bench-test using the same cables with the ROV in a water-filled container?

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-05-07 15:53
    It is very easy to determine if the BASIC Stamp is restarting for some reason. Simply put in an eveny that runs only at the beginning of the program and see if it keep doing that. Usually this is a DEBUG message saying something like, "PROGRAM RUNNING". However if you're aren't connected to a PC you could just turn an LED on for 1 second or do something similar.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • ACKACK Posts: 12
    edited 2009-05-07 16:01
    Thank you all for the helpful replies!

    I am using the same cables as the bench test and in the pool. I know for a fact that the basic stamp is restarting itself, we do have the debug message running. It only restarts itself when its been in the water for a while. What could be causing the restarting? Are the motors drawing too much current and turning off the stamp?
  • FranklinFranklin Posts: 4,747
    edited 2009-05-07 17:34
    ACK said...
    What could be causing the restarting? Are the motors drawing too much current and turning off the stamp?
    It could be that or noise caused by a heavier load on the hardware. Try adding a local battery pack for the stamp and filtering on the stamp input lines.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • ACKACK Posts: 12
    edited 2009-05-08 00:01
    Hi,

    Thank you for all the useful tidbits! That's a great idea, except the competition requires all the power to come from the 12 volt battery on shore. We'll test it with the external battery pack and see what happens!

    Thanks!
  • SRLMSRLM Posts: 5,045
    edited 2009-05-08 04:05
    After you test it with the onshore power supply, you could always add really large capacitors onboard to smooth out the dips... It may take a couple minutes to charge though... [noparse]:)[/noparse]
Sign In or Register to comment.