Simple question
Hi, I'm new here. I stumbled across this site after searching for a solution to my problem. My name is Justin and I make custom computers. I won't bore you with everything, but here is what I have to do.
It has to run off of a computer power supply. The speed does not really matter, but preferably it opens as fast as a servo spins.
Basically it needs to open a door 90* when i turn the switch to "on", as well as turn a fan on. When i hit the switch to "off" it needs to turn -90* to its original position, and turn the fan off. In either situation it needs to turn off after its motion, basically it needs a timer. A timer would have the servo on for X amount of seconds, then when its closed or open, it turns off. I really do not care which way this has to be done, however the smaller the better. I'm open to anything. I have purchased a large assortment of switches from RadioShack including feeler, toggle, and pot. I was thinking of having the servo hit the feeler switch as it hit my desired angle to turn it off, but then i wouldnt be able to have the servo reverse unless i had a reverse polarity switch of some sort?
There has to be a better way!
I've tried lots of things and I'm decent with electronics, but this stuff goes above me. Any help would be awesome! I'd be glad to help anyone with computer problems in return.
Thanks,
Justin
It has to run off of a computer power supply. The speed does not really matter, but preferably it opens as fast as a servo spins.
Basically it needs to open a door 90* when i turn the switch to "on", as well as turn a fan on. When i hit the switch to "off" it needs to turn -90* to its original position, and turn the fan off. In either situation it needs to turn off after its motion, basically it needs a timer. A timer would have the servo on for X amount of seconds, then when its closed or open, it turns off. I really do not care which way this has to be done, however the smaller the better. I'm open to anything. I have purchased a large assortment of switches from RadioShack including feeler, toggle, and pot. I was thinking of having the servo hit the feeler switch as it hit my desired angle to turn it off, but then i wouldnt be able to have the servo reverse unless i had a reverse polarity switch of some sort?
There has to be a better way!
I've tried lots of things and I'm decent with electronics, but this stuff goes above me. Any help would be awesome! I'd be glad to help anyone with computer problems in return.
Thanks,
Justin
Comments
Have a look at the downloadable book What's a Microcontroller? <http://www.parallax.com/detail.asp?product_id=28123> for information on using Stamps for this kind of task.
Look at this link for information on the Prop-1 <http://www.parallax.com/html_pages/products/boards/efx.asp>
Thank you for your reply, I will check those sites out right now!
thanks for your help and quick responses, i appreciate very very much!
You will need to parallel two of the outputs of the Prop-1 to handle the current for the fan ... no big deal.
You will need a servo motor for the door, mounting hardware, and maybe some piano wire to go from the servo motor to the door itself.
You've already got the switches. You'll need a resistor to "pullup" or "pulldown" the voltage at the Stamp pin when the switch is open. Anything from 1K to 10K will do very nicely.
The Prop-1 will run from the 12V supply of the PC that you'll use for the fan. It can run from the 5V supply, but you'd have to bypass the Prop-1's regulator ... not a problem, but you don't need to do that.
You may need a power cable for the Prop-1 and the fan. You can get those from Radio Shack. It's a standard cable and plug used for low voltage power.
Post Edited (Mike Green) : 10/5/2006 1:50:12 AM GMT
The Prop-1 includes the microcontroller for the BS1 and its EEPROM, a voltage regulator, the high current driver, a few other parts required for the microcontroller and to allow the EEPROM to be programmed, and some connectors, a power LED and switch.
As far as you're concerned, for every computer you make, you will need a Prop-1 controller for the door and fan. You could buy the parts separately and assemble them on your own printed circuit board and leave out stuff like the power switch and LED and some of the connectors. You probably wouldn't save much. There are cheaper microcontrollers, but they're harder to use.
You're also only using part of the capability of the BS1. There are 8 I/O pins and you're using 4 at the moment. The BS1 doesn't hold a large program, but to do what you need will still only take part of the available capacity. You could add a digital thermometer and only turn on the fan when the temperature is above some threshold for example.
For example, the DS1620 is a very accurate digital thermometer that can be attached to the Prop-1, takes 3 pins and requires a resistor and a capacitor to use and costs about $7.
Post Edited (Mike Green) : 10/5/2006 2:56:07 AM GMT
The Prop-1 (and other Stamp boards) has a programming connector. You can leave it connected to your PC while you're working on the program. The Stamp Editor will reset the Stamp/Prop-1 and download a new program to it on command. You can also view the output of debug statements in your program while it's running. When you've got it where you want, just disconnect the Stamp from the programming cable. If you want to change something, just reconnect it. You don't have to remove anything.
I also wanted to say thank you for all the help, it has been very beneficial.
I originally recommended the Prop-1 because it represented a complete prepackaged unit that could do what you asked out of the box at a reasonable cost. Do keep in mind that Parallax has 3 lines of microcontrollers, the Stamp (with really 2 major branches - BS1 & BS2), the SX series, and the Propeller. The Stamp has been around the longest and is the easiest to use. The SX series is a "classic" high speed microcontroller, not for beginners, but very cheap and very high power for typical microcontroller functions. The Propeller is the newest, rapidly dropping in cost and the most powerful overall. It's easy to program, but doesn't yet have the "lead you by the hand" type of documentation.
The SX series currently has a cheap protoboard ($10 each), but would require some soldering of connectors and, for control of a fan, would still need either the ULN2003 or a discrete transistor and a resistor or two to be mounted and wired to appropriate connectors for the switches and fan. A servo motor could be controlled directly, but would still need a connector to be used.
In learning how to use the Prop-1/Stamp1, the experience is directly transferrable to other Stamps and the SX series. The Stamps are not likely to come down in cost significantly because of the way they're constructed. The SX series and the Propeller are single chips and benefit markedly from economies of scale.
What kind of resistance to i need for a servo from 12v? I know there is a 5v lead on all power supplies, but in order to have the fan on the same switch it would be easier to use the 12v. I checked large amount of sites that calculate risistance, but i do not know the mA of a servo, and it won't calculate without it. The batteries i have for the R/C controllers are 4.8volts and range from 500-700mA.
Thanks again,
Justin
Actually, the Prop-1 is wired to provide a regulated +5V to servos (I looked at the documentation). Just use the standard plug that comes with the servo and plug it into the Prop-1. This wouldn't work for more than one servo (too much current drain), but should be just fine with one. There is also a built in pullup/pulldown resistor for two of the I/O pins for use with a switch. It's jumper selectable ... look at the Prop-1 documentation for details.
If the Radio Shack item is their "What's a Microcontroller BASIC Stamp Activity Kit" (Catalog #276-625), it includes a Stamp BS2 which is more powerful than the BS1 on the Prop-1, but the BS2 Activity Board's 5V regulator can't support the load of a servo and there are no connectors for servos. It's great for learning about microcontrollers and how to program them and you could use an external R/C battery pack or 6V AA battery pack to supply the servo.