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

Thread: How to output 5V from PWM pins of Teensy 2++

  1. #1
    Junior Member
    Join Date
    Oct 2022
    Posts
    16

    How to output 5V from PWM pins of Teensy 2++

    Hi friends,

    I succeed in controlling the frequency of output from PWM pin of Teensy 2++, like the link below says.
    https://www.pjrc.com/teensy/td_pulse.html

    However, the high voltage of output is 50mV according to oscilloscope. How to make the high voltage 5V?

    Thanks in advance.

  2. #2
    Senior Member
    Join Date
    Nov 2015
    Location
    Cold hollow VT
    Posts
    210
    According to the link given, 0 is low and 256 is constant high. If those values don't work, I would just try to >>> digitalWrite(<pin>, HIGH); <<<
    Have you tried measuring with a DVM ? or remembering to connect GND on the scope to GND on your project ?

  3. #3
    Junior Member
    Join Date
    Oct 2022
    Posts
    16
    The PWM pin I used (15) of Teensy2++ will output a voltage signal at frequency of 3921.57 Hz, which is hard to use digital voltage meter to measure, but I tried it shows 0V, clearly not 5V.

    I think connecting ground is not a problem, because I measure the 5V pin using oscilloscope and it shows right.

  4. #4
    Junior Member
    Join Date
    Oct 2022
    Posts
    16
    Problems solved. I didn't disconnect the teensy from other circuits and measured wrong. When I disconnect with other circuits, it is 5 V as high voltage.

Posting Permissions

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