What can a BS2 do?
matt167
Posts: 7
Just got a Basic Stamp Homework board/ kit ( early Christmas present ). I'v wanted for a PLC or microcontroller to mess with for a while. What is the limitation of the BS2?
I'm going thru the book pretty quick, but I arleady want to break off and do my own thing.. I have a slight background with programming in Basic, so the coding is pretty easy for me to pick up/ write. Of course their is trial/ error but that's all the fun
What I really want to do, is create an automatic start/stop for my home built gasoline powered Air compressor. I know I need the electric start kits for the engines ( Dual pump setup )..
Would like it to work like this
Push button to override starter system for initial ( cold start )- it would be cool if I could get some form of tach signal so that it knew when to stop. Press the button and wait for the engines to start, but without choke controls, it would take some cranking
Compressor reaches max pressure of say 120 PSI, trips pressure switch on ( or off depending on what type of switch would work better )
Microcontroller grounds out ignition system ( Magneto ) to kill engines. 2-3 second hold time on that circuit would be enough
Pressure drops below threshold
Normally closed pressure switch opens when pressure drops to say 100 PSI
Microcontroller sends power to the start relay and spins the starter to start the Engine. Hold time for a couple seconds most likely
Process repeats- should be 2 separate circuits for both engines
This should be all timed sequences, so not too complex. A Carbon monoxide sensor could be used to shut the system down, but it's not needed. I do want to have a panel with LED's for all functions. engines running, engine stopping, Up to pressure ect...
Any insight as to if this will work with a BS2?
I'm going thru the book pretty quick, but I arleady want to break off and do my own thing.. I have a slight background with programming in Basic, so the coding is pretty easy for me to pick up/ write. Of course their is trial/ error but that's all the fun
What I really want to do, is create an automatic start/stop for my home built gasoline powered Air compressor. I know I need the electric start kits for the engines ( Dual pump setup )..
Would like it to work like this
Push button to override starter system for initial ( cold start )- it would be cool if I could get some form of tach signal so that it knew when to stop. Press the button and wait for the engines to start, but without choke controls, it would take some cranking
Compressor reaches max pressure of say 120 PSI, trips pressure switch on ( or off depending on what type of switch would work better )
Microcontroller grounds out ignition system ( Magneto ) to kill engines. 2-3 second hold time on that circuit would be enough
Pressure drops below threshold
Normally closed pressure switch opens when pressure drops to say 100 PSI
Microcontroller sends power to the start relay and spins the starter to start the Engine. Hold time for a couple seconds most likely
Process repeats- should be 2 separate circuits for both engines
This should be all timed sequences, so not too complex. A Carbon monoxide sensor could be used to shut the system down, but it's not needed. I do want to have a panel with LED's for all functions. engines running, engine stopping, Up to pressure ect...
Any insight as to if this will work with a BS2?
Comments
I'm sure others will chime in regarding your request...but in the meantime, I'd like to steer you to some sources of information that might answer your general question of "what can a BS2 do?"
http://www.parallax.com/tabid/272/Default.aspx
http://www.parallax.com/tabid/440/Default.aspx
And, you may not know that pretty much all the Stamp related manuals are available for download. If interested, goto to www.parallax.com and look in the store. You'll find numerous manuals dealing with all sorts of stuff.
Actually, just perusing the various forums here will give you an idea of its capabilites.
Good success with your project!
I don't use Basic Stamps much myself (you're welcome to ask what I do use and why ), but based on your list of tasks you want the BS2 to handle, I think it should be able to meet your requirements just fine.
I spent some time thinking about a control system for my air compressor.
One item I wanted to do was a compressor performance test. The controller would monitor the time it took to pressurize the air tank.
If the pump "on time" was too long a warning would be given. I also wanted things like a temperature monitor, vibration alert, wireless remote on/ off, hour meter,email notification.
Keep us informed of your progress.
Best regards.
The BS2 is an ideal way to get into control projects. I've used them for many years in industrial controllers and they never disappoint.
The limitations are almost always in the guy doing the programming! There's usually a way to do what you want with a bit of ingenuity.
Over time, you'll develop your own skills to solve the problems as they come up.
I did a similar project on a backup diesel generator. The starting and stopping cycles are the most important. You have to take into account
what happens if the engine doesn't fire up. How do you know it started? I used a sensor on the crankshaft.
Stopping a big engine can take longer than you think. Again, having a sensor to confirm that it really stopped is useful.
The Stamp can do all this with a bit of planning to give you enough inputs/outputs for the external equipment.
Start the project and ask questions as the problems come up. You'll find lots of help here.
Cheers,
The other thing is you need to make sure you've saved your programs properly in a place where you can find them again. You cannot read a program off of the BS2 board back into your computer. That's a fairly common question here on the forums ("how do I...?"), and the answer is "you should have thought of that before you lost the program on your computer". Better to be aware in advance.
And yes, these forums will give you all the support you need. You're in the right place.
A crankshaft sensor was something I was thinking of. I think the hall effect sensor that Parallax sells will work, along with a magnet affixed to the crankshaft pulley.
The engines are not large, just 6.5HP single cylinder Honda clone engines, so they should not take more than a few seconds to shut down, but even holding that circuit for 10 seconds would be ok, sensor would be good too, I just don't know how to make it happen that way.
Main:
Input 8
Input 9
output 10
Output 11
Output 12
Start_Loop:
If In8 = 1 then contact
Goto Stop:
Contact:
High 10
High 12
Pause 3000
Low 10
Low 12
If In9 = 0 Pause 10000 then goto Contact:
Stop:
High 11
Pause 10000
Low 11
Loop
Input 8 would be a compressor pressure unloader/ switch
Input 9 would be a relay closed by the 12v charging system from the engine to sense if it did not start. Work by sending power from the board to pin 5 when that circuit is completed
Output 10 would be for the starter motor ( need extra relay also )
Output 11 would be a ground for the magneto ( also need a relay for )
Output 12 is really not needed, just added it as an example for a possible lit LED while starting.. Could do 3. Start ( Amber ), Run ( Green ) and Stop ( Red ), but I will probably keep it simple and not use them
Any insight? This will be my first Pbasic program not from the " What is a Microcontroller " book, so I expect that at least some is bad code.
You can always use the label stopp: or sstop: I doubt if I'm the only genius who has resorted to that tactic!
And BTW, I like the zippy, upbeat name of this thread. A BS2 can do a LOT even though it's nearly 20 years old! Most people will just say "upgrade to the Prop", but a few of us here enjoy pushing the BS2's limits and showing that it's more capable than some people think. I'm still not sure if Chris Savage of Parallax is convinced that I got a BS2 working as a quadrature encoder at 394 pulses per second: http://forums.parallax.com/showthread.php?121179-Reading-Quadrature-Encoders&p=899765&viewfull=1#post899765
I will test the program with some Led's and switches to verify that it will do what I need of it.. I Think I'm missing some code, but I will have it figured out, because now I have something I know I can work off of. I probably won't touch the actual compressor until spring.
Originally, I had a low pressure sensor and a high pressure sensor as inputs, but I think using the unloader with it's built in on/off switch will be easier, as that is one input, with a mechanical reset based on the pressure
I know, it might seem like a little bit of a hijack but, this is "What can a BS2 do?" The next version should have some extra features that I am hoping are workable with the BS2. Check the Conclusion of the Instructable for some ideas I had at the end of making the first prototype. However, I do have some new ideas that came about from building this latest version. I am excited about working on them. Hopefully, some of these features will make it into the device I plan on submitting to the www.instructables.com UP! Contest. Check it out. There are 10 3D printers up for grabs!