Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Automatic Toilet Control

Status
Not open for further replies.

Okada

Banned
Advanced Member level 4
Joined
Jun 16, 2016
Messages
1,159
Helped
129
Reputation
252
Reaction score
129
Trophy points
63
Activity points
0
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:

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.
 

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.
 

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.
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
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.
 

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.
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
My angle of rotation is 135 degrees only.
 

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:
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
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.
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
@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.
 

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.
 

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.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top