Close
0%
0%

Earbot

A robot with 'ears' to hear and turn to the source of a transient sound.

Similar projects worth following
A simple robot that just turns to face the source of transient sounds.

This robot has a lot of potential for feature creeping, especially because I have an end goal of integrating the idea with computer vision and spherical rotations. I want it not only turn to the source, but recognize and pinpoint the source.

But to start, the robot will just turn in a 2d plane to face the direction of a sound source. All I've done to start is come up with the equation

\color{White} \large \theta = arcsin( \frac{\Delta t}{T})where theta is the desired angle, delta t is the measured time difference that it takes for the sound to get from one ear to the other, and T is length measured between the ears divided by the speed of sound. The sign of delta t will determine which ear heard the sound first.

  • Basic circuit completed

    JangoJungle07/29/2016 at 13:46 0 comments

    Been a while! Since my last log I've had a baby girl! Woo-hoo! 😊

    I've drawn up a basic schematic of the circuit and I'll post it in the next few days if I can. I've prototyped my circuit with the ADC I've chosen and am currently working with very slow progress to make sure my digital data is correctly coming out of the circuit. I haven't locked in to a microphone either, so the gain on my amplifier may need to be adjusted or adjustable.

    I'm considering adding a simple RLC filter for noise above 20kHz so I can more cleanly do DSP on the signal later.

    I'm also looking into a basic compressor so I don't have to worry as much about clipping. I'll have to decide on a dB level for design and go from there.

    If all goes well, I should have something working by the end of the year! Slow and steady wins the race. 😊

  • Hardware

    JangoJungle05/28/2015 at 14:06 0 comments

    I plan to use a simple ADC with an adjustable mic amplifier for both ears of this robot. Currently I'm designing the circuit that will allow for either an ADC output or a comparator output with a jumper to choose. I've picked fairly cheap hardware, as I don't need anything fancy to just hear transients.

    I'm also looking into acoustic dampening for the servo(s) to make sure they're not adding interference. This may end up being the most expensive part, time and money.

    I'm also working in adobe illustrator to design a layout to cut out of plastic or soft metal. These will be brackets to hold the circuit board to the servos.

    I've chosen to use a raspberry pi as my platform, as I eventually want to add visual input to the robot. I'm looking into setting up openCV for that purpose.

    When my circuit is built I'll test to see how much of a problem reverb can be, taking into consideration a few different environments. The idea is to just program in essentially a debounce function that will wait a certain period of time to turn to another transient.

  • First Simulation

    JangoJungle05/04/2015 at 19:51 0 comments

    I've made a simple python program to simulate the earbot, testing out just the very basic function of taking in a difference of time and outputting an angle.

    So here's the code:

    __author__ = 'JangoJungle'
    """Earbot test program
    
    This program is the basic model of an earbot. Enter a small difference in time
    and it will output what angle the sound came from, how far it has to turn and
    in which direction, and it's new position.
    """
    
    from numpy import *
    
    # initialize variables
    
    current_angle = 0
    length = .1524  # this is approximately 6 inches in meters
    time_constant = length/340.29  # length of time for sound to travel the full .1524 meters distance
    
    # get the difference in time
    
    while True:
        delta_T = input('Please input the difference of time, a number between -0.00044785 and 0.00044785: \n(use negative sign to denote direction)\n')
    
        # test for validity: the absolute value of delta_T should never be greater than time_constant
    
        if abs(delta_T) > time_constant:
            print ('Invalid time difference!')
            continue
    
        # calculate where to go
    
        x = delta_T/time_constant
        angle = arcsin(x)*180/pi
    
        print ("The angle the sound came from is %s." % angle)
    
        # go there/update position
    
        current_angle += angle
        if current_angle > 180:
            current_angle -= 180
        elif current_angle < 0:
            current_angle += 180
        print ("My new angle is %s." % current_angle)

    So just a couple notes:

    1. this program does not distinguish between a sound from the front and a sound from behind. For simplicity's sake, I'm leaving it that way until I know the robot is built.
    2. In hindsight, it would have been simpler to make the time constant an integer, but this still shows the function well enough.

View all 3 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates