View Full Version : basic stamp project for an elevator

03-09-2005, 04:15 AM
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.

03-09-2005, 04:26 AM
I'm sure somebody makes such a beast. I don't know personally, but I'm sure somebody does.

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.

Beau Schwabe (Parallax)
03-09-2005, 04:30 AM
I agree, you probably do not want 'random' action. Is there anyway you could monitor and log a working unit?

"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 (http://www.national.com/)
(Communication Interface Division)
500 Pinnacle Court, Suite 525
Mail Stop GA1
Norcross,GA 30071

Paul Baker
03-09-2005, 04:58 AM
A random set operation could work, its what is used in programs which deal cards, you can't deal out two of the same card. This is usually done by coupling a random function with a set structure.

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

03-09-2005, 05:32 AM
The purpose of random calls is to simulate normal operation. I am not so much interested in checking to see if the car followed the exact secquence of calls, as I am in checking to see if it followed the correct "secquence of operation" that is required for the elevator to run from any floor to any other floor. There are many individual steps (i.e. relay operations, TTL logic) for a car to complete a floor to floor run. I want to turn this circuit on and come back in the morning and if the car failed to complete any single floor to floor run, I will know I have more troubleshooting to do. Thanks for the ideas.

Jim McCorison
03-09-2005, 05:50 AM
How will you know that the car went to the floor that was requested? If the random output of the stamp says go to 13, but the car goes to 12, you'd certainly want to know it. Or is there logging in the elevator control system showing floor requests Vs floor arrived at?


Paul Baker
03-09-2005, 05:54 AM
Then your best approach is a systematic method of calling every floor from every floor. The easiest method is set 1 as home, goto 1, goto 2, return, goto 3, return,.., goto 16, return, set 2 as home, goto 2, goto 3, return, goto 4, return... See the little trick in there, the return is an implicit pressing of the higher floor to the home floor, so when you set that higher floor as home you don't need to call any lower floors because they were already tested.

Post Edited (Paul Baker) : 3/8/2005 10:57:02 PM GMT

03-09-2005, 08:23 AM
Yes, testing for intermittent faults is a pain in the butt. I didn't realize each 'select_and_goto_floor' operation had so many pieces to it -- and it's these pieces you're trying to monitor.

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 (http://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

03-09-2005, 08:43 AM
Once again, I am not really interested in testing whether the car went to the exact floor that was specified.ˇ Those kinds of failures are so rare that I not interested in going there.ˇ The failure I'm looking for is more like a elevator getting stuck between floors.ˇ Also, I had looked at the 16 relay IO board that Parallax makes but if you carefully read the documentation, you see that it has 8 inputs and 8 outputs.ˇ I don't need any inputs and I need 16 outputs.

03-09-2005, 09:27 AM
Yes, but they DO have a 32-port I/O module. Doesn't that one have 16 outputs?

03-09-2005, 10:57 PM
You're right, it does have 16 outputs. Didn't notice that. However, it is designed for the 40 pin chip, it has features I don't need, and it is expensive. I'll probably build my own. Thought maybe someone had heard of a cheap solution.

Peter Verkaik
03-10-2005, 12:29 AM

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

Paul Baker
03-10-2005, 12:46 AM
from product description: "Connected through a simple three-wire cable (TxD, RxD, Ground) ˇ Baud rate 19200" Can a stamp handle this baud rate? Since there is no clock, I dont think you can slow the baud rate down.

Peter Verkaik
03-10-2005, 12:50 AM
19200 baud is no problem for a stamp.

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

03-10-2005, 12:54 AM
Mark, did you receive the Private Message I sent last night?


03-10-2005, 04:52 AM
I did not recieve your private message sid. Am new to this forum. Actually, I'm new to forums in general. Don't know how to recieve one. Are you talking about e-mail?? Sorry

03-10-2005, 05:00 AM
Mark, please contact me at Newzed@aol.com. (mailto:Newzed@aol.com.)