Bio Signal Amplification

You would want to move robot controlled by your eyes , or probably make a bio signal controlled robot , you need to actually amplify Bio-signals.

Here i talk about a simple construction to amplify and filter bio-signals . In this particular project a robot is controlled with signals based on eye movement. To be more precise when the eye moves left the bot moves left. Similarly right straight and stop.

The various stages in this project is to acquire the bio signals properly. When the eye moves there is produced a micro-volt variations in the electrodes in that region around the eyes this they pick up those signals.

Prominent disturbances of bio-signal are from external sources of nice thus it needs Low pass filtering . After filtering it will need a section to amplify at the last stage and avoid the threshold noise that is produces.

All the above said is achieve in the following circuit diagram and the three sages are marked.

  1. Acquiring Bio-Signals
  2. Filtering external noise
  3. Signal Amplification

Stage (1) collects the Bio-signal and amplifies in the first stage with a AD622 instrumentation amplifier. This give a huge voltage amplification (i’ve heard its given out as samples… do check) . Once the amplified signal is obtained you’l have to low pass filter it.

These bio signals have a very low frequency around 8Hz or so and hence a good low pass filter would remove all the noise. The op-amp shown in the second and third stages are either a 741 or LM324 .

The last and output stage has a normal amplifier with a op-amp. The third stage also helps us set the threshold voltage so that only the bio signal is amplified. The ‘POT’ in the third stage is set accordingly such that the total output of this circuit is ‘0’ at no signal input.

This the output will be a voltage > O for a signal from the electrode or ‘NO VOLTAGE’ .

In case you’l want to analyse these signals in digital logic , i.e “is there a bio signal or not?” then use the IC 7414 as in out IR sensor circuit .

This is from a working project *

Exact Circuit and MicroC code for stepper motor

Well saw that people still are having quite some doubts on the stepper motor post that i had put up. so i thot to make that abstact clear i better put the exact circuit and the code here.

The exact circuit to connect the stepper motor to 16F877A is given below

In this the common is connected to the 16V supply(12 v is actually enough actually higher current drives the motor better as far as i know*). If u are new here and donot know how to find the common line in a unipolar Stepper motor then see here

The MicroC code for running the motor is as below.
void main()
TRISB = 0x00;
PORTB = 0x00;

//routine to move in one direction
for (i=0;i<50;i++)// increse i=50 no i=100 to cover double the distance

//routine to move in the other direction

for (i=0;i<50;i++) // increse i=50 no i=100 to cover double the distance

There are much easier ways to write the above code but then i am not worried about the memory it’l take nor have any pressing need to keep my code small and trim ,so i guess this will make you absolutely clear of what i’m trying to do to make my motor run.

If you din know MicroC well,let me brief. The line PORTB = 0x80 (1000000)makes my 8th pin of the PORT “B” that’s b7 pin or the 40th pin go high.The next line PORTB = 0x40(01000000) will make the 39th pin go high and all other low.

Now whenever the pin at the input of the ULN2003 goes high say pin 1 the output pin 16 drains the current throuh the motor thus completing the circuit from supplt 16V through motor to the ground in that line. When you keep doing this in series as i called it the abcd pulse the motor will rotate . When your reverse the pulse order the motor rotates in the other direction. As simple as that. For most robotic application atleast at contest level you may use this circuit uinless you go for bigger stepper motors that need more current to drive and is greater than the 500mA that the ULN2003 can sink!!
i guess i was clear about using ULN2003 to drive a sstepper motor. pl post your comments and doubts
I like keeping all my circuits small and simple and not crowd it with resistors and capacitors.Afterall its a hobby and we need not complicate it.Cheers.

Make A IR Based Mice Robot

Well this is just a small mousey bot that can be make quickly from you old computer mouse froM the junk. The small DC motors would give it the speed and it'l almost not his and obstacle but avoid and keep running around on the floor. IR sensors would form the eyes of the bot so that it doesn't his obstacles. It will make a cool bot to show to yopur friends and put them in awe ! ,come lets get it done.

The basic concept is this way:
–>The two motors on the side propels the mouse fast in front
–>When an obstacle is detected in front the signal From IR is stops one of the motor from moving thus turning the bot to one side.
–>So the bot never hits and moves like a real mouse searching its way through.

As you can see in figure A) the two motors on the side propels the bot in front and then once the front IR recieves the presence of obstacle then the one of the motors stops moving thus rotating the bot to one side.The key feature that makes the bot ammusing is the speed at which it moves due to the motor.

Mechanical Setup:-
There's actually nothing much as mechanical setup. Just stick two motors on eithr side ot the mouse as show in fig A) below. It must be inclined as shown in figure B) which is its front side view.

Circuit Involved :-

–>Citcuit involves just two 7805 regulator and one BC107 transistor.
–>i guess ouy are able to see the circuit involved here.
–>The two motors runs on direct supply from the battery with a 7805 regulator in between.which is to just isolate the supply to the other motor when one motor supply is grounded
–>When the IR sensor detects the obstacle it willl give a 5v signal which drives the Transistor and groud the supply to the motor 2 thus stopping it.
–>While motor 1 is still running the bot turns right.
–>As soon as the IR sensor stops detecting the obstacles it drives the other motor too driving the bot in front.

If you have even a little basics in electronics you can follow this circuit. In case you'l need explanation please leave a comment.

The Ir cicuit need to be the one i suggested only to get it working properly. I have given the links on all the words "IR sensor" above. Take a lookj at theat and design the IR sircuit for this bot.

–>For the IR circuit vitis my post about IR sensors. Stessing this because most other IR detectors availabe on the net may not give 5v on signal detection but mine wiil hence stressed it a bit too much.

Stepper Motor Driver Circuit

Have you been searching for a goot damn circuit to drive your stepper motor?? Well even i did when i was learning robotics. Most stepper motor circuits that are available onlne have a bunch of transistors, Sometimes power trnsistors too quite a complicted circuit that drives you away far frm using it. Well i felt for most robotic use the stepper motor can be driven by a simple ULN2003 IC that costs just 12 bucks in my backyard.

The above are the most common types of stepper motors that you’l find in the market.

There are two types of stepper motor that normally is used.1)Unipolar 2)Bipolar . In simle terms they can be thought about like this. In unipolar there are 5 wires.One common wire and four wires to which power supply has to be given in a serial order to make it drive. Bipolar (not normally used in robotics) can have 6 wires and a pair of wires are given supplt at a time to drive it in steps.

STEP ANGLE :The angle with which the stepper motor turns for a single pulse if supply toone wire or a pair is called step angle.

Driving a stepper motor:

1) Identify the wire : Common and windings

Continue reading

Transistor as a switch

This circuits can help begginers to understand a transistor and use it for their ciruits. i will explain the general working of the transistor as a swithch and finally will give you few ideas of how all i used it.

Binary Output with a transistor:
1) Design a circut which allows a PIC processor to drive an LED array. This LED array has the following properties:

Vf @ 80mA = 10.2V ( six red LEDs are placed in series, giving 6 x 1.7V = 10.2V)
Assume that the PIC is only capable of driving 10mA at 5V.
Step 1. Find a transistor which can withstand 80mA.

110 < hFE < 450 ——>meaning you can count on a gain of atelast 300

max IC (Sat) = 200mA ——>meaning this can take 200mA. 80mA is quite small rite.

VCE(Sat) = 0.25V ——>a rough estimate of VCE at saturation

VCEO = 45V ——->meaning this transistor can take +45V when turned off

Step 2: Find a power supply bigger than 10.2V. Arbitrarilly assume a +24 supply.

Step 3: Find Rc to limit the current to 80mA

RC =( 24V-10.2V-0.25V)/ 80mA = 170 ohms

Step 4: Find RB to saturate the transistor. At the lowest gain, to put you just at the point of saturation,
Ib = ICE/hfe = 80mA /150 = 534uA —->150 is typical Hfe for BC107B in datasheet*
RB = 5V-0.7V/534uA = 32kohm

Pick R smaller than this to assure you saturate this stage. Let R = 10k.

switchIn this pic that i got from a random site kindly overlook the ZTX1051A transistor with Hfe>300. i have shown you calculations for BC107.


2) Design a circuit whichuses a single output from the PIC processor, and allows a PIC processor to drive this motor in the clockwise direction at either 0% speed (0V) or 100% speed (+5V). Assume the motor draws 470mA at +5V.

Step 1: Pick a transistor. I'll stick with a BC107 because I like this transistor.

Step 2: Add the motor to the collector. You don't need a current limiting resistor since the motor's armature resistance and back EMF limit the current to 470mA @ 5V.

Step 3: Add RB to saturate the transistor. Worst case, when the gain is minimum (300) and you're just at the point of saturation:
IB = ICE/Hfe = 470mA/150 = 3.14mA

