All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > Homework Help

Notices

Homework Help Stuck on a textbook question or coursework? Cramming for a test and need help understanding something? Post your questions and attempts here and let others help.

Closed Thread   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 10-19-2010, 03:03 AM
jegues's Avatar
jegues jegues is offline
Senior Member
 
Join Date: Sep 2010
Posts: 734
Question Elevator Circuit

Evening gents,

We've just recieved a group project in our digital logic course, and I'm trying to think of the best way to proceed so I thought why not post it on this forum and discuss some important things/details that I should consider when designing our system.

See figure attached for project details.

As a minimum our implementation will require the use of:
  • User input devices (buttons/keyboard);
  • Output displays - you may use the built in LEDs or may make use of external devices such as seven segment displays
  • Finite State Machine(s) to control the interaction of the parts;
Does anyone have any advice/ideas/tips/hints/suggestions for us?

Thanks again!
Attached Images
File Type: jpg ElevatorP.jpg (254.9 KB, 201 views)
  #2  
Old 10-19-2010, 03:40 AM
JoeJester's Avatar
JoeJester JoeJester is online now
Senior Member
 
Join Date: Apr 2005
Location: Grand Prairie, TX, USA
Posts: 2,355
Default

http://www.allaboutcircuits.com/scri...or+circuit#864

produces numerous elevator circuit responses
__________________
Joe
Navy Electricity and Electronics Training Series (NEETS) - pdf files - http://www.fcctests.com/neets/neets.htm
  #3  
Old 10-19-2010, 12:16 PM
jegues's Avatar
jegues jegues is offline
Senior Member
 
Join Date: Sep 2010
Posts: 734
Default

Quote:
Originally Posted by JoeJester View Post
http://www.allaboutcircuits.com/scri...or+circuit#864

produces numerous elevator circuit responses
Lots of those threads require the use of relays. We've never used relays in our labs yet.

Is this something that can be accomplished using a FSM? (We haven't seen those yet so I'm not sure)
  #4  
Old 10-19-2010, 04:28 PM
Georacer's Avatar
Georacer Georacer is offline
Super Moderator
 
Join Date: Nov 2009
Location: Athens, Greece (GMT +2)
Posts: 4,870
Default

A relay isn't something complicated. It amplifies the circuits potential power, much like a transistor when it operates on saturation.
Its key features are the voltage on which the secondary coil needs to be under, in order to close the switch it controls, the current the primary contact can handle and the voltage it can be put under.

If you want to use an FSM design, first come up with a working state diagram. A page of the AAC e-book concerning FSM's will be uploaded soon (I hope) so more to be heard from that part.
__________________
.
I am a prisoner of high standards and low social skills
____________________________________

I wish I was the best at what I would do, and what I would do wouldn't be pretty.
  #5  
Old 10-19-2010, 05:38 PM
DonQ DonQ is offline
Senior Member
 
Join Date: May 2009
Posts: 320
Default

Relays are the ultimate logic gate. Contacts of different relays in series are AND gates, in parallel are OR gates. Normally closed contacts are like a NOT because they open when the coil is activated. The major difference is the currents used are generally much higher than integrated circuits. Logically, they are the same, just a current activated switch with (possibly) multiple channels.

What was that about being able to generate any logic equation with only one type of logic gate and the availability of a NOT...?

State machines? Look up "ladder logic". This is a graphical representation of relay logic, nowadays performed on PLCs, but originally (and still sometimes) performed on huge banks of actual clicking relays.
  #6  
Old 10-19-2010, 06:53 PM
Georacer's Avatar
Georacer Georacer is offline
Super Moderator
 
Join Date: Nov 2009
Location: Athens, Greece (GMT +2)
Posts: 4,870
Default

Quote:
Originally Posted by DonQ View Post
What was that about being able to generate any logic equation with only one type of logic gate and the availability of a NOT...?
On that post:
http://forum.allaboutcircuits.com/sh...highlight=NAND
along with icelated, we found that you can simulate AND, OR and NOT gates can be simulated with a NAND gate or a NOR gate. Therefore you can create any logic function either with only NOR gates or NAND gates.

