- Pulse Width Keyed -
- Selector -
From time to time, there have been discussions, about communication between robots. There have been ideas like sheepbots that would be kept grouped together and protected by sheepdogbots, and of course Richard Caudle's Herding Photovores.
I was thinking about this and trying to come up with a BEAMish method of one robot being able to exchange important information with other robots. What I came up with was a method that could be used to key different responses to different length signals.
- Encoding -
The first thing we will look at is a simple circuit for encoding the information a robot will be communicating to it's neighbors. I used a 74HCT14 for the inverters in all the circuits in this article. I have not listed any values for the key components since these may vary according to your preferences. Should you decide you need them
E-mail
me and I'll send a list of what I used.
Figure 1
Okay, lets start with the inverter 2, which provides the output. The input of inverter 1 is tied to ground (common negative) through R6 and R5. R5 and R6 should be at least 1K. This keeps the output high. If any of the main inputs (Min, Mid or Max) is pulled high, the positive potential is passed through one of three diodes, labeled D1, D2 or D3, to the point between R5 and R6. This pulls the input of inverter 1 up and it's output changes to a low state.
At the same time, one of the other diodes, labeled D4, D5 or D6, passes the positive potential to one of the resistors labeled R1, R2 or R3. These resistors determine how long the output of inverter will be high. Diode D7 allows the positive potential to by-pass R4.
When the charge on C1, rises above the positive going threshold of inverter 2, It's output changes from a high to a low state. Diode D9 passes the negative potential to the point between R6 and inverter 1. This pulls the input of inverter 1 low, and the output changes to a high state.
At the same time diode D8 passes the negative potential to the point between R3 and R4. This prevents the positive potential from the input from reaching C1. It also discharges C1 through R4. When the charge on C1 drops below the negative going threshold the output of inverter 2 changes from a low to a high state. R4 and C1 therefore determines how long the output of inverter 2 is low.
When the output of inverter 2 is high, the input of inverter 1 is no longer held low through diode D9, so the output of inverter 1 again becomes low.
This process repeats as long as one if the main inputs is held high.
The arrangement of resistors R1 through R3 not only makes it relatively simple to set the desired pulse widths, it also gives priority to the inputs according to their width. The Min (minimum width determined by R3 and C1) input has priority over the other two inputs. The Mid (Mid-sized width determined by R2 + R3 and C1) has priority over the Max (maximum width determined by R1 + R3 + R1 and C1) input.
Below is a chart of the wave forms produced at the output of inverter 2 when each input was brought high.
Chart 1
The output of inverter 2 would be used to activate some type of signaling device when it goes low. This could be a tone (The bleating of the sheepbot), a pulse of infrared light or any other type of signal you prefer.
- How It Can Be Used -
The way I see it, the Min input should be used to signal danger. Any bot receiving a danger signal from another bot would be put into a phobic (fearful) state and attempt to run away from the signal source. This signal would continue until the bot was no longer in danger or could no longer signal.
The Max input could be used to notify other bots that a good food source (bright pool of light) has been found. Other bots could be attracted to the signal. This signal would only last a few pulses (5 or 6) then would quit. You may want to have your bot repeat the signal after a certain time period if the food source remains good. This timing could be add between the incomming signal and the input of the encoder.
The mid input might be used to say " I'm Hungry " This could cause any bot that has an adequate food source to call out with a max signal. When the hungry bot receives the signal from a bot that has found a good food supply it would then be attracted to the responding bot.
The Aux input was an after thought. Any time it is pulled high, the output of inverter 1 will go low. This would allow for a secondary circuit to produce random calls as the bot explores it's world. A kind of, everything is alright signal.
- Basic Decoder -
Now let's take a look at the other side of the system. As with the encoder, Again,
I have not included component values But will be glad to send them to you if you
E-mail a request to me. They should be chosen according to the size of pulse each stage will be dealing with. I have built and tested a sample circuit with pulse widths ranging from one quarter to one and three quarter seconds. The circuit performed beautifully and I didn't have any problems with it.
Figure 2
The circuit uses Nu's (Neural Neurons) to identify a signals that falls within a certain pulse width range. Figure 2 shows the basic concept. Nu 1 (components identified as "1" ) is adjusted so as to determine the minimum width of the pulse. Nu 2 (components identified as "2" ) is adjusted to set the maximum width of the pulse. Contrary to the common way of doing things, the Nu inputs are held high, that is the voltage on the capacitor is above the positive going threshold voltage of the schmitt inverters. Therefore the outputs of the inverters are low until the circuit is activate by an incoming low pulse of the correct length.
R1, R2,C1 and C2 should be selected to determine the minimum width ( time constant ) an incoming pulse must be low to cause the Nu's to change states. P1 and P2 provide adjustment of the required pulse widths.
- Nu 1 -
When an incoming low signal arrives at the input of the circuit, D1 allows the input of inverter 3 to be held low until the pulse ends and the circuit input is again brought high. If during the pulse, the voltage across C1 drops below the negative going threshold voltage of inverter 1, it's output goes high and is passes through R3 to inverter number three. R3 is at least a 1K resistor. It acts as to limit current and allows D1 to over ride the output of inverter 2.
- Nu 2 -
If the voltage across C2 drops below the negative going threshold of inverter 2 before the incoming pulse ends, the output of inverter 2 through D3 pulls the input of inverter 1 back high. Thus if the pulse is longer than the desired length the input of inverter 3 is held low and the output of the circuit remains high.
- Working Together -
However, if the pulse ends before the negative going threshold of inverter 2 is reached D2 pulls the C2 back high and D1 is no longer holding the input of inverter 3 low. Since the output of inverter 1 is high, the output of inverter 3 goes low until the voltage across C1 rises above the positive going threshold of inverter 1.
What results is an output that will produce a low pulse only when the length of an incoming signal pulse falls between the periods of the two Nu's. The output pulse length is determined by the time it takes the voltage across C1 to rise above to positive going threshold of inverter 1.
One other note, if the incoming pulse is longer then the desired length, the output of inverter 2 will become and  remain high until the input line returns to high and C2 again rises above the positive going threshold. This may be useful for activating a secondary response of some sort.
- Side Note -
It has been pointed out to me that this behavior is somewhat similar to that of a normal Nv (Nervous Neuron), and that it could be placed into a microcore or a chain of Nv's. If this were done the PWK (Pulse Width Key) might be able to produce some useful modification to the behavior of the core or chain it was inserted into.
The following chart is a comparison of the behaviors of a common Nv and the basic PWK described above. I also recommend that you read the E-mails exchanged between Bruce Robinson and Wilf, and myself. I'm sure the chart and E-mails will help stimulate some interesting ways to use PWKs.
Chart 2
- Three Stage PWK Selector -
Now lets look at how to provide a different output for different length input pulses.
Making the circuit able to select between multiple outputs is just a matter of adding Nu ( timing ) and output stages.
The block diagram below shows the general arrangement of a PWK with the extra stages. The boxes on the left represent the " Input / Timing (Nu)" portion and the boxes on the right represent the "Output / Gating " portion of the circuit.
PWKS Block Diagram
Here's a quick run down of what the various lines do
The input lines carries the pulse to the Nu's which then start the timing process.
The lines marked "Time" are the output side of the Nu's. They will be high if the incomming pulse is longer than the preset time of the stage they are tied to.
The hold lines will keep the output section the circuit high until the pulse ends.
The clear lines will reset any stage below the one they come from when it's preset time is passed.
The red lines (marked as reset) and the blue lines (maked as Latch) are only applicable only to Latch / Reset type PWKS which are described later.
An output line will go low only if the incomming pulse falls between that stage's time period and the next longer stage.
Now let's take a closer look by examining the schematic.
Figure 3
Chart 3
The input of inverters 1b,2b and 3b are all held low through diodes D1a,D2a and D3a. This holds the outputs high as long as there is a low pulse at the circuit input. Nu 3,interacting with Nu 2, determines the Mid (middle) pulse width the circuit will respond to. It is tied to Nu 2 in the same manor that Nu1 and Nu 2 is tied to Nu 1. The output of inverter 3a is tied through diodes D3b1 and D3b2 to the input of inverters 1a and 2a. Nu 4 determines the maximum width the circuit response to, and is tied to the lower stages in the same manner.
The output of Nu 4 goes high if the incoming pulse is longer than the Maximum width desired, and remains high as long as the pulse is present at the input of the circuit. As with the basic PWK this may be useful for activating a secondary response.
More stages can be added the same way but the number of diodes needed starts to mount up fast.
- Latch and Reset -
It may be desirable to have the output remain low until the bot is able to respond to the signal. This can be accomplished by adding a few resistors and diodes.
Figure 4
Chart 4
Diodes D1c through D4c (Blue) allow only the negative potential of a low on the input of the LPWK (Latch/Reset-Pulse Width Keyed Selector) to reach the Nu stages. Diodes D*e and Resistors R*c (Blue) insure that the selected ouput remains low. This is acomplished by routing a portion of a low on the output of inverter 1b, 2b or 3b to the input of inverter 1a, 2a or 3a. The resistors (R1c to R3c) are for current limiting. They should be large in caparison to R5 if it is used.
Once the bot has responded appropriately, it should send a high pulse to the reset line to re-enable the Pulse Width Key Selector. R5 determins how long the reset pulse needs to be. The diodes marked D1d to D4d and resistor R5 (Red) provide the reset path. R5 is needed only if you desire or need a delay in the reset process. there will be interaction between R5 and R*c of the latching stage. This should be taken into account when determining the desired length of the delay.
- In Closing -
I believe that there may be many potential uses for this idea. It could even be used as a limited form of remote control of a robot. I know that this circuit would take up to much space for most of the small BEAM robots out there, but I like building larger bots, so I don't have to much trouble with this.
Let me again recommend that you take a look at the E-mails that I received from Wilf And Bruce. I found them very helpful and I think you will too. Both gentlemen have developed variations of the concept and have given me permission to share their responses with you.
If you decide to give any of the circuits a try let me know how things work out and what you decided to use it for. Also don't shy away from asking questions. Contact me if you run into a problem or are curious about anything.
So long,
Droidmakr
aka Clifford Boerema
August - 17 - 2000