Well, a quick look for the stepper motor 23HS8430 provided that the holding torque is 180 Newton-centimeter, but the DETENT torque is merely 6 Newton-centimeter. It does not clarify the maximum voltage. It does say the motor is a maximum of 3 amps. Since Amps X Volts equals Watts, I am a bit cautious about going to the max with everything due to the creation of more heat. Excess heat just ages everything quickly.
I am suspecting that the performance figures are based on 36 volts -- midway between 24 and 48 volts. And that it will run on 48 volts if you need to do so... just as long as it does have more time to cool off than time in actual use.
With a bit of luck, the 24 volt supply will be adequate. The rest of the stuff remains well within your needs. You might read Wikipedia's entry for Stepper Motor to get a quick briefing on the technical details and options involved.
My dilemma is the Chinese stepper and motor controller are good AND inexpensive.
American product is good, but more expensive.. But much better documented.
So I checked with a comparative American stepper motor and when you jump from 24 to 48 volts in power, it does not gain double the torque. Also, they provide charts with curves that are dependent on what RPM you are trying to sustain. It is all too complex to reach any conclusion other than 48 volts will boost, but won't go as far as to double.
BTW, I can read a bit of Chinese and if I had documentation in Chinese it might be helpful. But Chinese product just seems to not see the need to produce so much in detail.
Do you have a sense as to how problematic this stepper setup may be? I am concerned about the longevity of having a stepper motor constantly running 24/7. What is the life expectancy of the stepper and the supporting electronics, 1 yr, 5 yrs? I am not opposed to buying high quality components with the assurance of a longer life.
I should receive my Quickstart board any day, so I can start learning how to get an LED to blink.
If you are running the stepper at full power constantly, it will be hot, I would expect bearings to dry out faster (bearing wear and lubrication and dirt ingress are
issues for steppers, not much else is). If you power down between uses or use at lower than rated full current it will be cooler... Most industrially rated stepper
controllers will be rugged - they get used in machine shops with no maintanance for years/decades. Fixing the motor to large metal frame provides heat-sinking
(and will be assumed by most datasheets I suspect).
I suspect that your actual duty cycle is well below 25% of the on time, so everything will benefit from these periods to cool down. The stepper motor controller even automatically goes into a low power mode when not stepping for longer periods of time. I can only guess at the number of years, but years of good operation without service should be possible. I would be concerned about the trip switch failing first unless it is good industrial quality.
My degree is actually a B.S. in Fine Arts, so I do understand that you desire to make a quality sculpture that doesn't breakdown frequently. And you might have it located far and away from you, so service might be a costly problem. To that end, I have tried to use parts that are robust, not minimal. But machines do eventually require a rebuilt. It might be easiest to provide an entire replacement kit that can be shipped to someone competent to swap out all and everything.
I have sorted out the 24Volt versus 48Volt power curves and it seems that at any rotation under 500RPM that the 24 votl provides the same torque as at 48 volt. So there is no reason to consider a higher voltage power supply. Your project is running at about 30RPM for a couple of seconds and then resting for a minute or so. This is very light duty for all the electrical equipement and the motor.
With steppers, when you go above 500 rpm, they begin to produce less torque... but I am not very clear about what is going on.
Regarding the supply of 5VDC to the Propeller, the tiniest way to do so is to convert the 24VDC to 5VDC. You have extra capacity in the 5 amp 24VDC supply already, so you could use one of these little boards from Pololu.
So, when the stepper is idle but energized and holding its position without moving, is the stepper is considered to be resting and will not building up heat? I like your suggestion of stepping the 24 VDC to 5 VDC
RE: Do you have suggestion for the limit switch that i might use?
If you want to use a mechanical switch take a look at the Microswitch range of switches and actuator paddles. Personally I prefer to use an optical sensor for that. In many cases you can make your own with an IR led and phototransistor for much less than the cost of a mechanical switch.
Good suggestion kwinn. In an optical sensor setup, is an IR led on constantly with the light beam mechanically blocked or unblocked from striking the phototransistor?
Essentially yes, but the IR led does not have to be on all time. If you have free pins you can have the prop turn the led on when the motor is running and off when stopped, or even turn the led on only when testing to see if the beam is blocked/unblocked.
So, when the stepper is idle but energized and holding its position without moving, is the stepper is considered to be resting and will not building up heat? I like your suggestion of stepping the 24 VDC to 5 VDC
Not exactly. But operation at lower voltage and/or lower current will create less heat. When the motor is active, more motor power is used and converted into heat. Rotation 100% of the time is the highest wear state, but your 1.5 to 2 second cycles every 1 to 3 minutes are very low.
In math terms 2 seconds of 1 minute use is 1/30th or less than a 3.333% duty cycle. There remains 96.667% of the time for cool off and recovery.
You will run cooler at 24 volts. The motor is rated at 3 amps, but you will run cooler at 2.8 amps. If you don't need 2.8 amps of power you adjust it to a much lower setting. The SW4 allows you to run it all at 1/2 current... much cooler. Or, you can just set the amps output to 1.3 amps and when not in use the controller will automatically go to half of that 0.65amps.
Amps X Volts = Watts, and Watts convert into heat as well as mechanical work.
The dilemma is that you have to build your set up and test operation. Then you can reset to lower power demands to make it long lasting. This is the beauty of buying a 5 amp power supply, a 4.5 amp controller, and a 3 amp motor even though you might get by with 2 amps or less. Everything is built for higher stresses than you are providing. The trade off is slighter wear, longer life.
If you can use a CNY70 IR sensor instead of a mechanical switch, this would be more rugged. The only risk is that the optical sensor gets dusty and dirty... then it would not respond. But it could easily be cleaned witha Q-tip and a bit of dish soap.
If you worry about accumulated dirt, a hall-effect sensor can trigger by a passing magnet and will work regardless of dirt.
If you can't get the above to work due to distances involved, you can use an ultrasonic proximity sensor to trigger.
All these options may be better than a mechanical switch for a microcontroller. Microcontrollers have problems with 'bounce' in mechanical switches that is absent in the above devices.
Ambient light might interfere with the CNY70, but if you can shield it from such, I think it is an excellent solution.. low cost and a simple wiring circuit. It might work fine at 3.3 volts, but the example is at 5.0 volts. AND, the CNY70 does have a daylight filter built into it.
I suspect that in your application, the IR LED in the CNY70 will need to be on all the time and it might need 5VDC power to have optimal brightness. It is a cyan blue color and not very intense. On the output, I think that 3.3volt operation to the Propeller will work just as good as the 5.0 volts in the example.
Sure you could turn off the LED when the stepper is cycling if you really need to do so to avoid false triggers. But it does a bit more to your programing and wiring.
The sensor relies on reflected light from a passing object. There are others that have a slot for having a slotted wheel pass between the IR LED and the sensor.
Given the potential mechanical problems with a limit switch, and dust/ ambient light interference with an optical sensor, I think the most reliable solution is using a mag switch.
I am ordering the necessary gears and need to know the stepper motor's shaft diameter. Is that a standard diameter for all NEMA 23 motors?
Hi again,
I've been trying to shop ahead of what you might be wanting. Regarding the stepper motor's shaft size and all the dimensions, I'd check by the motor ID number. Google can find it. Just provide the number AND the words 'stepper motor'.
First of all, I think the IR switch is a good choice, if you pass close enough to it. The ones I mentioned filter out ambitent light. The CNY70 does depend on a relective surface passing quite close, but the other one is a slot interrupter configuration and less subject to ambient light problems.
Also, Honeywell Microswitch has a product line of mechanical microswitches that are internally hall effect switches to avoid bounce. You might want to consider these as they may best fit your orginal design.
The thrid category is Hall effect Proximity switches and there is a both a huge variety to select from in terms of cost and in terms of electrical characteristics. Hall effect sensors can be latching, sweeping, or switching. You want switching.
You might get a tiny chip for 75 cents or pay more than $100 USD for a packaged unit intended for industrial use. Shopping EBay is difficult because we need to know the exact electrical specs. There are some good devices there, but everything has to be taken on a case by case base of cost, vendor, and documents.
Jameco seems to have some good devices and may be an easier place to sort out selection.
I hope the above helps. You can build your stepper motor and control system and get it working with the sculpture first... without the trip switch ... by testing the cycles with the touch switch. And in the meanwhile, you can shop for what you really want.
Be careful is searching for industrial proximity switches - not all are hall effect. Others use capacitance and the capacitance is subject to failure if the sensor gets dusty or dirty. The hall effect sensors require a magnet attached to the passing sculpture.
Microswitch is a very old company and NOT all of their products are hall-effect switches.
But the listing you show me has ONLY one hall-effect microswitch. Choose one that requires +5VDC power as a high voltage requirement means another set of problems to resolve.
Yes, 3mm is too much distance for the CNY70. That is why I mentioned the slot interrupter.
Cherry also sells hall effect switches.
You might do better to look at Jameco listings than a surplus seller. You will get a better idea of what hall effect switches are available. And they do require power. Some act like an NPN transistor in open collector configuration, that is NOT a problem.
It is nearly impossible to get a hall effect switch that uses 3.3 VDC, but you can get some that use 5VDC. And if that is not possible, you can get some that range from 6VDC to above 24VDC.
Jameco might not have been the right place to shop. Those devices need a magnet attached to the sculpture, and the chip might need additional components to really work well.
Read up in Wikipedia about what hall-effect is. These are more like a semiconductor than a mechanical switch. Thus they do not bounce or create the problems associated with bounce, but they do require power. What is bounce? It is the switch opens and closes several times before really changing state. Since microcontroller are so sensitive and fast, they get muddled by the bouncing and count it as multiple commands.
If you must use a traditional mechanical switch, there are ways to get rid of bounce in software code and in wiring.
You can use the Hall effect proximity switch by just attaching a small magnet to the moving sculpture. That might be the most elegant as you would not see an obvious switch. Just avoid Latching and avoid Bipolar devices. You want a Unipolar device. At some point, you may have to learn some more about electronics to fully appreciate what is going on.
I am getting the feeling that it might be easiest to just order your preferred hall effect microswitch directly from Honeywell/Microswitch if they would allow you to do so. It seems the distributors are not carrying much inventory. If that cannot be ordered, we can first try to resolve this by delays in software. And if that works fine. If it doesn't work, there are debounce circuits and even special chips.
After reading up on Hall effect switches, I presume that the above switch would be tripped using a small rare earth mag? If so, i will need to determine at what distance the mag will trip the sensor so I can mount the mag properly.
I think at this point, I have presented you with more information that you can completely absorb. It might be easiest to just build with a conventional mechanical switch and see how it all works. After all, the bouncing may not be an issue with such a slow cycle, and there are solutions to remove the bounce.
My concern with the little sensor device from Mouser is that it may be an incomplete solution. An encased hall-effect proximity switch may include that chip, plus an op amp and a schmitt trigger than clean up the signal so that the microcontroller can get a clear signal. These little individual chips may only be a partial configuration.
I previously mentioned that hall effect switches have a very wide variety of devices and a big range of costs. If you go for the least expensive, expect to do more learning and building.
Yes, you would have to buy something and bench test it with a magnet to see if it will work well at the distance you require. A small rare earth magnet is required for the trigger and in the hall-effect microswitch, there is a tiny magnet included.
You may not realize it , but just about all good computer keyboards are hall-effect switches -- one for each key. Having 50 or so switches that all require signal clean up is a huge burden. Having just one is an easy detail to resolve.
At this point, my impression is that it has gotten very difficult to buy Honeywell/Microswitch Hall-effect switches. Devices that need this buy directly from Honeywell/Microswitch in vast quantities, not sales of one or two. Hence, Digikey and Mouser have listing, but no inventory on hand for small sales.
I think we are near the end of your shopping, but you do need to get up to speed on much of the information that I have provided in links.
To repeat..
You don't have to use a hall-effect switch. We can try to adapt a regular switch as long as it will handle about 5 VDC and 20ma (very undemanding)
You can use a hall-effect proximity sensor, but there certainly will be some trial and error involve to get the right magnet in the right place. There will be some wiring to learn. 4.5v-24VDC power is best solution.
At this point, I guess you don't want to use IR reflective or slot interruption sensors. And you don't want to look at ultrasonic motion detection.
Much depends on your ambitions. How much you are willing to spend; how much you want to learn. You are aware that bounce may cause a problem, but it may not in this context as a trigger goes immediately into a cycle of operation that continues uninterrupted for 1.5 to 2.0 second
You can buy one of the following, two, or all three
1. a traditional microswitch
2. a hall-effect microswitch
3. a hall-effect proximity sensor switch.
The benefits of buying all 3 is about learning more. But the choice is up to you. The pro and con about which will last the longest and which is the best depends very much on your construction details and quality.
Here is an another thought...
I said that the mechanical switch will likely work fine, so why bother at all with hall-effect switches or hall-effect proximity sensors?
A bit of automotive history.
Before 30 or so years ago, we all had to get regular tune-ups on our cars to retain good performance. The biggest item of wear was the contacts in a mechanical switch inside the distributor. We called these 'the points' and had to religiously replace them and the capacitor that was supposed to help reduce the wear that was due to electrical arcing of thousands of cycles of opening and closing. The whole process was made more challenging by the complexity of the distributer -- we had to set the proper angle (the advance) and the dwell (the time on and off of the switch)
Then along came hall-effect senors and distributors converted to a rotating series of magnets and a hall-effect sensor. These days a tune-up is mostly a change of spark plugs, an oil change and a new air filter. We no longer touch the inside of the distributor unless it seems to need a new rotor cap (this is still a mechanical switch).
In other words, a hall-effect switch doesn't fail from electrical wear. They last a lot long. Even if bounce is NOT an issue in your application, they are a better choice for durable design.
Another interesting fact is that DC switches actually wear faster than AC switches at the same voltage. A switch that is good for 120VAC at 1 amp, might only be good for 24VDC at 1 amp. You see this in specs for mechanical relays all the time.. a much higher voltage is allowed for AC use.
Why can a switch tolerate a higher AC use? Well, in DC the switch wears in only one direction. Metal is removed from one contact and transfers to the other. But in AC the metal goes back and forth.. so the wear balances out. So even at 24VDC wear is a real issue in a mechanical switch.
When you were asking about what might fail and when, I said the switch is my biggest concern and now you see why. I've had 3 brand new air conditioners in the past 15 years in Taiwan and the first item to fail on all of them has been the push buttons. None were hall-effect devices.
Reliability of the electronics will be very important. I agree, a mechanical switch may be ok for R&D, but I think a hall effect switch is the ultimate solution. Since my mechanical design will depend on the switch I choose, I think I'll spend my design efforts assuming I will use a hall-effect switch. Having said that, do you have a recommendation for a switch off of the Mouser link I sent you?
Well, I can't really say that there is anything I like at Mouser.
The two choices of hall-effect switches are [a] a Honeywell/Microswitch hall-effect switch that is a complete traditional switch configuration and a hall-effect proximity switch that requires a separate magnet.
I think you located just one Honeywell/Microswitch that was available and it operates from a 5VDC supply. I'd be okay with that. That was from Electronic Surplus.
The other choice is fine with any device that operates at 4.5 to 24 volt range and is a complete proximity switch solution, not just the sensor. I think I may a suggestion of one from Jameco that was about $5.95 USD and made by Cherry.
So, do you really need to order via Mouser? About the only reason that I can think that you may not want the Cherry device is that it is not as good looking as some other devices. The housing is black plastic.
The thing about the Cherry proximity sensor is that I can read the data and see clearly that it includes [1] a hall effect sensor, [2] an op amp to boost the sensor, and [3] a schmitt trigger to provide a good clean pulse. The componet from Mouser that you previously referred to is only equal to a hall effect sensor.
You could try that tiny Honeywell device from Mouser as well, but with having one to bench test I just don't know if it is as good. The one you asked about just may work out fine and it is very small and economical. It say it will work up to 1 inch distance.
Further reading of Honeywell documents indicates that the device you selected from Mouser will work just fine. It includes all three items that I mentioned that the Cherry device has, and the unipolar will make it a bit less tricky to set up.
It works from 3.8 volts to 30 volts, it provides a 20ma output and uses 11 ma power. It will trigger from either end of a magnets polarity. And it will sense a magnet that is up to an inch away. The top edge is the sensing surface.
I guess hall-effect switches have just gotten smaller and cheaper. Some of the oldies are over $100 USD and housed in stainless steel. The stainless steel might protect them from stray magnets, but that might not be an issue.
If you are going to order more than one, maybe you can send one to me and I can do some testing for you. In theory, it can be easily set up to light an LED from a 5VDC supply.
I found the same book this morning and was reading through the different applications. It was helpful to get a sense for the differences between the types of sensors.
I am perfectly fine with the MP1021 from Jameco. I will ordered some ASAP. Would you like me to send you one?
Received my QuickStart board today. I am amazed at the number of objects available for SPIN development. I guess I will be begin that learning curve in the next couple of days.
Hi,
You don't need to send me one if I can explain how to test it over the internet. And I have to do that anyway. Actually the Jameco devices are from Cherry and a bit more rugged (reverse polarity protection, etc.)
I think it would be a very good idea to test the sensor independent of a microcontroller and have the magnet turn off and on an LED. The device you bought is UNIpolar, not OMNIpolar --- so only one pole of the magnet will turn it on. That means you have to get the right end, but it also means less chance of a false trigger from a stray magnetic influence.
At this point, we are changing from a shopping point of view into an actual construction and programing point of view.
Construction and Programing are very interrelated for a variety of reasons. The components and senors we add often require that we invert the logic from what we generally accept to be ON and OFF.
I have not discussed what an Open Collector device is, but you will need to comprehend the concept with the Hall-effect proximity sensor. And testing on a bread board will help demonstrate it to you.
1. When an open collector output is ON, the device pulls the output toward ground (in this case to something like 0.4volts). The logic in the Propeller sees any transition to less than half the 3.3VDC as a LOW.
2. To get a HIGH, you have to provide an Open Collector device with a pull up resistor to 3.3VDC of about 1000 ohms. This is NOT related to the required power supply voltage of 4.5 to 24VDC (you must provide that separately).
3. Since an ON condition makes a Logical 0 and an OFF condition defaults to a Logical 1, you have to adapt your programing code to what the hardware does.
Yes there is an inversion of what you might consider the normal Outputs of the Propeller, where 0 is OFF and 1 is ON. When working with transistors we constantly run into adding devices that invert what we think the ON and OFF condition should be.
The microcontroller is willing to adapt, but the programmer may get confused. Open Collectors are in a lot of devices, including those Opto-isolators that we discussed before. So one has to check and double check which state is ON and which state is OFF in all the interfaces and pay special attention to Open Collectors when they are mentioned.
BTW, there are lots of 1021 devices.... you MUST buy the 1021-01, the 1021-02, or 1021-03. Some are switches, others are NOT. The letters A, B, C indicate different packages. Take a look at the drawings. Do NOT buy a 1021-04, -05, or 06. They latch and that will not work properly.
~~~~~
With the QuickStart board, try some demo programs to be sure you can get the LEDs to blink. Once you can do that, maybe figure out how to get the Touch switch to trigger a cycle of 5 blinks.
From there you can refine the program to give 5 blinks on the first touch, 6 blinks on the second, and 7 blinks on the third, with going back to 5 blinks on the 4th. This will be about 75% of what you need to control the stepper, but the delay timing will just change to faster than you can see with an LED and instead of Blinks, you will have steps.
You whole SPIN program with be in ONE cog and written in ONE object. There is no reason to make this particular project more complex.
I have completed a few of the QuickStart tutorials and will work my way towards understanding the use of the touch switches. At that point, I will focus on the exercise that you suggest of sequencing the number of blinks. That will be a great exercise to simulate the use of the trip switch. I clearly need to read up on open collectors as that subject is a bit confusing right now. Thanks for the homework, professor Herzog!
I have looked and looked at that Cherry device, and nowhere can I find the distance at which it will trigger. On the other hand, the Honeywell/Micorswitch device clearly said 1.0"
This is the hazard of shopping over the internet. One gets dizzy with all the information and may miss something important. You might be safer to order the Honeywell/Microswitch device. Mouser has both the Cherry devices and the Honeywell/Microswitch devices. And these to seem to be the main choices. Also, the Jamco product may not have a flange with screw holes, it might be a 'snap in' version.
These device only get expensive when you want a through hole mount with cable attached. I guess it is the added labor to assemble them that increases the costs.
I am not quite sure about finding the right rare earth magnet... a lot of things might work. And be sure to not get confused with Cherry's other magnetic proximity senors that are NOT solid-state. Those are magnetic reed switches. The reed switchs work like normal switchs, can handle higher voltages, and wear out like normal switches.
I ordered a few of the Cherry MP 102103 and have some rare earth magnets that range from 2- 6 mm in diameter. Maybe you can instruct me how to set one up on a bread board to check its sensitivity. From there, I can get a Honeywell switch if need be.
If you want to bench test the hall-effect sensor, just do the following.
A. Proved a good +5VDC suppy if you can. If you don't have that, it can opperate between 4.5-24 volts from a battery source such as a 4 x AA cell battery pack.
B. Since the Open Collector will handle up to 20 ma, wire an LED and a resistor in series between the power supply and the "output".
For 5 volts, the resistor is determined by 5 volts / 20ma = 250 ohms. So something greater than 250 ohms.. say 270 or 300 or 330 ohms
For 6 volts, the resistor is determined by 6 volts / 20ma = 300 ohms. So something greater than 300 ohms.. say 330 ohms
For 24 volts, the resistor is determined by 12 volts / 20ma = 600 ohms. So something greater than 600 ohms.. say 660 ohms.
This is not a normal Open Collector pull down/pull up arrangement, but it will certainly test the device in a safe manner. It helps to use regulated voltages to get your math right, but a battery pack is a simple source of power. The higher the resistance, the dimmer the LED.
When the magnet is away, the circuit is off: when the magnet is near, the circuit is on.
If you use a different device with a 10ma limit, the math would change
For 5 volts, the resistor is determines by 5 volts / 10ma = 500ma. So something greater than 500 ohms.. say 560 ohms
And 12volts x .020ma = .24 watts. So 1/4 watt resistors are a good choice for all.
Becareful about batteries and getting the right resistors. Freshly charged batteries will often provide more than the rated voltage. So 4 AA cells that are fresh alkaline might be closer to 7.0 volts. Higher volts with a resistor for 6 volts might provide excess of 20 ma current and damage the hall effect switch.
You don't have to test as the 20ma rating. Many LEDs light nicely at 15ma or much less, so using larger resistors that are handy is a very common way to be safe and not go shopping for odds and ends.
I was a bit surprised and disappointed to find that the hall-effect microswtches have seemed to go out of production and can only be purchased as surplus.
Also, it seems that Cherry is promoting magnetic reed switches as equal to hall-effect devices.
So it was interesting to come across this comparison. Life is tough as an engineer/designer. What was best for years may fall out of favor. I personally thing the hall effect microswitch might just have been too good for the switch manufacturers. If a switch never wears out, how you keep your business going?
Reed switches do have some advantages compared to hall effect and optical switches, but they also have some faults. They have a shorter life span, lengthy switch bounce, and poor repeat-ability when used for positioning.
I was a bit surprised tomboardman passed on the optical sensors in favor of hall effect switches though. I have used a led and phototransistor to make optical sensors for monitoring vacuum pump rotation in spectrometers. That is a much worse environment than his use would be, and they work reliably for years.
Comments
I am suspecting that the performance figures are based on 36 volts -- midway between 24 and 48 volts. And that it will run on 48 volts if you need to do so... just as long as it does have more time to cool off than time in actual use.
With a bit of luck, the 24 volt supply will be adequate. The rest of the stuff remains well within your needs. You might read Wikipedia's entry for Stepper Motor to get a quick briefing on the technical details and options involved.
http://en.wikipedia.org/wiki/Stepper_motor
My dilemma is the Chinese stepper and motor controller are good AND inexpensive.
American product is good, but more expensive.. But much better documented.
So I checked with a comparative American stepper motor and when you jump from 24 to 48 volts in power, it does not gain double the torque. Also, they provide charts with curves that are dependent on what RPM you are trying to sustain. It is all too complex to reach any conclusion other than 48 volts will boost, but won't go as far as to double.
BTW, I can read a bit of Chinese and if I had documentation in Chinese it might be helpful. But Chinese product just seems to not see the need to produce so much in detail.
If you are running the stepper at full power constantly, it will be hot, I would expect bearings to dry out faster (bearing wear and lubrication and dirt ingress are
issues for steppers, not much else is). If you power down between uses or use at lower than rated full current it will be cooler... Most industrially rated stepper
controllers will be rugged - they get used in machine shops with no maintanance for years/decades. Fixing the motor to large metal frame provides heat-sinking
(and will be assumed by most datasheets I suspect).
My degree is actually a B.S. in Fine Arts, so I do understand that you desire to make a quality sculpture that doesn't breakdown frequently. And you might have it located far and away from you, so service might be a costly problem. To that end, I have tried to use parts that are robust, not minimal. But machines do eventually require a rebuilt. It might be easiest to provide an entire replacement kit that can be shipped to someone competent to swap out all and everything.
I have sorted out the 24Volt versus 48Volt power curves and it seems that at any rotation under 500RPM that the 24 votl provides the same torque as at 48 volt. So there is no reason to consider a higher voltage power supply. Your project is running at about 30RPM for a couple of seconds and then resting for a minute or so. This is very light duty for all the electrical equipement and the motor.
With steppers, when you go above 500 rpm, they begin to produce less torque... but I am not very clear about what is going on.
Regarding the supply of 5VDC to the Propeller, the tiniest way to do so is to convert the 24VDC to 5VDC. You have extra capacity in the 5 amp 24VDC supply already, so you could use one of these little boards from Pololu.
http://www.pololu.com/catalog/product/2107
That would make the 115VDC wiring much cleaner, simpler, and safer.
If you want to use a mechanical switch take a look at the Microswitch range of switches and actuator paddles. Personally I prefer to use an optical sensor for that. In many cases you can make your own with an IR led and phototransistor for much less than the cost of a mechanical switch.
Not exactly. But operation at lower voltage and/or lower current will create less heat. When the motor is active, more motor power is used and converted into heat. Rotation 100% of the time is the highest wear state, but your 1.5 to 2 second cycles every 1 to 3 minutes are very low.
In math terms 2 seconds of 1 minute use is 1/30th or less than a 3.333% duty cycle. There remains 96.667% of the time for cool off and recovery.
You will run cooler at 24 volts. The motor is rated at 3 amps, but you will run cooler at 2.8 amps. If you don't need 2.8 amps of power you adjust it to a much lower setting. The SW4 allows you to run it all at 1/2 current... much cooler. Or, you can just set the amps output to 1.3 amps and when not in use the controller will automatically go to half of that 0.65amps.
Amps X Volts = Watts, and Watts convert into heat as well as mechanical work.
The dilemma is that you have to build your set up and test operation. Then you can reset to lower power demands to make it long lasting. This is the beauty of buying a 5 amp power supply, a 4.5 amp controller, and a 3 amp motor even though you might get by with 2 amps or less. Everything is built for higher stresses than you are providing. The trade off is slighter wear, longer life.
If you can use a CNY70 IR sensor instead of a mechanical switch, this would be more rugged. The only risk is that the optical sensor gets dusty and dirty... then it would not respond. But it could easily be cleaned witha Q-tip and a bit of dish soap.
If you worry about accumulated dirt, a hall-effect sensor can trigger by a passing magnet and will work regardless of dirt.
If you can't get the above to work due to distances involved, you can use an ultrasonic proximity sensor to trigger.
All these options may be better than a mechanical switch for a microcontroller. Microcontrollers have problems with 'bounce' in mechanical switches that is absent in the above devices.
Ambient light might interfere with the CNY70, but if you can shield it from such, I think it is an excellent solution.. low cost and a simple wiring circuit. It might work fine at 3.3 volts, but the example is at 5.0 volts. AND, the CNY70 does have a daylight filter built into it.
http://www.vishay.com/docs/80107/80107.pdf
http://2.bp.blogspot.com/-DgKjxBA_j5s/Tk5kDuqXU5I/AAAAAAAAA5Q/U7fgmawtphQ/s1600/CNY70.jpeg
http://www.datasheetcatalog.org/datasheet/vishay/83751.pdf
I suspect that in your application, the IR LED in the CNY70 will need to be on all the time and it might need 5VDC power to have optimal brightness. It is a cyan blue color and not very intense. On the output, I think that 3.3volt operation to the Propeller will work just as good as the 5.0 volts in the example.
Sure you could turn off the LED when the stepper is cycling if you really need to do so to avoid false triggers. But it does a bit more to your programing and wiring.
The sensor relies on reflected light from a passing object. There are others that have a slot for having a slotted wheel pass between the IR LED and the sensor.
http://www.vishay.com/docs/81147/tcst2103.pdf
I am ordering the necessary gears and need to know the stepper motor's shaft diameter. Is that a standard diameter for all NEMA 23 motors?
I've been trying to shop ahead of what you might be wanting. Regarding the stepper motor's shaft size and all the dimensions, I'd check by the motor ID number. Google can find it. Just provide the number AND the words 'stepper motor'.
First of all, I think the IR switch is a good choice, if you pass close enough to it. The ones I mentioned filter out ambitent light. The CNY70 does depend on a relective surface passing quite close, but the other one is a slot interrupter configuration and less subject to ambient light problems.
Also, Honeywell Microswitch has a product line of mechanical microswitches that are internally hall effect switches to avoid bounce. You might want to consider these as they may best fit your orginal design.
The thrid category is Hall effect Proximity switches and there is a both a huge variety to select from in terms of cost and in terms of electrical characteristics. Hall effect sensors can be latching, sweeping, or switching. You want switching.
You might get a tiny chip for 75 cents or pay more than $100 USD for a packaged unit intended for industrial use. Shopping EBay is difficult because we need to know the exact electrical specs. There are some good devices there, but everything has to be taken on a case by case base of cost, vendor, and documents.
Jameco seems to have some good devices and may be an easier place to sort out selection.
http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_513261_-1
I hope the above helps. You can build your stepper motor and control system and get it working with the sculpture first... without the trip switch ... by testing the cycles with the touch switch. And in the meanwhile, you can shop for what you really want.
Be careful is searching for industrial proximity switches - not all are hall effect. Others use capacitance and the capacitance is subject to failure if the sensor gets dusty or dirty. The hall effect sensors require a magnet attached to the passing sculpture.
If you don't want contact, a ultrasonic motion sensor is a larger device, but will do well.
http://www.ebay.com/sch/i.html?_odkw=hall+effect+proximity&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0&_nkw=hall+effect+proximity&_sacat=0
http://www.vishay.com/docs/83751/cny70.pdf
Because of play in mechanisms and ensuring that components don't rub, my construction tolerances would actually be around 3 mm.
I like the idea of a microswitch with an internal hall switch. Will one of these be comparable to that design?
http://www.electronicsurplus.com/LeftNav/Switches/Microswitches.cat
But the listing you show me has ONLY one hall-effect microswitch. Choose one that requires +5VDC power as a high voltage requirement means another set of problems to resolve.
http://www.electronicsurplus.com/Item/28710/MICRO SWITCH - Switch_ micro_ Hall effect with lever_ - 37XL11YD-43/
Yes, 3mm is too much distance for the CNY70. That is why I mentioned the slot interrupter.
Cherry also sells hall effect switches.
You might do better to look at Jameco listings than a surplus seller. You will get a better idea of what hall effect switches are available. And they do require power. Some act like an NPN transistor in open collector configuration, that is NOT a problem.
It is nearly impossible to get a hall effect switch that uses 3.3 VDC, but you can get some that use 5VDC. And if that is not possible, you can get some that range from 6VDC to above 24VDC.
http://www.electronicsurplus.com/SearchResults.aspx?Keyword=hall effect switch
It may be wisest to buy a brand new Honeywell/Microswitch Hall Effect switch that exactly suits your needs.
http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_1821804_-1
http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_1915923_-1
Read up in Wikipedia about what hall-effect is. These are more like a semiconductor than a mechanical switch. Thus they do not bounce or create the problems associated with bounce, but they do require power. What is bounce? It is the switch opens and closes several times before really changing state. Since microcontroller are so sensitive and fast, they get muddled by the bouncing and count it as multiple commands.
If you must use a traditional mechanical switch, there are ways to get rid of bounce in software code and in wiring.
Here is a better site for Hall Effect Switches.
http://www.alliedelec.com/search/searchresults.aspx?dsNav=Ntk:Primary|switch+hall+effect|3|,Ny:False,Rpp:60,Ro:0&dsDimensionSearch=D:switch+hall+effect,Dxm:All,Dxp:3&SearchType=0&term=switch+hall+effect&ps=60&fromsearch=true
You can use the Hall effect proximity switch by just attaching a small magnet to the moving sculpture. That might be the most elegant as you would not see an obvious switch. Just avoid Latching and avoid Bipolar devices. You want a Unipolar device. At some point, you may have to learn some more about electronics to fully appreciate what is going on.
I am getting the feeling that it might be easiest to just order your preferred hall effect microswitch directly from Honeywell/Microswitch if they would allow you to do so. It seems the distributors are not carrying much inventory. If that cannot be ordered, we can first try to resolve this by delays in software. And if that works fine. If it doesn't work, there are debounce circuits and even special chips.
http://www.electrosome.com/switch-debouncing/
http://www.mouser.com/ProductDetail/Honeywell/2SS52M/?qs=sGAEpiMZZMs0JOhy9PM0UaeqUmwx6qAftPDfAngXeP8%3d
After reading up on Hall effect switches, I presume that the above switch would be tripped using a small rare earth mag? If so, i will need to determine at what distance the mag will trip the sensor so I can mount the mag properly.
My concern with the little sensor device from Mouser is that it may be an incomplete solution. An encased hall-effect proximity switch may include that chip, plus an op amp and a schmitt trigger than clean up the signal so that the microcontroller can get a clear signal. These little individual chips may only be a partial configuration.
I previously mentioned that hall effect switches have a very wide variety of devices and a big range of costs. If you go for the least expensive, expect to do more learning and building.
Yes, you would have to buy something and bench test it with a magnet to see if it will work well at the distance you require. A small rare earth magnet is required for the trigger and in the hall-effect microswitch, there is a tiny magnet included.
You may not realize it , but just about all good computer keyboards are hall-effect switches -- one for each key. Having 50 or so switches that all require signal clean up is a huge burden. Having just one is an easy detail to resolve.
At this point, my impression is that it has gotten very difficult to buy Honeywell/Microswitch Hall-effect switches. Devices that need this buy directly from Honeywell/Microswitch in vast quantities, not sales of one or two. Hence, Digikey and Mouser have listing, but no inventory on hand for small sales.
I think we are near the end of your shopping, but you do need to get up to speed on much of the information that I have provided in links.
To repeat..
You don't have to use a hall-effect switch. We can try to adapt a regular switch as long as it will handle about 5 VDC and 20ma (very undemanding)
You can use a hall-effect proximity sensor, but there certainly will be some trial and error involve to get the right magnet in the right place. There will be some wiring to learn. 4.5v-24VDC power is best solution.
At this point, I guess you don't want to use IR reflective or slot interruption sensors. And you don't want to look at ultrasonic motion detection.
Much depends on your ambitions. How much you are willing to spend; how much you want to learn. You are aware that bounce may cause a problem, but it may not in this context as a trigger goes immediately into a cycle of operation that continues uninterrupted for 1.5 to 2.0 second
You can buy one of the following, two, or all three
1. a traditional microswitch
2. a hall-effect microswitch
3. a hall-effect proximity sensor switch.
The benefits of buying all 3 is about learning more. But the choice is up to you. The pro and con about which will last the longest and which is the best depends very much on your construction details and quality.
I said that the mechanical switch will likely work fine, so why bother at all with hall-effect switches or hall-effect proximity sensors?
A bit of automotive history.
Before 30 or so years ago, we all had to get regular tune-ups on our cars to retain good performance. The biggest item of wear was the contacts in a mechanical switch inside the distributor. We called these 'the points' and had to religiously replace them and the capacitor that was supposed to help reduce the wear that was due to electrical arcing of thousands of cycles of opening and closing. The whole process was made more challenging by the complexity of the distributer -- we had to set the proper angle (the advance) and the dwell (the time on and off of the switch)
Then along came hall-effect senors and distributors converted to a rotating series of magnets and a hall-effect sensor. These days a tune-up is mostly a change of spark plugs, an oil change and a new air filter. We no longer touch the inside of the distributor unless it seems to need a new rotor cap (this is still a mechanical switch).
In other words, a hall-effect switch doesn't fail from electrical wear. They last a lot long. Even if bounce is NOT an issue in your application, they are a better choice for durable design.
Another interesting fact is that DC switches actually wear faster than AC switches at the same voltage. A switch that is good for 120VAC at 1 amp, might only be good for 24VDC at 1 amp. You see this in specs for mechanical relays all the time.. a much higher voltage is allowed for AC use.
Why can a switch tolerate a higher AC use? Well, in DC the switch wears in only one direction. Metal is removed from one contact and transfers to the other. But in AC the metal goes back and forth.. so the wear balances out. So even at 24VDC wear is a real issue in a mechanical switch.
When you were asking about what might fail and when, I said the switch is my biggest concern and now you see why. I've had 3 brand new air conditioners in the past 15 years in Taiwan and the first item to fail on all of them has been the push buttons. None were hall-effect devices.
The two choices of hall-effect switches are [a] a Honeywell/Microswitch hall-effect switch that is a complete traditional switch configuration and a hall-effect proximity switch that requires a separate magnet.
I think you located just one Honeywell/Microswitch that was available and it operates from a 5VDC supply. I'd be okay with that. That was from Electronic Surplus.
The other choice is fine with any device that operates at 4.5 to 24 volt range and is a complete proximity switch solution, not just the sensor. I think I may a suggestion of one from Jameco that was about $5.95 USD and made by Cherry.
http://www.jameco.com/Jameco/Products/ProdDS/513261.pdf
So, do you really need to order via Mouser? About the only reason that I can think that you may not want the Cherry device is that it is not as good looking as some other devices. The housing is black plastic.
The thing about the Cherry proximity sensor is that I can read the data and see clearly that it includes [1] a hall effect sensor, [2] an op amp to boost the sensor, and [3] a schmitt trigger to provide a good clean pulse. The componet from Mouser that you previously referred to is only equal to a hall effect sensor.
You could try that tiny Honeywell device from Mouser as well, but with having one to bench test I just don't know if it is as good. The one you asked about just may work out fine and it is very small and economical. It say it will work up to 1 inch distance.
http://sensing.honeywell.com/index.php?ci_id=3108&la_id=1&pr_id=36114
http://sensing.honeywell.com/index.php?ci_id=50348
It works from 3.8 volts to 30 volts, it provides a 20ma output and uses 11 ma power. It will trigger from either end of a magnets polarity. And it will sense a magnet that is up to an inch away. The top edge is the sensing surface.
I guess hall-effect switches have just gotten smaller and cheaper. Some of the oldies are over $100 USD and housed in stainless steel. The stainless steel might protect them from stray magnets, but that might not be an issue.
If you are going to order more than one, maybe you can send one to me and I can do some testing for you. In theory, it can be easily set up to light an LED from a 5VDC supply.
Honeywell provides a nice 128 page book to explain just about anything you care to know.
http://sensing.honeywell.com/index.php?ci_id=56085
I am perfectly fine with the MP1021 from Jameco. I will ordered some ASAP. Would you like me to send you one?
Received my QuickStart board today. I am amazed at the number of objects available for SPIN development. I guess I will be begin that learning curve in the next couple of days.
You don't need to send me one if I can explain how to test it over the internet. And I have to do that anyway. Actually the Jameco devices are from Cherry and a bit more rugged (reverse polarity protection, etc.)
I think it would be a very good idea to test the sensor independent of a microcontroller and have the magnet turn off and on an LED. The device you bought is UNIpolar, not OMNIpolar --- so only one pole of the magnet will turn it on. That means you have to get the right end, but it also means less chance of a false trigger from a stray magnetic influence.
At this point, we are changing from a shopping point of view into an actual construction and programing point of view.
Construction and Programing are very interrelated for a variety of reasons. The components and senors we add often require that we invert the logic from what we generally accept to be ON and OFF.
I have not discussed what an Open Collector device is, but you will need to comprehend the concept with the Hall-effect proximity sensor. And testing on a bread board will help demonstrate it to you.
1. When an open collector output is ON, the device pulls the output toward ground (in this case to something like 0.4volts). The logic in the Propeller sees any transition to less than half the 3.3VDC as a LOW.
2. To get a HIGH, you have to provide an Open Collector device with a pull up resistor to 3.3VDC of about 1000 ohms. This is NOT related to the required power supply voltage of 4.5 to 24VDC (you must provide that separately).
3. Since an ON condition makes a Logical 0 and an OFF condition defaults to a Logical 1, you have to adapt your programing code to what the hardware does.
Yes there is an inversion of what you might consider the normal Outputs of the Propeller, where 0 is OFF and 1 is ON. When working with transistors we constantly run into adding devices that invert what we think the ON and OFF condition should be.
The microcontroller is willing to adapt, but the programmer may get confused. Open Collectors are in a lot of devices, including those Opto-isolators that we discussed before. So one has to check and double check which state is ON and which state is OFF in all the interfaces and pay special attention to Open Collectors when they are mentioned.
http://en.wikipedia.org/wiki/Open_collector
BTW, there are lots of 1021 devices.... you MUST buy the 1021-01, the 1021-02, or 1021-03. Some are switches, others are NOT. The letters A, B, C indicate different packages. Take a look at the drawings. Do NOT buy a 1021-04, -05, or 06. They latch and that will not work properly.
~~~~~
With the QuickStart board, try some demo programs to be sure you can get the LEDs to blink. Once you can do that, maybe figure out how to get the Touch switch to trigger a cycle of 5 blinks.
From there you can refine the program to give 5 blinks on the first touch, 6 blinks on the second, and 7 blinks on the third, with going back to 5 blinks on the 4th. This will be about 75% of what you need to control the stepper, but the delay timing will just change to faster than you can see with an LED and instead of Blinks, you will have steps.
You whole SPIN program with be in ONE cog and written in ONE object. There is no reason to make this particular project more complex.
I have looked and looked at that Cherry device, and nowhere can I find the distance at which it will trigger. On the other hand, the Honeywell/Micorswitch device clearly said 1.0"
This is the hazard of shopping over the internet. One gets dizzy with all the information and may miss something important. You might be safer to order the Honeywell/Microswitch device. Mouser has both the Cherry devices and the Honeywell/Microswitch devices. And these to seem to be the main choices. Also, the Jamco product may not have a flange with screw holes, it might be a 'snap in' version.
These device only get expensive when you want a through hole mount with cable attached. I guess it is the added labor to assemble them that increases the costs.
I am not quite sure about finding the right rare earth magnet... a lot of things might work. And be sure to not get confused with Cherry's other magnetic proximity senors that are NOT solid-state. Those are magnetic reed switches. The reed switchs work like normal switchs, can handle higher voltages, and wear out like normal switches.
I ordered a few of the Cherry MP 102103 and have some rare earth magnets that range from 2- 6 mm in diameter. Maybe you can instruct me how to set one up on a bread board to check its sensitivity. From there, I can get a Honeywell switch if need be.
A. Proved a good +5VDC suppy if you can. If you don't have that, it can opperate between 4.5-24 volts from a battery source such as a 4 x AA cell battery pack.
B. Since the Open Collector will handle up to 20 ma, wire an LED and a resistor in series between the power supply and the "output".
For 5 volts, the resistor is determined by 5 volts / 20ma = 250 ohms. So something greater than 250 ohms.. say 270 or 300 or 330 ohms
For 6 volts, the resistor is determined by 6 volts / 20ma = 300 ohms. So something greater than 300 ohms.. say 330 ohms
For 24 volts, the resistor is determined by 12 volts / 20ma = 600 ohms. So something greater than 600 ohms.. say 660 ohms.
This is not a normal Open Collector pull down/pull up arrangement, but it will certainly test the device in a safe manner. It helps to use regulated voltages to get your math right, but a battery pack is a simple source of power. The higher the resistance, the dimmer the LED.
When the magnet is away, the circuit is off: when the magnet is near, the circuit is on.
If you use a different device with a 10ma limit, the math would change
For 5 volts, the resistor is determines by 5 volts / 10ma = 500ma. So something greater than 500 ohms.. say 560 ohms
And 12volts x .020ma = .24 watts. So 1/4 watt resistors are a good choice for all.
Becareful about batteries and getting the right resistors. Freshly charged batteries will often provide more than the rated voltage. So 4 AA cells that are fresh alkaline might be closer to 7.0 volts. Higher volts with a resistor for 6 volts might provide excess of 20 ma current and damage the hall effect switch.
You don't have to test as the 20ma rating. Many LEDs light nicely at 15ma or much less, so using larger resistors that are handy is a very common way to be safe and not go shopping for odds and ends.
http://www.bristolwatch.com/hall_effect/
Also, it seems that Cherry is promoting magnetic reed switches as equal to hall-effect devices.
So it was interesting to come across this comparison. Life is tough as an engineer/designer. What was best for years may fall out of favor. I personally thing the hall effect microswitch might just have been too good for the switch manufacturers. If a switch never wears out, how you keep your business going?
http://www.digikey.com/Web Export/Supplier Content/Meder_374/PDF/MEDER_Reed_Sensors_vs._Hall_Effect_Sensors.pdf?redirected=1
Reed switches are still some of the worth offenderrs and can bound out to 1/4 second if the magnetic field is weak.
I was a bit surprised tomboardman passed on the optical sensors in favor of hall effect switches though. I have used a led and phototransistor to make optical sensors for monitoring vacuum pump rotation in spectrometers. That is a much worse environment than his use would be, and they work reliably for years.