Teleo Blocks Printable Page August 2005
Accelerometer Block LED Block Power Connect Block Switch Block
AC Switch Block Line Block Regulator Block  
Break-Out Block Poly Block Servo Block  
Input Block

Potentiometer Block

Stepper Block  
 

 

AC Switch Block

The AC Switch Block allows a conventional signal level to control a much larger AC line. A 5V signal applied to the D0 input will case the two AC terminals to be connected.

The switch can handle up to 16A of current provided it is kept cool enough. At 110V, this is more than 1500W. We suggest that this limit be approached very carefully and recommend staying far beneath this.

Once an AC line is connected to the AC terminals, several places on the board will become live. This makes it absolutely essential that the board be mounted somehow to prevent short circuits or accidental human contact. This is true even for rough prototypes or trial hook ups. Treat AC line voltages with much respect.

The input of the switching device is actually an LED (internal to the device itself) so it will draw a few 10's of mA when it runs. The AC Switch Block has a resistor built in so a direct 5V supply will not damage the device.

 

top of page

 

Accelerometer Block

The Accelerometer Block provides two analog signals corresponding to the acceleration the block is experiencing on the x-axis and the y-axis. This sensor can therefore act as a tilt sensor in two directions.

The block requires 5V power and a 0V connection from another source.

When perfectly flat the accelerometer is designed to output 2.5V. The exact value tends to vary from device to device, so a trimpot is provided for each axis to enable the user to center the output precisely at 2.5V.

Assuming the board is being held flat with respect to the ground, when it is tipped to the right (as it is illustrated above) the X axis output will read a higher value. When tipped to the left it will report a lower value. Similarly, the Y axis output will read higher when the board is tipped forward and lower when tipped back.

The outputs are relatively weak and can't supply much current - it is suggested that they only be used as inputs to devices that do not require much current. These can be connected to inputs on devices like the Poly Block, Servo Block, Stepper Block, Line Block, and Switch Block.

 

top of page

 

Breakout Block

The Breakout Block is a very simple device. When connecting multiple devices to another Block, it saves having to put 4 x 5V and 4 x 0V wires into single screw terminals on the other Block.

 

top of page

 

Input Block

The Input Block is a simple device that can supply inputs of various kinds to other parts of a project. It was developed to serve as a testing device - supplying inputs that might in the finished system be supplied by sensors or other devices. The Input block can also supply voltages to other blocks to control their operation.

There are two Push Buttons that provide a means to send momentary 5V pulses to a receiver. There are four DIP switches each of which can provide 0V or 5V to another part of the project. Finally there are two potentiometers which can supply an analog voltage from 0 to 5V.

 

top of page

LED Block

The LED Block was created as a monitoring and diagnostic tool. It is designed to be directly connected between the output of a Poly Block, and some other Blocks, to permit the easy monitoring of outputs. Signals arriving at the I0 - I3 inputs are transfered directly to the O0 - O3 outputs and a monitoring circuit attached to activate an LED when the input is activated. This monitoring circuit has it's own amplification so there is no effect on the values traveling on the data lines.

The board needs to be connected to the 5V and 0V of the board supplying power. It doesn't use the +V at all, it merely passes it from one side to the other.

 

top of page

 

Line Block

 

The Line Block was developed to provide a way to send signals over long distances. This is achieved by taking the incoming data, encoding it into digital form, and sending it, together with an address onto the communication lines. Another Line Block with matching address, connected to the same communication lines, will decode the digital data and render it to its output.

The Line Block can transmit two analog and two digital signals. The receiving board turns the analog signals into PWM outputs, and also provides true filtered analog outputs on A0 and A1. The digital signals are sent directly onto the D0 and D1 outputs.

 

top of page

 

Poly Block

Introduction

The Poly Block was designed to provide a simple way to achieve a number of simple functions without requiring a computer or any programming skills.

Functions

The functions it provides range from simple functions that manipulate logic values (e.g. Combine) to complex time bound functions (e.g. Follower).

The functions available on the Poly Block are as follows:

