Hot!Elevator Algo

Page: 12345 > Showing page 1 of 5
Author
naeem1234
Super Member
  • Total Posts : 411
  • Reward points : 0
  • Joined: 2015/02/19 06:39:28
  • Location: 0
  • Status: offline
2018/08/13 03:48:16 (permalink)
0

Elevator Algo

Hello everyone
 
I am working to develop an Elevator controller that do not use any communication bus between the Elevator Cabin, Hall and Controller panel. Instead all call buttons and indication LEDs etc and reed switches from all floors are directly (or through relays etc) are connected on the GPIO pins. So a high number of pin counts is needed on the MCU. For example for a 12 floor elevator I estimated approx. 90 GPIO pins.
 
I was thinking that would it be possible to make a cascadable controller.. so for example if i could adjust 4 floors on a MCU and then make it communicate with next (and previous) MCU's each capable of handling 4 floors.. in this way i could use 40 pins MCUs in the Control box as many as needed.. all of them communicating with each other on UART port and they can be cascaded as many as required.
 
If this is something doable.. can you give an algo level design about the firmware?
 
Your help is highly appreciated.
#1

99 Replies Related Threads

    qɥb
    Monolothic Member
    • Total Posts : 3329
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: Elevator Algo 2018/08/13 04:01:38 (permalink)
    +1 (1)
    Rather than using huge MCUs, why not just use a small simple one (that has an SPI peripheral), and daisy chain parallel to serial shift registers for all the inputs?
    74HC165 chips are great for doing this.
     
     

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #2
    Francesco C
    Senior Member
    • Total Posts : 144
    • Reward points : 0
    • Joined: 2010/08/08 14:33:14
    • Location: UK
    • Status: offline
    Re: Elevator Algo 2018/08/13 04:19:01 (permalink)
    +1 (1)
    Hi,
    In theory your idea of 'cascadable'  controller is OK. However, you then decrease the reliability.
    I think you should attempt to simplify as much as possible, withing the constrains you have in the system.
    You probably have already checked that there are many controller with over 100pins so you have no problem there.
    Also you have not said why you are restricted in the usage of any communication bus.
     
    From experience, all the Elevator Controllers (except some ancient one) have some form of bus communication.
    This is because it reduces cost, generally. For example you will save cost on cabling alone.
     
    Regards
     
    Francesco C
    #3
    du00000001
    Just Some Member
    • Total Posts : 2075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Elevator Algo 2018/08/13 04:55:44 (permalink)
    +3 (3)
    Think of a serial interface as some "communications bus" and you have to correct your "bus-less approach".
     
    Indeed, one microcontroller per "action station" is a good approach. These microcontrollers might be connected via a single RS-485 link (e.g. using one of the MODBUS protocols), or - somewhat more modern - by e.g. CAN.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #4
    JorgeF
    Super Member
    • Total Posts : 3281
    • Reward points : 0
    • Joined: 2011/07/09 11:56:58
    • Location: PT/EU @ Third rock from the Sun
    • Status: offline
    Re: Elevator Algo 2018/08/13 05:08:15 (permalink)
    0
    Hi
     
    One more on favour of the multiple small MCUs interconnected by some kind of bus.
    Its an aproach used even in doorbeels and other multistation systems.
    A simple daisy chain of shift registers will have a high noise sensibility, so you need something more robust.
    Elevator shafts are often used for all kinds of cabling, including power lines of the building, including for the very powerfull elevator machinery.
     
     

    Best regards
    Jorge
     
    I'm here http://picforum.ric323.com too!
    And it works better....
    #5
    qɥb
    Monolothic Member
    • Total Posts : 3329
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: Elevator Algo 2018/08/13 05:13:22 (permalink)
    +1 (1)
    I suspect this is for a model elevator for a school project, and the OP is looking for a shortcut to simplify design...
    In real life, running hundreds of signals down a cable to a moving elevator cabin would be just plain stupid.

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #6
    du00000001
    Just Some Member
    • Total Posts : 2075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Elevator Algo 2018/08/13 05:18:06 (permalink)
    +2 (2)
    Running tens/hundreds of signals - each on its own wire - down a cable is plain nonsense even in a school project:
    • The wire harness is too heavy
    • Using the thinnest wires available will result in massive lack reliability (due to broken wires).
    Could be that such a system cannot be set into operation at all.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #7
    naeem1234
    Super Member
    • Total Posts : 411
    • Reward points : 0
    • Joined: 2015/02/19 06:39:28
    • Location: 0
    • Status: offline
    Re: Elevator Algo 2018/08/13 05:21:51 (permalink)
    0
    du00000001
    Think of a serial interface as some "communications bus" and you have to correct your "bus-less approach".
     
    Indeed, one microcontroller per "action station" is a good approach. These microcontrollers might be connected via a single RS-485 link (e.g. using one of the MODBUS protocols), or - somewhat more modern - by e.g. CAN.




     
    In cascading the MCU's the comm bus will be just between the MCU's which are all located within the controler box. So no comm-bus is between the controller and the Elevator Cabin or the Hall buttons.
    #8
    qɥb
    Monolothic Member
    • Total Posts : 3329
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: Elevator Algo 2018/08/13 05:23:43 (permalink)
    0
    naeem1234
    ...
    In cascading the MCU's the comm bus will be just between the MCU's which are all located within the controler box. So no comm-bus is between the controller and the Elevator Cabin or the Hall buttons.


    So you are back to running dozens of signals between your moving cabin and all the buttons and lights on the floors.
    Listen to what people are telling you. That is just plain stupid.

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #9
    naeem1234
    Super Member
    • Total Posts : 411
    • Reward points : 0
    • Joined: 2015/02/19 06:39:28
    • Location: 0
    • Status: offline
    Re: Elevator Algo 2018/08/13 05:26:20 (permalink)
    0
    Thank you for everyone's response.
     
    The project is for real life elevators but for low cost low maintenance easy deployment and less than 12 floors solution. This basic elevator type has more market share in my region as opposed to highly automated type of elevators.
     
    I am doing it for a contractor so I have to stick to his requirements.. specially those outside of the controller box.
    Edit: He don't want any electronics outside of the controller box.
     
    Can you point me to some sample c-code for Elevator control?
    post edited by naeem1234 - 2018/08/13 05:31:59
    #10
    qɥb
    Monolothic Member
    • Total Posts : 3329
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: Elevator Algo 2018/08/13 05:31:32 (permalink)
    0
    naeem1234
    The project is for real life elevators but for low cost low maintenance easy deployment and less than 12 floors solution.
    ...

    Sorry, but your proposed solution is NOT going to be low maintenance.
    Plainly you've never worked on this sort of system before.
     

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #11
    naeem1234
    Super Member
    • Total Posts : 411
    • Reward points : 0
    • Joined: 2015/02/19 06:39:28
    • Location: 0
    • Status: offline
    Re: Elevator Algo 2018/08/13 06:30:20 (permalink)
    0
    qɥb
    Sorry, but your proposed solution is NOT going to be low maintenance.
    Plainly you've never worked on this sort of system before.
     



    Yes this is my first elevator project but the contractor has deployed around 400 such elevators successfully using different low cost Chinese controllers or PLCs or local developed etc using the same wiring based scheme. So I think he has worked out ways to handle the problems which usually occur in these types of elevators.
     
    Regarding 'low maintenance' i am pretty sure it must be like this else it would not have been sustainable for the contractor, whose background is only in electrical wiring etc.
     
    Moreover.. here the maintenance can be in 3 areas:
    1. The controller
    2. The interconnecting massive wiring
    3. Button & LED panel inside Elevator Cabin
    4. Button & LED panel on every floor.
     
    Once the whole system is installed and operational then very little chance of problem occurring in (1), but all the remaining components (2), (3) and (4) will have day to day or maybe once in a week or month type of problem arrival rate specially where the elevators are used very roughly.. for which a simple electrician would suffice to attend and fix the problem without even using a multimeter. So the cost of technician as well as the cost of tools and replaceable components is very important here. Also because the elevator is in use all the time so the time-to-bring-it-back-to-operational is also very important and in this case where most of the faults can be seen by visible eyes they can also be fixed very quickly.
     
    Only in the case when something would go wrong in the controller box (1) only then some high cost will be incurred.. specially the visit of an engineer to the site etc.
    #12
    du00000001
    Just Some Member
    • Total Posts : 2075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Elevator Algo 2018/08/13 06:33:23 (permalink)
    0
    "Low cost, low maintenance" would be a system with a serial pair (of reasonable cross-section to prevent braking) plus a power line (most likely a simple pair to power the cabin, another pair to power the floors).
     
    Start calculating the cost of parallel wires, dive into the issues of the cable to the cabin and - - - start to become reasonable!

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #13
    du00000001
    Just Some Member
    • Total Posts : 2075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Elevator Algo 2018/08/13 06:46:03 (permalink)
    0
    Buttons and LED panels are subject to about the same maintenance - irrespective of the system applied. (At some point, all buttons and LEDs are connected to some microcontroller.)
    But honestly: if our elevators would be subject to daily, weekly or monthly maintenance due to faults, they would get ripped out and replaced!
    It's already considered a real nuisance that one of our elevators developed some kind of "dementia": from time to time (every 2 or 3 months) one of the cabins - partly - forgets that there is a 5th floor: if called from the 5th, it will come. But you can't select the 5th from within the cabin  sad
     
    But the wiring is the real issue of the "massive parallel" approach: there's a lot that might happen. And imagine a button not working - on the 12th floor - while the system controller resides in the basement.
    Now try to find out whether it's the button or the wiring. If the wiring: where exactly?
    Even worse: the same situation with a button in the cabin. Wired through the ever-flexing harness that's prone to repeated wire breaks.
     
    The reason for the existing massive parallel wiring may be more on the contractor's side, who - until now - may have never heard of other, more reasonable approaches.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #14
    naeem1234
    Super Member
    • Total Posts : 411
    • Reward points : 0
    • Joined: 2015/02/19 06:39:28
    • Location: 0
    • Status: offline
    Re: Elevator Algo 2018/08/13 06:52:21 (permalink)
    0
    du00000001
    The reason for the existing massive parallel wiring may be more on the contractor's side, who - until now - may have never heard of other, more reasonable approaches.




    Thats true.. and I dont want to impress upon him to move to more advanced controllers.. as then he would not be feeling easy with those.
     
    BTW he has just sent me links to few commercial controllers based on the same design approach of massive wiring.. Although he also know about the ModBus versions but he resist using those.
    #15
    NKurzman
    A Guy on the Net
    • Total Posts : 16291
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: Elevator Algo 2018/08/13 07:02:43 (permalink)
    0
    People, this is the project. It is what the customer wants. The tasks is to replace the control, not the system.
    You are not going to find elevator code lying around for your special purpose elevator. But elevator is a commonly assigned school project. You could start with the PLC code it should give you a basic idea of the tasks.
    And hope you are properly handling the input and output hardware. TTL is not designed for 12 stories. And the wire lengths will pickup all kinds of noise and spikes.
    #16
    naeem1234
    Super Member
    • Total Posts : 411
    • Reward points : 0
    • Joined: 2015/02/19 06:39:28
    • Location: 0
    • Status: offline
    Re: Elevator Algo 2018/08/13 07:03:23 (permalink)
    0
    du00000001
    But honestly: if our elevators would be subject to daily, weekly or monthly maintenance due to faults, they would get ripped out and replaced!

     
    If you have something like 400 installations in operations then probability of occurring a fault in any one lift is not too low..
     
    #17
    malaugh
    Super Member
    • Total Posts : 338
    • Reward points : 0
    • Joined: 2011/03/31 14:04:42
    • Location: San Diego
    • Status: offline
    Re: Elevator Algo 2018/08/13 07:07:43 (permalink)
    0
    An easy way to increase the I/O on any CPU is to use the SPI bus.  SPI is a serial bus, so you in firmware can assign memory locations for the switches and lights, then write a function that regularly reads these registers and sends them over the SPI connection.
     
    Microchip chip sell a part https://www.microchip.com/wwwproducts/en/MCP23S17  that expands to 16 I/O.  You can just daisy chain these together to get as many I/O as you require.  You can also use a simpler chip like the 74HC595 for output, and a equivalent (cannot remember the part number) for input.
     
     
     
     
     
    #18
    du00000001
    Just Some Member
    • Total Posts : 2075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Elevator Algo 2018/08/13 07:07:45 (permalink)
    +1 (1)
    In German there are 2 words that do not really translate to English:
    • beratungsresistent
    • bildungsresistent
    Error localization within a system with a serial bus is not "more difficult" (more the contrary), it's just "different".
    But with a minimum of education easily adapted by the workers.
     
    I had a similar issues many years ago:
    • I started with "what could this external guy do what we cannot ?"
    • They soon had to find out this "external guy" could do a lot of things they couldn't.
    • The whole story ended with me refurbishing their whole system - introducing minor, but important changes.
    Subsequently, they adopted the new principles as service frequency went down to next-to-zero and system installation had become a piece of cake.
     
    The only guy somewhat suffering from this: the "chief debugger".
    He no longer had regular trips all around the world. Just because the lack of necessity. (Although I'm not sure whether he really suffered: these were no leisure trips, these were unplanned trips that ruined every planning.)

    BTW: the company still exists. And I think some of the principles developed then are still employed these days.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #19
    du00000001
    Just Some Member
    • Total Posts : 2075
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: Elevator Algo 2018/08/13 07:11:26 (permalink)
    0
    @ naeem1234
     
    Ripping out elevators is not within the influence of the contractor: on the long run it's the users that decide pro or against some system. So the maintenance contract may be profitable for the contractor. But once a better and more reliable system is available, he might see "his" 400 systems diminish towards zero.
     

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #20
    Page: 12345 > Showing page 1 of 5
    Jump to:
    © 2018 APG vNext Commercial Version 4.5