2

Author Topic: TPA81 to LM386  (Read 15830 times)

0 Members and 1 Guest are viewing this topic.

Offline mango1Topic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
TPA81 to LM386
« on: August 23, 2008, 01:12:55 AM »
Hi guys,

I need some help on a project I am workin on. I am making a robot based off of the herbie schematic: http://downloads.solarbotics.net/misc/herbie1.gif

I have followed the herbie layout exactly but instead of using 2 photodiodes I am going to use two TPA81 sensors to detect a flame. Everything has been running smoothly but I am stuck on how to wire the TPA81 to the LM386.

Here is the TPA81 schematic: http://www.superdroidrobots.com/product_info/TPA81/tpa81.GIF

and here is the LM386 schematic: http://www.mcu.hk/GIF/LM386.gif

any input would be appreciated. thanks!

« Last Edit: August 23, 2008, 01:14:31 AM by mango1 »

Offline RobD

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: TPA81 to LM386
« Reply #1 on: August 23, 2008, 01:50:56 AM »
Just by looking at the specs on the TPA81, it looks like it takes the sensor readings and uses an on-board chip to make everything I2C friendly.  The I2C  lines are the only outputs from the sensor on this board.   

The design of the herbie uses the direct output of the photodiodes to feed the inputs of the LM386. 

I'm not sure if the TPA81 can be directly wired to the LM386.   

Offline mango1Topic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
Re: TPA81 to LM386
« Reply #2 on: August 23, 2008, 08:38:00 AM »
ahh thats not good news :(

if the TPA81 can't be wired to it do you know of any other type of sensor I can use instead?

Offline RobD

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: TPA81 to LM386
« Reply #3 on: August 23, 2008, 03:27:43 PM »
Maybe the thermopile itself is what you are looking for? 

I found one on DigiKey's website.  http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=MLX90247-ESF-DSA-ND

The data sheet shows a connection to two different types of Op Amps. 

Offline mango1Topic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
Re: TPA81 to LM386
« Reply #4 on: August 23, 2008, 05:00:40 PM »
that could be it!

i read this off a site: the herbie bot reads the difference in light level between the two ir sensors and uses that to split the voltage between the two motors. so if both ir sensors are seeing the same amount of light, the 9V gets split evenly into 4.5V for each motor. When one eye sees more light than another, the op-amp directs more voltage to the motor on the opposite side, which makes the robot turn towards the light

so now my question is will having 2 thermopiles instead of 2 photodiodes achieve the same result but make my robot go towards a flame?

Offline RobD

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: TPA81 to LM386
« Reply #5 on: August 24, 2008, 01:21:55 AM »
Hi mango1

Bear with me on this subject because I find it really interesting.  I think I will give this a try myself soon.

I should probably start by asking:

What do you wish to have your robot "see"?  The candle flame or the heat from the candle?

This starting point should help narrow down the right sensor for your robot and tune the circuit properly.

I started out by looking at the general consensus of the blackbody temperature of a paraffin candle.  I found that 1930 Kelvin is the key number used in most calibrations.  Knowing that number, I used Wiens Law to find the peak spectrum for that temperature.

Wiens Law:   lamdamax  = 2.9X106 / Tk

Where lamdamax is the peak frequency in nm and Tk is the objects temperature, Kelvin.

So... lamdamax = 2.9X106 / 1.93X103

lamdamax is roughly 1500nm - or - 1.5um, so, if you want to "see" the candle at it's maximum frequency of emittance then a sensor sensitive to the longer IR waves would appear to be suitable.  In this case the thermopile would seem appropriate for they all seem to be more sensitive in the high IR range.  The TPA81's range is stated to be 2-22um, which in this case is slightly above our optimal temperature.  The thermopile I steered you toward earlier s rated at 5.5 to 15um so I was actually in error.   

Now, the visible yellow glow of a candle is just the particulates of soot and stuff burning up.  This is from the exited hydrocarbon atoms shooting their photons at us.  Since this color is generally orange-ish, it's probably somewhere around 650nm.  If we wanted our robot to "see" the visible flame itself then it appears a photdiode would be more appropriate.  Digikey lists photodiodes that range from around 200 to 1100nm.

Using a photodiode pair would reduce the amount of legwork on your part and you could just about plug them into your existing circuit plus they seem cheaper.  Using a thermopile would require some extra work matching an appropriate op amp to the device as I don't believe the LM386 to be quite suitable for this application.  Mainly because the thermopile can swing negative if the sensor reads a temperature cooler than the sensor itself.  This would require a dual +/- power supply or for you to use a voltage divider to place a virtual ground to the negative side of the op amp.  There are single supply op amps on the market as well.

An unrelated note... All the time I was thinking about this today I was wondering if multiple detectors (spanning the UV to IR wavelengths) could be used to sense if an object was moving away from or approaching the robot by interpreting the shift in wavelength.  Thats probably a pretty cosmic thought  :D

Hope I was able to help some. 

Rob 



Offline mango1Topic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
Re: TPA81 to LM386
« Reply #6 on: August 24, 2008, 10:22:38 PM »
Hi Rob,

Initially, I was going to have the robot see the heat of the flame so I was going to use the tpa81 but I learned that I canít wire it to the LM386 like the herbie circuit does with the photodiodes. so I guess I changed my plan haha

I am thinking of just having the robot see the light instead. Based on all of your findings I think I will definitely lean towards photodiodes. I actually went out to the store after reading your post to see if I could get my hands on some but wasnít so lucky.

I found a couple of ir phototransistors( http://www.radioshack.com/product/index.jsp?productId=2049724&cp=&sr=1&origkw=phototransistor&kw=phototransistor&parentPage=search) and grabbed those. I was wondering, will they be able to substitute for photodiodes? If not, then I think Iíll definitely order a pair of photodiodes from digikey. Iíll look for something that is around 650nm just so it can see the flame.

Also, about your unrelated noteÖthats actually a very interesting thought. Might be a good idea for a robot you could work on :)

p.s. i REALLY apprecate you taking the time to help me with my robot. thank you very much!

Offline RobD

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: TPA81 to LM386
« Reply #7 on: August 25, 2008, 10:31:10 PM »
No problem!  This is something I was wanting to look into myself but never got around to it  ;D  I don't know much about the flame detecting robots and how they are wired up to operate so I might have just re-invented a wheel someone else has looked into haha.

The phototransistor you purchased from RadioShack is an IR type, so it will be more sensitive to the red to infra-red spectrum.  Yesterday I was looking at phototransistors myself.  If you look at the difference between a photodiode and a phototransistor you might be happy with your purchase!  I guess the next step is wiring them up and checking them out.   Tomorrow after I get home I'll try some experimenting too.  This is where I would start (definitely some tweaking will be required  :D)  Q1 and Q2 are the phototransistors, R1 and R2 are bias resistors, and U1 is the LM386. 



   

 


Get Your Ad Here