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

Thread: Teensy 4 ADC

  1. #1

    Teensy 4 ADC

    I have researched this to death. Not sure what to do at this point. I am sending a 50Hz sine wave into A0 to be read by the ADC. I print the values to the serial monitor. The values don't make any sense. What is the input range of the T4's ADC? I read it is 0 to 1.2V, but tonight it seemed like it was willing to take more. The values I'm getting do not span the full range of 0 to 1023, and they tend to sit at funny values for longer than normal periods of time. I set the ADC to 10 bit length. I'm generating the 0.1V to 1.1V sine wave from pixelpulse program connected to the ADALM1000.

  2. #2
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,494
    the default analog Reference is 3.3v. You can use analogReference(INTERNAL); to reduce the range to 0 to 1.2v

    As the forum rule states, please provide complete source code that demonstrates your problem.

  3. #3
    Senior Member
    Join Date
    Apr 2016
    Location
    St. Petersburg, FL
    Posts
    193
    Use the serial plotter instead of the monitor to get a visual picture of the waveform. Also, a sine wave does hover near it's min and max values compared to the central region, dV/dT ~ 0.

    PS
    Oops, serial plotter not working with T4, only TyTools monitor.

  4. #4
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,494
    Quote Originally Posted by Arctic_Eddie View Post

    Oops, serial plotter not working with T4, only TyTools monitor.
    What? SerialPlotter works for me on T4 (arduino IDE 1.8.11) on ubuntu

  5. #5
    Senior Member
    Join Date
    Apr 2016
    Location
    St. Petersburg, FL
    Posts
    193
    I've got the TyCommander installed so it apparently grabs the connection first. Next time I update Arduino I'll try it before installing Ty.

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,631
    You can always go into TyCommander, and choose the Integrate with Arduino, choose your install, and then there is an option to restore back to not using tycommander...

  7. #7
    Senior Member
    Join Date
    Apr 2016
    Location
    St. Petersburg, FL
    Posts
    193
    Works fine now. I had it installed when I was working on a project that used three Teensy boards and had to see and program all of them. Now it's just one board at a time so will uninstall Ty.
    Thanks.

Posting Permissions

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