A Gal asked me for help with an assignment, but since my personal projects tend to explode or malfunction I prefer to ask you first before giving her any guidance.
She is basically making a sound following robot. A two motor bug that rotates in direction of an incoming sound and moves towards the source.
I thought about using an LM741* op amp as a comparator, with an electret microphone on each input. The op amp output is then connected to a couple of NPN and PNP transistors. According to the voltage the respective left or right wheel motor will be activated (see attached picture)
The problem is, I cannot figure out how to make the robot advance towards the source. If the two microphones are facing the sound at the same time the resulting output of the op amp will be zero.
Although Micro controllers would easily overcome this problem unfortunately I have no experience with them.
Any hint will be very appreciated.
(*I know the LM741 it's lousy and old, what would be a more decent low power op-amp?)
I found some problems in my approach too, after checking a clap switch schematic. The microphone signals must be amplified and filtered to avoid uncontrolled triggering with any sound or below certain the threshold.
If I understood you, the amplifier output will be never equal to zero, except when the microphones are facing the same direction.
Do you think that adding another comparator at the output of the first one (i.e. transistors will be only triggered then signal passes beyond certain level) will fix the rotation problem?
hi,
Consider only one comparator, it will have only two output states, turn right or turn left.
What you need are two comparators, first clap1, move forward, clap2 if detected first by left comp,turn left 45deg, clap3 if detected first by right comp,turn right 45deg.
If right and left detected simultaneously, keep moving forward.... if no claps for say for 10 seconds , stop.