|
Homebrew Equipment A place to show, design and discuss the weird and wonderful electronic creations from the hands of individual members. |
|
Thread Tools |
4th Sep 2020, 9:27 pm | #21 |
Nonode
Join Date: May 2016
Location: Cornwall, UK.
Posts: 2,339
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Chris, that's great! Lots to get on with over the weekend, and much appreciated. The microphone is intermittent. I thought it was broken before, but then it came back, but now there's no response to any tapping or other stimulation.
I wasn't going for 3.6V, as that's the maximum on the datasheet. I put Vcc something like 5.2V to give some sagging headroom, and added some extra resistance to the mic to make sure it was well below the overload Vdd, but within the 1.5V - 3.6V datasheet values. It's obviously still drawing current, so perhaps the problem is something as simple as a loose breadboard connection. Another point for the investigation! I'll report back... |
8th Sep 2020, 1:10 am | #22 | ||||
Nonode
Join Date: May 2016
Location: Cornwall, UK.
Posts: 2,339
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Quote:
Quote:
Quote:
Quote:
I'll check around the 4066 some more. I am happy to believe a significant amount of the noise is because of the open breadboard construction with a lot of interference around, but it's strange how it's so different from one half of the IC to the other. I'll try moving it to a different set of breadboard holes. |
||||
8th Sep 2020, 8:03 am | #23 |
Dekatron
Join Date: May 2003
Location: Edinburgh, UK.
Posts: 3,274
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Perhaps you could draw what your schematic looks like now?
Peter |
8th Sep 2020, 1:55 pm | #24 |
Hexode
Join Date: Mar 2020
Location: Rochdale, Greater Manchester, UK.
Posts: 457
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Hi - good to hear that you are making some progress. Squarewaves sound encouraging, but the next hurdle of the buffer amps I think may have a simple solution.
It comes down to the single supply issue again for your op amps. The inverter is sorted and you report a good sinewave, but the distortion on the non-inverting buffer made me realise that you need to modify that stage also for single supply working. Fortunately a quick fix, as illustrated in the attached diagram. See how things line up from here, good luck. Cheers Chris |
8th Sep 2020, 1:58 pm | #25 |
Hexode
Join Date: Mar 2020
Location: Rochdale, Greater Manchester, UK.
Posts: 457
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
If that gives you a decent sinewave on both outputs, then you should apply the same fix to the low pass filter stage, which is essentially the same non-inverting buffer configuration with filter components added.
Cheer Chris |
8th Sep 2020, 10:28 pm | #26 |
Dekatron
Join Date: May 2003
Location: Edinburgh, UK.
Posts: 3,274
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
I think the signal at the input of the LPF stage is already referenced to 2.5 volts back at the inputs of the first LM358.
Peter |
9th Sep 2020, 1:13 am | #27 |
Nonode
Join Date: May 2016
Location: Cornwall, UK.
Posts: 2,339
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Peter - the revised circuit version A is attached. The previous one is now superseded.
I found a couple of wiring errors as I checked through, and now with the 40kHz connected between VGND and IN (C3, HPF), I get a sound through the headphones. As I turn the 555 frequency control, I can hear a varying squeegee sound somewhere between tuning on longwave and a DJ scratching vinyl. However, I've discovered that the output from pin 7 of the unity gain buffer is cleaner when the power is disconnected! Pin 1 is still a decent sine wave, but weak. Both sides are approximately 0.1Vpp rather than 1Vpp, with power on and off. Bypassing the HPF with the signal generator gives an output of 1Vpp on each, but they're in phase. Chris - thank you for your split supply circuit. Unfortunately, I don't understand how it applies. Both LM358s are connected to VCC and GND for their supply. Are you saying I should apply the split supply to the non-inverting input, so the signal from the HPF arrives at the junction between the two resistors? How does that interact with the 68R to VGND as the HPF? I think this is what Peter means by saying the signal is already referenced to VGND. Could it be a problem because I've changed the original HPF from an RLC to RC? Originally, there was a 3.3mH inductor to VGND, bypassed with 220R. I can imagine that the 68R there is now doesn't give enough offset to the signal. I avoided the inductor because I didn't understand it and it appeared to be a value that was unusual. I didn't want to make an order just for that part! Also the numbers for the advertised cutoff didn't work with the calculations I did for those values. |
9th Sep 2020, 7:43 am | #28 |
Dekatron
Join Date: May 2003
Location: Edinburgh, UK.
Posts: 3,274
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
I think the wiper of the volume pot R9 should be connected to the -ve input of the LM386 and not to VGND. Also I think you should remove the capacitor C9 and couple the +ve input directly to the Low Pass Filter.
Peter Last edited by peter_scott; 9th Sep 2020 at 7:49 am. |
9th Sep 2020, 3:53 pm | #29 |
Hexode
Join Date: Mar 2020
Location: Rochdale, Greater Manchester, UK.
Posts: 457
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
I don't think the inductor is really an issue here. The original high pass filter with its inductor was actually a "2nd Order" filter which would roll off at -40dB per decade, in contrast to your "1st Order" filter with a roll off of -20dB per decade. Just calculating the cut-off frequency with the original R and C values would understandably give the wrong answer, so your own calculated values are spot on (23.405kHz). If you wish to emulate the roll off of the original then just cascade two stages of your own filter.
I think Peter and I are both acknowledging that the signal needs to be referenced to VGND, ie half supply voltage in these single supply op amp stages, and on your schematic this is achieved by the lower op amp stage that establishes VGND for use wherever required in the circuit. A similar effect can be produced by using another potential divider with equal resistors (and an optional capacitor) if required for an individual op amp stage. As you have seen, the Inverting Stage Unity Gain op amp happily uses VGND on pin 3, the "virtual earth" terminal since it is not in the direct signal path. My concern about just connecting VGND to pin 5 is that it would just short out your already referenced to VGND signal. Hence my suggestion of using an additional potential divider to achieve a half supply reference point for that op amp, without shorting out the signal. Peter suggests that this has already been done (post #26), prompting me to say well yes, but nobody told the Unity Gain Buffer or the 2nd LM358, which are the areas in which you seem to be having ongoing problems. I'm still of the belief that implementing a potential divider across the supply, mid-point connected to non-inverting terminal (pin 5 or 3 ) for each of those stages will solve your problem. You say that the final audio amp is working pretty well, so the C9 issue seems minor/optional at this point. It's strange that the simplest buffer stage is the one giving problems here, but virtual earths are a difficult concept to grasp and a I've found that practical approach can avoid a lot of stress! The LM386 is a special audio amp rather than a standard op amp, so I would follow the data sheet guidance as a starting point. You seem to be using the x20 gain mode as per the attached screenshot - perhaps follow that closely, with or without C9? I hope you are just a step away from success - go for it! Cheers Chris |
10th Sep 2020, 9:38 am | #30 |
Dekatron
Join Date: May 2003
Location: Edinburgh, UK.
Posts: 3,274
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Unless I'm missing something (like little grey cells) then I think the signal at pin 4 of LM358 #2 should be sitting about the nominal VGND level so no additional biasing or ac coupling should be required.
Peter |
10th Sep 2020, 7:03 pm | #31 |
Nonode
Join Date: May 2016
Location: Cornwall, UK.
Posts: 2,339
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Peter - do you mean pin 1? Pin 4 is GND at the power supply, but I see my '1' on the diagram looks rather like a 4!
I'm confused as to why this extra referencing would help, as the original design is not a split supply so should suffer from the same problems. All I've tried to do is replace the specific CMOS opamps the original designer used with examples I already had. I've never used opamps before (and transistors are still a bit of a black box to me) but thought they were basically drop-in replacements for this kind of circuit as long as the power supply was sorted. The new microphone boards arrived today, so I'll hook one up and see if I get any change. I'm also tempted to start the breadboard again to make sure all the changes have been properly applied! Thank you both for your continued assistance, and I'll report back. |
10th Sep 2020, 9:14 pm | #32 |
Nonode
Join Date: May 2016
Location: Cornwall, UK.
Posts: 2,339
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Now I see the LM358 is not a 'rail-to-rail' opamp. The author is keen to use the MCP6004 for this reason.
|
11th Sep 2020, 1:05 am | #33 |
Dekatron
Join Date: Feb 2007
Location: Leominster, Herefordshire, UK.
Posts: 16,536
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Rail to rail will give larger output voltage swing capability for the opamps. In principle, 0-5V for an opamp on a single 5V rail, in practice rather less depending on loading. The LM358 can probably only be relied on to swing between about 100mV and 3.5V or so. For maximum symmetrical swing that would suggest making VGND around 1.75V would be better than 2.5V. This might need some attention to dc levels for the LM386 audio amp (maybe some judicious capacitive coupling?).
There's nothing to stop you using higher voltage rails for the active circuits as long as you take care to feed the microphone properly.
__________________
....__________ ....|____||__|__\_____ .=.| _---\__|__|_---_|. .........O..Chris....O |
11th Sep 2020, 8:41 am | #34 | |
Dekatron
Join Date: May 2003
Location: Edinburgh, UK.
Posts: 3,274
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Quote:
Peter |
|
11th Sep 2020, 8:48 am | #35 | |
Dekatron
Join Date: May 2003
Location: Edinburgh, UK.
Posts: 3,274
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Quote:
Peter Last edited by peter_scott; 11th Sep 2020 at 9:06 am. |
|
11th Sep 2020, 10:30 pm | #36 |
Nonode
Join Date: May 2016
Location: Cornwall, UK.
Posts: 2,339
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
I'm getting seriously fed up now. I've rebuilt the breadboard, triple-checked the connections and get zero output from the 'scope on the microphone (new mic. board) and zilch through the headphones except a hiss. Now the 'scope has a very dim trace and there's a funny smell so I think it's given up the ghost. I now have two blown 'scopes and no detector. Goodness this hobby is a mare at times.
|
12th Sep 2020, 10:00 am | #37 |
Dekatron
Join Date: May 2003
Location: Edinburgh, UK.
Posts: 3,274
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Do you get any output at the low pass filter? If using headphones instead of your oscilloscope then you would need to stick a capacitor in series with the phones.
Peter |
15th Sep 2020, 1:30 pm | #38 |
Hexode
Join Date: Feb 2014
Location: Southampton, Hampshire, UK.
Posts: 419
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Hi, I bought some of the SPU0410LR5H-QB microphones with the intention of putting one in one of my detectors and feeding the comparison results back to you for trouble shooting signal levels etc. However what has arrived in the mail is this tiny thing that needs a strong magnifying glass to even see the solder pads yet alone make a connection. Have I missed someting here as I read in your post 31 "New microphone boards have arrived" ,can you buy them ready mounted on something easier to connect to?
Pete |
15th Sep 2020, 3:44 pm | #39 |
Nonode
Join Date: May 2016
Location: Cornwall, UK.
Posts: 2,339
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Yes Pete - the original link I was using for the circuit diagram is on Github. Here's the author's blog, though it seems from earlier posts in this thread that some parts might be wrong in the diagram. I had to do some digging to see what he'd done for a microphone board, as he's boosted it with an opamp before it gets to the 'IN' on the original diagram. I've included my version of his opamp board in the Rev A of the 5V circuit I drew out.
I got one board (because like you I thought soldering that microphone itself would be nonsensical as I'm used to valves not SMD) from the MicBooster link on that blog. but they were on holiday so I got my replacements to test just before oscilloscope blew up from eBay. There's a Dutch chap selling pre-built boards there. |
23rd Sep 2020, 1:42 am | #40 |
Nonode
Join Date: May 2016
Location: Cornwall, UK.
Posts: 2,339
|
Re: Bat Detector with Knowles Ultrasonic microphone problems
Trying again. I've tried some of the ICs separately as I was confused at getting no meaningful result with the new oscilloscope. It appears they're all blown. In a voltage follower configuration with the LM358s I get 3.84V at the outputs without any input, grounded or not. I've replaced the 555 with another and get a good square wave. The last LM358 I have is in the microphone preamp slot and there's jumping on the oscilloscope when the microphone's tapped or paper is rustled in front of it. A good sign.
Alas, I have no opamps left so this will have to wait until I have some more. It's bizarre they've all given up the ghost...unless I'm testing them wrongly. |