Author Topic: Attiny1606 burning out when connected to a drv8251  (Read 2534 times)

0 Members and 1 Guest are viewing this topic.

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Attiny1606 burning out when connected to a drv8251
« on: April 20, 2024, 07:42:03 pm »
Hi, I am designing my own locomotive DCC decoder, no need to know what that is. The major problem i am having now is that if i try to use the drv8251 the attiny1606 overheats and then burns out. Even when there is nothing connected to the output, i was just measuring the output voltage with a multimeter. Initially everything was fine, but then, as i said, the mcu burnt out.
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2564
  • Country: us
Re: Attiny1606 burning out when connected to a drv8251
« Reply #2 on: April 20, 2024, 08:11:12 pm »
Welcome fellow modeler.  I do HO scale myself with my own custom throttle power controlled by a laptop computer.
   https://www.eevblog.com/forum/chat/model-trains/msg4729595/#msg4729595

I think your problem is going to turn out to be that you're switching the GND to enable the DRV8251.
I'm not familiar with the DRV8251 but suspect the its inputs are floating higher than Attiny Vdd causing
its pins to overload.
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #3 on: April 20, 2024, 08:20:50 pm »
I am not sure about that, the drv is using the reference voltage of the attiny, plus those resistors on the inputs should prevent possible overcurrent. Prior to assembling the whole PCB, I tested all the parts individually. First the voltage regulator, then separating the signal. And last i tested the drv. For the test i used the same schematic for the drv as shown in the picture before, but instead of the attiny I was controlling it with arduino nano (vcc 5v). That seemed to work with no problem
 

Offline uer166

  • Frequent Contributor
  • **
  • Posts: 911
  • Country: us
Re: Attiny1606 burning out when connected to a drv8251
« Reply #4 on: April 20, 2024, 08:24:40 pm »
Check the 3.3V rail when you turn off the DRV. The previous poster is likely correct: you can't switch that IC's GND and not have it back-power all of its' other pins.
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #5 on: April 20, 2024, 08:31:01 pm »
Well that might be true. I didnt get a chance to test this. I don't think that's why the mcu burnt out because the transistor was never off during the test. Everithing seemed alright and than out of nowhere the mcu died.
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #6 on: April 23, 2024, 07:46:00 pm »
Thanks for your answers. After some iterations thanks to your recommendations the attiny completely stopped overheating and the circuit is working absolutely fine. But for one fatal exception, the attiny doesn't seem to be able to switch the B input of the drv high. Not sure why tho. All i have done was, directly connect ground to the drv and add 1k ohm resistors between the attiny and input of the drv. One of the inputs can be controlled fully, but the other (input B) cannot be controlled at all and is constantly pulled down, probably by the integrated pulldown resistors of the drv.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2564
  • Country: us
Re: Attiny1606 burning out when connected to a drv8251
« Reply #7 on: April 23, 2024, 08:02:31 pm »
Why do you think you need to have resistors between the Attiny and the DRV8251?

They are both powered by 3.3V?

As far as the built-in pull-down resistors.  From what I see the pull-downs are 100KΩ (Figure 8-6).
Negligible to the Attiny.  They are only there so the motor outputs are at Hi-Z (disabled) if the
inputs are not connected.

Also, insure that both Attiny pins are configured as outputs.
« Last Edit: April 23, 2024, 08:04:21 pm by MarkF »
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #8 on: April 23, 2024, 08:05:33 pm »
I added those resistors just to be sure not to damage the attiny, but i have tried it even without them resulting in the same situation. One of the inputs can be fully controlled and the other is for some reason always low. Even tried if the attiny pin works, it does.
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #9 on: April 23, 2024, 08:08:33 pm »
It might be some kind of a problem with the reference voltage, but i don't think that's the case because that would result in neither of the inputs working
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2099
Re: Attiny1606 burning out when connected to a drv8251
« Reply #10 on: April 23, 2024, 09:56:30 pm »
The schematic has signal PA_2 connected to both PA_2 and PA_4 on the Attiny ?
« Last Edit: April 23, 2024, 09:59:55 pm by Andy Watson »
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #11 on: April 24, 2024, 05:33:24 am »
Yes that is shown in the schemat, i wrongly rewritten it. But in the pcb everithing is as intended. Signal input on PA2, outputs for the motor PA3 and PA4
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3276
  • Country: gb
Re: Attiny1606 burning out when connected to a drv8251
« Reply #12 on: April 24, 2024, 08:13:31 am »
But for one fatal exception, the attiny doesn't seem to be able to switch the B input of the drv high.

