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

Thread: method to addd a transistor to 4.0 or 3.2 to boost a pin output to 5v

  1. #1
    Junior Member
    Join Date
    Jan 2020
    Location
    Greenport NY
    Posts
    1

    method to addd a transistor to 4.0 or 3.2 to boost a pin output to 5v

    For either a 4.0 or 3.2, I need to boost the output of a pin, for example
    void setup() {
    pinMode(5, OUTPUT); // and later
    void loop() {
    digitalWrite(5, HIGH); // produces ~3.3v on pin 6
    yet I need 5v. to trigger the DC motor drive module input of this part https://www.droking.com/160W-2-Chann...tor-Controller
    Q1. Please provide a link to a schematic to help me place a transistor correctly on the breadboard.
    Q2. Would any old transistor do the job? I've got a few in my Radio Shack NPN PNP stash.

    Ideally I'd also like to pass along a PWM value to control the speed of the vacuum motor, and to that end I've got
    void loop() {
    analogWrite(6, 100); // to suitably dim an LED
    Q3. Would the solution to Q1 above also pertain passing along a suitably strong 5v PWM signal to a DC motor drive module input?

    I've scanned some forum postings and I think I almost understand that this can be done. A simple simple schematic with added instructions would be most appreciated.

    Project: a Cuirass Ventilator solution within https://helpwithcovid.com/projects/13

    Thank you, Steve
    - - - - - - - - - - - - -

  2. #2
    Senior Member
    Join Date
    Jun 2013
    Location
    Torrance CA
    Posts
    415
    A1) https://www.instructables.com/id/12V...-NPN-Transist/ (NPN), https://startingelectronics.org/begi...rduino-buzzer/ (PNP) just replace the 12V with 5V and the motor/buzzer with the controller. You don't need the diode from the first example.

    A2) Since you're just driving another controller you shouldn't need a huge current gain so yes I'd say just about any modern transistor will work.

    A3) PWM should work fine.

  3. #3
    Junior Member
    Join Date
    May 2020
    Posts
    5
    As I was running NPN transistor was no problem with Teensy 3.6. I have connected Teensy 3.6 on Full Bridge drive. as soon as I have connected to PNP transistor, Board failed to disconnect. I have checked there is a input diode overheating. Teensy 3.6 board not working anymore!
    Another trial, I have connected to Teensy 4.0 with PNP transistor. As soon as Transistors Emitter pin connected to +5 with 1 k resistor board start consumes extra energy. So I concluded the pins on the board is not designed to run on PNP directly. So I will use opto-isolator to protect board.

    Do you have any better suggestions? Maybe if you have idea atleast to return teensy 3.6 life back!
    Kind Regards.

  4. #4
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,583
    Look at the schematics of the Teensy LC board. It has a logic level converter IC 74LV1T125 on board which brings the 3.3V output of pin 17 up to Vin (5V) level : https://www.pjrc.com/teensy/schematic.html

  5. #5
    Member
    Join Date
    Apr 2020
    Location
    Tucson
    Posts
    48
    Have you tried this? Most 5v logic can be triggered to a one at about 2.3 Volts. Your board should "just work." This sounds more like wiring error. Inputs should not present voltage back to the teensy unless it's pulled to 5v instead of ground (in which case it's not really an input, it's a current loop). Output from a 3.3V device will trigger most modern 5v logic devices.

  6. #6
    Junior Member
    Join Date
    May 2020
    Posts
    5
    Thank you very much. I will try to understand. Teensy 3.6 not working now. It is heating where I have marked with red on the uploaded picture. Click image for larger version. 

Name:	teensy3.6.png 
Views:	6 
Size:	437.8 KB 
ID:	20562

  7. #7
    Junior Member
    Join Date
    May 2020
    Posts
    5
    Quote Originally Posted by boxxofrobots View Post
    Have you tried this? Most 5v logic can be triggered to a one at about 2.3 Volts. Your board should "just work." This sounds more like wiring error. Inputs should not present voltage back to the teensy unless it's pulled to 5v instead of ground (in which case it's not really an input, it's a current loop). Output from a 3.3V device will trigger most modern 5v logic devices.
    I believe, Sor of wiring error! Learning curve. I think, the board in default low, and pnp transistor triggered in low signal and there was no protection! So it sucked 5 volt from emiter to base, that was enought to distroy it. Probably I have to use protection bigger than 1K and/or opto isolator.

  8. #8
    Senior Member
    Join Date
    Mar 2016
    Posts
    175
    Quote Originally Posted by boxxofrobots View Post
    Have you tried this? Most 5v logic can be triggered to a one at about 2.3 Volts. Your board should "just work." This sounds more like wiring error. Inputs should not present voltage back to the teensy unless it's pulled to 5v instead of ground (in which case it's not really an input, it's a current loop). Output from a 3.3V device will trigger most modern 5v logic devices.
    This actually depends on the logic family. Consider the difference between HC and HCT (or AHC and AHCT). The non-T version has a minimum Input High (Iih on the datasheet) of around 3.85V (with a Vcc of 4.5V) or so and the T version it is something like 2V. Clearly the non-T logic will not trigger from a 3.3V device. So, consult your chip datasheet.

Posting Permissions

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