Teensy CC Dummy Load +300W

Status
Not open for further replies.
Quick update, playing with noise. In the two below images the humps are noise to/from the LCD, the frequency of the LCD updates is 10Hz. The large downward spike is me touching the screen. In the second photo I ran separate grounds to both my pots and the LCD, along with powering the LCD separately with 3.3V and 5V. Powering the LCD alone made no discernible impact, moving the GND's was major. The LCD got the ground closest to the USB plug and the Pots got the GND next to pin 13.

I used the internal 1.2V reference and the values are 16 bit, serial transmit rate is 28. The sample size for the data is 32(ADC0) and 64(ADC1) samples, averaging is also set for 4 so (32x4) and (64x4). Sample rate is around 280KSPS per ADC. The 2 blue lines represent ADC0 and 1 sampling separate pots set at the same voltage, same for Red and Green.


Keep in mind this is on a solder-less breadboard using 8" DuPont jumpers, its a real spaghetti monster. The Teensy is also powered from USB, so I'm sure that adds noise.
Determining the cause of the spike during touch could be fun, not sure if its code or noise related.
All power from USB.jpg
ILI9341 5V and 33V Powered seperate and gnds common at teensy only.jpg

I also found an issue with my temperature measurements, I was forced to change the 2K5 resistor to 1K5 and swap its location. The NTC is now connected to 3V3 instead of GND. This gives the desired range, the other way around the readings would have maxed out around 50-55C

Edits... Made some math corrections and added more info.
 
Last edited:
Regarding the noise on ADC, please bear in mind on single ended mode you can achive only 12/13bit resolution effectivly.
See also https://www.pjrc.com/teensy/K66P144M180SF5V2.pdf , page 44/45.

So in an other project I ended up with an external ADC.

Yep I've read the spec and informed others in the past of it. Averaging and system noise play a role, all the specs are also listed using the 3.3V supply, you might as well throw darts at the wall if your doing any high speed switching like I'm doing. I'm using the internal 1.2V ref but I'm not sure how clean it is, I need to get my external reference in place.
Much of the noise in those pictures right now is from the test system. Most of which I need to resolve, the sample sizes are so large that it should not matter for random noise. The data in those 2 pictures has data points provided from 128 and 256 samples each respectively and those samples are added to the previous average and divided by 2 again.
 
I think I have pretty much hit the limit of what can be done on a solderless breadboard. The SPI transactions, even with the wires removed adds a significant amount of noise onto the ADC readings. Noise between SPI transactions averages around 300-800uV and during transactions it jumps into the 3-10mV range. Its hard to tell how much of the noise I can get ride of using a proper PCB. I did find using an external 3.3V supply was quieter than using the Teensy onboard regulator. And using an external Reference also was slightly better than the on board 1.2V reference. I will probably add a footprint for an external 3.3V regulator and a few extra caps on the PCB in case I need them.
 
ADS8688 caught my eye. Might make a breakout and see what I can do with one or two :) They also have an 18Bit series.

Edit.
The ADS8332 also looks nice, it does lack PGA and Internal Ref.
Add some SPI DMA and your good to go :D
 
Last edited:
Working on a test board for the ADS8698, 18Bit, 500KSPS, 8 channel ADC. Plan is to be able to plug this test board into the SPI2 lines under the SD Card holder.
Not sure if I want to bother with the extra row of pins, each input on the ADC will accept a sense ground connection in case there is voltage loss but it only allows something like +/- 0.1V with respect to GND. Would save me 1 row of 9 and 9 resistors plus the GND jumpers at the end....

Its not a cheap ADC(well it was a sample... but next one will be something like $25 with shipping:() but it has a lot of features including the ability to daisy chain and individual PGA's for each channel. Figuring I can couple this with the DMA and have a pretty nice sample rate.

ADC Board.jpg
bitmap.jpg

On another note, I tried changing the LCD SCK pin to 27. It provided some improvement in noise but not enough to really get anywhere. I think I'm going to end up using the Teensy ADC just for temperature measurements and the ADS8698 to measure current and voltage inputs.

Edit...
Also thinking if i'm going to solder a $20 chip to this PCB I might as well add some Op Amps to it......
 
Last edited:
More work done today on the ADS8698 test board, generalized the board since I was forcing to many constraints on myself. All connections are now 2.54mm Terminals.
Broke out all 9 channels (8 PGA'd and 1 direct 16Bit), Vin is 7V to 24V? (not sure about power consumption and heat yet)
All inputs are now buffered. I configured the inputs so that you can use them for Inverting, Non-Inverting, Differential or any combination that can be soldered onto the provided pads :)
GND'd all the N analog pins since the small amount of accuracy you gain just isn't worth the risk of killing the IC. The P analog channels will accept positive or negative voltages.
The buffers are pin compatible with a large number of different OpAmps so the user can pick their poison.

Dimensions are 50mm x 80mm.

ADC Board mk2.jpg
bitmap mk2.jpg
Not super happy with some of the routing but there is a limit to what you can do with only 2 layers.
Board.jpg
 
The ADC probably not really 18b unless the op amp and the reference choices are re-considered.

To get at least 16b of useful data, my stuff typically uses a 24b ADC and low-noise/lo-Vos/low-Ib op amps; not to mention decent resistor specs. Same with the Vref - you need low noise and low tempco where something more than 12b required.
 
Most 24b ADC's have just an input and a Mux, most have no internal filters, PGA, reference or oscillator. Many of those 24b ADC's also have 24b ratings at very low sample rates, 1.5KSPS or less.

I used the LM324 because its a part I have handy, I could always remove it and place something better, at-least the op-amp industry for the most part stay pin compatible. Its not to hard to replace a $0.36 LM324 with a $3-5 precision amp. I may even order some nicer amps and do a comparison to see where the noise actually ends up.

BJB, i'm always looking for advice on making things better. The Teensy 3.6 DMA ADC's do a pretty decent job of providing 13b and even 14b values, but the minute you turn on any other peripherals it goes to crap. Which is the sole reason I am going with an external ADC for current and voltage measurements. I want my ADC's, my TFT and maybe even PC comm's or Datalogging with my Cake :)
 