By "B" input do you mean pin 2 of the DRV8251?  That is adjacent to the ground pin, perhaps you have a small solder ball/whisker causing a short?
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #13 on: April 24, 2024, 08:30:57 am »
Yes i mean pin 2 of the drv8251. I measured that and there is no short to ground or the adjecent input (pin 3)
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #14 on: April 24, 2024, 08:31:51 am »
This is the current schematic
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2564
  • Country: us
Re: Attiny1606 burning out when connected to a drv8251
« Reply #15 on: April 24, 2024, 12:15:36 pm »
There doesn't seem to be anything wrong with your latest schematic.

Barring any connection issues, it seems like the DRV8251 may have been
damaged through all the other issues found thus far.
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #16 on: April 24, 2024, 12:21:59 pm »
There should not be anything wrong with the components. I have installed a whole new set of brand new components
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #17 on: April 24, 2024, 01:22:16 pm »
I feel like i have tried everything. Separately everything seems to work fine, but when connected together it stops working.
I think the only option i havent tryed yet is changing the reference voltage. Not sure if that would make a diffefence.
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 3926
  • Country: nl
Re: Attiny1606 burning out when connected to a drv8251
« Reply #18 on: April 24, 2024, 01:30:29 pm »
Your Attiny might need better power supply decoupling. In the schematic there is only a 10uF capacitor to decouple the Attiny, and it might be that internal oscillations cause it to overheat. Try adding a 100nF capacitor as close as possible to the Attiny power pin.

Another problem can be when the motor starts to run due to the low capacitance in the device. It depends on the input supply voltage and the startup current drawn by the motor. If the voltage temporarily drops to low it might cause a reset of the Attiny. As long as the input voltage onto the MCP1792 stays above the minimum 4.5V it most likely won't be a problem.

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2564
  • Country: us
Re: Attiny1606 burning out when connected to a drv8251
« Reply #19 on: April 24, 2024, 01:38:57 pm »
Along those lines of thought, you might try two things:
 1) Disable the current sense by tying the ISEN directly to GND.
 2) Use a 1K resistor in place of the motor to verify operation (i.e. minimal load).


BTW.  What is the motor voltage you're trying to control?

Edit:  Dah.  I forgot.  DCC decoder.
« Last Edit: April 24, 2024, 01:56:43 pm by MarkF »
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #20 on: April 24, 2024, 02:05:22 pm »
I tryed the first point, no effect. For the second point i tryed connecting a LED, didnt work. And powering the motor doesnt work either.
« Last Edit: April 24, 2024, 03:43:33 pm by lavaman »
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2564
  • Country: us
Re: Attiny1606 burning out when connected to a drv8251
« Reply #21 on: April 24, 2024, 02:28:01 pm »
Are you testing this from track power or a lab power supply?

For DCC, the track power for HO scale is approx +/-15V @ 5KHz pulse width encoded communication and power.
I don't do DCC but that's what I remember.  So, you should have plenty of voltage for the 3.3V regulator.

I'm assuming that you're using PA2 to decode the DCC commands?
___________________________________________________________________

Testing with a LED will not work since the LED is not bidirectional.  At least use a incandescent light bulb.
« Last Edit: April 24, 2024, 02:46:16 pm by MarkF »
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #22 on: April 24, 2024, 09:31:59 pm »
It finally works. Turned out to be a problem with the voltage regulator as it is rated only for 100mA max it couldn't deliver enough power for the drv reference and power the attiny. Not sure why it was causing this kind of problem, but after exchanging the old regulator (MCP1792T-3302H/CB) for a new one (AP2210N-3.3TRE1, rated for 300mA), I just seemed to have to laying around, everything works just fine. No overheating, no other problems. Thanks for your help, I really appreciate it.
 

Offline Faranight

  • Supporter
  • ****
  • Posts: 226
  • Country: si
Re: Attiny1606 burning out when connected to a drv8251
« Reply #23 on: April 25, 2024, 05:25:45 am »
I'm a bit skeptical. Sounds a bit unusual that the attiny and the reference would need that much current. The reference pin of the DRV8251 is internally connected to a high-impedance amplifier input, so it shouldn't draw any noticeable current (see attachment pic). As for attiny, are you sure that it really needs that much current? Do you have a multimeter where you can measure the amount of current draw from the regulator on the 3V3 rail? A scope would also be helpful to see the voltage ripple on that line.
e-Mail? e-Fail.
 

Offline lavamanTopic starter

  • Contributor
  • Posts: 19
  • Country: cz
Re: Attiny1606 burning out when connected to a drv8251
« Reply #24 on: April 25, 2024, 08:57:22 am »
I am skeptical too. Power usage on the 3v3 rail, when drv is under load, is around 20mA. Not sure if there was some kind of problem with the voltage regulator.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf