Programmable robots

siemens-logo

In this subject, we are going to see what is and what we can do with a device that constructed of very compact form, we can program it with certain software so that it realises some certain tasks of independent form.

The device that we will see is of the Siemens house and the language that we will use is LOGO, by means of the program LOGOSOFT, that will be in charge to simulate and to overturn€ our program to the device.

In the part superior we have the feeding entrances, that work in rank 110-250 the digital volts and entrances from I1 to I8. In addition, this device has the following characteristics:

  1.  4 Exits of type relay who supports 10 To of resistiva load or 3 To of inductive load
  2.  The type of assembly is track DIN 35 mm
  3. Dimensions of 72 xs 90 xs 55 mm
  4.  Protection IP20
  5. Rank of temperatures of 0 to 55
  6. It has one reserves for clock of 480 hours
  7. Possibility of using other modules to extend functionality.

The way to understand this device is to put it in march with simple tasks to see how it works and to understand its utility. We will go, as it is logical, of less to greater complexity. One requires knowledge of digital electronics

Tasks.  To really realise table, karnaugh, logic circuit and to simulate in Logosoft the following activities:

Exercise a 1 alarm has 4 detectors located in doors and windows, that we will call To, B, C and D.  The alarm sounds if:

a) At least 3 detectors activate.

b) Itself there are two activated detectors, it is possible to be chosen to activate or not the alarm (you decide it)

c) An only detector or no excluding the combination A=0, B=0, C=0 and D=1 activates for.

Exercise 2 a room has 3 switches for the ignite-dull one of a lamp. The light bulb will be dull if the number of some even and is extinguished if the number of some (activation of the switches) uneven. It designs the circuit

Exercise 3.  An electronic system works with lifted temperatures, so that an excessive increase can cause an important failure in the same. To design and to simulate in logosoft, the circuit that conducts the following operations when reading a bus of 4 cables (by where it receives the information of the temperature)

  •  The system ignites a green light if the temperature is below 40 (corresponding to a digital number smaller to 10 in binary)
  • A yellow light ignites if the system is received the 11, 12 and 13 (it corresponds to temperatures between 40 and 60 )
  • One activates the red light and a siren if the 60 system surpasses (corresponds to numbers 14 and 15.

traffic light

Exercise 4. A system accountant of 4 entrances (to, b, c and d) counts from the 0 to the 15, in intervals of 2 seconds, so that to happen of a number to the following one they spend 2 seconds. To design a circuit that controls the lights of a traffic light, so that from the 0 to the 6 including the green light ignites.  In the 7 and the 8 the yellow light ignites and for the rest of numbers, the red light ignites. It is necessary to consider that the circuit with less doors has major score.

Exercise 5. Unbelievable

The son of the technician of elevators of the Trump tower of 8 years,   he has panic to the new president of the USA, reason why, the father, to cause that he comes to see him, decides to put a system in the elevator, by which, when the deprived elevator of low Trump of floor 32, activates a red light and the boy, when seeing it, it can leave humming by 5 Reconciled. To consider that the tower has 58 plants. To design the circuit

display-7-segments

Exercise 6.  Display is constituted by leds internal (a bar by LED) and usually is formed in common cathode. Therefore, to activate the bar inferior, we must feed the terminal on that bar and connect the mass. it is necessary to put a limitor resistance of current.  To design a circuit binary decoder decimal from the 0 to the 7.

Exercise 7.  An awning of a porch has a motor that makes possible the opening and collection of the same. In addition it has three types of sensors, that are.

a) Sensor of light (with a LDR) so that when there is much solar radiation, it issues order to the awning so that it is opened

b) Rain detector. This one is in charge to warn the motor in case it rains

c) Wind detector. An anemometer installed next to the awning issues order to gather if the speed reaches a certain value

To design the circuit to mount it in logosoft

Exercise 8. In a farm, we have a potable water well, I deposit main on surface (to 4 meters) and another secondary one for another ship to 6 meters of height. To design a system. In order to extract the water of the well a pump (B1) is used and to take water from I deposit main to the secondary one is used another pump (B2). The deposits have two emptiness and sensors each. To design the circuit so that:

  • The pumps work when the deposit of where it takes the water is full and empty the deposit that there is to fill
  • The two pumps cannot work simultaneously

 Exercise 9 In the following figure we must solve a system of openings of two barriers for a garage in cellar so that we must apply the criterion of first let leave€. The systems that we must control are:

  • 2 barriers commanded by two motors M1 (under) and M2 (motor stop)
  • 2 traffic lights with 3 lights each, that we will call R1 (red of down) V1 (green of down) and A1 (yellow of the traffic light of down). The same for the traffic light of above V2, A2, R2.
  • 2 sensors of presence of vehicles that we will call S1 and S2

problem garage logic gates

Cases:

  • If the system detects two cars simultaneously, any door is not opened and the red lamp of above ignites indicating to the car of above that lets leave to the car down. Also the A1 ignites indicating that it waits for the one of down. When retiring S2, R2 follows assets and the doors are opened. A1=1.
  • If a car Arrives above and nobody is detected down, the system is opened, with R1=1 and V2 =1

Sequential systems.

Previously we have seen systems where the exit is function exclusively of the values that takes the entrance, but is situations where the value that takes the exit is going to depend on which this one was worth previously, that is to say, if we called Q (t) to the value of the exit at moment t, its value is going to depend than it was worth previously, that is to say, depends on Q (T-1). To this type of circuits one denominates sequential systems to them.

A very important element in this type of systems is introduced who is the refeeding, by which, the value of the exit becomes to enter the system. We will see a scheme to create a general concept.

