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

Thread: A few schematic questions

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    11

    A few schematic questions

    Taking the MK20DX128VLH5 and Nuvoton MINI54 for sale on the the Teensy store my plan was to integrate the teensy into a PCB for my application.

    Looking over the schematic I had a few questions before I go forward.



    What are the unlabeled squares circled in red? I've seen this before as a voltage regulator.
    EDIT: Whoops, apparently I can't read "A pair of pads are linked to join VUSB to VIN. For applications where external power is needed, these pads may be cut apart to isolate the board's VIN power from VUSB."

    Is the purple circled line a 'typo'?

    What inductance is necessary for the ferrite inductors listed throughout the schematic.

    Has anyone taken the individual components and used them to 'build' their own Teensy based circuit before and have any advice?

    The circuit I'm building is an (absurdly, unnecessarily high) 16 bit HID Joystick, I'll be using a TI ADS1256 24 bit ADC for low noise sampling and an LCD screen for information display.

    I'm also correct in that I need a blank MK20DX128VLH5 and Nuvoton MINI54, and not the ATMEGA32U4 at all?
    Last edited by CharlieSears; 05-29-2013 at 02:26 PM.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,788
    Quote Originally Posted by CharlieSears View Post
    Is the purple circled line a 'typo'?
    That's a test point. Look at the bottom side of your Teensy3. There are 7 little dots for testing certain signals. When we press it onto the bed-of-nails test fixture, a spring loaded pin makes contact with that little pad.

  3. #3
    Junior Member
    Join Date
    May 2013
    Posts
    11
    Quote Originally Posted by PaulStoffregen View Post
    That's a test point. Look at the bottom side of your Teensy3. There are 7 little dots for testing certain signals. When we press it onto the bed-of-nails test fixture, a spring loaded pin makes contact with that little pad.
    AH! Excellent! That makes perfect sense.

    Thank you Paul

  4. #4
    Did you have any luck figuring out the inductance for the ferrite inductors? I am making my own board too..

  5. #5
    Senior Member
    Join Date
    Mar 2013
    Posts
    140
    Quote Originally Posted by CharlieSears View Post

    The circuit I'm building is an (absurdly, unnecessarily high) 16 bit HID Joystick, I'll be using a TI ADS1256 24 bit ADC for low noise sampling and an LCD screen for information display.
    That's a fun exercise. Achieving 16-bit accuracy is extremely demanding and rarely achieved in practice.
    You will probably need a good low noise anti-aliasing filter in front of the ADC and your Joystick choice will be challenging.
    I am curious to see if you can better this chip: http://www.ams.com/eng/Products/Magn...-Sensor/AS5013

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,788
    The ADC on Teensy3 is really only capable of about 13 bits at slower speeds or using the averaging feature. Freescale calls it a 16 bit converter, and maybe with a LOT of post-processing from many readings you might get something more than just 13 bits? But for most uses, those lower 3 bits are always just random noise.

    If you really need 16 accurate bits, you must use a dedicated A/D chip. Even then, achieving measurements that precise is very challenging.

    It's easy to feel like 16 and even 24 bits is common practice, because CD players are 16 bits and now lots of sound cards are now 24 bits. But if you look at the actual data on those systems, the lowest bits are almost always just noise.

  7. #7
    Junior Member
    Join Date
    May 2013
    Posts
    11
    Quote Originally Posted by adrianfreed View Post
    That's a fun exercise. Achieving 16-bit accuracy is extremely demanding and rarely achieved in practice.
    You will probably need a good low noise anti-aliasing filter in front of the ADC and your Joystick choice will be challenging.
    I am curious to see if you can better this chip: http://www.ams.com/eng/Products/Magn...-Sensor/AS5013
    I'm still learning quite a bit about signal processing

    I'm using a TI ADS1256IDBT 30kHz 24 bit low noise ADC. At all speeds the noise free bits exceeds 16 bits. I definitely need to ensure my input signals are nice and clean. I'm testing using a plain ol 100kΩ bourns 10% pot filtered with a 300Ω resitor, 0.1F and 100pF caps.

  8. #8
    Junior Member
    Join Date
    May 2013
    Posts
    11
    Quote Originally Posted by PaulStoffregen View Post
    It's easy to feel like 16 and even 24 bits is common practice, because CD players are 16 bits and now lots of sound cards are now 24 bits. But if you look at the actual data on those systems, the lowest bits are almost always just noise.
    It'll be an interesting challenge to see if I truly can get 16 noise free bits from a 24bit ADC, my guess is that yes I can with proper filtering before the input. We'll see , maybe I'll fall flat on my face and only learn a thing or two on the way.

    Waiting on my 7.68MHz crystal to arrive so I can properly clock the ADC.

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,788
    Quote Originally Posted by CharlieSears View Post
    It'll be an interesting challenge to see if I truly can get 16 noise free bits from a 24bit ADC, my guess is that yes I can with proper filtering before the input.
    Usually you also need extreme filtering on the power supply lines.

    Another common problem is too-high source impedance. Just getting a voltage with so little noise is quite a challenge.

  10. #10
    Junior Member
    Join Date
    May 2013
    Posts
    11
    Quote Originally Posted by PaulStoffregen View Post
    Usually you also need extreme filtering on the power supply lines.

    Another common problem is too-high source impedance. Just getting a voltage with so little noise is quite a challenge.
    Good point, and USB is insanely noisy, right now I'm running the vUSB through a 5v-5v regulator, there is much room for improvement there.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,788
    Always remember the datasheets are written by marketing people. The datasheet's only purpose is to sell you the part. Anything that might discourage you from choosing it is usually downplayed or not mentioned at all. The main reason analog design can be so hard is because so many parts look great but have hidden gotchas.

    I looked at the ADS1256 datasheet briefly. It makes a good number of pretty strong performance promises, especially in the noise histograms on page 9. They do have a section about providing a low-noise reference at low impedance. Not much discussion on source impedance and power supply noise, but they do recommend R-C filtering and the obvious issue to avoid digital switch currents through the analog ground.

    I'm curious to hear how this part actually works out? I hope you'll post a bit about it after you've got it running....

  12. #12
    Junior Member
    Join Date
    May 2013
    Posts
    11
    Quote Originally Posted by PaulStoffregen View Post
    Always remember the datasheets are written by marketing people. The datasheet's only purpose is to sell you the part.

    I looked at the ADS1256 datasheet briefly. It makes a good number of pretty strong performance promises, especially in the noise histograms on page 9. They do have a section about providing a low-noise reference at low impedance. Not much discussion on source impedance and power supply noise, but they do recommend R-C filtering and the obvious issue to avoid digital switch currents through the analog ground.

    I'm curious to hear how this part actually works out? I hope you'll post a bit about it after you've got it running....
    I'll definitely post after I get it running and putz around with it some more. I'm optimistic about the results I could see, but we'll see how things play out in the real world in prototyping.

  13. #13
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,113
    Quote Originally Posted by PaulStoffregen View Post
    Usually you also need extreme filtering on the power supply lines.

    Another common problem is too-high source impedance. Just getting a voltage with so little noise is quite a challenge.
    Rather than a single supply with filtering, I would suggest dual supplies (one for the analog cicuitry, which includes the ADC) and another for digital (Teensy, and any external logic). That way, you have a lightly loaded regulator whose power supply rejection ratio is working for you between your analog circuitry and the digital part; and whose load regulation is being very lightly stressed. Tie the grounds together, at a single point.

    For low source impedance, a simple unity gain buffer made from a rail-to-rail op-amp seems to work well.

    Quote Originally Posted by CharlieSears View Post
    Good point, and USB is insanely noisy, right now I'm running the vUSB through a 5v-5v regulator, there is much room for improvement there.
    USB, if powered by a computer, is insanely noisy. Just sending in 5V via a USB connection is no more noisy than any other method.

  14. #14
    Junior Member
    Join Date
    May 2013
    Posts
    11
    Quote Originally Posted by Nantonos View Post
    Rather than a single supply with filtering, I would suggest dual supplies (one for the analog cicuitry, which includes the ADC) and another for digital (Teensy, and any external logic). That way, you have a lightly loaded regulator whose power supply rejection ratio is working for you between your analog circuitry and the digital part; and whose load regulation is being very lightly stressed. Tie the grounds together, at a single point.

    For low source impedance, a simple unity gain buffer made from a rail-to-rail op-amp seems to work well.



    USB, if powered by a computer, is insanely noisy. Just sending in 5V via a USB connection is no more noisy than any other method.
    I had been simply using the USB power supply from my computer, all the connections I've tested are all over the board. I think I'll use a quality wall plug for power when moving closer to production. I hadn't thought about using two power supplies. The easiest way would be to keep the digital voltage coming from filtered USB power and analog power coming from an external 5v power supply. Though I'd imagine 2 5v power supplies would provide much cleaner power to the system.

    Thank you for the advice!

    I love how much more helpful this board is with things excluding just the Teensy!

  15. #15
    Senior Member Jp3141's Avatar
    Join Date
    Nov 2012
    Posts
    486
    Quote Originally Posted by CharlieSears View Post
    I'm still learning quite a bit about signal processing

    I'm using a TI ADS1256IDBT 30kHz 24 bit low noise ADC. At all speeds the noise free bits exceeds 16 bits. I definitely need to ensure my input signals are nice and clean. I'm testing using a plain ol 100kΩ bourns 10% pot filtered with a 300Ω resitor, 0.1F and 100pF caps.
    Even the best Bourns pots have about 0.1 of backlash. That corresponds to worse than 12 bit performance.

  16. #16
    Senior Member
    Join Date
    Mar 2013
    Posts
    140
    This is the part I use to solve some of the problems mentioned: TI REF200.
    I would choose a low resistance pot and supply the current to form the potential divider from this reference.
    Then I would use the differential mode of the ADC to measure the difference between the potential at the top of pot and the wiper.
    You can probably eliminate a buffer op-amp if you do this. Picking a small cap as antialiasing filter across the differential input will probably provide
    a low enough dynamic source impedance for the ADC.

    I have done something similar with the ADC of the Teensy 3.0 and got quite good results. I wouldn't complicate the power supplies too much. An inductor,
    good cap choice and careful (e.g. split) ground layout can work wonders.

    The challenges for this sort of project often come from strange unexpected places. I have lost days on silly things like needing to clean the boards with a good flux cleaner. This is a rather too common in commercial products. I just went to use a board that had been in its antistatic bag for 6 months to find corrosion flowering up from around the main chip because they hadn't cleaned the flux off properly. It is also good to use a board sealant when you are done.

    ps

    I took a closer look at the data sheet and I notice there is a current source built into the ADC for open/short detection.
    I wonder if you can use this as part of a regular measurement.
    Last edited by adrianfreed; 06-12-2013 at 03:27 PM.

  17. #17
    Junior Member
    Join Date
    Dec 2012
    Posts
    13
    Quote Originally Posted by CharlieSears View Post
    Good point, and USB is insanely noisy, right now I'm running the vUSB through a 5v-5v regulator, there is much room for improvement there.
    Wondering how you can do this with power being supplied via USB, i.e. the power is already in the USB, how would you run through a separate regulator device when it's already piped through the Teensy board?

  18. #18
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    1,057
    Imagine a USB cable running from a PC to a box that cleans up the power and then goes from there to the teensy via separate power lines (with no power in the 2nd USB cable that continues on to the teensy).

    I have no problem getting 16 bits from the teensy with USB power and over-sampling/decimation.

  19. #19
    Junior Member
    Join Date
    Dec 2012
    Posts
    13
    I'm encountering adc noise, even with filter caps across the pots and avdc agnd. So you're talking about a USB In/out box before hitting teensy?

Posting Permissions

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