First project creating circuit that shows engaged status of a toilet!

Thread Starter

enigma121

Joined Mar 8, 2012
4
Hi All,

I have well and truly wracked my brains with this one. Maybe somebody here might be able to help!

I have attached an image to this post for reference if it is needed.

I must first state that I am somewhat of a newbie at electronics - especially when logic controllers are thrown into the mix!

The setup:

In essence I would like to rig up a 'simple' system using LED illuminated lights and switches that indicates whether a toilet is vacant or not!

Outside the toilet will be a 'Door Open switch' and also a 'toilet engaged light' (indicating when someone is using the toilet)

Inside the toilet will be a 'door open switch', a 'locked' light (which illuminates when the door is locked, a 'unlocked' light (which illuminates when the door is open' and a 'lock switch' which locks the door.

There will also be two lights behind the mirror in the toilet, one that illuminates with 'Toilet locked' and one that illuminates with 'toilet unlocked' at the appropriate times.

I should also mention that the system (lights) will be powered off a 36V 1.7A DC transformer. This I realise is too powerful for most CMOS chips Ive looked at but I can reduce the input voltage with resistPrs to bring it down to 12v.

The lights where mentioned are all LED's. Mirror writing is illuminated by a string of 20 LED's wired in serial. The switches are not toggle switches i.e. they have no discernible on or off position (a bit like PC power buttons). There are only 2 contacts on each switch - this makes them SPST if I am not mistaken?.

Switching logic:

This is what I would (in an ideal world) like to happen!

When the external or internal 'door open switch' are pressed the following lights would light up:

Mirror unlocked
Internal 'unlocked'

All other lights would be off. This would be the default state when the circuit is powered on

When the internal 'lock switch' is pressed the following lights light up:

Mirror locked
Internal locked light
external toilet engaged light.

All other lights would turn off

The problem is I cannot for the life of me figure out which CMOS controller to buy or indeed how to wire it all up! To that end I would appreciate some help.

Thanks in advance to all that glance at this :)

Cheers

Dave
 

Attachments

Pencil

Joined Dec 8, 2009
272
Converting the input from the switch to a useable latched
condition is the first step.

Sounds like you should be looking for a "Schmitt Trigger"
These can be built form discrete components, made from
a 555 timer, or available as an I.C. The Schmitt trigger
would allow you to toggle between two states from the
clock pulse provided from your switches. The toggling between
high and low states could be used, with appropriate drive
circuitry, to turn on transistors, relays, MOSFETs etc.

Working out the logic from there is just a matter of details.
With your available power I would tend to lean toward relays
triggered from the logic and switching the 36V that is driving
any lock solenoids, lights etc..


The switches are not toggle switches i.e. they have no discernible on or off position (a bit like PC power buttons). There are only 2 contacts on each switch - this makes them SPST if I am not mistaken?.
SPST Momentary ON

I should also mention that the system (lights) will be powered off a 36V 1.7A DC transformer. This I realise is too powerful for most CMOS chips Ive looked at but I can reduce the input voltage with resistPrs to bring it down to 12v.
Look for "Voltage Regulator" such as 78xx series or DC to DC buck convertors. Using resistors for reducing voltage is not a good idea.

Post back here with any more questions.
 

crutschow

Joined Mar 14, 2008
34,464
Draw a logic flow (state) diagram of all the states you need and how to go from one state to the next. From that you can generate a truth table to determine the logic you need for the various functions. Google "flow chart" and "truth table" for more info on that.

Then you could use a microprocessor for the logic or, since you logic is reasonably simple, some CMOS logic circuits (AND gates, OR gates, and latches).

It will require some learning on your part to do all this but just ask questions here for help on things you don't understand.
 

THE_RB

Joined Feb 11, 2008
5,438
You really need to add 2 additional lights for someone doing a "number1" or a "number2"... :)

That's very important information to know if you are waiting to use the toilet after someone. ;)
 

gerty

Joined Aug 30, 2007
1,305
Look up automatic flusher for urinals. They flush the urinal when the user walks away. I believe it works on an IR led with photo transistor, the IR is reflected off the user.
 

Thread Starter

enigma121

Joined Mar 8, 2012
4
First off thanks all for the replies. Unfortunately I didn't receive email notifications of a reply so I assumed nobody had - how's that for negative thinking! :)

Since I didn't have this forum to refer to I puzzled some more over this and have reduced it (for testing purposes) down to its simplest form - On paper (in the image attached) 2 NOR gates connected in a ??SR latch?? configuration works perfectly.

I reduced the input down to 6V (again for testing) and wired up a CMOS 4001 chip in the configuration shown in the attached image (pin 14 and 7 attached to +6V and 0V respectively, pin 1 connected to output from SPST momentary switch 1, pin 2 connected to output from pin 4, pin 3 connected to pin 5 and pin 6 connected to output from SPST momentary switch 2). I then connected the two LED's to the outputs of pin 3 and 4.

The result of this was disturbingly nothing like in the image attached! When the power was turned on both LED's turned on. When switch 1 was pressed LED2 turned off but when it was released LED2 turned back on again. Vice versa for switch 2 and LED1

After reading through Pencil's post maybe I need to build a Schmitt trigger. I cant understand the wiring involved though. I did a design this morning based on a 555 timer config I found on the internet. The output from the timer was high before the switch was pressed, when the switch connected to the 555 timer is pushed the output goes low but when the switch is released the output goes high again! This is a very similar situation to what I've currently got

I must be missing something ...or possibly a lot of things!

If anyone can provide information to explain my apparent mis-configuration at this point it would be much appreciated!
 

Attachments

Thread Starter

enigma121

Joined Mar 8, 2012
4
Bizarrely I have just found exactly what I am looking to do on YouTube. I only found out this morning that the configuration I was after was a 'SR latch'. Knowledge is a wonderful thing lol!

http://www.youtube.com/watch?v=mo4Lq0DvJ68

The only difference between the circuit there and mine are the resistors connected to the two switches. I'm going off now to Google 'pull down resistors' as I believe these hold the key to my solution :)
 

Pencil

Joined Dec 8, 2009
272
After reading through Pencil's post maybe I need to build a Schmitt trigger. I cant understand the wiring involved though. I did a design this morning based on a 555 timer config I found on the internet. The output from the timer was high before the switch was pressed, when the switch connected to the 555 timer is pushed the output goes low but when the switch is released the output goes high again! This is a very similar situation to what I've currently got

I must be missing something ...or possibly a lot of things!

If anyone can provide information to explain my apparent mis-configuration at this point it would be much appreciated!

Sorry, I realized later I was't very clear. I was thinking
of a "Bistable Multivibrator" or "Flip flop", but got side-
tracked when thinking about how to provide a clean clock
pulse in order to change states from low to high. Anyway
the post read one thing when I meant to say another. Basically
you only got half of a thought, that wasn't complete.

I am sorry to have misled you.

Hopefully you are on the right track now If you need more help
feel free to keep posting.
 
Top