Check it out. If we made a mistake please tell us so.
__________________
.
I am a prisoner of high standards and low social skills
____________________________________

I wish I was the best at what I would do, and what I would do wouldn't be pretty.
  #7  
Old 10-19-2010, 08:18 PM
PRS's Avatar
PRS PRS is offline
Senior Member
 
Join Date: Aug 2008
Location: Yakima Washington
Posts: 989
Smile

The way I read your project specs, there is no real motor involved and hence no appreciable current. It sounds like this is a 5 volt and a 100 or 200 mA range logic project, and so no relays are required. Relays are for larger currents than semiconductors can provide. Rather than relays, and since this is a sequential logic circuit, you will be using logic gates and flip flops. Those buttons (for input) and LEDs (for output) are all low power devices. A simple low power 5 volt supply is enough for the whole project.

If this isn't a microprocessor project, which I understand to be the case, start by making a logic table for all of the conditions that can occur between three floors. An elevator climbing to level 2 usually will continue up to the 3rd floor, though 1 has been pushed on its way to 2. Think of things like that. This elevator has three states which correspond to the three floors. But the alternative paths between states requires logic. This is your challenge. You need to draw a 3-state diagram and, using it, imagine all of the possibilities that may come up and then, using common sense, determine the elevator's behavior and fill in the logic table. In the end, you'll be explaining your common sense decisions to your instructor.

Then, using the techniques of sequential logic you learned in class, develop a circuit to implement the control system on a breadboard. In a real application you would also need to vary the speed of the motor and detect (with sensors) the position of the elevator with respect to the doors. But I don't think your instructor is calling for such complications. At least I see none of that in the specs.

[QUOTE=lank;823949]The outputs of your elevator controller, i.e. your control signals are a) direction, (1 for up, 0 for down, or vice versa); and b) on/off (1 for on, 0 for off or vise-versa -- your choice, but be consistent); also light1, light2 light3, all of which are either on or off (1 or 0).

The inputs are represented by the left side of your logic table. There are three buttons, but there are many more conditions dictated by logic. So add a 4th input and call it priority. This is 1 if the car should stop at the next station, 0 otherwise. Therefore make a 4 bit logic table on the left side and use the MSB for the priority bit:

0000
0001
0010,
.
.
.
1111

Remember that the next state of a sequential circuit is determined by both the input and the present state. That priority bit represents the present state and it is set logically according to your state diagram and common sense.

