Help adding a contact mic to an instrument

(I’m not very used to these kind of websites, so please forgive me if I mess this up)

I recently invested in a ukulele, and while I may not be the best at playing it, I’d like to be able to add a contact mic to it for better recording. I’m planning to use one of those little piezo disks, but I’m not too familiar with how I should use it. My first thought is to attach it to the inside of the back with some 5-min epoxy, then lead tthe wires out using a jack. Would that be sufficient to, say, plug into a computer’s microphone input?

While googling, I got a bit confused about the differences between line level and instrument level etc, is that something I really need to worry about?

Should I use a small eurorack style jack or a big kosmo style jack? Everything I own at the moment uses small jacks, but most instruments I’ve seen use big jacks. Are there any benefits either way, or is it just down to personal preference?

I’m also thinking about making my own effects box based around a 3.3v microcontroller, which would involve sending the instrument signal into a 3v3 tolerant pin. Do I need an amp, or conversely some kind of protection from overvoltage?

Sorry for the load of newbie questions, I’m much more a software kind of person. Any advice or pointers towards links would be much appreciated =)
<3

5 Likes

Hi @voidUpdate, welcome!

I have a ukulele I “installed” a piezo disk into some years ago using blue masking tape. Last time I checked it was still attached. I’m not saying I recommend this, but it is repositionable and removable unlike 5-min epoxy. You can try out different positionings etc. before going with a permanent solution.

A piezo puts out a small signal — much smaller than line level — so it won’t work well to plug it into a line level input. But a mic input might be okay. You can try it, you won’t fry your computer or anything. If that isn’t satisfactory you’ll need to amplify the signal before putting it into a line level input, or use a sound interface that has an instrument level input.

Ideally there should be a preamp mounted near, or in, the instrument — you can buy such preamps for under $10, made to be mounted on the upper side of the body. But you can get by without it, at least as a start.

Electric guitars and other electrified instruments pretty much universally use 1/4" jacks. It’s your uke, you can use a 3.5 mm jack if you want to, and if you need to you can get adapters or cords with different jacks on the two ends. But 1/4" is more compatible with what other people use.

For the effects box, the microcontroller will need a signal within the range 0 to 3.3 V. The small piezo signal would have to be amplified (to within 3.3 V peak to peak) and offset (to keep it positive). And yes, the microcontroller pin should be protected against voltages outside that range.

2 Likes

Hi voidupdate . yeah I would defiantly do like analogoutput says and just use tape at first , that way you can try it in different positions . it will sound different as you move it around . you can try different types of tape to like double sided foam tape . jacks are personal preference mostly depends on what you are plugging into.


here is a quick way to try it out .

Thanks from the both of you =)
I’ll look out for a cheap preamp. I’m kinda looking for a lo-fi sound (the microcontroller only has 8-bit ADC and DAC, might as well embrace that limitation) so a cheapy one might end up working in my favour XD.
I might end up going for big jacks if it doesn’t matter, since I can easily adapt my headphones up to big jacks, but going the other way is a little harder.
Would a ~3v3 zener diode between the pin and ground be adequate protection?

2 Likes

That’d work against overvoltage, except you also need a series resistor to protect the zener against overcurrent. But the zener doesn’t just turn on completely at 3.3 V, it’s more gradual, which means the voltage drop across the series resistor changes, which slightly distorts the signal going into the microcontroller. Sounds like that’s not a problem for you but in a more precision case it could be important.

What I think works better is a Schottky diode between 3.3 V and the input. Another Schottky between input and ground protects against negative inputs. You still need a series resistor to limit current through the diodes.

2 Likes


here is a couple more things , this site has more info to and can get you started on a new hobby in case you needed another .
3 Likes

Dual op amp pcb these boards a really nice for a quick pre-amp. I used dual Tl072 with one amplifying the Contact mic then using one as a lowpass filter. It should be possible too use a Dual opamp that is single powered with a single supply voltage. I haven’t tested it but it should work.

2 Likes

Hot glue! Many cigar box guitar builders hot glue there piezo elements in.

I built this circuit a few days ago:

I disassembled a salvaged electret mic capsule to get a jfet since I didn’t have any on hand. I did change the two 3.9k resistors for 4.7k to keep the current across the jfet down as these are more sensitive than those specified in the original design.