Ordered the (10)ADS8698 test boards on Tuesday. Should be here within 2 weeks which gives me time to order parts and start looking at creating some test code for the IC. Hopefully I get it working on the first try, I don't fancy having to buy a replacement IC....
 
Been fairly quit as of late, the weather got cool here in south Florida so I took the opportunity to get my Electric Go-kart going (Teensy controlled). Got to 27MPH the other day. Going to make some gearing reduction changes and then figure out what the max range is.
The ADS test boards came in yesterday, I will solder it up in the next few days if I have ambition (work is such a killjoy sometimes).
GKOqS7u.jpg
 
12+ bit resolution in the challenging so-called "real world"

To get even 12 bit real-world performance with a 2.5V input range, that is about 600 uV per count. I'm just using those values as examples. With 1.2V ref its 300 uV per count. To achieve that is non-trivial in my limited experience. 16 bit 2.5V = about 40 nV per count! We've had to use very low noise analog power supplies, 4-layer boards (so we could have a very low impedance analog ground plane, guard traces, etc), and filtering on any digital signals to the ADC since fast edge rates will leak into nearby analog. We usually have a digital ground plane too and tie it to analog at one point. The 4-layer board is essential, even with grounded copper pours on the top and bottom too. There are lots of app notes out there on these issues and usually the vendor dev boards use them all. Then there is post-processing of the data to try to average out or filter the noise a bit.

Let us know how it goes!
 
Last edited:
Just a quick update, its taken me a few hours to get this ADS8698 to play nice, soldering 0.5mm pitch pins is a SOB. Took me a few tries to get all the pins to actually solder without bridging to China. Or looking like they were soldered but not really :mad:

With the inputs all tied to ground and the ADS8698 setup to measure +/- 10.24V at 18bit i'm seeing good single value measurements that are only at most 15 apart. A buffer should clear up the noise pretty well.

Here is a picture of Channel 0, reading a Channel every 50uS so getting a CH0 value every 400uS.
ADS8698 First Test ch0.jpg
 
Just realized I never posted the latest schematic for the ADS8698 breakout board. I only had 2 major issues with the PCB. The first was I got the 3.3V regulator pins mixed up so I had to clean some mask off the 5V plane and solder the SOT23 on an angle. The second was the ADS8698 as I mention in my previous post was a SOB to solder the first time around, I have learned how to do it now(most likely will be a long time before I need to remember how lol).

Schematic.jpg
 
Progress was made :) Took a while but I have the LCD and ADC running on SPI0 and SPI2, the noise is not to bad so I don't believe I will spend to much more time with it. I doubt I could get noise down any more without going to full isolation of the ADC from the rest of the setup. Which I don't plan to do. Its also tough to say how much noise can be accredited to the Breadboard layout.

Below pictures were taken with 18bit values, serial prints are 16 values averaged. Reading all 8 channels every 250uS and printing to serial every 2mS.
Square wave is a timer based printed value, LOW for 50mS and HIGH for 50mS. First blue line in sequence is Ch0 on a separate pot, Ch1-7 are on same pot.


No LCD Comms (pkpk noise is around 150uV, scaling is 18bit at 10.24V)
Capture_noILI9341_Comms.jpg
LCD Comms (pkpk noise is around 625uV, scaling is 18bit at 10.24V)
{Blue line appears to be noisier then the rest, I can accredit that to the wire from the pot sitting right next to the LCD SPI wires}
Capture_ILI9341_Comms.jpg


hXB04Ka.jpg
 
Been pretty quite the last few months on this, work has been keeping me extremely busy along with life in general.

I significantly reworked the design a few weeks back and added Isolation between the analog and digital sections. Then I ran the BOM and added up the costs, as it stands right now without the heatsink or housing the unit will cost around $180 for someone to make. This and the lack of time have pretty much pushed me away from really spending any time working on the other technical hurdles(SD card data-logging) I wanted to solve before actually building one of these things.
 
Status
Not open for further replies.
Back
Top