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

Thread: Teensy got fried

  1. #1
    Junior Member
    Join Date
    Jul 2020
    Posts
    10

    Teensy got fried

    Hi,

    I'm currently working on a project to be able to control a solenoid valve and fan using a Teensy 3.2. The circuit itself is pretty simple but when I first tested it, the Teensy got fried. I attached a basic circuit diagram below with all the parts I used.
    Click image for larger version. 

Name:	CircuitDiaTemplat.jpg 
Views:	36 
Size:	86.7 KB 
ID:	21438

    Both of the resistors are 330 ohms and there are capacitors on the 7805CT each around .33 uF.
    If it helps, the power supply I used outputted 12v at 1A.

    This is my first Teensy project so any help would be greatly appreciated.

    Thanks!

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,640
    Everything you've drawn looks like it should work, if it really is connected correctly.

    But there are 2 ways to quickly kill Teensy 3.2.

    1: If 12 volts touches any I/O pins, Teensy dies instantly. On many other models 12V on the VIN pin will also kill it, but usually Teensy 3.2 can survive 12V input because the voltage regulator is rated for up to 10V and the input voltage doesn't go to any other chips on 3.2. The real danger is if *anything* touching the 12V power accidentally touches any I/O pin, even for a brief accidental moment.

    2: Reverse polarity power kills Teensy 3.2. Most of the other models have a diode or transistor to protect against reverse power, but Teensy 3.2 does not. Usually when this happens the voltage regulator will burn up.

    Maybe one of those accidents happened by mistake?

  3. #3
    Senior Member
    Join Date
    Apr 2020
    Location
    Tucson
    Posts
    124
    You have these great optoisolated ssr but they're tagged on the same power supply with almost no protection, which defeats the whole point. The ground of the solenoid needs to be closest to the power supply and heavy and the ground of the teensy should never have to meet except at the smallest connection. Ideally, just don't power the solenoid from the same psu as the teensy. Ground swings can do crazy things and it appears this may have some sort of snubbing internally, as it says it is "arc free with no snubber." When that solenoid opens, your ground is going to bounce like crazy at the solenoid, and if the teensy is in that current path you're going to destroy it.

    A diode in series with the 7805 input would also be a good idea if you are going to make them share power supplies. And at least 10uF caps on both 7805 terminals.

  4. #4
    Junior Member
    Join Date
    Jul 2020
    Posts
    10
    The second situation sounds exactly like what happened. When it broke, the voltage regulator was extremely hot to the touch. What would you recommend adding to the circuit to prevent this? Could I just add a diode between the voltage regulator and the Teensy?

  5. #5
    Quote Originally Posted by kevinshish View Post
    The second situation sounds exactly like what happened. When it broke, the voltage regulator was extremely hot to the touch.
    This usually happens when there is a short circuit on the 5v output. Probably because the Teensy was already dead at that time.

    I think I see why the teensy fried. You are trying to drive the optoisolators directly from the teensy digital outputs? Are you sure they can handle that? You need to convert the digital outputs to something that can provide a higher current.

    What would you recommend adding to the circuit to prevent this? Could I just add a diode between the voltage regulator and the Teensy?
    What you provided was a schematic, but it does not show how the wiring was actually done. I would have run the ground and power leads for the solenoid directly to the 12 volt source. And a separate ground wire for the teensy.

    Also, put a reverse polarity diode directly across the solenoid coil (cathode to the 'hot' side, anode to the ground). This will snub any voltage spikes that occur when the solenoid turns off. A good idea even if the optoisolators say they don't need it.

    I don't see how a diode between the regulator and the teensy would help anything.

    Usually those 3 terminal regulators have 2 capacitors on the input side and 2 more on the output. Say, something likea 0.01uf or 0.1uf ceramic, and a 10uf or larger electrolytic in parallel at each place. Make sure the capacitors are rated for at least twice your supply voltage (that's what I like to do, but some may say they can be rated lower.)
    Last edited by OhioJim; 08-22-2020 at 03:22 PM.

  6. #6
    Senior Member
    Join Date
    Jan 2020
    Location
    Toscana
    Posts
    130
    Hmm. I'd connect the grounds to the 7805 GND in a star configuration, not flying daisy chain. Also, the 12V of both SSR close to the power supply, flyback diodes across inductive loads, plus a capacitor to "eat" any induced voltage and tame the slew rate or "iron out" the signal .
    Inductance from the solenoid can be quite powerful in producing overvoltage that easily crosses any insulaition barrier of a SSR and can induce overvoltage in other wires as well. Vagabonding oscillations. Quite nice, can kill any circuit in a nanosecond.

  7. #7
    Junior Member
    Join Date
    Jul 2020
    Posts
    10
    What could I use to convert the digital outputs to something with a higher current?

  8. #8
    Senior Member
    Join Date
    Jan 2020
    Location
    Toscana
    Posts
    130
    The SSR are a simple way. The only problem (or more a feature) they have is their high slew rate on the switced side. So to compensate this, a few extra parts are helpful, or you choose a SSR especially designed for inductive load.

    A L298N would be a good and commonly used part, but it needs 5V logic, so you need to add a line driver as level shifter.

    Or a MOSFET, but then you leave the pefab path.

Posting Permissions

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