LED's versus lampsNormal LED

When you need to add light to your model, an ordinary filament lamp is the first thing to spring to mind. But if you don’t need a large amount of light because the light is just for some sort of indicator, an LED could be the best thing to use.

Advantages of LEDs

Disadvantages of LEDs LED cluster (Maplin PD00A)

Current will only flow in one direction through an LED (since LEDs are Light Emitting Diodes) so you must check which way round you connect them up.

Figure 1 (below) shows how to connect up an LED and how to find out which lead is positive (+ve). With a new LED, the longest lead is +ve. The -ve lead is shown by a flat piece on the case. Note that special shapes of LED may not adhere to this.

Figure 1: Using an LEDThe value of the resistor can be found using simple Ohms Law...

Equation R = Vs - 2 / 0.02LED seven segment display

...where R is the value of the resistor in Ohms and Vs is the power supply voltage in Volts.

Resistors can only be brought in certain values, so this calculation will not normally produce a value of resistor you can buy. In this case, choose a higher value resistor.

One standard series of resistor values is as follows:

100, 120, 150, 180, 220, 270, 330, 390, 470, 560, 680, 820

This sequence repeats for the ‘K’ values (ie., 10 times bigger) PCB Mountable LED (Maplin QY86T)
Here are some values of resistor derived from the equation for common voltage supplies:

12V 560W
9V 390W
6V 220W

 

Need some help? Use the LED Resistor Wizard to work out the resistor value you need.
Only works with Microsoft Internet Explorer version 4.0 and above.

Goto top of page


Stepper motor

Stepping out: Using stepper motors

Editors note: The stepper motor driver circuit described in this article uses the SAA1027 IC which is now unavailable in the UK.  An alternative circuit is given in the article A replacement stepper motor circuit in issue 10.  The following article is still relevant as it gives some background information on stepper motors, and the circuit given will still be useful to those who already have an SAA1027 IC.

If you need a precision source of movement in your model or you wish to use a computer to control a model, then stepper motors could be what you need.

Advantages of stepper motors

Disadvantages of stepper motors

Figure 2: Inside a stepper motorHow they work

There are several types of stepper motor, the simplest of which we shall consider in this article. The ‘4-phase uni-polar’ type of stepper motor is fairly easy to drive and is readily available to buy.

Figure 2 shows the inside of a stepper motor, which has four coils strategically arranged with a magnet on the rotor so that energising each one in turn will make the motor rotate.

Try applying the correct voltage briefly between each coil and 0V, and you should see that if you use the correct sequence you can get the shaft to rotate. The sequence will be coil 1, coil 2, coil 3, coil 4, coil 1 ... and so on, hence the term ‘4 phase’. The term ‘uni-polar’ is a reference to the fact that the current will only ever flow one way through any of the coils to 0V — some stepper motors use both directions and are consequently harder to drive.

A useful motor Figure 4: Pinout of the SAA1027

The stepper motor would be pretty useless if you had to keep on energising the coils by hand. What’s needed is a circuit to supply the coils with pulses in the correct order.
That circuit is inside the SAA1027 microchip, a 16-pin IC for which the pin-out is shown in figure 4.

Click here to read this datasheet in Adobe Acrobat format SAA1027 Stepper Motor Driver Datasheet
155Kb

The SAA1027 accepts a ‘clock’ pulse at pin 15 which advances the motor by one step. The sequence of the outputs to the coils is shown below, and as you can see, at each step two, rather than one, coils are on. This is so you get double the torque from the motor — clever!

Counting Sequence Coil 1 Coil 2 Coil 3 Coil 4

0

on

off

on

off

1

off

on

on

off

2

off

on

off

on

3

on

off

off

on

0

on

off

on

off

The SAA1027 has three inputs:

Clock (pin 15) -- Every time this changes from 0V to +Vs the motor will advance by one step.

Mode (pin 3) -- Connect this to 0V to make the motor rotate in one direction, or +Vs to make it rotate in the other.

