-
Basic circuit completed
07/29/2016 at 13:46 • 0 commentsBeen 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
05/28/2015 at 14:06 • 0 commentsI 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
05/04/2015 at 19:51 • 0 commentsI'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:
- 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.
- In hindsight, it would have been simpler to make the time constant an integer, but this still shows the function well enough.