Basic Stamp & DS1302 Time Chip & In-Put Switches & remember the last State with power
sam_sam_sam
Posts: 2,286
Here are the part that I am going to use
Basic Stamp
DS1302 Time Chip
In-Put Switches
I want to remember the last State the switch is in with power lost and when power is restored the state of that switch is returned
Here is why where I work there was an in another facility with a over head crane
Here is what happen the person was going up with a load and the crane hoisted hits the upper limit switch which is what should happen
but the hoist motor is suppose to STOP how ever the contact-or contacts welded together and motor kept running and the cable broke and the hook fell to the ground
NO ONE was hurt in this accident
Our facility was told to set up our crane to where if the hoist goes past the first limit and hits the second limit switch that power it is shut OFF to the hoist
and not allow to restart until the crane has been work on to see why it when to the second limit switch
The second limit switch is being add to all of our crane
From what I understand there is NO off the shelf add on to do this So my thought is to have it where when this happen
when hook block hit the second limit switch the power is shut OFF to UP DOWN contact-or until maintenance person climb up on to the crane to trouble shoot what happen
Basic Stamp
DS1302 Time Chip
In-Put Switches
I want to remember the last State the switch is in with power lost and when power is restored the state of that switch is returned
Here is why where I work there was an in another facility with a over head crane
Here is what happen the person was going up with a load and the crane hoisted hits the upper limit switch which is what should happen
but the hoist motor is suppose to STOP how ever the contact-or contacts welded together and motor kept running and the cable broke and the hook fell to the ground
NO ONE was hurt in this accident
Our facility was told to set up our crane to where if the hoist goes past the first limit and hits the second limit switch that power it is shut OFF to the hoist
and not allow to restart until the crane has been work on to see why it when to the second limit switch
The second limit switch is being add to all of our crane
From what I understand there is NO off the shelf add on to do this So my thought is to have it where when this happen
when hook block hit the second limit switch the power is shut OFF to UP DOWN contact-or until maintenance person climb up on to the crane to trouble shoot what happen
Comments
How ever I not sure how to save the last state of an input to the DS1302 time chip and if the power is lost how to read the state of the input from memory from the DS1302 time chip
To keep the output of the Basic Stamp is LOCK OUT until a INPUT switch is pushed to clear the input FLAG
Two limit switches are fairly common on mechanical systems. The first limit switch goes to the control electronics which commands it to stop. The second switch is usually a normally closed contact in series with the coil of the main power relay. When this switch opens it removes all power from the equipment. In many cases there is also a latching relay or mechanical latch that must be manually reset before power can be restored to the system.
Thank you for your reply
I would like to do this with a Basic Stamp
Here is why we have one crane that at least 25 to 30 years old it dose not have a lower limit switch
What I want to is IF some one hold the down button on the remote for longer than what it take for the hosit hook block to go from the top limit switch to the ground then it would stop the motor until the up switch is push for so many seconds
I know that this not fool proof but it is better than nothing
Thank you for your reply
Could you post a web link to the type of latching relay that you are talking about I have never use one Thanks for all of your help
A latching relay is likely the best solution for that. After all, what happens to the BS when power is lost, it wipes its memory.
Yes, but it's last action was to write it's state to the time-chip's memory.
But they make 2 and 4pin remember-state ICs
3V 1.27mm SOIC http://www.mouser.com/ProductDetail/Ramtron/FM1106-GA/?qs=sGAEpiMZZMtsPi73Z94q0CkDToGtzUA7WawxTTmnW5I%3d
5V small 0.65mm SOT http://www.mouser.com/ProductDetail/Ramtron/FM1105/?qs=sGAEpiMZZMtsPi73Z94q0KcM%252bBSzTxqK2Vl%252bDrW9N6I%3d
better have good sight to put it on a smt-board, other sites may have soic version of this 5v
There are workarounds for this problem, but none are quite as good as a latching relay.
http://parts.digikey.com/1/parts/374592-plc-relay-spdt-24vdc-2966171.html
http://parts.digikey.com/1/parts/374593-plc-relay-spdt-24vac-dc-2966184.html
In typical safety circuits these are in series with the coil of the relay that provides power to the motors or equipment so the exact relay you use will depend on the rating of that coil. Normally such equipment would have a manual reset button but a microcontroller could also do that. Since the micro does not need to remember the state of the switch no RTC chip is needed. A timing loop running on the micro when the up button is pressed is all that is required. In fact a 555 timer could probably do that.
OOPS - Scratch the 555 timer. Forgot about timing how long the down button was pressed.
BTW the down time count should probably be cumulative so it tracks the total amount of down travel even if the button is released from time to time.
Here is what I am looking for[IMG]http://media.digikey.com/photos/Panasonic Elect Works Photos/SP2-L2- SERIES_sml.jpg[/IMG]http://search.digikey.com/us/en/products/SP2-L2-DC24V/255-2839-ND/649193
After it was all said and done my boss decide not to go with a microcontroller and do it with a relay instead
I want to thank all of you that replied to this post
I will to build a 24 volt power supply to to use this relay
When I am on the other laptop computer I will post the code that wrote to do this there is a 100 th of a second where it powers up that pin but that may have work any way
In a way it dose because if you base your code on what state of the input is before the power is lost and when it is restored you might be able to restart the hoist motor again
The way I wrote the code was when you turn on the power and the input was low the contractor would be ON if the input went high then it would turn OFF and stay OFF until a second input went high to reset the first input but you would a second switch to disabled the first input
But i might be making this harder than it need to be
I do want to thank you for all of your help in this matter
As for making this harder than it has to be, yes you probably were. A safety circuit needs to be reliable so the simpler you make it the better. You do not want hoists starting up by themselves when the power comes back on.
BTW how are you going to do the timing of the down movement without a micro?
I was going add this on one of the hoist if I was using a micro controller