Brand spanking new to this. . .
Mongojerry_2
Posts: 15
Ok. An acquaintance suggested Parallax stuff might be able to accomplish what I want to do. So I started to check it out. I made it through medical school and beyond but I'm completely baffled by this. Can anyone help?? I suspect what I want to do is pretty simple but then again, maybe not.
I'd like to be able to program one of these devices as the controller for a small electronic device (a small vibrating device such as that used in silent pagers). In the simplest form of my idea I'd like to be able to program the device, originally controlled by a small battery pack, to turn on for 30 seconds and then off again every 30 minutes. My ideas get more complicated from there but that's a good starting point. Can I do that? How would I attach the electronic device to the new controller? What about battery power?
Post Edited (Mongojerry_2) : 3/1/2005 8:06:30 PM GMT
I'd like to be able to program one of these devices as the controller for a small electronic device (a small vibrating device such as that used in silent pagers). In the simplest form of my idea I'd like to be able to program the device, originally controlled by a small battery pack, to turn on for 30 seconds and then off again every 30 minutes. My ideas get more complicated from there but that's a good starting point. Can I do that? How would I attach the electronic device to the new controller? What about battery power?
Post Edited (Mongojerry_2) : 3/1/2005 8:06:30 PM GMT
Comments
battery is not an issue with basic stamp as it can be powered by a 9v batt. but, what type of devices you want to control? voltage, current requirements, etc?
if you give us more details you would be able to help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
The full extent of what I'd like (and I'd take even a fraction of my overall dreams) is to supply potentially varying intensity (though I'd like to be able to set it to vary the intensity or not) and duration of activation at varying intervals, with each variable determined randomly--for example the burst might come anywhere from 5 to 30 minutes after the last one (and the best would be that these limits would be adjustable by me, or at least have a few different "programs" from which to choose) and range in intensity from barely there to full force and range in duration as well (again programmable would be best, say from 10 seconds to 30 seconds or perhaps a full minute). Lastly·I'd love it to·have the ability to be paused on the fly without losing its settings but without the possibility of inturrupting an activation in the middle (in other words the timing program can be paused between activations only).
Perhaps it could have a feature that could be activated·during any given use session or not (or included in some available "programs") that would include a small chance (very small? Moderately small?) of a more sustained (like 5 minute) high intensity vibration Maybe an even smaller chance of an even longer setting.·But ultimately it's the basic idea I'm after--short duration long interval teasing pulses at either predictable or somewhat variable intervals.
·
You could use dip-switches to program the interval/mode that you want to operate in.
I believe most pager motors (I'm generalizing) run on 3Vdc...or 1.5Vdc....the smallest voltage you can get away with will let the motor last longer.· Go too high a voltage and it'll spin like mad, sure, but will die sooner than you'd like.· Sort of like a doctor telling me I need more exercise...I explain to him I have a finite number of heartbeats...so to sit still and do nothing will mean a long life!! haha
It's like this: "everytime I get the feeling to exercise, I lay down until it goes away!"
Sorry....working on my standup routine! [noparse]:p[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Geordi: "It's like the laws of physics went right out the window!"
Q: "And why shouldn't they, they're so inconvenient!"
Geordi LaForge, Chief Engineer, USS Enterprise, NCC 1701-D
Q, Omnipotent Prankster
What about variable programs--for example a switch position that would mean 5-30 seconds every 5-30 minutes with a small random chance of 5 straight minutes? Could I set the likelihood on that occurance (for example a 1/100 chance checked for once every 2 hours)?
Let's just say I want to set a program running and give the device to someone else. Could I have an override switch/button included so that person could pause the program temporarily? Could I have that button functional only during a dormant period but not during an activation already in progress?
Stream of consciousness questions follow: What would I need to do to design all this? (I'm motivated enough to learn but I wonder--could I perhaps pay someone to design the device for me?) How durable would the device be once set up? How big/heavy is it? Could I put it into a clip on casing such as an empty pager box for example? What would I purchase to do all this? What does it take to connect it to the pre-existing silent alarm electronic device? Someone said these things are powered by 9-volt? If I try it out at 1.5V and decide I really need 3V could I change that?
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Geordi: "It's like the laws of physics went right out the window!"
Q: "And why shouldn't they, they're so inconvenient!"
Geordi LaForge, Chief Engineer, USS Enterprise, NCC 1701-D
Q, Omnipotent Prankster
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Geordi: "It's like the laws of physics went right out the window!"
Q: "And why shouldn't they, they're so inconvenient!"
Geordi LaForge, Chief Engineer, USS Enterprise, NCC 1701-D
Q, Omnipotent Prankster
Basically, on startup, the unit would go read the status of those switches (on/off) and decide from there what it should do.
So with your stamp you could use some dipswitches to set it's running state.· So, if you want it in mode 1, then flip the first dipswitch.
Then in your program you would have your program look to see what that switch is doing.
To be honest....although you are starting properly (baby steps) you really should take a gander at some of the literature that Parallax provides...which just so happens to be free!!· The first manual ppl will tell you to look at is the "What's a Microcontroller" text.· It gives you some ideas on how to connect switches and such to a stamp and how to begin programming.
Guys can drop a quick bit of code and tell you how to hook it up....but that doesn't help you understand how it works....OR, when it' stops working, how it's supposed to work so that you can troubleshoot it!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
You would essentially have the stamp read the status lines upon startup and run the appropriate block of code.·
If you wanted to change the MODE that it runs in....then just change the switches and reset the stamp and it'll reread the status lines and run the appropriate block of code!
As far as being able to turn it off or disable it....you could have the stamp look to see if ANY dipswitches are set high..or low...and not do anything.·
As far as the contruction....to do your demo project...get the BS2 and the Board of Education (BOE demo board).· I don't remember the name of the kit....but this will give you a quick setup so you can start playing.· Now, this stuff isn't small by any means....you could get the interpreter chip (one of those ICs on the stamp itself) and build your circuit around that....but I won't comment on how easy or hard this is!).· Even if you worked with just the Basic Stamp 2 footprint, you may have troubles fitting it in to a pager case!· It might be slightly bigger....depends on the motor size and how you have the dipswitches in there.· You'll definately want to put the stamp IC in a socket of some sort so you'd be able to easily pull it out and pop it in your BOE for reprogramming!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
First, let me say welcome to a great community and source for good information on how to work with the Basic Stamp.
It is always good to see newcomers with enthusiasm and great ideas.
The Stamp is eminently capable of doing what you want .
Now, let me second Steve_b's last posting suggesting that you explore the lessons in What's A Microcontroller with a BOE on the table in front of you. Before you can benefit from code or wiring diagrams or construction hints offered in this forum, you will need to be a little familiar with the language and techniques of both programming and electronics. Please don't misunderstand me; I am not discouraging your questions or exploration here, I encourage that. Just realize that when you ask " How would that work? (Remember, I know absolutely nothing.)" it is akin to me asking you to explain to me the process of operating on Steve_b's useless appendix [noparse]:)[/noparse] . If I don't have a firm grounding in basic anatomy, medical terminology, the tools of the trade, and medical procedures, a lot of your efforts will be wasted.
The Basic Stamp is one of the simplest and most user friendly microcontrollers on earth. But it is still a microcontroller which means that it is intended to control other electronics through proper interface circuitry. A well designed system is a synthesis of sound logical program design working in harmony with electronic components that are selected to operate within the current and voltage parameters of the Stamp and the devices it is controlling. The processes and technique of actual construction is another layer of skill on top of that. When you are given a pointer such as "You would essentially have the stamp read the status lines upon startup and run the appropriate block of code," you need to have enough basics to translate that pointer into code and try it on a breadboard or the suggestion won't be valuable.
Give yourself some time to learn the basic operation of the Stamp, a little basic electronics, some of the relevant PBASIC commands, component identification, breadboarding, soldering. Ask questions, scour these archives, and you will soon see the potential of the Stamp and you will have a much more fertile basis on which to make decisions about how you can do what you want to do. I teach a college class every semester that covers basically what "What's a Microcontroller" covers. It takes the students at least that much understanding before they begin to synthesize their knowlege and can really benefit from forums like this.
Sorry for the long post, but I tend to wax philosophical about the process...I'm a teacher and I love what I do.
Best wishes,
-Bruce
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Name: Bruce Clemens
Work:· Clemensb@otc.edu
Good Stuff on my Bolg: http://theDeadBug.journalspace.com
I·think if I could envision how that would go I would have a pretty good sense of how to learn to design the programming I have in mind.
Several people here have mentioned dipswitches. I understand how that would work but how do the switches get onto the unit? I may suddenly learn this programming language but I'm not likely to suddenly learn soldering.
How long would the 9v be likely to last doing what I've described? I'd like it to run for hours at a time, spending the bulk of its time counting and checking the state, perhaps, of a few random numbers, intespersed with short bursts of activating the vibrating unit I'm envisioning.
I'm glad you're taking the time to go through the manuals....there are many pages and I know the urge just to flip to what you need and get on with it....but each page is one more page you didn't know before!
The dipswitches act like any normal switch.· Just that these ones are in a nice small form for small devices.
Basically you would tie one end of the switch to +5V then through a resistor (unsure of value) then in to a stamp pin.
When the switch is closed, you will have that +5V on that input, so when you tell the stamp to 'look' at that pin, it would see a logic value of 1.· When the switch opens, you drop to 0V and you get a logic value of 0 on that input.· (someone will say that you need to 'pull' the pin to ground when it doesn't have the 5V on it so that it doesn't 'float'....but we can get to that later!
So that's how you might read a switch state.· To operate your motor, you might tell a stamp pin to go "high" which puts it to +5V.· Now, this 5V shouldn't be used to power the motor as it would draw too much current from the stamp....so you might use that 5V to trigger a transistor or a small relay that would trigger the motor to go.· I'm sure this is all in the manuals.· Here's a quick image of how to hook up a relay....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
I use....uh oh....took too many robaxicets!!· ORCAD.· I've used AutoCAd but that's more structural, in my opinion...but I use ORCAD at work and find it to be alright.·
I've used paint in the past just to throw something together.· I've included a quickie that I worked in Micro$oft Paint.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://ca.geocities.com/steve.brady@rogers.com/index.html
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."