Monostable multivibrator as analog differential motion controller

Thinking about robots is the same as thinking about microcontrollers or some other digital computing device able to control the motion. That is correct and pretty logic way of thinking. But, the motion could be also controlled with an analog device. What we need is a square wave generator able to control an H-Bridge circuits which drive a DC motor. This simple example demonstrates a monostable multivibrator as the analog device able to control one set of the differential motion kinematics.

Differential robot

Before we start with a monostable multivibrator, I would like to say something about a differential robot. The differential robot belongs to a class of simple robotic system. It has two standard DC motors (with two wires), each connected to an H-Bridge device controlled by a microprocessor or analog device, what we do have in this example.


When both DC motors rotates in the same direction, the robot goes forward or backward. When one DC motor rotates in one direction and second in a reverse direction, the robot rotates around its axis. Very simple, but you should be aware that a DC motor rotational speed plays an important role in different types of non-linear motion.

Differential robot.

Monostable multivibrator

A monostable multivibrator has two states: a stable and unstable state. We need only one bit of information to encode a stable and unstable state. A logic 1 could be used for a stable and a logic 0 for an unstable state. It is important for the state to be encoded, because there is a class of a multivibrator's stable in a both states, called a bistable multivibrator - a flip flop (RAM memory building block) for example. In the electronic world, a logic 1 and 0 could be anything.

For example: a +5V stand for a logic 1 and 0 volts for a logic 0, or +15 volts for a logic 1 and -15 volts for a logic 0. Voltage levels depend on the hardware design, but it is important to have two different voltage levels to distinguish between two different logic states. In this example, we are dealing with a TTL / 5V CMOS voltage levels suitable to control an H-Bridge BA6222 integrated circuit (truth table BA6222 documentation).

To explain how a monostable multivibrator works, I am going to use a state machine as reference. As you are able to see from the below picture, the state machine has only two states, the one stable state (logic 1), and the one unstable state (logic 0). There are also a two transitions between the states, the external transition (ET), directed from the stable to an unstable state, and the direct transition (DT) directed from the unstable to the stable state.

The external transition is an external event (an external sensor interrupt), in this case the micro switch. By the external event, the state machine changes its state from the stable to an unstable state and stay there for some set of time. After a time, the state machine goes directly from the unstable state to a stable state and stay there till the next external event. Now, we have a machine able to generate a square wave signal, great!


Initial state: stable state (logic 1).
After 55 minutes: external interrupt is triggered -> ET from the stable to the unstable state, 1 -> 0.
After 30 seconds (predefined unstable time): DT from the unstable to the stable state, 0 -> 1.

After 10 minutes and 12 seconds: external interrupt is triggered -> ET from the stable to the unstable state, 1 -> 0.
After 30 seconds: DT from the unstable to the stable state, 0 -> 1.
After 2 days: external interrupt is triggered -> ET from the stable to the unstable state, 1 -> 0.
After 30 seconds: DT from the unstable to the stable state, 0 - > 1.
After 2 seconds: new external event is triggered -> ET from the stable to the unstable state, 1 -> 0.

As a result we have the sequence of the logic numbers: 1010101010101010101010101..., and the electrical signal counterpart.

Square wave signal


Now, let's take a look at the implementation of the presented state machine. We can do an implementation with a microcontroller device or we can do that with a pure electronics. The microcontroller implementation is much easier because it's already have an integrated timer (counter) which could be easily set to trigger an event after setting delay of time. 

To generate a square wave signal by an analog electronic device we need an operational amplifier to act as a comparator, and we also need a timer. With a microcontroller device, a timer is simply a counter able to count signal oscillations generated by an astable multivibrator (clock generator) until it reaches a desired number of oscillations. Because we do not have a microcontroller unit, we need an analog timer and that is an RC (resistor - capacitor) circuit.

Monostable multivibrator

The RC circuit defines a time, by the time necessary for the capacitor charging. The RC circuit is built around the resistor implemented by the trimmer potentiometer and the network of the two capacitors to increase the charging time. Instead of the two capacitors, you are filling free to use as much as you wish, or use just one capacitor, that depends on your choice. But the rule is simple the more capacitors you have, the more time is needed for charging. The same stand for the resistor. With the higher resistor value, more time is needed for the capacitor charging. With the resistor implemented by the potentiometer, we are able to configure the maximum time of the capacitor charging and, at the same time to configure the maximum unstable signal period width.

The signal marked as (1) is connected directly to the positive input of the operational amplifier. The value of the signal (1) is compared with the referent voltage marked as the signal (3), presented in the below picture. By simply comparing operation, the operational amplifier sets the output digital signal to one of the two possible states: a logic 1 or a logic 0, in this case +5 volts and 0 volts respectively. To see how comparing operation is done, please look at the below picture. For simplicity the analog signal (capacitor voltage charging/discharging) is presented as linear. 

Because the BA6222 H-Bridge device has two input pins related to the standard DC motor control rotation, one additional operational amplifier is required to invert the generated square signal. The output of the first operational amplifier is connected to the inverting input of the second operational amplifier which result in the reverts (inverted) in square wave signal. The signals marked with CS1 and CS2 are connected to the input pins of the BA6222 in order to control rotation of a DC motor.

For schematic and PCB design, please visit the web page.


  1. Nice post.Thanks for sharing this article with us.Keep posting!!
    Analog timer in chennai

  2. Great post.Thanks for sharing this article with us.Keep posting!!
    Analog timer in chennai

  3. Great post . For ece important points & formulas CLICK HERE


Post a Comment

Popular posts from this blog

Electrolytic capacitors and design rules

Kako napraviti laboratorijsko napajanje od starog kompjuterskog ATX prekidačkog napajanja