Reset (pin 2) -- Resets the internal counters (when connected to 0V) to count ‘0’ in the above table. This is useful since the power is still supplied to the motor coils, without the motor turning.

The clock input can be done by hand as an example. Wire up the SAA1027 part of the circuit in figure 3 with the common of a single-pole switch to pin 15 of the SA1027, and connect the other two terminals of the switch to +Vs and 0V respectively. Every time you flick the switch back and forth, the motor will move!
The only unfortunate snag is that it moves more than one step per flick of the switch. This is caused by the contacts of the switch bouncing and giving extra pulses which the SAA1027 thinks are legitimate, resulting in spurious movement of the motor.
To overcome this, we will use the NE555 timer IC instead to drive the clock. The circuit (as shown in the main figure 3 with the SAA1027) is called an ‘astable’ and will be discussed properly in the next issue. Suffice to say that the output of the NE555 is a square wave that acts as a regular clock for the SAA1027 without having the problem of contact bounce.
Notice that the circuit has a variable resistor which, if you turn it, will alter the speed of the stepper motor. Remember, if you try to make it go too fast, the stepper motor will stall.

Building the circuit

When you buy a new stepper motor, it will have an indication somewhere showing which wire is which. With salvaged stepper motors (from old printers, etc.), you will have to work out the connections for yourself. If you have a multimeter, you can measure the resistance across different wires to discover which one is the common wire. If the motor is wired up incorrectly, it will simply skip steps erratically.

Remember to connect the polarised capacitors the correct way around -- they will be clearly marked with a '+' or a '-'.

Resistor Rx depends on the voltage and current required by the stepper motor. The value of 220W is correct for the Maplin stepper motor which is rated 12V/130mA per coil. To work out the resistor required for another motor, you will need the SAA1027 data sheet which has a graph of VRX and IRX as a function of output current, from which you can use Ohm’s law to find the resistor value.

When working these things out, here are a few things to remember:

Figure 3: Circuit diagram of the stepper motor controller

Figure 3: Circuit diagram of the stepper motor driver circuit

(To view full size, click on the image)

Figure 7: A stripboard layout for the SA1027 circuit

Note that any circuit that you use to clock the SAA1027, such as the NE555 astable, must have it's 0V supply linked to the 0V supply of the SAA1027 circuit.

Alternative circuit: A replacement stepper motor circuit replaces the SAA1027 IC used in this article which is now unavailable.

See also: Driving more powerful stepper motors , The NE555 astable circuit

Goto top of page


Reversing using two relays

Figure 5: Reversing switch using two single-pole relaysIn issue 1 we discussed how to build a reversing switch for a motor using a DPDT switch. We also showed that a double-pole relay can be used to do the same thing.
But if you happen to have two single-pole relays lying around in your component drawer, it is possible to use these instead as shown in figure 5.

Switching on one relay will result in the motor turning one way, while switching on the other relay will result in the motor turning the other way. If both relays are on or both relays are off, the motor will not turn.

See also: Motor reversing switches

Goto top of page


Title: Practical Matters -- Breadboards

If you need to construct a circuit, there are four ways to do it, depending on whether the circuit is a prototype or a final design:

Hardwiring
Simply connecting the component leads together by soldering may be the best method if there are few components and they are just resistors, relays or motors. But don’t even think of soldering directly onto the pins of an IC — use one of the other methods below.

BreadboardBreadboard
Use breadboard if your circuit is in the experimental stage since if you need to move components around it is easy to do so since there is no soldering to be done. Components are simply pushed into the holes in the breadboard.

Stripboard
This is the same idea as breadboard in that it has a grid of holes, except that stripboard is design for your finished project since the components are soldered to copper tracks under the board.

Printed Circuit Boards
If you needed to make several copies of a circuit, then it could be worthwhile designing a special Printed Circuit Board (PCB) layout for your project. Unless you already have access to the equipment needed to make a PCB, it will be a very expensive option!