Oscillator - switches it's outputs on and off at a specified rate
Sequencer - when triggered, activates each of its outputs in turn
Combine - performs logical AND, OR, XOR and Invert operations on its inputs.
Switch - has outputs which can be turned on and off in a variety of ways
Timer - creates time intervals
Counter - counts events - both up and down
Compare - compares two values and reports greater-than, less-than, equal and not equal conditions
Follower - output tracks the input at a specifiably slow rate
Adder - adds two incoming signed inputs
Multiplier - multiplies to incoming signed inputs
Multiplexor - permits one of four outputs to be selected

Consult the Poly Block Reference for a detailed description of each function.

The functions the Poly Block offers are selectable by the Function Switch. The Function Switch has four tiny switches each of which can be in one of two positions: on or off. Each of the functions has a unique pattern of switch settings. Choose the function you'd like to use by putting the switches in the appropriate setting. When you'd like to use a different function, simply choose another setting and adjust the switches accordingly.
For example, the Oscillator function's switch settings are 0 0 0 0.

As another example, the Counter function is selected by selecting the correct switches for that function: 0 1 0 1.

The correct switch settings are given for each function. The only tricky part is remembering to enter them the correct way round: last digit on the top.

Power

Power can be applied to the Poly Block from any of the three Power Connectors. Either supply 7V to 24V to the +V input, and the Poly Block will create the 5V it needs, or supply regulated 5V to the 5V connectors. But not both. The Poly Block can supply only a small amount of power to external devices, so be mindful of their requirements.

Orientation

Like other blocks, it has inputs on the left hand side, outputs on the right. This means that in general you will be able to understand what a group of blocks is doing by "reading" them from left to right.

Trimpot and Trimpot Jumper

Where there is a need to set a scale or value for the function to work, it may be conveniently done with the trimpot. The trimpot permits voltages between 0V and 5V to be applied to one of the Poly Block inputs (I4). Several of the functions on the Poly Block have been implemented to read key values from the I4 input, making them controllable from the trimpot. The value it supplies increases as it is turned clockwise. In addition, this voltage is presented on the Tr connector, where it can be measured, connected to other devices or connected to other inputs on the Poly Block.

The trimpot isn't always the best thing to have connected to the I4 input. A jumper is used to determine whether the trimpot is actually connected to the I4 input or not. This makes it possible to either use the trimpot to supply voltages or bypass it and supply the voltages externally from another source. When the jumper is on, the voltage created by the trimpot is passed to the Tr connector and also to both the I4 connector and to the chip. Without the jumper on, the Tr connection still carries the trimpot voltage, but the I4 Input is independent and will not be influenced by the trimpot.

Analog Output

The O0 output can function in some cases as a PWM output. This means that it will convey not just an on or an off value, but by combining being on and off in different proportions it will convey some average between on and off. In our 5V system, this means some value between 0V and 5V.

When this kind of output is used to illuminate an LED for example, the LED appears to glow brighter and darker even though all that's happening is that the output is being switched on and off very quickly.

If you were to connect this output to anything that expects an analog input, it would not read well - it would read either 0V or 5V depending on where in the cycle the value is sampled. Fortunately, the circuit for converting the on-off pulses of a PWM output to a more smooth analog output is very simple. This is the purpose of the A0 output on the PolyBlock. It is the identical signal to the O0, with the exception that it has been averaged out.

This value is now suitable for reading by another electronic device.

Switch Outputs

The O0 and O1 outputs are both conventional digital outputs. This means that you can connect them to other electronics devices to control them digitally. But the capacity for these outputs to actually do useful work is somewhat limited - to about 25mA. In order to permit the handling of larger loads, the O0 and O1 outputs are also connected to fairly robust electronic switches which can switch surprisingly large loads on and off. These switches are the outputs marked S0 and S1. Whatever it is that you are going to connect must be connected to the +V or some other power line on one side and one of the S0 or S1 terminals on the other.

Internally, the O0 and O1 outputs are sent to the switch circuitry as well as to the O0 and O1 connectors. One side of the switches is connected to 0V (ground). The switch outputs therefore are low-side switches, meaning that they make a connection to the 0V section of the circuit for you. It is assumed that the rest of the circuit, including the thing you want to control, connects ultimately to +V, or some other power source..

 

top of page

 

Potentiometer Block

The Potentiometer Block is very simple. It has four potentiometer trimpots which can be used to supply four different voltages to different parts of a project. This can be very helpful as a test device for inputs that will ultimately be supplied by sensors or other input devices.

 