There is also a good op amp based design which will give you higher gain.

For the piezo element I tried a few and a large one from an old smoke alarm gave excellent results.

3 Likes

Thanks, interesting links. I get the feeling there may be ideas here that would give better results for Mikrokosmos than the original Music Thing design. Someday I want to revisit that and see if I can improve it.

2 Likes

I have fitted many piezo and Mic systems from ukuleles and zithers to harps, drums, under saddle systems for electric guitars to bridge systems for cellos and though I’ve never found a good universal preamp for either ceramic and electret and there are simply so many ways to go.

With piezo its the position and the baffle that is the most important. On acoustic stringed instruments it can be near the bridge with an offset to treble strings and I will sometimes sandwich the piezo in card (the baffle) and attach with tape. I do use glue (usually epoxy) when attaching to hard body and again i add a baffle to stop wash (noise echo).
For electret is all about placement near a sound hole and understanding the amplification of acoustic instruments (what the back board and top and sound hole do) . Thick wire is a friend when positioning electret mics.

But preamps are the witches brew so start simple and that for me is the 4049.
From one CD4049 Hex inverter you can have a really clean preamp and then add tone, filters, gain, maybe add fuzz or distortion, even an envelope follower and all with just a few additional components. I could not recommend a better start to signal processing.

I learned as I went along on guitars but when I started making odd instruments I found Nicholas Colins’ book Handmade Electronic Music is a great guide to building useful audio circuits.

2 Likes

So a little update on my progress. I was able to get the jack installed, but unfortunately not much more


I was able to use my parent’s workshop over christmas to get that done, but I left everything else (piezo disc, soldering supplies, all my electronics) at my other house, which, due tto current lockdown restrictions, I am unable to access :confused:
The design on the front is handmade (obviously :joy: ), and I’m aware it looks a little crappy. At some point I’m going to do it properly using spray paint instead of sharpie, and give it a clearcoat so my hand doesnt rub it off

2 Likes

Clearcoat will usually work on Sharpie. Light coats, 4+ layers.
Unusual location for a jack but will make little difference to sound.
I often find that time away from your tools and workspace makes me more inventive. For a long time I found fitting piezo disks a faff until one summer on holiday I was forced to make a tool that looked like chopsticks in a simple G clamp to reattach a disc that had come loose.
Happy Building

1 Like

I was planning to put it on the bottom of the wide end, but after drilling the hole I realised that the wood was too thing for the length of the jack, and I wouldnt be able to put the nut on, so I had to make a second hole in the side. I’m left handed, so that’s the bottom side for me. That does now mean that I’ve got an extra hole in my uke, but I’m sure I’ll find a use for it at some point

2 Likes

that makes a little more sense . you said you needed help ?

3 Likes

I think I’ll be fine, at least until I need to do the overvoltage protection. Just need to wait until I can actually access the kit again, or I might just order some stuff to here, which will probably take a while anyway

4 Likes

we are here and will help if possible .

4 Likes

Great success!
I recieved an order of a few new piezo discs today, and set about putting one into the ukulele. I put a little 2 component epoxy on the back to stop me accidentally ripping a wire off, then soldered it to the jack that I already installed. I plugged my headphones in, and could hear it when I tapped on the disc, hoewver the level seems to be too low when strumming. However my dad let me use his big amp for a bit to confirm it was working.
It’s a bit dark now, but I’ll share some pictures and stuff tomorrow.
I know I’m getting a little excited over a small thing, but its quite impressive to me that my hardware things works first try

3 Likes

First pebble in a landslide mate. Plenty of circuits for headphones amp but if you want simple and amazing try connecting a cheapo USB soundcard to a smartphone with an OTG cable (so you have power and USB) then uke into Mic in and headphones on the soundcards headphones socket. Then hit the play store for any number er of free BIG amp and speaker simulation programs.
Well done, have fun.

Yeah, a piezo won’t really drive headphones directly if that’s what you were trying to do — or is there a preamp in there too?

2 Likes

No, no preamp. I was just interested as to if it would work directly. I’ll be building the amp later, once I can get access to the rest of my stuff again

1 Like