So many things for one basic stamp 2sx to do? Out of variable Space...
AndrewParsons
Posts: 13
Hi all.
First let me share with you my project. I am building a underwater tethered ROV. I am using (or was) trying to use a Basic stamp 2sx to control 6 thrusters (brushless drills) with 6 HB-25 Motor Controller. As for sensors I have humidity, temperature, xyz accelometer and leak detection.
I was using 2 stamps to communicate over rs-485 from the surface to below. This was done using two RS-485 Transceivers. I have found this to be a horrible and slow way to communicate.
Anyways, I consider myself one step above a newb, I have thought myself Basic and about microcontroller using Parallax's stamp in class.
The main problem I am having is I am running out of variable space on my Basic Stamp 2sx below water level.
I have trimmed the code as much as I can trying to reduce WORD variables as much as I can. Could anyone point me in the right direction? I am looking to move to similar setup with more than 32kb of program space so i have plenty of room to expand my project.
I guess my question is more of a plea for suggestions. I would like to increase my variable space and/or move to a setup that I am already familiar with that has more variable space (Like Basic Stamp2)
I looked at the prop but programming in C looks greek to me, and I find the training is nowhere near as straight forward as Stamp in class.
Thanks in advance
and sorry for the newbness
Andrew
First let me share with you my project. I am building a underwater tethered ROV. I am using (or was) trying to use a Basic stamp 2sx to control 6 thrusters (brushless drills) with 6 HB-25 Motor Controller. As for sensors I have humidity, temperature, xyz accelometer and leak detection.
I was using 2 stamps to communicate over rs-485 from the surface to below. This was done using two RS-485 Transceivers. I have found this to be a horrible and slow way to communicate.
Anyways, I consider myself one step above a newb, I have thought myself Basic and about microcontroller using Parallax's stamp in class.
The main problem I am having is I am running out of variable space on my Basic Stamp 2sx below water level.
I have trimmed the code as much as I can trying to reduce WORD variables as much as I can. Could anyone point me in the right direction? I am looking to move to similar setup with more than 32kb of program space so i have plenty of room to expand my project.
I guess my question is more of a plea for suggestions. I would like to increase my variable space and/or move to a setup that I am already familiar with that has more variable space (Like Basic Stamp2)
I looked at the prop but programming in C looks greek to me, and I find the training is nowhere near as straight forward as Stamp in class.
Thanks in advance
and sorry for the newbness
Andrew
Comments
The usual way to deal with running out of variables is to re-use them in different parts of the program.
With 8 program slots available and the scratchpad space, the project you describe should fit into the BS2sx. You didn't include your code so its hard to make concrete suggestions.
I'm a bit surprised at your poor luck with RS-485. If the proper handshaking is taking place between the surface controller and the submerged unit, you should be able to have a system able to control the ROV in real time.
Also, just for clarity, what is a "brushless" drill that can be controlled with an HB-25?
Cheers,
Thanks for the help... could you explain in simple code how one would re use a variable and use the scratch pad with rs-485. This is beyond the scope of what i have learned thus far with Stamp in Class. Also to clarify I wanted to use my HB-25 for my drills, from your comment i have looked into the matter and see this is not an option. I can use bielge pumps for thrust or use oil filled thruster with regular 12v dc drill motors.
That would have sucked dropping all that money on brushless drills. lol Thanks.
I have already spent the money on the six HB-25, mainly because i can get away with only using 3 pins to control them all.
I look forward to your reponse.
Andrew
The BS2 code (one program) was tasked with the motor control on a remote control barge used in water quality testing. It used a standard r/c radio for inputs and controlled two drive fans to move the barge. It also could operate a water sampler and a winch for lowering the anchor.
The other 6 programs (the one called "master" is loaded into slot 0) were in the BS2sx and it read the instruments serially then used a data radio to send the information back to the shore based computer. The same code would be used whether you used rs-232, rs-485, or data radios, as I did.
Cheers,