
Angle Control of Servo Motor using 555 Timer in Proteus ISIS

Hello friends! Today we will control a hobby servo from a 555 timer in Proteus ISIS. We will generate a repeating position-command pulse, measure its width, and see how changing that width changes the simulated shaft position.
This project is a useful way to connect timer theory with motion control. The servo has its own internal motor driver and feedback system; our 555 supplies a command signal, not the motor's operating current. The command pulse must have suitable voltage levels, timing and repetition.
The original diagrams and download are preserved below. We will correct two important points from the older explanation: a servo does not universally rotate from −180 to +180 degrees, and the 555's threshold is a fraction of its supply rather than a fixed 5 V value.
Understand the Servo Before Connecting It
A conventional positional hobby servo contains a motor, gears, a position sensor and a controller. It compares its requested position with its measured position and drives the motor to reduce the difference. A three-wire connection normally provides power, ground and a command input.
The signal connector is not a direct motor-power input. Driving it high continuously does not command full speed or a particular extreme angle. The servo interprets timed pulses according to its own interface.
Continuous-rotation servos behave differently: their pulse width generally controls direction and speed around a neutral stopping region. They cannot be assumed to move to an absolute angle like the positional model in this tutorial.
Check your servo's documentation for supply voltage, signal levels, pulse range and mechanical travel. Connector colors are helpful clues, but confirm the pin arrangement rather than relying solely on color.
Pulse Width Controls the Requested Position
A common starting point is a pulse near 1.5 ms repeated approximately every 20 ms. Shorter and longer pulses command positions on opposite sides of neutral, within the range accepted by the particular servo. The relationship is not a universal degrees-per-millisecond standard.
Pololu's servo interface explanation describes why pulse width, neutral position and mechanical endpoints need to be treated separately. Start near neutral and establish the usable range for the selected model.
| Quantity | Meaning |
|---|---|
| High pulse width | The position-command variable |
| Frame period | Time from one command pulse to the next |
| High and low voltage | Whether the receiver sees valid signal levels |
| Jitter | Unwanted pulse-to-pulse timing variation |
For a 1.5 ms high pulse in a 20 ms period, duty cycle is 7.5 percent. However, the pulse width is the useful command description. Keeping duty cycle at 7.5 percent while doubling the period also doubles the high pulse to 3 ms, which is not the same command.
Review the Original Circuit
The historical project uses a 555 astable, two switched timing resistors and a BC547 transistor. The transistor is connected as an inverter, with its emitter grounded and a collector pull-up providing the servo signal.
The older text said that the signal came from the transistor's emitter. In this common-emitter arrangement, the useful inverted signal is at the collector. When the timer output is high, the transistor conducts and pulls the collector low. When the timer output is low, the pull-up raises the collector.
This inversion is useful because the standard astable's low interval can be made into the servo's short positive command pulse. Without inversion, the servo would receive the much longer high interval of the timer.
The original values include a 33 kΩ upper timing resistor, a 100 nF capacitor and switched resistances of 10 kΩ and 68 kΩ. Nominal inverted high pulses are therefore about 0.693 ms and 4.712 ms, with complete periods about 3.673 ms and 11.712 ms. Those are not a general-purpose 1–2 ms, approximately 20 ms servo interface.
A simulated motor reaching an endpoint with those values does not establish that a physical servo accepts them. We will use revised timing values and check the signal before connecting a real motor.
Connect a Revised 555 Astable
Use a regulated 5 V timer supply and the selected timer's documented operating limits. For this example, choose RA = 240 kΩ, a timing capacitor of 100 nF, and RB adjustable from 15 kΩ to 30 kΩ.
- Connect pins 8 and 4 to 5 V, and pin 1 to ground.
- Join pins 2 and 6 at the timing node.
- Connect RA from 5 V to discharge pin 7.
- Connect RB from pin 7 to the timing node.
- Connect the 100 nF timing capacitor from that node to ground.
- Add a typical 10 nF capacitor from pin 5 to ground.
- Place approximately 100 nF supply bypassing close to the IC.
Implement RB with a fixed 15 kΩ resistor and a 15 kΩ potentiometer used as a variable resistor. Tie the wiper to the selected end terminal. The fixed resistor prevents a zero-resistance discharge path at one end of adjustment.
Use a stable timing capacitor, such as an appropriate film component, when repeatable pulse width matters. The simulator's nominal capacitance does not represent all real tolerance and temperature effects.
Calculate the Servo Pulse and Frame Period
The standard astable has tHIGH ≈ 0.693(RA + RB)C and tLOW ≈ 0.693RBC. The NE555 datasheet explains the charging and discharge paths behind these expressions.
After inversion, the servo's positive pulse corresponds to tLOW. Its complete frame period remains T ≈ 0.693(RA + 2RB)C. Changing RB changes both quantities, so this simple circuit does not provide an independently fixed frame frequency.
| RB | Positive servo pulse | Frame period | Repetition rate |
|---|---|---|---|
| 15 kΩ | 1.040 ms | 18.711 ms | 53.4 Hz |
| 22 kΩ | 1.525 ms | 19.681 ms | 50.8 Hz |
| 30 kΩ | 2.079 ms | 20.790 ms | 48.1 Hz |
These are candidate teaching values, not guaranteed safe endpoints for every servo. Set the resistance near 22 kΩ total for the first test and measure the waveform. Limit the available adjustment to the range documented or established for your servo before sweeping toward either end.
To calculate the nominal resistance for 1.5 ms, use RB = t / (0.693C). With C = 100 nF, the result is approximately 21.65 kΩ. Component tolerance means the measured neutral adjustment may differ.
Build the BC547 Signal Inverter
Connect the BC547 emitter to ground, its collector to 5 V through 4.7 kΩ, and its base to the 555 output through 10 kΩ. Connect the servo signal to the collector. A 100 kΩ base-to-emitter resistor helps define the off state when the drive is absent.
Check the transistor package pinout in the manufacturer's BC547 documentation. Swapping collector and emitter may produce confusing partial behavior rather than the clean switching expected from the schematic.
When the collector is low at an illustrative 0.2 V, the pull-up current is approximately (5 − 0.2) / 4700 = 1.02 mA. The transistor is switching this small signal current, not the servo's motor current.
At an illustrative 3 V timer high level and 0.8 V base-emitter drop, the 10 kΩ resistor supplies about 0.22 mA before the small pull-down current. That is suitable drive for the modest pull-up load in this example. Verify the collector voltage with the actual model and connected input.
The pull-up establishes the signal's high voltage. It must be compatible with the servo input even if the servo motor is powered from another supply voltage. A common ground is needed to define the command voltage, but it does not replace signal-level compatibility checks.
Power the Servo Separately from the Signal Path
Connect the servo's power lead to a supply suited to its specified voltage and current. The timer output and collector pull-up must never be used as its power source. Starting, moving and holding a loaded shaft can demand much more current than an unloaded servo at rest.
Pololu's servo electrical characteristics guide discusses the separation between power and control. Consult the actual servo's specifications when selecting a supply and connector.
Join the timer and servo grounds with a sensible return arrangement. Avoid forcing motor current through a thin signal-ground jumper before it reaches the timer reference. Supply droop or ground movement can disturb the pulse generator and make the servo twitch.
Provide suitable local energy storage and bypassing according to the supply and servo requirements. A capacitor cannot compensate for a fundamentally undersized supply, but local decoupling can reduce short wiring-related disturbances.
Run the Proteus Test in Stages
- Leave the servo signal disconnected and start the timer simulation.
- Measure the timer output and the inverted collector signal.
- Confirm a positive pulse near 1.5 ms and a period near 20 ms.
- Check that the signal voltage is compatible with the selected servo model.
- Connect the model and observe its neutral position.
- Change the timing resistance in small steps while measuring pulse width.
- Record model angle against measured pulse width without assuming that the same mapping applies to hardware.
The original screenshots show model positions labeled −90 and +90 degrees. Those labels describe that simulation model's display convention. They do not prove a universal ±180-degree travel range or an exact physical angle for a given resistor.
If a model jumps to an endpoint, inspect the waveform before interpreting the jump as successful control. A pulse far outside its normal command range may simply be clipped by the model. That behavior hides the invalid command rather than validating it.
Understand the Two Original Switches
The old circuit selects timing paths with separate switches. A switch changes the resistor network only while its electrical state remains selected. It is not a memory element that necessarily remembers a brief button press.
If both switched paths are open, the intended timing path is interrupted. If both are closed, the resistors combine in parallel and create a third timing value. Neither condition should be ignored when explaining the controller.
For two fixed positions, use a defined selector arrangement that chooses one valid resistance at a time, and specify its transition behavior. A maintained selector differs from two momentary pushbuttons. If pushbuttons must select and retain positions, add appropriate latching or control logic.
Mechanical contact bounce can also disturb timing when a switch changes resistance during a capacitor ramp. Measure the transition pulses, not only the steady-state waveforms after the switch has settled.
Position, Holding and Mechanical Limits
A positional servo generally continues receiving command pulses after it reaches the requested position. Its internal control can then correct disturbances and hold against load within its capabilities. Stopping the pulse stream does not provide a universal, guaranteed hold behavior.
Do not force a shaft against a mechanical stop while increasing the command pulse. A stalled motor can draw substantial current and heat the servo. Establish usable limits with the manufacturer's guidance and an unloaded mechanism before attaching the final linkage.
The direction associated with a wider pulse depends on mounting and the servo's convention. Define clockwise and counterclockwise from a stated viewing direction. Otherwise, two people looking at opposite sides of a shaft can describe the same movement differently.
A linkage can reach its own limit before the servo reaches its internal limit. Check the complete mechanism's travel, clearance and load. A valid electrical pulse is only one part of a working motion system.
Tolerance, Jitter and Better Timing Options
For the inverted pulse, width is proportional to RBC. If resistance is 1 percent high and capacitance 5 percent high, the nominal width scales by 1.01 × 1.05 = 1.0605, about 6.05 percent. At 1.5 ms, that is approximately 91 µs before other errors.
This calculation explains why a 555 circuit is useful for learning but needs calibration for a precise position command. A low-tolerance capacitor and resistor reduce drift, but do not establish an exact angle without measuring the servo response.
Jitter is different from a fixed calibration offset. A constant 50 µs offset moves the requested position consistently; pulse-to-pulse variation can cause continual small corrections or audible activity. Examine several pulses on the oscilloscope when diagnosing an unstable shaft.
If independent frame timing and pulse width are required, use separate timing stages or a controller with a suitable hardware timer. The single-astable circuit deliberately trades that independence for a small component count.
Build a measured position table
For an unloaded test, record pulse width and observed shaft angle at several points inside the established usable range. Approach each point from both directions if gear backlash matters. Keep supply voltage and the measuring reference unchanged so that the readings can be compared.
Suppose a particular tested mechanism measures 30 degrees at 1.2 ms and 150 degrees at 1.8 ms. A linear interpolation between those measured points would give 200 degrees per millisecond and predict 90 degrees at 1.5 ms. Those are hypothetical calibration readings, not specifications for the servo shown here.
Check an intermediate measurement before trusting that interpolation, and do not extrapolate it beyond the verified range. Mechanical geometry and servo response may be nonlinear. This is especially important when a horn drives a linkage rather than directly indicating shaft angle.
Changing the command pulse also does not directly specify how fast the shaft travels. Movement speed depends on the servo, load and controller behavior. A gradual command sequence can limit requested position changes, but that is another control function beyond this simple adjustable timer.
Download and Review
The original Proteus project remains available below. Its historical switched resistor values have not been replaced in the archive. Apply the revised design deliberately and measure it before considering a hardware build.
Download Angle Control of Servo Motor Project using 555 Timer
| Symptom | Check |
|---|---|
| No movement | Servo supply, common ground, signal polarity and pulse presence |
| Immediate endpoint movement | Actual pulse width and the model's accepted range |
| Jitter or repeated resets | Supply droop, ground return, contact bounce and timing noise |
| Wrong direction | Pulse-width change, viewing direction and mechanical mounting |
| Servo heats while holding | Stall, excessive load or command beyond the mechanism's usable range |
| Button release changes behavior | Momentary versus maintained switching and the resulting resistor path |
The main lesson is to measure the command at the servo connector. A timer calculation, a transistor inversion and a simulated angle are connected steps, but none should be substituted for the next.
Frequently Asked Questions
Is the 555 threshold always 5 V?
No. With its normal control level, the upper threshold is approximately two-thirds of the supply.
Does every servo move through 360 degrees?
No. Positional travel depends on the servo. Continuous-rotation variants use a different control interpretation.
Why use the BC547 collector as the signal?
The common-emitter stage inverts the timer output so that its short low interval becomes a positive servo pulse.
Can I power the servo from pin 3?
No. Provide an appropriate motor supply. Pin 3 controls the small signal-interface stage only.
Will 1.5 ms always mean an exact 90 degrees?
No. It is a common neutral starting point, but the physical angle and usable pulse range need device-specific calibration.
























Comments
0