Shop OBEX P1 Docs P2 Docs Learn Events
basic stamp project for an elevator — Parallax Forums

basic stamp project for an elevator

Mark_BMark_B Posts: 9
edited 2005-03-09 22:00 in BASIC Stamp
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

  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-08 21:26
    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 SchwabeBeau Schwabe Posts: 6,557
    edited 2005-03-08 21:30
    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
    (Communication Interface Division)
    500 Pinnacle Court, Suite 525
    Mail Stop GA1
    Norcross,GA 30071
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-03-08 21:58
    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
  • Mark_BMark_B Posts: 9
    edited 2005-03-08 22:32
    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 McCorisonJim McCorison Posts: 359
    edited 2005-03-08 22:50
    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?

    Jim
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-03-08 22:54
    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
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-09 01:23
    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, 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
  • Mark_BMark_B Posts: 9
    edited 2005-03-09 01:43
    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.
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-09 02:27
    Yes, but they DO have a 32-port I/O module. Doesn't that one have 16 outputs?
  • Mark_BMark_B Posts: 9
    edited 2005-03-09 15:57
    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 VerkaikPeter Verkaik Posts: 3,956
    edited 2005-03-09 17:29
    Hi,

    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 BakerPaul Baker Posts: 6,351
    edited 2005-03-09 17:46
    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 VerkaikPeter Verkaik Posts: 3,956
    edited 2005-03-09 17:50
    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
  • NewzedNewzed Posts: 2,503
    edited 2005-03-09 17:54
    Mark, did you receive the Private Message I sent last night?

    Sid
  • Mark_BMark_B Posts: 9
    edited 2005-03-09 21:52
    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
  • NewzedNewzed Posts: 2,503
    edited 2005-03-09 22:00
    Mark, please contact me at [url=mailto:Newzed@aol.com.]Newzed@aol.com.[/url]

    Sid
Sign In or Register to comment.