top of page

 

Power Connect Block

The Power Connect Block is a very simple device. It was designed to solve the problem that occurs in some projects where there are multiple consumers of V+. It was designed so that the actual V+ and 0V source (the power supply) is connected to one of the connectors, so that V+ and 0V are then available for easy connection at all the other connectors.

 

top of page

 

Regulator Block

The Regulator Block takes +V and 0V and provides a regulated +5V supply at up to 1A of current. This is useful when more current is required than is normally available and when you want to provide power to 5V devices that have no regulator of their own. Most commonly, this means that the +V and 0V lines should be supplied by something else (a power supply) and the 5V will be an output, providing that voltage for other users.

The block also has an LED power indicator.

 

top of page

 

Servo Block

The Servo Block permits the simple control of up to four hobby servos. Each servo has an approximately 90 degree operating range which can be controlled by the application of a 0V to 5V signal on the appropriate input.

The Trimpot controls the rate at which the servos move to their specified target positions. This rate can be very quick (servos react immediately) or very slow.

The Servo Block has two regulators: one for the microprocessor and another for the Servos themselves. This separation helps to keep electrical noise from the servos from interfering with the operation of the microprocessor. Most servos must be supplied with voltages in the range of 4V to 6V, so they can't simply be powered from the +V line.

The onboard servo regulator can be bypassed by lifting the Servo Regulator jumper. This disconnects the regulator from the servos. Now power can be provided from an external source on the SV terminal.

 

top of page

 

Stepper Block

The Stepper Block permits the control of one unipolar stepper motor. Stepper motors are often an ideal way to move objects or mechanisms in a controlled way. They are commonly available from numerous sources including surplus stores and are often surprisingly cheap. The catch is that they are harder to control than a regular DC motor because they are moved step by step by a series of pulses sent to coils inside the motor. With the application of some very simple control voltages, the Stepper Block can create these pulses and in some modes keep track of the step position of the motor.

It can operate in four different modes, controlled by the function switch. The modes are as follows:

Manual - Bidirectional Mode - the stepper runs forwards and backwards under the control of a single voltage

Manual - Unidirectional Mode - the stepper's speed is controlled by a voltage in one direction only, however it may be reversed by the application of another control voltage

Scaled Mode - the stepper goes to a position specified by a voltage. The range of travel is controlled by another voltage.

Automatic Mode - the stepper goes to a position specified by a voltage. The range of travel is determined at power up by searching for the upper and lower limits.

The Stepper Block's mode is determined by the Function switch. Each combination of switch-on's and switch-off's causes a particular mode to be activated.

The functionality of the Stepper Block is controlled by voltages arriving on the various inputs. For example, in Manual - Bidirectional mode, a voltage applied to I0 will control the absolute step rate of the Block. Three of the four modes use the last input, I3 to set some parameter. This input is special in that it is optionally connected to an on-board trimpot. When the Trimpot jumper is attached, the trimpot voltage is applied to I3. When the jumper is detached, the I3 input may be controlled externally like any other.

Two of the inputs function in the same way for all modes: the L0 and L1 inputs. These inputs are connections for limit switches. They are tied into the microprocessor firmware at a very low level to prevent the Stepper mechanism from being driven beyond the limits permissible for the machine. These inputs are optional - leaving them un-attached will leave them unused. However, if the functionality is desired, the L0 and L1 inputs need to be connected to switches (or other devices) that produce +5v when the stepper device reaches the respective limit. The diagram below depicts a common way to organize the limit switches. When the bar attached to the belt reaches the end of it's travel, the corresponding microswitch is activated. The microswitch is wired up so that when it is connected it conveys 5V to the respective limit switch input on the Stepper Block (L0 or L1).

Limit switches are a very important part of building mechanical devices. They help to prevent situations where a motor or other actuator might act in such a way as to harm the mechanism it is driving. In addition, in Automatic Mode the limit switches are used to mark the operating envelop of the device automatically.

Motor Selection

The Stepper Block will work with a variety of different motors. Although there are one or two things to watch out for.

There are two major kinds of Stepper - unipolar and bipolar. The bipolar kind typically have four wires and can not be used with the Stepper Block. The unipolar kind have six or more wires and can be used. See below for how to connect these motors up.