RB = 5V-0.7V/3.14mA = 5.48kohm

Step 4: Just to make sure that you saturate the transistor, make Rb smaller than this. Let RB = 2k.note: The inductance in the motor stores energy in a magnetic field. When the current is turned off (the transistor turns off) the energy in the field has to go somewhere. To save the transistor, place a diode across the motor to allow the collapsing field to drive current through the diode – saving the transistor

motoragain the ZTX1051A is replaced by BC107 and the current at 2k at base resistance is 3.14mA.


3) Design a circuit which can drive the motor forward and in reverse using transistors:This is the transistor version of my ULN2003 H-Bridge
You can use the same circuit as before, only add another NPN and two more PNP transistors. The equations work out
the same for each transistor:
OFF: put the input to 0V. This assures that 0A flow through the diode.
ON: make RB = 2k to saturate this transistor when 470mA flow though it.

IB > 470mA/Hfe = 3.14mA

RB < 5V-0.7V/1.57mA = 5.48kohm

Let RB = 2k.

PNP: BC177(since I picked a transistor with the same gain (Hfe or b)
OFF: put the input to +5V. This assures there is no potential across the base diode and no current flows.
ON: Make RB = 2k to saturate this transistor when 470mA flows through it.
IB > 470mA/Hfe = 3.14mA

RB < 5V-0.7V/3.14mA =5.48k
Let RB = 2k


That will do…..



1) I connected my local FM radio reciever to my parallel port. There are only two switches to operate it. one for selecting channel and the other for reset . just connect it this way below and you can write a code in VB or C to address the ports and to scan or reset.


The two black thigs are the switches.. just pic the two sides which the switch shorts on pressing and make this combination and get your electronic switch working.

2) I have connected my calculator and microcontroller using the same concep.. I will put those pics later as my friend is havin the digi as of now!!

Cheers trying the circuits. Keep giving your coments plas (it will cheer me up!!) –Madan

IR Sensor

I have come across many IR transmitter and reciever circuits over the internet. They happen to be of a very wide range from a single transistor transmitter to transmitters that will look reali high funda to newbies.The first time i searched for my first circuit for IR sensor i had a tough time. My friend gave me a circuit with a 55 timer and aTSOP to recieve.This is the most popular form of IR sensors used at college level robotics. Here in the city(Chennai) there is a place calle Ritchie street. People over there rig up circuits for you and if you can make their pockets heavy the can just do anything from a LED display to amicrocontroller Kit. now the frist time i go there with my poor 555 timer circuit for IR sensor and esk him to wire it up. I got a blank reply “This circuit will not wotk and do you want to buy my circuit for 600 bucks??? it will work properly!1″… This was pretty much an interesting start for a ‘new to robotics’ (then!!) guy like me. so here is one circuit that is so straight forward that you can hardly question its proper functioning.

A normal led looks like in the picture


Now follow the circuit.The circuit is as below



FOr thoe who are new well it is like this. The Ir led is just forward biased diode and the reciever is a normal led like looking reciever. In my place i get it if i ask for just “IR reciever”(That looks more or less like a normal LED) .Well the reciever is reverse biased thus the input to PIN 13 of the 7414IC remains “HIGH” thus the output (PIN12) being inverted will be “LOW“. Thus the LED will not golw.

When the reciever recieves IR waves from transmitter the reciever will be forward biased and that will literally ground the supply(not really though). so input to pin13 gets”LOW” and sice the IC is inverting typethe output is “HIGH” and the Led glows.


1)At the point above reciever the voltage remains about 2.25v when no IR is recieved thus IC output is low

2)When IR is recieved the volatage just above the point above reciever the voltage goes to 0.23V and thus the IC inverts it and shows up a HIGH and thus the indicator LED in series with the 100 ohms glows only when it recieves IR.


The other circuit with 555 timer can be asjusted for sunlight and interference .This circuit above will be affected but doin what i say now will help a lot and it has workled satisfactorily in alll conditions for me. just wrap a black tape around both reciever and transmitter and streamline your wave path.This removes most of the interference.


1)This can be used to find obstacles which can be done by makin the IR led and reciever LED facce in the same direction places close to each other.Tracing a white path can also be done this way.
Note:This can be literally put to any use . like i made a fuel flow meter with this concept!!!(water flow cuts the IR when it folws between transmitter and reciever!!)