So you need to think like this: If the car is at 1 and both 2 and 3 buttons are pushed, make the car go to 2, turning off light 1 and stop there and turn on light 2 (I'd add a timer circuit in order to show this, otherwise events will happen too fast to see them occur), then the car goes up to 3 and stops. This means light 2 goes off and light 3 goes on. Remember direction = 1 in both cases, but there are five changes in the on/off control from 0 to 1 from 0 to 1 to 0.

Good luck and have fun!

I just re-read the specs. Another output is to show the direction the car is traveling. You actually don't need another output for this. Just use the up/down control line mentioned above. It would control the motor direction if the motor was actually present. To implement this directional signal on your breadboard just use two opposing LEDs, one red, the other green, and designate one as up the other as down.

Just as an aside: You are making a dedicated computer. It just does one thing: It controls a three floor elevator. But larger logic systems, such as microprocessors and micro-controllers are based on the same logic that you are developing. In this case, each instruction represents a hardware implementation, be it a Do While Loop or a Go To instruction. So you see, this project is leading you to somewhere big. If you pursue this think Intel or Microchip Corporations, and the like.
__________________
Paul
Yakima, Washington

Last edited by PRS; 10-19-2010 at 11:38 PM.
  #8  
Old 10-20-2010, 02:09 AM
jegues's Avatar
jegues jegues is offline
Senior Member
 
Join Date: Sep 2010
Posts: 734
Question

[QUOTE=PRS;287971]The way I read your project specs, there is no real motor involved and hence no appreciable current. It sounds like this is a 5 volt and a 100 or 200 mA range logic project, and so no relays are required. Relays are for larger currents than semiconductors can provide. Rather than relays, and since this is a sequential logic circuit, you will be using logic gates and flip flops. Those buttons (for input) and LEDs (for output) are all low power devices. A simple low power 5 volt supply is enough for the whole project.

If this isn't a microprocessor project, which I understand to be the case, start by making a logic table for all of the conditions that can occur between three floors. An elevator climbing to level 2 usually will continue up to the 3rd floor, though 1 has been pushed on its way to 2. Think of things like that. This elevator has three states which correspond to the three floors. But the alternative paths between states requires logic. This is your challenge. You need to draw a 3-state diagram and, using it, imagine all of the possibilities that may come up and then, using common sense, determine the elevator's behavior and fill in the logic table. In the end, you'll be explaining your common sense decisions to your instructor.

Then, using the techniques of sequential logic you learned in class, develop a circuit to implement the control system on a breadboard. In a real application you would also need to vary the speed of the motor and detect (with sensors) the position of the elevator with respect to the doors. But I don't think your instructor is calling for such complications. At least I see none of that in the specs.

Quote:
Originally Posted by lank View Post
The outputs of your elevator controller, i.e. your control signals are a) direction, (1 for up, 0 for down, or vice versa); and b) on/off (1 for on, 0 for off or vise-versa -- your choice, but be consistent); also light1, light2 light3, all of which are either on or off (1 or 0).

The inputs are represented by the left side of your logic table. There are three buttons, but there are many more conditions dictated by logic. So add a 4th input and call it priority. This is 1 if the car should stop at the next station, 0 otherwise. Therefore make a 4 bit logic table on the left side and use the MSB for the priority bit:

0000
0001
0010,
.
.
.
1111

Remember that the next state of a sequential circuit is determined by both the input and the present state. That priority bit represents the present state and it is set logically according to your state diagram and common sense.