In the following months we will discuss each of these options in detail, this month starting with breadboarding.

The photo shows a typical small breadboard which will accommodate around 3 IC’s — enough for most of the circuits we’ll be building in Electronics in Meccano, although larger sizes are also available. Most breadboards have lugs on each side so they can be placed side by side.

As shown in figure 6, the board has two rows of holes both top and bottom. All the holes in one row are connected together by a copper strip inside the breadboard. By convention, the top row should be connected to the positive supply (+Vs), and the bottom row should be connected to ground (0V).

Figure 6: Close-up of breadboardThe holes in the centre of the breadboard are connected vertically so that if an IC is placed in the centre of the breadboard, each of it’s pins is available for connection.

Contrast with: Stripboard

 

 

 

 

Goto top of page


Title: Shopping ListThe following lists the electrical parts that are discussed in the articles. Prices and order codes given are taken from the current Maplin catalogue, which is the probably best source of electronic components for the hobbyist in the UK.

If you have access to a company account with Rapid Electronics or RS Electronics you may find these companies are cheaper.

LED's versus lamps
Maplin Order Code Price Page
Standard 5mm Red LED WL27E 9p 181
Standard 5mm Green LED WL28F 9p 181
Standard 5mm Orange LED WL29G 9p 181
Standard 5mm Yellow LED WL30H 9p 181
5mm Blue LED (Blue tinted package) JA29G £1.49 181
5mm Blue LED (Water clear package) JA30H £1.49 181
5mm White LED (3.6V, 25mA) NR73Q £2.99 184
Stepping out: Using stepper motors
  Maplin Order Code Price Page
Stepper Motor Kit (includes motor and SAA1027 driver circuit on PCB) Discontinued
 
Parts needed for the Stepper Motor Driver circuit in Figure 7 to be constructed on stripboard.  Note that UK distributors have discontinued the SAA1027 IC, so you may like to look at the alternative circuit in issue 10.
 
1 x 12V 4-phase stepper motor FT73Q £19.99 329
1 x SAA1027 Discontinued
1 x NE555 Timer IC QH66W 29p 292
1 x 8-pin IC Holder BL17T 14p 304
1 x 16-pin IC Holder BL19V 19p 304
1 x 100W Resistor M100R 7p 221
1 x 220W 2W Resistor D220R 16p 223
1 x 1kW Resistor M1K 7p 221
1 x 2.7kW Resistor M2K7 7p 221
1 x 100kW Linear Variable Resistor JM74R 89p 225
1 x 0.01mF Capacitor BX70M 15p 91
1 x 0.1mF Capacitor BX76H 15p 91
1 x 1mF Capacitor BX82D 39p 91
1 x 1000mF Capacitor VH50E 44p 94
1 x SPST toggle switch FH97F £1.09 308
Stripboard (at least 23 holes x 17 rows) JP47B £1.79 204
Reversing using two relays
  Maplin Order Code Price Page
6V 5A SPST miniature PCB mounting relay JM17T 89p 217
12V 5A SPST miniature PCB mounting relay JM18U 89p 217
Practical Matters: Breadboard
  Maplin Order Code Price Page
AD-102 breadboard (30 columns with power bars) AG10L £4.99 209

Maplin charge £2.50 for delivery on orders under £30.00 inc. VAT.
Prices are taken from the September 2000 - August 2001 Maplin catalogue, and include VAT at 17.5%

Contact their order line on 0870 264 6000 or visit one of their shops.
Their customer service line is 0870 264 6002 and they have a website at www.maplin.co.uk where on-line ordering is available.


Goto top of page


EiM Logo

www.eleinmec.freeserve.co.uk

Electronics in Meccano January 1999 -- Issue 2

Edited by Tim Surtell
E-mail: timsurtell@eleinmec.freeserve.co.uk


| Home | Contents of Issues | Index | About | Letters | Printed Edition | Circuits Shop | Wizards | SELMEC | Links |