red-supply systems

We have on the one hand of left to right, an entrance that enters 1 system (Decision making) where a series of values is generated so that the system of processes works and generates an exit. From the exit one is taken se±a'por medio de some sensorial and it becomes to enter by a block (Comparator) so that signal, next to the entrance, becomes to introduce in the block of decision making and is generated a new signal for the system of processes. To that taking of the exit that enters again Refeeding is denominated.

We will see a simple sequential system and a method to be able to analyze and to develop the different problems that we are going to propose in this blog.

model-of-moore

In this model we have the following elements:
  • Entrance exit x/Q (t). It comes represented as a pair of numbers (0/1, 1/1, etc,) where first it indicates the value that entrance X takes and the second the value that takes exit Q (t). For example, in case 0/1, entrance X takes value 0 and the exit takes value 1 and system passes of the steady state q1 to q2.
  • Steady states q. The system remains permanently in that state until it appears a pulse of clock, moment at which it is again put to work the system. In this case it is a system of an exit, therefore there are two possible states, noticeable as q0 for the exit 0 and q1 for exit 1
  • So that the system changes from a state to another one, it is necessary to apply a clock pulse to him, moment at which the system is put to work.

Don't Know

 How behaved that has system?
  1. We leave from q1 and therefore with the exit to 0. A pulse comes from clock, the system reads the entrance X, that takes value 1 and the system remains in the same state, that is the new Q is going to be just as the previous q, this is q (T-1) = Q (t) =0.
  2. We leave from q1 and with the new pulse of clock, the entrance is now 0, therefore, as we see in the graph of moore, the exit is now 1 and the system evolves to a new state q2.
  3. The system remains in q2 until a new pulse appears, reads the entrance X, that takes value 1 and the system remains in the same state, with Q=1.
  4. In a new pulse of clock, the entrance takes value 0, reason why the system stops of q2 to q1.

The difference of a combinacional to a sequential one is in which when the X=1, the exit was 0 or 1 in the combinacional, but in this that we see now, the exit can as much be 0 as 1 (to see graph of Moore).

If we have a system with 2 exits (Q1 and Q2) we would have other two variables at a previous moment [q1 (T-1)   and q2 (T-1)] and, therefore, our model of Moore is going to have 4 circuits representing the 4 possible states.

How we represented the states?

The way to create€ steady states to start off of them in the transitions, is by means of the bistable circuits (RS, JK, D, T, etc). Of them we will see the JK for our developments.

Bistable JK

It is a circuit (already integrated) whose connection of doors, symbol and table of the truth are in the following image:

 

 

bistable JK

To clarifying way we have:

  1.  The first image shows as the doors in a JK with clock by levels are connected. In our case we are going to use one by flanks (that its symbol is the right)
  2. We did not show the connection of the doors by flanks to simplify the study.
  3. In the tables of the truth, Q is the exit of the JK and following Q is the value of the exit when it appears a new pulse of clock
  4. The table of the right sample to simplified way how one behaves.

Exercise 10: Using a bistable JK, to construct a circuit that feeds the light bulb on an intermittent one.

Exercise 11:  To design a circuit that, using a single pulser, activates or deactivates a lamp.

Resolution. In this case, we have an entrance that normally is open, that is to say, the pulser without activating enters a zero the system. When pressing it, it changes the state of the light bulb. We have therefore, an entrance and an exit. We happen to make the table of the truth:

As we can verify, if the pulser does not act (p=0) we have as exit, the value that was before

If it is pressed, the state happens to its previous state. The table following sample the operation

Table truth pulser

 

 

 

 

 

 

We are going to represent the state diagram, where we see that it happens the change when we have an entrance of 1.

diagram states of the pulser
diagram states of the pulser

The following thing, (to create the system of steady states) is to use our bistable JK. These we must them incorporate to the previous table. Of it we have the following result:

Pulser Q (previous) Later Q J K Exit
0 0 0 0 X 0
0 1 1 X 0 1
1 0 1 1 X 1
1 1 0 X 1 0

It is observed that the Exit agrees with later state Q, therefore, S = Q

We can simplify by Karnaught each one of the variables J and K, but in this case, when having two entrances (Pulsador and previous Q) we only removed them directly, this is:

and for entrance K we have  

Our system already is done and we can mount it in logicly:

to ignite and to extinguish lamp with jk

ImportantIt uses the simplification by Karnaught and you will see in what it remains the circuit 

Exercise 12: To control the lights of a traffic light so that the ignition sequence and extinguished is the following one:

  1. Part of a green light
  2. Of the green one it happens to amber
  3. Of amber to the red one.
  4. Of the Red one to amber
  5. From amber to the green one and one becomes to repeat the sequence

Exercise 13: 

In order to open a safe, we counted on a key-temporary system, so that we must enter an entrance digit an established time. If the sequence is not the correct one, it will sound an alarm. If she is correct, the box will be opened. The pulser To that it enters the data, enters a 1 logical one if a 0 is pressed and if it is not pressed. In addition it is counted on a general switch B who puts the system in march. If B is dull, the system does not work (this avoids that it jumps without entering data).

The key is 1 1 0 1.

If at the moment of reading, the input data is not correct, it goes of the state corresponding to the initial state.

To carry out the following tasks:

  1. To happen of the exposition to the state diagram.
  2. Construction of the table of states (Table of the truth)
  3. Simplifying by Karnaugh of each one of the variables of entrance of bistable the J, as well as of the exit
  4. To draw the resulting circuit and to mount in LOGOSOFT

You can see solved exercises 12 and 13 in the following page: Problems with bistable JK

2 Block: Problems with timers