The motor must have a voltage rating that you can supply. If the votlage corresponds to the V+ (12V on many systems) the motor can be plugged into the V+ terminal on the board. If the motor has a lower voltage, don't be tempted to connect it to the 5V line from the Stepper Block. That is a very low current supply and should not be used for the stepper. If the motor needs a voltage that is not the same as V+, an external power supply can be used. See below for details.

At any voltage, the motor must draw less than 2A per coil. Remember to use Ohm's Law to work out what the current would be if it's not specified. Watch out for motors that require low voltage drives. If they are accidentally connected to the Stepper Block and the V+ line they will almost certainly draw too much current. Note also that even if the rated current is observed for the motors, there is a chance that they will warm up during use. Stepper motors frequently need heatsinks to prevent them from overheating and burning coils up.

Connections

Unipolar stepper motors have six or more wires - corresponding to two coils. Which wire emerging from the motor is which is sometimes not obvious. Ideally, a manufacturer's data sheet is consulted to determine how the motor is wired internally. Failing this, the wiring can be determined with a little detective work and a multimeter. The wires are determined using the following observations:

  • wires from separate coils will have no connection at all (i.e. very high resistance)
  • one common wire and a wire from the same armature will have a certain resistance that is the same (or roughly so) on all coils
  • non-common wires from the same armature will have double that resistance

Once the various wires have been identified, they need to be connected to the Block in the correct order. The block activates the coils in order (i.e. O0, O1, O2, O3), so the wires that are inserted into the outputs should come from alternating armatures.

Wiring in this way will result in one wire going to each of the Stepper Block outputs, and two wires going to the V+ line.

If the Stepper requires an external power supply, connect the common terminals of the Stepper up to the positive side of the power supply. Connect the negative side of the power supply to the 0V connector on the Stepper Block.

Probably the best way to test a motor is to wire it up to the Stepper Block with the power off and with nothing mechanically connected to the stepper motor. Then select Mode 00 - Manual Bidirectional Mode. You'll need a potentiometer on I0 - the Speed input. Adjust the Trimpot (Speed Midpoint with the jumper on) to around midway. Adjust the Speed potentiometer to around the same. Now apply power. If nothing gets too warm, that's the first step. If wired correctly, the stepper will probably start slowly stepping. If it just twiches, check the wiring possibly trying another combination. If it runs slowly in one direction, then you can play with the Speed input potentiometer to get it to go forward and backwards. You'll also be able to note the point at which the motor (without a load) can no longer keep up with the Stepper Block.

You may have noticed that there is more than one correct way to wire a stepper motor up. Without a datasheet, or other information, some experimentation might be required to get it completely right. If the stepper motor just twitches when you run it, try swapping O0 and O2, or O1 and O3. If the motor runs properly, although in the opposite direction from the way you'd like it, completely reverse the wires.

The limit switches are connected so that each limit switch is connected on one side to +5V, and the other side to the L0 and L1 inputs on the Stepper Block.

 

Manual Bidirectional Mode 00 - 00
Speed : A
I0

O0
S : Stepper Phase 0
Reverse : D
I1 O1
S : Stepper Phase 1
Lower Limit Switch : D
L0 O2
S : Stepper Phase 2
Upper Limit Switch : D
L1 O3
S : Stepper Phase 3
  I2
Speed Midpoint : A
I3
Trimpot : A
Tr
 

When the Manual Bidirectional Mode is selected, the Stepper is under manual control. An analog signal provided at I0 determines the speed the stepper runs at by comparing subtracting the I3, Speed Midpoint voltage. This way, if the I0 - Speed input voltage is higher than the I3 - Speed Midpoint voltage, the stepper runs forward. If the voltage at I0 is less than the voltage at I3, the stepper runs backwards. The direction the motor goes in can be reversed by applying a 5V signal to the I1 - Reverse input.

If, at any time, a 5V signal is applied to either of the Limit Switch inputs (L0 or L1) motion in the corresponding direction will cease. It is important to make sure that the stepper is wired up in such a way as to permit this to function correctly. This means that there is a requirement to make sure that the limit switch governs motion in the correct direction.

Manual Unidirectional Mode 01 - 01
Speed : A
I0

O0
S : Stepper Phase 0
Reverse : D
I1 O1
S : Stepper Phase 1
Lower Limit Switch : D
L0 O2
S : Stepper Phase 2
Upper Limit Switch : D
L1 O3
S : Stepper Phase 3
  I2
I3
Trimpot : A
Tr

When the Manual Unidirectional Mode is selected, the Stepper is under manual control. An analog signal provided at I0 determines the speed the stepper runs at. The stepper runs in one direction - at zero speed when the I0 voltage is zero and at maximum speed (1023 steps per second) when 5V is applied. The motor can be reversed by applying a 5V signal to the Reverse input.

If, at any time, a 5V signal is applied to either of the Limit Switch inputs (L0 or L1) motion in the corresponding direction will cease. It is important to make sure that the stepper is wired up in such a way as to permit this to function correctly. This means that there is a requirement to make sure that the limit switch governs motion in the correct direction.

 
Scaled Mode 02 - 10
Target Position : A
I0

O0
S : Stepper Phase 0
Scale :A
I1 O1
S : Stepper Phase 1
Lower Limit Switch : D
L0 O2
S : Stepper Phase 2
Upper Limit Switch : D
L1 O3
S : Stepper Phase 3
Acceleration : A
I2
Maximum Speed : A
I3
Trimpot : A
Tr
 

In Scaled Mode, the Stepper tries to go to a position specified by the I0 - Target Position input. 0V applied to the Target Position input causes the Stepper Block to attempt to position the stepper to the 0 position. 5V applied to the TargetPosition input causes the Stepper Block to attempt to position the stepper to some location specifed by the I1 - Scale input. The higher the voltage (up to 5V) on the Scale input, the further the Stepper travels. Any intermediate voltage will cause the block to try to position the stepper motor at the appropriate position.

The function that relates the Scale voltage to the number of steps in the range is as follows:

steps = ( ( ( 1023 * Scale / 5 ) / 128 ) ^ 2 ) * 1024

This function has been designed to provide smooth scaling from a small handful of steps (8) at the lowest possible value (0V) up to approximately 65000 at the highest (5V)

When the mode is activated, it assumes that it's at the uppermost position. It then runs in reverse, trying to find the 0 position, or until it activates the Lower Limit Switch. This has the effect of bringing the mechanism back to a reset position from where it can be extended to known positions. Once either 0 is reached or the Lower Limit Switch is activated, normal positioning is permitted.

At any time, if either of the limit switches are activated, the system will immediately assume that the stepper is at the corresponding position and movement in the corresponding direction will be stopped.

Automatic Mode 03 - 11
Target Position : A
I0

O0
S : Stepper Phase 0
Scan Speed : A
I1 O1
S : Stepper Phase 1
Lower Limit Switch : D
L0 O2
S : Stepper Phase 2
Upper Limit Switch : D
L1 O3
S : Stepper Phase 3
Acceleration : A
I2
Maximum Speed : A
I3
Trimpot : A
Tr

In Automatic mode, the block relies on the presence of good limit switches on the mechanism. When it powers up, it first moves the stepper forward seeking to activate the the upper limit sensor. When it does, it takes a note of the position at which that occured. Then it tries to move back in the opposite direction, seeking the lower limit switch. When it finds that, it attempts to find the distance it traveled and makes that the full range of the block. The speed that it does this scanning at is governed by the scanning speed input. If this input is 0, the I3 - Maximum Speed value is used. If it is greater than zero, then that value is used instead. This permits very slow scans to be performed to protect the equipment against the damage that might be caused by a full speed collision with the end of travel.

When a voltage is applied to the Target Position input, the stepper is moved to a place that corresponds to that position. (0V to the lower limit, 5V to the upper limit, etc.)

If either of the limit switches are subsequently activated, the position the block holds is updated, and motion in that direction halted.

 

top of page

 

Switch Block

The Switch Block can switch up to four devices that consume substantial currents (up to 10Amps with no cooling). The inputs are expected to be conventional logic level signals - i.e. 0V or 5V. The outputs are switches to 0V. This means that devices that need to be switched are connected on one side to power (+V or 5V depending on the device), and the other side to the Sn output. When an input goes to 5V, the corresponding switch is closed, connecting the corresponding terminal to 0V.

 
 

 

etc