We can't stop here. This is bat country!

Started by moid, August 01, 2024, 09:59:11 AM

Previous topic - Next topic

moid

Hello everyone

Its the holidays and I can finally stop lurking and get on with some virtual interaction! I hope you are all well and not sweating in the heat like we have here at the moment (kind of need the opposite of the Woodstock No Rain song right now). Of course I'm going to finish those builds that got left in the lurch the last time I was here*, but first I have a question (or two) for you all regarding a circuit that isn't an effects pedal, but I suspect you'll be the only people who know the answers!

One of my relatives gave my son a bat detector kit for his birthday. I put it together for him (luckily it was a pre-made PCB that you just connect parts inside; no soldering)... and despite me assuming that it wouldn't work (because it does look like cheap junk) we took it into the garden last night, pointed it at a couple of bats and we could indeed hear them echo locating (which was cool!). There are a couple of issues / improvements that I think the circuit would benefit from - firstly volume... even on maximum, it is damn quiet (it has a built in speaker). I'm not sure if the lack of volume is just an issue with ultrasonic sound (the bats we were listening to are pipistrelles and they chat at around 30-35KHz) or strange circuit design - the PCB is all SMD components so impossible to read, but the instructions came with a schematic (a nice surprise!) and it looks like there is a 386 amplifier driving it... now when I've built 386 circuits they have been pretty loud, so maybe the issue is the speaker? It's an 8ohm 0.5 watt speaker (which should be ok?).



My question is - could I stick a standard 386 amplifier circuit in between the last 100uF capacitor and the Loudspeaker (LS in the schematic) and would that solve the volume issue? Or would that be a bad thing to do to the speaker? It would have to run off the same 9V battery that the kit runs on.

(this is the sort of thing I mean by a standard 386 amplifier)


Or should I use a different circuit? Do something else? I don't want to touch the components on the PCB because they are damn near microscopic and I doubt I could get a soldering iron near them without frying things.

Another thought is could I also add 3.5mm headphone socket so that we could plug in headphones? I'm guessing I could have an SPDT switch to determine whether the audio goes to the speaker or the headphones? Might want the headphone socket to always be outputting audio and the speaker to have the on/off capability... that way we could record the audio to another device and listen to the speaker at the same time?

And a final thought - this circuit uses a heterodyning process to generate the bat sound where it has an additional frequency that runs 1K less than whatever the frequency pot is set to, and then (if I understand this correctly) that 1K less frequency is subtracted from the original frequency and that brings the audio down from say 30KHz to 1Khz and it therefore becomes audible to humans. Which is clever. So then I started pointing the bat detector at a variety of other objects to see if it detected things - the plugs on my extension lead make great drone sounds, and the LED display on the microwave and cooker make some fun electronic bleeps... I tried some acoustic guitar through it (because acoustic instruments should be capable of making harmonics that go beyond our hearing) but couldn't tell if it made any sounds... might just be that the acoustic guitar was way louder than the loudspeaker... I was wondering would we get an interesting sound if we had a circuit that turned normal acoustic instrument audio into an ultrasonic version of itself, play that through an ultrasonic transducer perhaps and then capture that on an ultrasonic microphone - would that sound interesting; or just like a tinny, lo fi version of the original? Have any of you even done this?

Anyway, got to go, my attorney is waiting outside in a red chevy convertible, and we need to drive, drive off to find the Great American Dream... just hope none of those bats see us again...


*liar, we've heard that one before!
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

Rob Strand

#1
Very cool project and use of the IC.

Unfortunately with those ICs the datasheet tells very little about what is coming out of the pins in terms of expected voltage levels and impedances.   Who knows what level is coming out of the AM mixer.  Normally you would take the output from the detector.  Also why add a 100nF cap across the mixer output?  Hard to know without doing some measurements to guess the output impedance on that pin.

Adding a second LM386 is over doing it.  Can't you just lower the 470 ohm gain resistor on the LM386 ( pins 1 and 8 ) ?   Try shorting it out, leaving the cap in.  Maybe that's enough gain.


The mic circuit looks odd.  Not sure why it's like that.  You might expect something funky since you are putting audio into an input that expects small RF signals.  If that's an electret mic it's only biased at 0.6V, pretty low, maybe a reason for low output.  However, maybe that's the idea in that part of the circuit!!!  [It occurred to me later it's not a mic but an ultrasonic receiver?]


Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

moid

Thanks Rob - sorry I forgot to say the mic is an ultrasonic receiver. I'd rather not get the soldering iron near the components though; they are tiny and I doubt my ability to do so without hitting everything around them. That's why I thought about adding another circuit afterwards.

I thought the 386 part was odd - to me, if you want to boost a quiet sound, you want the circuit to be capable of maximum power, so that 470ohm resistor between pins 1 and 8 stops that happening... mind you this is a bat detector for different types of bats - pipistrelles are tiny things, perhaps larger bats are much louder and so need an attenuated volume to prevent damage to the speaker?
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

duck_arse

but, what is it the bats are saying? mopre, have you thought of reversing the procedure, upscaling your speech and outputting ultrasonic? I bet you have.


your car engine running, and breaking glass, two sources of ultrasonic noises you could listen to. when I was working bank alarms, we had ultrasonic detectors to mount on the vaults, so they could hear the ultrasonic noise a thermal lance makes burning through concrete. have you gat any thermal lances laying about?

I've got nothing useful.
" I will say no more "

moid

Aloha Duck!
Quote from: duck_arse on August 01, 2024, 11:11:02 AMbut, what is it the bats are saying?

Well it was tricky to work out the intonation; bats seem to use microtonal inflexions so that very tiny pitch changes make all the difference between "moth", "mosquito", "midge" and "microphone"... and add in the doppler effect as they flap around you and it goes well over my head. However I can loosely translate the longest sentence we heard as "mothmothmothmothmothwhatthe@#$%ishedoingwiththatboxtakeevasiveactionwheredidthatmothgo"

Quote from: duck_arse on August 01, 2024, 11:11:02 AMmopre, have you thought of reversing the procedure, upscaling your speech and outputting ultrasonic? I bet you have.

If you'd had money on that one, you'd be a winner! You're right - I have no idea how to though! I did find a uk company that sells both transmitters and receivers, but they don't offer any datasheets / schematics sadly... and I've no idea if it would be worthwhile to try it or not - half my brain says it might create an interesting lo fi old school radio sort of sound, and the other half thinks it'll just be hiss...

Quote from: duck_arse on August 01, 2024, 11:11:02 AMyour car engine running, and breaking glass, two sources of ultrasonic noises you could listen to.

Cool, didn't know those two - my keys jangled together sounded interesting... I've got a metal tongue drum that I thought would sound good, but couldn't get anything out of it (but it may just have been too loud to hear against the feeble speaker)

Quote from: duck_arse on August 01, 2024, 11:11:02 AMwhen I was working bank alarms, we had ultrasonic detectors to mount on the vaults, so they could hear the ultrasonic noise a thermal lance makes burning through concrete. have you gat any thermal lances laying about?

Oh if only I'd known; I cleared out the last of my thermal lances last week - gave them to the local orphans charity shop. I figured I was getting too old for bank raids... my back just isn't what it was... those oxyacetylene tanks are heavy you know! Still I'm sure the orphans will find some use for them.


Quote from: duck_arse on August 01, 2024, 11:11:02 AMI've got nothing useful.
Nay sir! Never :) When a man is tired of duck, he is tired of... something important, I forget. Maybe it was chicken?
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

moid

