+ Post New Thread
Results 1 to 12 of 12
  1. #1
    Banned
    Points: 5,417, Level: 17

    Join Date
    Jun 2016
    Posts
    1,159
    Helped
    122 / 122
    Points
    5,417
    Level
    17

    Automatic Toilet Control

    I am making an Automatic Toilet Control project using PIC. I am using bi-polar stepper motor to control door hinges and solenoid bolt for locking system. I need to sense stepper motor shaft position (i.e., door position) with a feedback to detect motor stalling due to obstruction. Where can I find stepper motor with inbuilt potentiometer which can be used to detect stepper motor shaft position based on potentiometer voltage ?
    Last edited by Okada; 21st April 2017 at 14:06.

    •   Alt21st April 2017, 13:37

      advertising

        
       

  2. #2
    Super Moderator
    Points: 64,616, Level: 62
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,691
    Helped
    3474 / 3474
    Points
    64,616
    Level
    62

    Re: Automatic Toilet Control

    Most systems use optical encoders. If potentiometers were used there would have to be many values manufactured.
    With optical you can either look for pulses stopping prematurely (not at the same rate as the stepping pulses) or do a 'count in/count out' check to ensure full motion had been completed.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  3. #3
    Banned
    Points: 5,417, Level: 17

    Join Date
    Jun 2016
    Posts
    1,159
    Helped
    122 / 122
    Points
    5,417
    Level
    17

    Re: Automatic Toilet Control

    If potentiometers were used there would have to be many values manufactured.
    I can't use optical encoder with stepper motor because my PIC has 3 INTx pins and they are already assigned for other sensors. A 10k potentiometer can be built at the back of stepper motor and it can give 0 V for 0 degree and 5V for 360 degrees.



  4. #4
    Member level 3
    Points: 1,552, Level: 9

    Join Date
    Jun 2010
    Location
    Regina, Canada
    Posts
    66
    Helped
    2 / 2
    Points
    1,552
    Level
    9

    Re: Automatic Toilet Control

    I can't use optical encoder with stepper motor because my PIC has 3 INTx pins
    You can use timer interrupt, take every pulse as input to TMR0 and count on interrupt, you can also count steps needed to open and close in this case you don't need any external source to get position.


    1 members found this post helpful.

  5. #5
    Banned
    Points: 5,417, Level: 17

    Join Date
    Jun 2016
    Posts
    1,159
    Helped
    122 / 122
    Points
    5,417
    Level
    17

    Re: Automatic Toilet Control

    I can't use Timer. I thought about it but timer doesn't give me the stalled position of motor. I can use a timer to detect if door covers 135 degrees within a certain timeout period and if it doesn't then I can take it as motor stalled somewhere but it will not give me position of stalling.



    •   Alt21st April 2017, 20:15

      advertising

        
       

  6. #6
    Super Moderator
    Points: 64,616, Level: 62
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,691
    Helped
    3474 / 3474
    Points
    64,616
    Level
    62

    Re: Automatic Toilet Control

    You will also find difficulty tracing a 360 degree potentiometer. Your only option would be a multi-turn type but that wouldn't go from 0 to 5V in one revolution.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.


    1 members found this post helpful.

  7. #7
    Banned
    Points: 5,417, Level: 17

    Join Date
    Jun 2016
    Posts
    1,159
    Helped
    122 / 122
    Points
    5,417
    Level
    17

    Re: Automatic Toilet Control

    My angle of rotation is 135 degrees only.



  8. #8
    Member level 4
    Points: 1,050, Level: 7
    Altaero's Avatar
    Join Date
    Dec 2013
    Location
    St-Petersburg, Russia
    Posts
    76
    Helped
    23 / 23
    Points
    1,050
    Level
    7

    Re: Automatic Toilet Control

    I think there is no stepper motors (I guess no any type of motor) with inbuilt potentiometer. Compared to encoders it has a lot of drawbacks. You can use potentiometers yourself, but you'll have to mechanically connect it to the shaft (or preferably the load your shaft moves).
    Last edited by Altaero; 22nd April 2017 at 09:17.


    1 members found this post helpful.

  9. #9
    Super Moderator
    Points: 231,284, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    39,920
    Helped
    12195 / 12195
    Points
    231,284
    Level
    100

    Re: Automatic Toilet Control

    I can imagine a stepper motor driving a miniature model door. If you are actually planning to drive a full size door, start with a serious mechanical design.


    1 members found this post helpful.

    •   Alt22nd April 2017, 09:31

      advertising

        
       

  10. #10
    Banned
    Points: 5,417, Level: 17

    Join Date
    Jun 2016
    Posts
    1,159
    Helped
    122 / 122
    Points
    5,417
    Level
    17

    Re: Automatic Toilet Control

    @FvM

    Yes, I am doing a project for a client and I asked him to get stepper motor with potentiometer manufactured. I am only designing circuit and writing code. They need fully automatic toilet. It will have a 20x4 LCD display on the board and it shows whether the toilet is vacant or not. There will be a IR sensor on the door and if the toilet is vacant then standing in front of the toilet will open the door automatically and when user enters the toilet a PIR sensor will detect motion and then closes the door and displays toilet is not vacant on Lcd. Also the system allows the user access to toilet only if the flush tank is filled with water. After user uses toilet he has to press a button to flush the toilet. Another button is provided to open the door from inside.

    The project is stuck because there is no availability of stepper motor with potentiometer.

    I need this type of motor because I should be able to if door gets stuck.

    My task is only to design circuit and write code. To write code I need stepper motor with potentiometer.



  11. #11
    Super Moderator
    Points: 64,616, Level: 62
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    10,691
    Helped
    3474 / 3474
    Points
    64,616
    Level
    62

    Re: Automatic Toilet Control

    Using a stepper motor doesn't seem like a cost effective solution to me. Why does a sytstem need to know the angle of an access door anyway? It should be either open or closed (easy to sense) or jammed somewhere between (motor stall current detected). If it stalls, assuming something or someone is blocking the path, the usual solution is to move the door back to the fully open position. I confess to never having worked on toilet doors but I have worked on motorized gates to car parks which seem to work on the same principle.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  12. #12
    Super Moderator
    Points: 231,284, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    39,920
    Helped
    12195 / 12195
    Points
    231,284
    Level
    100

    Re: Automatic Toilet Control

    As explained by others, incremental encoder (possibly in combination with limit switches) is the usual way to monitor stepper motor movement. sairfan1 has suggested a feasible method to implement it without dedicated interrupt inputs in post #4. In so far I think, this part of the question can be considered as solved.

    If you prefer though to use an analog position monitoring method (potentiometer, analog hall sensor, whatsoever), you'll need to add it to your drive design.



--[[ ]]--