Forum Rule: Always post complete source code & details to reproduce any issue!
Page 4 of 4 FirstFirst ... 2 3 4
Results 76 to 95 of 95

Thread: Teensy CC Dummy Load +300W

  1. #76
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    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.
    Click image for larger version. 

Name:	All power from USB.jpg 
Views:	84 
Size:	80.6 KB 
ID:	11722
    Click image for larger version. 

Name:	ILI9341 5V and 33V Powered seperate and gnds common at teensy only.jpg 
Views:	107 
Size:	58.1 KB 
ID:	11723

    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 by Donziboy2; 10-10-2017 at 03:20 PM.

  2. #77
    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.

  3. #78
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    Quote Originally Posted by larry_berlin View Post
    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.

  4. #79
    Quote Originally Posted by larry_berlin View Post
    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.
    Which external ADC (and or module) did you wind up using. I may have a need for something similar.

  5. #80
    Quote Originally Posted by SharpEars View Post
    Which external ADC (and or module) did you wind up using. I may have a need for something similar.
    I used ADS 1115 for following reasons:
    - 16 bit resolution
    - no need to be very fast
    - progammable PGA

    see: http://www.ti.com/product/ADS1115

    also a lot of prefabricated modules on the market.

  6. #81
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    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.

  7. #82
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    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
    Last edited by Donziboy2; 10-12-2017 at 10:41 PM.

  8. #83
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    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.

    Click image for larger version. 

Name:	ADC Board.jpg 
Views:	100 
Size:	81.2 KB 
ID:	11773
    Click image for larger version. 

Name:	bitmap.jpg 
Views:	118 
Size:	105.7 KB 
ID:	11775

    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 by Donziboy2; 10-15-2017 at 02:46 AM.

  9. #84
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    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.

    Click image for larger version. 

Name:	ADC Board mk2.jpg 
Views:	103 
Size:	113.2 KB 
ID:	11778
    Click image for larger version. 

Name:	bitmap mk2.jpg 
Views:	115 
Size:	77.3 KB 
ID:	11779
    Not super happy with some of the routing but there is a limit to what you can do with only 2 layers.
    Click image for larger version. 

Name:	Board.jpg 
Views:	115 
Size:	129.5 KB 
ID:	11781

  10. #85
    Senior Member
    Join Date
    Jan 2014
    Posts
    149
    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.

  11. #86
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    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

  12. #87
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    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....

  13. #88
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    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).

  14. #89
    Senior Member
    Join Date
    Nov 2012
    Location
    Salt Lake City, UT, USA
    Posts
    276

    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 by bboyes; 11-08-2017 at 06:04 PM.

  15. #90
    Reading this thread reminds me that dummy loads were simpler in the 1970s and 80s. You bought a heathkit Cantenna, you added some oil, you fired it up.
    http://beachpackagingdesign.com/boxv...thkit-cantenna

  16. #91
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    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

    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.
    Click image for larger version. 

Name:	ADS8698 First Test ch0.jpg 
Views:	96 
Size:	76.2 KB 
ID:	12129

  17. #92
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    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).

    Click image for larger version. 

Name:	Schematic.jpg 
Views:	116 
Size:	78.5 KB 
ID:	12163

  18. #93
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    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)
    Click image for larger version. 

Name:	Capture_noILI9341_Comms.jpg 
Views:	70 
Size:	73.5 KB 
ID:	12231
    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}
    Click image for larger version. 

Name:	Capture_ILI9341_Comms.jpg 
Views:	71 
Size:	81.1 KB 
ID:	12232



  19. #94
    Senior Member
    Join Date
    Mar 2013
    Posts
    651
    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.

  20. #95
    Member
    Join Date
    Apr 2018
    Location
    Eastern Time, USA
    Posts
    72
    See https://forum.pjrc.com/threads/53173...ith-the-Teensy

    I get 16 bits, no problem. I use an instrumentation grade front end with some specific circuit design to deal with the Teeny's ADC and some additional measures in the PCB design.

Posting Permissions

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