So you need to think like this: If the car is at 1 and both 2 and 3 buttons are pushed, make the car go to 2, turning off light 1 and stop there and turn on light 2 (I'd add a timer circuit in order to show this, otherwise events will happen too fast to see them occur), then the car goes up to 3 and stops. This means light 2 goes off and light 3 goes on. Remember direction = 1 in both cases, but there are five changes in the on/off control from 0 to 1 from 0 to 1 to 0.

Good luck and have fun!

I just re-read the specs. Another output is to show the direction the car is traveling. You actually don't need another output for this. Just use the up/down control line mentioned above. It would control the motor direction if the motor was actually present. To implement this directional signal on your breadboard just use two opposing LEDs, one red, the other green, and designate one as up the other as down.

Just as an aside: You are making a dedicated computer. It just does one thing: It controls a three floor elevator. But larger logic systems, such as microprocessors and micro-controllers are based on the same logic that you are developing. In this case, each instruction represents a hardware implementation, be it a Do While Loop or a Go To instruction. So you see, this project is leading you to somewhere big. If you pursue this think Intel or Microchip Corporations, and the like.
Thank you for the excellent reply. What you've interpreted from the project is exactly what the instructors are expecting from us.

I'm going to read over your post a few more times, try a few things out and I'll see what I can come up with. I'll edit this post with my results.

Thanks again!

EDIT: Here's a truth table I came up with from what you had recommended. (See figure attached)

I'm a little confused as to what should be on the right side of my table. Also, should each light (1,2,3) have its own column in the table?

Is the idea to split the logic of the elevator into 2 parts, one part that is simply sequential logic (i.e. doesn't depend on the state of the elevator), and another part which DOES depends on the given state of the elevator?

Your post has got me thinking alot, but I still don't have any solid sort of structure down, ideas and variables are still floating around.

Any suggestions?
Attached Images
File Type: jpg ElevatorPTable.JPG (26.5 KB, 112 views)

Last edited by jegues; 10-20-2010 at 02:38 AM.
  #9  
Old 10-20-2010, 05:11 AM
Georacer's Avatar
Georacer Georacer is offline
Super Moderator
 
Join Date: Nov 2009
Location: Athens, Greece (GMT +2)
Posts: 4,870
Default

Quote:
Originally Posted by jegues View Post
Is the idea to split the logic of the elevator into 2 parts, one part that is simply sequential logic (i.e. doesn't depend on the state of the elevator), and another part which DOES depends on the given state of the elevator?
Just a small correction here, in sequential logic, the output is dependent of the current state.

If this was an actual build, things would be easier, in the logic part. But we 'll find a way.

It is important to set up correctly the inputs, the states and the outputs of the system.

Your inputs are the "call" pushbuttons outside the elevator and the "floor" keypad inside the elevator.

Your states are the 3 floors.

Your ouputs are the on/off signal and the direction signal.

To build the initial FSM system, the inputs and the states are enough. If I were you I would make a truth table with columns as sush:

2 columns for the state variable (2 bits to encode the floors)
3 bits for the "call" buttons (3 floors by 2 directions)
3 columns for the "floor" keypad (you can select all 3 floors if needed, that's why there are 3 bits, much like the "call" buttons)

This results in 256 rows. Now this are a lot of cases, but with this approach of the problem I don't see another way to describe the system completely. Even if the elevator can "target" only one floor at a time, you would still have many cases.
Now, this is duable. Just very impractical in my opinion.

I think a modular solution would be easier for the mind (save you the 8 variable Karnaugh) and a more satisfying challenge.
__________________
.
I am a prisoner of high standards and low social skills
____________________________________

I wish I was the best at what I would do, and what I would do wouldn't be pretty.
  #10  
Old 10-20-2010, 12:10 PM
jegues's Avatar
jegues jegues is offline
Senior Member
 
Join Date: Sep 2010
Posts: 734
Default

Quote:
Originally Posted by Georacer View Post
Just a small correction here, in sequential logic, the output is dependent of the current state.

If this was an actual build, things would be easier, in the logic part. But we 'll find a way.

It is important to set up correctly the inputs, the states and the outputs of the system.

Your inputs are the "call" pushbuttons outside the elevator and the "floor" keypad inside the elevator.

Your states are the 3 floors.

Your ouputs are the on/off signal and the direction signal.

To build the initial FSM system, the inputs and the states are enough. If I were you I would make a truth table with columns as sush:

2 columns for the state variable (2 bits to encode the floors)
3 bits for the "call" buttons (3 floors by 2 directions)
3 columns for the "floor" keypad (you can select all 3 floors if needed, that's why there are 3 bits, much like the "call" buttons)

This results in 256 rows. Now this are a lot of cases, but with this approach of the problem I don't see another way to describe the system completely. Even if the elevator can "target" only one floor at a time, you would still have many cases.
Now, this is duable. Just very impractical in my opinion.

I think a modular solution would be easier for the mind (save you the 8 variable Karnaugh) and a more satisfying challenge.

What do you mean by a modular solution, Georacer?
Closed Thread   Post New Thread

Tags
,


Related Site Pages
Section Title
Worksheet Design Project: Signal generator
Worksheet Rectifying diodes
Video Lecture Diode Characteristics - Diode and Diode Circuits - Diodes and Diode Circuits
Video Lecture System Notations - Electronic Systems
Video Lecture Representative Systems - Electronic Systems
Textbook Introduction : Digital Communication
Textbook Using multiple combinational circuits : Combinational Logic Functions
Textbook The common-emitter amplifier : Bipolar Junction Transistors
Textbook Vacuum tube audio amplifier : Discrete Semiconductor Circuits
Textbook Conventional versus electron flow : Basic Concepts Of Electricity


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:21 AM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.