Hi everyone,
I’m trying to get a teensy 4.1 to be used as a datalogger in place of different, physically larger micro-controller. I’m testing it out, and it seems that the code side of things is ok (it’s recording samples at the correct rate and storing them to a card), but when I try to get a signal from a signal generator, I’m getting a lot of noise. I’m suspicious of there being some issue with whether I’m using the right ground pin, and if it’s treating some ADC channels as floating.
I’m currently using channels 14-25 to be used to collect 12 bit data with a sampling rate of 10 kHz. Data is being stored to a micro-SD card and it’s using a buffer to achieve the high sampling rate.
If you look on the picture below, the pins with X’s on them are the pins that are connected.

I’m powering the Teensy with a 5V power supply on a Vin and GND pin that is closes to the micro-USB connection. The connection between 3.3 V and pin 2 is just a button to get the datalogger to start recording. A signal generator is connected to pin 17 (and is connected to the GND pin I mentioned previously to get a common ground) and I’m doing a 100 Hz, 1V p2p, offset by 1V signal. When the signal generator is turned on, the signal read for pin 17 is correct, but several other channels have incorrect readings – showing a lot of noise. I don’t think this is due to the environment as I have run the same test on an oscilloscope and another microcontroller datalogger, and they show the data being absolutely fine. I think something is wrong with the GND, and it being as if the other pins are floating (or something like that). When no signal is coming from the signal generator, the signal is incorrect, it's not coming in at zero.
pin 17 (the one connected to the signal generator):

(the y axis is the number of bits - 4096 being equivalent to 3.3 V I believe)
neighbouring pin 18:

pins 14 and 21 respectively (other pins being recorded that just give the wrong voltage reading back):


Any help or direction for this would be greatly appreciated. I have collected data on the Teensy, the other micro controller and the oscilloscope multiple different times and got the same result, so I really don't think it is ambient noise.
I’m trying to get a teensy 4.1 to be used as a datalogger in place of different, physically larger micro-controller. I’m testing it out, and it seems that the code side of things is ok (it’s recording samples at the correct rate and storing them to a card), but when I try to get a signal from a signal generator, I’m getting a lot of noise. I’m suspicious of there being some issue with whether I’m using the right ground pin, and if it’s treating some ADC channels as floating.
I’m currently using channels 14-25 to be used to collect 12 bit data with a sampling rate of 10 kHz. Data is being stored to a micro-SD card and it’s using a buffer to achieve the high sampling rate.
If you look on the picture below, the pins with X’s on them are the pins that are connected.

I’m powering the Teensy with a 5V power supply on a Vin and GND pin that is closes to the micro-USB connection. The connection between 3.3 V and pin 2 is just a button to get the datalogger to start recording. A signal generator is connected to pin 17 (and is connected to the GND pin I mentioned previously to get a common ground) and I’m doing a 100 Hz, 1V p2p, offset by 1V signal. When the signal generator is turned on, the signal read for pin 17 is correct, but several other channels have incorrect readings – showing a lot of noise. I don’t think this is due to the environment as I have run the same test on an oscilloscope and another microcontroller datalogger, and they show the data being absolutely fine. I think something is wrong with the GND, and it being as if the other pins are floating (or something like that). When no signal is coming from the signal generator, the signal is incorrect, it's not coming in at zero.
pin 17 (the one connected to the signal generator):

(the y axis is the number of bits - 4096 being equivalent to 3.3 V I believe)
neighbouring pin 18:

pins 14 and 21 respectively (other pins being recorded that just give the wrong voltage reading back):


Any help or direction for this would be greatly appreciated. I have collected data on the Teensy, the other micro controller and the oscilloscope multiple different times and got the same result, so I really don't think it is ambient noise.