Ground pins question & schematic

TonyAme

Member
Thanks for reading. I'm using the Teensy 4.0 with the audio adapter board rev d.

This is a simple synth using 2 adafruit MPR121 capacitive touch sensor boards that trigger synth notes.
Scale, key, octave, wave form are selected via an LCD menu.

1. Should all of the ground pins be connected?
2. Should all peripheral devices (MPR121, LCD be powered via the Teensy's 3V supply as show in schematic?

U4 is a header for connecting 2 MPR121 capacitive touch sensor boards via I2C

U5 is for an LCD (20X4) LCD has a toggle switch (SW2) for cutting off the 3V supply to it.
(LCD is from Amazon by company called Hosyond, where it's stated that it requires a 5V supply, but I've been using it with a 3V supply from the Teesny's 3V supply pin with no problems, could it become a problem?

SW3 is a rotary encoder with push button switch.

*I use Q3 (a p-channel MOSFET) for reverse polarity protection.

Audio out is mono from LOUT.

Sincere thanks for any advice/help. Appreciated!
TonyAm
 

Attachments

  • TeensySynthI2C.png
    TeensySynthI2C.png
    63.9 KB · Views: 19
Yes, connect the GND pins.

Teensy's 3.3V output should be plenty to power MPR121 and a normal LCD.

If the LCD has backlight LEDs and has dedicated power pin(s) for those LEDs, probably best to power the backlight directly from your 5V power, using the appropriate resistor if needed. There's no 1 standard for how LCD backlights are used on LCD display modules, so I can't be more specific.
 
There are 2 possible grounding issues you may or may not face. These aren't problems with your schematic. They are (possibly) a matter of how your device interfaces with the surrounding world.

#1: Capacitive touch sensing depends on the person's body being at a fixed or stable voltage relative to your touch electrode's rapidly changing voltage. For handheld devices this is usually a non-issue because the person's other hand is holding the entire device which couples their body with the device's ground. If a person will touch the electrode without holding the device, usually you need the device's ground to be connected to earth ground. Because the person's body is so large compared with the electrode, even when they're not touching any grounded usually their body will have enough electro-static coupling to the surrounding environment (where most stuff is earth grounded) so that their touch influences the electrode.

But if your device is "floating" without any significant coupling to earth or the human touching, when they touch your electrode what can happen is your device's "ground" ends up moving (at the rapid speed that chip drives the electrode) relative to the room because they are touching it and effectively "grounding" your entire device to only their body!

I see your schematic has a provision for a battery. Many people have built touch sensing projects which seemed to work fine while testing, but they experience painful problems when running only from a battery. Usually a USB cable gives the device a "solid" ground during testing (either by a PC which is actually earth grounded by its power cord or a laptop with large surface area that couples to the environment), but when you unplug the USB and run only from battery your ground is "floating" which completely changes the nature of how capacitive touch can work.

#2: Analog audio can have a common problem called "ground loops". It's not just Teensy. Because this is such a common problem, musical instruments with MIDI use an optocoupler so the MIDI IN jack has no physical connection to the device's ground. Professional audio gear uses balanced signals, and it can still be a problem. For ordinary line level audio this ground loop isolator is often an easy fix. The nature of the problem is non-audio currents also flow through your audio ground wire, and the wire isn't perfect so you get tiny voltage changes. When connected to an amplifier, those tiny changes are seen as part of your signal and get amplified.

Hopefully you don't have these problems, or if you do you get only 1 of them. If you have both, it could be a difficult situation because capacitive touch wants earth grounding but preventing audio ground loops wants ground isolation. But my main point behind this long message is to explain both, because these can be really painful if you have the project working perfectly on your desk and then you take it to another location where the grounding ends up different and it doesn't work reliably. At least knowing about these possible problems will let you test well and plan for how your device needs to be connected to function properly.
 
Last edited:
Back
Top