You know I might just build a 386 circuit and plug it into the bat detector (and keep it's volume pot turned down) and see what happens - if it doesn't work I'm sure I could stick it into some other circuit that needs a boost later on.
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

jorg777

Quote from: moid on August 01, 2024, 09:59:11 AMMy question is - could I stick a standard 386 amplifier circuit in between the last 100uF capacitor and the Loudspeaker (LS in the schematic) and would that solve the volume issue?

It would be way overkill to add another LM386 to the circuit, and the LM386 is not intended to be cascaded anyway.  The LM386 provides a simple gain control method.  Interpreting from the datasheet, pins 1 & 8 can be connected through a capacitor and variable resistance to set the gain.  Internally, there's a 150 Ohm and 1350 Ohm resistor in series; putting an RC in parallel across the latter (pins 1 & 8) boosts the gain.  Call the effective series combination of the 150 + (1350 || Rg) as Reff.  Gain is then 30000/Reff.  With no external resistor, gain is 20.  With pins 1 & 8 AC-shorted (through a capacitor) you get a gain of 200.  With 470 Ohms across, you get 30000 / (150 + (1350||470)) = 60.  Short out that 470 resistor and you will get a gain of 200 (more than 3x what you have now).

PRR

> we could plug in headphones?

This. Maybe not the final answer, but should be interesting.
  • SUPPORTER

duck_arse

Quote from: duck_arse on August 01, 2024, 11:11:02 AM. mopre, ....

geeze, it's bad enough I can't read my own handwriting, now I can't read my own typing. what is this word, any ideas?
" I will say no more "

stallik

mopre - ministry of power and renewable energy
Mopre - surname
mopre - sausage fingers caught the p when typing the o in more
Insanity: doing the same thing over and over again and expecting different results. Albert Einstein

bluebunny

mopre - absolutely sh!tfaced, typed "Martin" with his elbows  :D
  • SUPPORTER
Ohm's Law - much like Coles Law, but with less cabbage...

duck_arse

might be shorthand for "bemused regulars".
" I will say no more "

moid

#12
Quote from: jorg777 on August 01, 2024, 02:39:42 PMIt would be way overkill to add another LM386 to the circuit, and the LM386 is not intended to be cascaded anyway.  The LM386 provides a simple gain control method.  Interpreting from the datasheet, pins 1 & 8 can be connected through a capacitor and variable resistance to set the gain.  Internally, there's a 150 Ohm and 1350 Ohm resistor in series; putting an RC in parallel across the latter (pins 1 & 8) boosts the gain.  Call the effective series combination of the 150 + (1350 || Rg) as Reff.  Gain is then 30000/Reff.  With no external resistor, gain is 20.  With pins 1 & 8 AC-shorted (through a capacitor) you get a gain of 200.  With 470 Ohms across, you get 30000 / (150 + (1350||470)) = 60.  Short out that 470 resistor and you will get a gain of 200 (more than 3x what you have now).

I took a photo of the PCB


I can see where there should be a 470ohm resistor (I think it's R5, I drew red around it), but to my eyes (admittedly not great) it seems to be missing? So there is a 10uF cap, but no resistor... so does this mean the circuit is ignoring the cap and just using the internal resistor on the chip itself? It looks like someone forgot to add the relevant resistor to me (unless SMD parts are even smaller than I thought - these ones are damn small). This might explain why the circuit is quiet. I checked the rear of the PCB and it is blank (unless you can hide parts inside the PCB? I've no experience with them). I'm not sure if I could connect a normal resistor to those tiny pads without hitting the chips nearby... which is why I was thinking of using a extra circuit after this PCB, because the connections to the PCB  and speaker and nice and easy to attach new cables to. If 386 amplifiers shouldn't be cascaded, would a TL072 circuit or a LPB1 be a better thing to try?

The TL072 datasheet has a ten fold amplifier circuit

RL should be a 2K resistor, and I could substitute the 10K resistor for a 10K pot to get control of the boost I think?
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

moid

Quote from: PRR on August 01, 2024, 03:20:25 PM> we could plug in headphones?

This. Maybe not the final answer, but should be interesting.

Yes it did occur to me that the sound might be louder on headphones... but it could be useful to try because that way I could also record the audio the device captures.
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

moid

Quote from: duck_arse on August 03, 2024, 10:53:20 AMmight be shorthand for "bemused regulars".

The bemused irregulars were regularly amused? It could happen :) It's better than mop(r)eing about!
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

PRR

Quote from: moid on August 03, 2024, 04:14:49 PMjust using the internal resistor on the chip itself? It looks like someone forgot to add the relevant resistor

Agree. If you can work the box while open, have sharp eyes and steady hands, melt a small scrap of wire in the end of a plastic stick and try shorting the "R5" pads while listening. The choices are 1,500r, and 150r, with about 400r if the schematic were correct. If there is a BIG change when shorted, they screwed-up. However it could just go into uncontrolled screaming (feedback), a different form of screw-up.

I think from here you either acquire the tools to do SMD hacking, or brutally bypass the LM386 to send audio to the "LS" jack to feed to a separate mini-amp.
  • SUPPORTER

Rob Strand

Quote from: moid on August 03, 2024, 04:14:49 PMI can see where there should be a 470ohm resistor (I think it's R5, I drew red around it), but to my eyes (admittedly not great) it seems to be missing? So there is a 10uF cap, but no resistor... s
There's a very good chance that's it.

First check if R5 goes to the cap and pin 1 of the LM386 (maybe pin 8 if it doesn't follow the schematic exactly).   

It only needs to get a short across it.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

jorg777

#17
Quote from: moid on August 03, 2024, 04:14:49 PM
Quote from: jorg777 on August 01, 2024, 02:39:42 PMIt would be way overkill to add another LM386 to the circuit, and the LM386 is not intended to be cascaded anyway.  The LM386 provides a simple gain control method.  Interpreting from the datasheet, pins 1 & 8 can be connected through a capacitor and variable resistance to set the gain.  Internally, there's a 150 Ohm and 1350 Ohm resistor in series; putting an RC in parallel across the latter (pins 1 & 8) boosts the gain.  Call the effective series combination of the 150 + (1350 || Rg) as Reff.  Gain is then 30000/Reff.  With no external resistor, gain is 20.  With pins 1 & 8 AC-shorted (through a capacitor) you get a gain of 200.  With 470 Ohms across, you get 30000 / (150 + (1350||470)) = 60.  Short out that 470 resistor and you will get a gain of 200 (more than 3x what you have now).

I took a photo of the PCB


I can see where there should be a 470ohm resistor (I think it's R5, I drew red around it), but to my eyes (admittedly not great) it seems to be missing? So there is a 10uF cap, but no resistor... so does this mean the circuit is ignoring the cap and just using the internal resistor on the chip itself? It looks like someone forgot to add the relevant resistor to me (unless SMD parts are even smaller than I thought - these ones are damn small). This might explain why the circuit is quiet. I checked the rear of the PCB and it is blank (unless you can hide parts inside the PCB? I've no experience with them). I'm not sure if I could connect a normal resistor to those tiny pads without hitting the chips nearby... which is why I was thinking of using a extra circuit after this PCB, because the connections to the PCB  and speaker and nice and easy to attach new cables to. If 386 amplifiers shouldn't be cascaded, would a TL072 circuit or a LPB1 be a better thing to try?

The TL072 datasheet has a ten fold amplifier circuit

RL should be a 2K resistor, and I could substitute the 10K resistor for a 10K pot to get control of the boost I think?


If they've omitted R5 (and assuming R5 really is supposed to be the gain resistor) then all you need to do is put a blob of solder across the R5 pads.  No need to go to all the trouble of adding an op amp.

No normal consumer product would hide a component inside the PCB.  It is not completely impossible to hide components in this way, but it is rare and costly, super tricky.  I have done it on exotic government spy stuff, for RF performance reasons.  But that's the only instance I've ever seen of doing that.

If one end of R5 is connected to pin 1 or pin 8, these are the pads you are looking for.

moid

Thank you very much chaps for your thoughts and advice. I can report some success :) I ordered a magnifying visor (I had a load of Amazon vouchers left over from Christmas that I was thinking of buying a delay pedal with, but I probably have quite a few of those already, and my eyesight is not improving)... anyway. it's amazing - it fits over my glasses but doesn't completely occlude them so I still have some peripheral vision while wearing them but can flip them out of the way with an elbow while holding a soldering iron / solder / tweezers in my hands. With the visor on I can read the numbers on the SMD resistors :) I was going to just put a small strip of wire or solder across the pads (with the visor on I could see that one of the R5 pads connected to pin 1 of the LM386 chip) as suggested but then I thought maybe the microphone might fedback on itself too much? It warns me about this in the manual (before fixing it there was no feedback).I thought about ordering some 470ohm SMD resistors, and then another bit of good(?) fortune happened. One of our smoke detectors died, so I took it down and thought... hey I bet these have SMD resistors in them - so I dismantled it and the PCB is stuffed with them! Sadly none were 470ohm, but there were some 100ohm resistors and I was able to desolder one of them, then stick it to the bat detector PCB with soldering paste and then solder it (badly and messily!) with my iron and solder and it looks a mess, but it works! The speaker is now seriously loud and feedbacks at near maximum volume (so I'm glad I put some resistance in the circuit; I think a bare wire would've been stupidly loud). I'm really happy; thanks for all the great advice!

I haven't yet fitted a headphone jack - because I realised I need a portable device to record the sound onto - if I record with my phone (I don't own anything cool like a Zoom recorder) then I don't think there is a way to record the audio without using the phone's built in mike... probably some sort of mike attachment? Anyway I'm all out of vouchers so it can wait!

One last question if you don't mind. The PCB from my smoke detector that I am dismantling has been coated all over in a thin layer of transparent plastic which I can peel bits of it away but it does make it hard to remove the resistors... is this normal for SMD PCBs? I don't think I've noticed that before (but then again I haven't ever desoldered one or worn a magnifying visor either). I'm impressed at how much heat the resistors survived from my iron - I checked them with the DMM after detaching them and the few I've removed so far all read with values that correspond to the numbers on them.
Mushrooms in Shampoo -  Amidst the Ox Eyes - our new album!

https://mushroomsinshampoo.bandcamp.com/album/amidst-the-ox-eyes

Chillums

That's conformal coating.  From Wiki.

Conformal coating is a protective, breathable coating of thin polymeric film applied to printed circuit boards. Conformal coatings are typically applied at 25–250 μm to the electronic circuitry and protect against moisture and other severe conditions.