Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 10 of 10

Thread: Programmable guitar/microphone effect pedal

  1. #1
    Junior Member
    Join Date
    Oct 2020
    Posts
    9

    Programmable guitar/microphone effect pedal

    Hello everyone,

    I am trying to design a low cost open source programmable guitar/microphone effect pedal with my Teensy 4.0 + Audio Shield.

    I have tested the circuit on breadboard (Except the mic phantom power) with a vocoder effect and it worked fine except some noise that i expect to disappear on the actual circuit.

    The EAGLE for the PCB are on my github:
    https://github.com/VasileiosVasilopo...ster/DeepSpace

    The complete PCB fits in a 1590BB enclosure.
    I am currently soldering the PCB in order to test it.

    I would like to ask a question: My teensy is soldered with the Audio shield and i do not have a desoldering station at the moment.
    Can i power the Teensy over USB to flash the code, and then power over the +5V from the PCB as long as i don't do them simultaneously?
    (Without cutting the trace on teensy)

    Also does anyone have any suggestions to improve the pcb? Any obvious mistakes?

    Click image for larger version. 

Name:	DeepSpace.jpg 
Views:	17 
Size:	151.5 KB 
ID:	23198

  2. #2
    Senior Member Blackaddr's Avatar
    Join Date
    Mar 2017
    Location
    Canada
    Posts
    290
    Yes, can power from your PCB, or via USB but NOT at the same time. As long as you never do that you should be fine.

    I also have made a Teensy guitar pedal and while it's not that difficult to get something basically functioning, it's much more difficult to get something with low noise (specifically digital interference getting into the analog circuit) with proper headroom for using guitar pedals with it (9V preamp required) while simultaneously ensuring no high voltages go into the codec. The SGTL5000 will start clipping around 2.8Vpp and fries at 3.6Vpp.

    So you can see it starts to get complicated. If you power the preamp at 3.3V, a higher voltage from a 9V guitar pedal will fry the preamp (and possible make it through and fry the codec). Also, 3.3V is cleary not enough headroom for guitar applications using other pedals which all run at 9V and can easiily hit 7 Vpp.

    A couple people on this forum trying to make guitar pedals with the SGTL5000 have fried it simply by strumming too hard.

    So you need to a 9V supply for your preamp, now you have the headroom you need. But, your preamp can still fry the codec at that voltage! So you need voltage protection circuits to protect the codec if a loud pedal is plugged in.

    You're preamp also needs to have a lot of gain sometimes (single coil pickups) but sometimes it's too hot and needs attenuation (hot humbuckers, bass guitar, active pickups and guitar pedals can all put out Vpp > 3V.)

    Take a look at my design (schematic is included in the boards datasheet), I've accounted for all of these including proper low-noise power supply design and proper PCB design to keep the digital signals from interfering with the analog ones.

    https://www.tindie.com/products/blac...-audio-shield/

  3. #3
    Junior Member
    Join Date
    Oct 2020
    Posts
    9
    First of all, thanks a lot for answering my questions.

    I am familiar with your shield, i've read about it and it is very well designed.

    Reasons i wanted to create my own were:
    - To fit in a 1590BB enclosure
    - To add XLR mic input in order to try vocoding.
    - To learn stuff
    - To see my creation come to life (You probably know the feeling)


    From what i've tried so far i didn't fry the chip. My guitar is a Gibson Les Paul with active EMG's.

    I measured the guitar's output voltage to about 1.3 Vpp max so i created a dc voltage of 2.5V before the guitar unity buffer.
    On super hard strumming the voltage on the debug code seems to go a little bit over the maximum but nothing got fried.
    Maybe the Audio shield already has overvoltage protection?

    The signal routing is:
    guitar -> buffer with TL072 -> Teensy Audio shield analog in (left)
    microphone -> preamp with SSM2019 -> Teensy Audio shield analog in (right)
    Teensy Audio shield mono analog out -> buffer with TL072 -> Effect out

  4. #4
    Senior Member
    Join Date
    Jul 2020
    Posts
    667
    The way to protect any CMOS chip from overvoltage inputs is the standard resistor + 2 schottky clamps to the power/ground rails.
    However the audio shield doesn't include this on the line inputs - and they need to be between the series capacitor and SGTL5000
    input pins. A series resistor is better than nothing, which will allow the chip's anti-static protection diodes to clamp the voltage.

    As the SGTL5000 line inputs are 29k impedance you can afford a few k ohms of series resistance for this without too much
    attenuation. Perhaps try 2k2 in series with the audio shield line inputs to make it more robust?

  5. #5
    Junior Member
    Join Date
    Oct 2020
    Posts
    9
    Quote Originally Posted by MarkT View Post
    Perhaps try 2k2 in series with the audio shield line inputs to make it more robust?
    So changing R6 and R17 to bigger values would help protect the SGTL5000? (R6 is already 10kOhm)
    Thanks for your help!
    These are the 2 line input circuits for reference:

    Click image for larger version. 

Name:	Guitar_Buffer.jpg 
Views:	18 
Size:	49.0 KB 
ID:	23200Click image for larger version. 

Name:	MicPreamp.jpg 
Views:	18 
Size:	45.8 KB 
ID:	23201

  6. #6
    Senior Member
    Join Date
    Jul 2020
    Posts
    667
    Make them both a few k.

    Your phantom power circuit will destroy the mike preamp, you don't have diode clamps to protect it from the 48V phantom-power switch transients.

    See the diodes here for instance: https://www.edn.com/signal-chain-bas...n-the-machine/

    A small bridge rectifier package provides a handy way to provide the 4 clamps.

  7. #7
    Junior Member
    Join Date
    Oct 2020
    Posts
    9
    I copied the preamplifier circuit from here

    https://www.instructables.com/Build-...m-Powered-Mic/

    The phantom power is at +15V same as the preamp power.

  8. #8
    Senior Member
    Join Date
    Jul 2020
    Posts
    667
    Ah, I wasn't expecting a +/-15V preamp and +15V phantom, +48V is standard for phantom power, and a 5V rail to rail preamp would be
    more usual in a microcontroller context these days

  9. #9
    Junior Member
    Join Date
    Oct 2020
    Posts
    9
    I just tested the board with a condenser microphone (No Phantom Power connected) and my guitar plugged in.

    Guitar Input is fine with no noise, output is ok i think.
    Microphone Input seems to be clipping a lot even when I set the channel's volume to 0.3 in the code and the Gain Potentiom

    Going back to the SSM2019 docs if i understand correctly:

    Click image for larger version. 

Name:	ssm.JPG 
Views:	8 
Size:	33.2 KB 
ID:	23242

    Is the preamp ouput around 13Vpp?

    Can i lower it with a simple Voltage Divider (2.5k Resistor from ssm output to ground)?

    Also shouldn't this have fried something?

  10. #10
    Junior Member
    Join Date
    Oct 2020
    Posts
    9
    Update: Changed R17 to 20kOhm, Added 1kOhm Voltage Divider to mic preamp output, completed assembly and tested.

    Some photos:

    Click image for larger version. 

Name:	Pic1.jpg 
Views:	14 
Size:	146.1 KB 
ID:	23425

    Uploaded a simple bypass effect which mixes the microphone and guitar pedal and outputs the signal and works fine without noise.

    Not yet tested: Phantom power, control potentiometers.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •