basic stamp project for an elevator
Mark_B
Posts: 9
I work on elevators for a living and am constantly dealing with intermittent problems.· I want to build a circuit that will register simulated pushbutton inputs so I can run the car for a period of time before I put it back in service.· I want a total of 16 outputs, and I want one output to go on every 60 seconds in a random pattern.· To set the call, I need to pick a 24vdc relay that draws 25ma.· These relays have a common controller ground·and need a·+24v to pick.· ·I could build the circuit from scratch, but I would prefer to buy an off the shelf solution to save time and hopefully cost.· Does someone offer a pre-engineered·pcb or kit that has a socket for a bs2 and 16 output circuits that use miniaturized relays or transistors?· Also, I am ok with electronics but have no programming experience.··· I think I can eventually hack my way through the code, but any ideas would be appreciated...thanks.
Comments
One point -- you probably don't want 'random' action. You want action that you KNOW about in advance, and can VERIFY executed correctly.
So select a set of floors, select some times, put it all in a loop, and let it go. A nice pattern could be "go to top floor. Go to bottom floor, go to top - 1, go to bottom + 1, ..." etc.
The approximately 60 seconds part is very easy with the BS2 -- just do a PAUSE 60000.
"play back" the sequences that were previously logged as a macro and do your testing that way.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe - Mask Designer III
National Semiconductor Corporation
(Communication Interface Division)
500 Pinnacle Court, Suite 525
Mail Stop GA1
Norcross,GA 30071
For your 16 floors, the most efficient data structure is 2 bytes (16 bits), initialize both bytes to 0, initialize your random function, adjust the output of the random function to output integers between 0 and 15, perform 1<<(random value) in a two byte temp variable, perform the AND operator between your set structure and your temp value and place the results into your temp value. If the result is 0, set the associated bit in your set structure and output the asscociated output line, pause 60 seconds and repeat the process. If the result is greater than 0, that floor was already selected, immeadiatly choose another random value and repeat the above process until the random function picks a floor that hasn't been chosen yet.
To maintain a log of the order the floors were chosen, maintain a seperate list of the floors chosen (1st location is the first floor choosen and so on), provide a means for downloading that dataset after the test is completed, then physically compare the floor order with observed behaviour.
the prefab board that fits your needs that parallax offers is here: http://www.parallax.com/detail.asp?product_id=27965·but you could certainly do it yourself for cheaper.
Post Edited (Paul Baker) : 3/8/2005 10:02:05 PM GMT
Jim
Post Edited (Paul Baker) : 3/8/2005 10:57:02 PM GMT
It occurs to me it might be annoying to some of the upper story people to have the elevator zooming by all night -- but maybe you've thought of that already.
Doesn't Al Williams have something like this already? Maybe Parallax commercial stuff has a relay board in it.
What are you trying to 'press', anyway? I assume this gizmo will be somewhere near a 'master' controller for the elevator, simulating button presses. What does the existing 'button press' circuit look like? It's possible all you need is a couple of diodes for a 'wired-or' configuration.
Yup -- http://www.parallax.com/detail.asp?product_id=27965
Just go to www.parallax.com, click "Products" tab, go to the "Industrial" entry.· There's several options there -- this is the 16-I/O board, $290, WITH the BS2 socket (but you still need a BS2 to run it).
Post Edited (allanlane5) : 3/9/2005 1:27:55 AM GMT
You may want to check out http://www.conrad.com
Select UK flag (bottom right)
and search for part 967720
This is a serial controlled cascadable 8-relays card.
So for 16 relays you need two cards.
regards peter
You do need true rs232 levels so you need a level converter (max232).
The programming port won't do because of the echo.
What may be a problem is that the last card transmits back to
the host. I don't know how fast the data is returned to the stamp.
You can also search for part 130217. A relay card for a parallel port.
regards peter
Post Edited (Peter Verkaik) : 3/9/2005 5:54:41 PM GMT
Sid
Sid