Author Topic: Arduino Pro Mini - two copies have different sleep currents  (Read 37164 times)

0 Members and 2 Guests are viewing this topic.

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #25 on: July 15, 2020, 05:42:39 pm »
Have you removed absolutely everything else from the board including the ceramic resonator, and then fused the 328 for internal oscillator mode?

Yes I have.  All of that.  It still sleeps at 150uA.

But I have not tried to remove the processor itself from the board.  I don't have a heat gun, so I would have to use a skillet.  I'll have to think about that.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #26 on: July 15, 2020, 05:46:48 pm »
That would be an awfully lot of leakage for a board.

Could there be an open CMOS input pin?  That will cause excessive power draw.
OP writes in Arduino code...
Code: [Select]
for (i = 2; i < 20; i++) {          // all pins to one rail or the other - power saving
    pinMode(i,OUTPUT);
    digitalWrite(i,LOW);
  }
which sets all pins... so what state is pin 1 left in?

Oh, sorry about that.  I left D0 and D1 out originally so as not to interfere with Rx and Tx, but changed that a week ago to include them.  So it's been i=0;i<20 for a while now.  But that didn't change the sleep current.

Edit: To clarify, my memory was that the bootloader left TX at OUTPUT, HIGH, and Rx at INPUT_PULLUP.  So since both were already at a rail, I didn't need to mess with them.  But just to be sure I changed it so all the I/O pins are OUTPUT, LOW.  That works because Rx and Tx aren't connected to anything during the sleep current test.
« Last Edit: July 15, 2020, 05:56:14 pm by Peabody »
 

Offline DrG

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #27 on: July 15, 2020, 05:55:55 pm »
Is it irresponsible to suspect that it is not a legitimate chip?

I looked at a few that I had hanging around and they are all -AU chips. I can see the AU in the data sheet (page 635 https://ww1.microchip.com/downloads/en/DeviceDoc/ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061A.pdf) I see no -KR am I missing that or is it new or ?

It is confusing because I guess Atmel changed some labeling and Microchip has their labeling.

excuse the phone pic

I don't have any Arduinos with the AU marking.  All my stuff, including Nanos, have the second line as U-{something}  Either U-TH, U-TW, or U-KR.  I'm guessing TH is Thailand, TW is Taiwan, and KR is Korea.  But I agree there's nothing in the datasheet that looks like that, so maybe all mine are counterfeits.  I just don't know.

*blech* I don't know either - I was looking here https://forum.mysensors.org/topic/9388/atmega328p-au-counterfeit/16
and the AU chip (which looks like mine) turned out to be, according to the poster, a mess. He then ordered from Digikey and got the U-TH version.

AVR freaks has a thread or two showing labeling lines but I think they were changed or are inconsistent or ? e.g., https://www.avrfreaks.net/forum/fake-atmega328p

You have been using your LP code successfully but I wonder if it would not be worthwhile again to just test out that library that I linked to earlier.

It is a puzzle.

edited to add a link
« Last Edit: July 15, 2020, 06:04:54 pm by DrG »
- Invest in science - it pays big dividends. -
 

Offline DrG

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #28 on: July 15, 2020, 05:58:22 pm »

Not sure how credible  LCSC is sourcing Atmel/Microchip parts, but theirs looks identical to Peabody's: https://lcsc.com/product-detail/ATMEL-AVR_ATMEL_ATMEGA328P-AU_ATMEGA328P-AU_C14877.html
I also looked at the newest product I could find on Sparkfun with an ATMEGA328(P) their labeling looks similar as well: https://www.sparkfun.com/products/16282 (looks like end of june 2020 timeframe)

Assuming Sparkfun is using reputable parts, it's plausible this is still a genuine part.


Yeah copy that (and see my last post) - it would be helpful to have a CURRENT version of Atmel's labeling guide.
- Invest in science - it pays big dividends. -
 
The following users thanked this post: hans

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13130
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #29 on: July 15, 2020, 07:43:24 pm »
Have you removed absolutely everything else from the board including the ceramic resonator, and then fused the 328 for internal oscillator mode?

Yes I have.  All of that.  It still sleeps at 150uA.

But I have not tried to remove the processor itself from the board.  I don't have a heat gun, so I would have to use a skillet.  I'll have to think about that.

Your photos show the ATmega32P '32A' TQFP-32 package.  To totally isolate power to the MCU to confirm its the cause of the 150uA leakage, you'd only have to lift four pins, two Vcc (4,6), one AVcc (18), and /Reset (29) (as it has an external 10K pullup to Vcc you may not have removed), which any competent tech should be able to do non-destructively, given *any* soldering iron  (that doesn't have to be heated on your kitchen gas hob :) ) with an appropriately sized well tinned bit, some flux and desolder braid, and free choice of an xacto knife or a sharp fine needle probe to actually lift the pin.

If you want to rework or transplant SMD chips without proper tools/equipment for SMD reflow, consider using ChipQuikand an ordinary iron.  Its not cheap, but a little goes a *very* long way.  Using ChipQuik would eliminate nearly all risk of cooking the chip, or changing board leakage (or causing board damage) by excessive heating of the laminate.


Discussion thread: https://www.eevblog.com/forum/blog/eevblog-437-removing-smd-parts-with-chipquick/

Actual desoldering starts at 9:05 and takes under 3 minutes. 
Another example, TQFP-32, similar to your MCU package starts at 18:00, removal takes 50 seconds!  N.B. keep the blobs of used ChipQuik with the kit - it will do several more chips before its melting point becomes high enough to matter.

« Last Edit: July 15, 2020, 08:29:13 pm by Ian.M »
 
The following users thanked this post: elecdonia, I wanted a rude username

Offline hans

  • Super Contributor
  • ***
  • Posts: 1688
  • Country: nl
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #30 on: July 16, 2020, 06:51:07 am »
If you really need to get a chip off in a destructive manner (for the chip), you could also use a side cutter or a sharp stanley knife, and then cut all the pins of the package. Then clean up the pads with the remaining legs. That way you don't need to use a hot air gun, special solder wire or insane amounts of heat to get a QFP chip of a board.

In my experience, the QFP32 packages have a large pin pitch which allows you to get in there with pretty slim pair of cutters (perhaps depends on the tip design), and cut all pins.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13130
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #31 on: July 16, 2020, 07:39:47 am »
I've never liked that approach to destructive SMD removal.  Maybe its just my bad luck but I always seem to get the boards with the weak pads and the shock from cutting them can rip pads off too easily for my liking.  OTOH its *THE* goto method for weak padded, tight plated-through-hole boards if the chip can be destroyed.

I've had better luck wicking off as much solder as possible then threading a fine wire under the row of pins, firmly anchoring one end, and pulling the other flat outwards so it wedges between the pin and the inner end of the pad while reheating the pin the wire is pulling on, moving along as the wire lifts it, to lift them all 'zipper style'.  If you see any pad start to move, stop and get some ChipQuik!

For the wire, any heat resistant fine wire that's strong enough in tension to lift a pin will do, preferably of a material or with a coating solder doesn't stick to.  I prefer fine magnet wire with tough non-solder-through enamel, as I can strip the end on an aspirin and tack-solder it where I need to fix it.

Leave opposite corner pins till last, and to avoid ripping off the last pad as the chip skews as you lift the second to last,  secure the chip in place e.g. with non-stretchy tape or bluetack  and lift the last two pins manually with a probe. 

With care, the chip can usually be salvaged by fluxing and reheating the pins with a clean bit to remove excess solder, then holding it down on the bench and realigning any laterally bent pins with the tip of an xacto knife or a very fine flat-blade jewller's screwdriver, then re-setting the pins to the bench surface plane with a shim cut from business card under the chip body.  They'll spring back up slightly, but if you didn't lift them by more than the wire diameter, the spring-back will leave them in close enough to the same plane, flat enough, and slightly below the chip body, so you wont have any problems hand soldering it
« Last Edit: July 16, 2020, 07:43:15 am by Ian.M »
 
The following users thanked this post: hans

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3047
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #32 on: July 17, 2020, 07:05:54 am »
Or, just but a hot air station.  Most useful tool in the lab

  *  Desolders things
  *  Solders things
  *  Shrinks heatshrink
  *  Removes stringing from 3d prints
  *  Heats plastic for reforming
  *  Toasts ciabatta rolls
  *  Warms hands on bitterly cold mornings
  ...



~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 
The following users thanked this post: hans

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #33 on: July 20, 2020, 11:39:41 pm »
I'm very sorry to report that I received my new batch of Pro Minis today, and they too sleep at 150uA rather than the 1uA shown in the datasheet.  These use the same "the Simple" board as the others, but the processor markings are different.  Since I established before that no other part on the board was causing this problem, I have to conclude that the processor is the problem in all these cases.

So I have the situation where my older Mini, which uses the same board, and which has a date code marking of 2018, produces the correct 1uA sleep current, but all of the newer Minis, with date codes of 2019,  sleep at 150uA.  The test sketch, bootloader and  fuses are the same in all.

I have to conclude that either all of these newer processors are counterfeits, or there has been a change in the 328P that Microchip hasn't told us about.  In any case, unless somebody has a recent source of Minis that produce the 1uA sleep current with the power LED and regulator removed when running my test sketch, I'm going to have to give up on this and eliminate the Mini as a low-current option for battery power.  I don't know what to replace it with, except maybe the breadboard PU chip.

I'll reproduce my test code below in case anybody wants to try the same test on their Mini or their PU.  If anyone has another version of a test sketch that they think is more likely to produce the correct sleep current, please post it.  I'll be happy to try anything.

Also, if anyone knows how I might officially raise this issue with Microchip, please let me know.  I'm just a hobbyist, so there's no reason why they should talk to me.

I think this really sucks.

Code: [Select]
#include <avr/sleep.h>
#include <avr/wdt.h>
int i;

void setup(){

  for (i = 0; i < 20; i++) {          // all pins to one rail or the other - power saving
    pinMode(i,OUTPUT);
    digitalWrite(i,LOW);
  }
  ADCSRA = 0;                         // disable ADC for power saving
  wdt_disable();                      // disable WDT for power saving
  set_sleep_mode (SLEEP_MODE_PWR_DOWN); // Deep sleep
  sleep_enable();
  sleep_bod_disable();                // disable brownout detector during sleep
  sleep_cpu();                        // now go to sleep
}

void loop(){
}
 
The following users thanked this post: hans, thm_w

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4533
  • Country: nz
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #34 on: July 20, 2020, 11:56:52 pm »
That really sucks.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13130
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #35 on: July 21, 2020, 12:38:42 am »
Unless you are willing to spend money, time and effort on swapping one of the AVRs with a genuine one from MicrochipDirect, or an official distributor that offers traceability back to Microchip, to see whether or not the genuine chip's sleep current is out of spec, you are pretty much at a dead end.   However if you do consistently find a traceably genuine chip is out of spec, Microchip support *WILL* (eventually) take an interest, even though you are a hobby user.  Register with Microchip's website, log in, then raise a support ticket at http://www.microchip.com/support/hottopics.aspx

If you conclude its just counterfeit chips they are less likely to be interested unless it helps them trace the counterfeits back to their source.   I would suggest posting good closeups of all affected chips you have to their forum, with details of your test methodology, then raising a support ticket and giving them the topic URL.  Its more difficult for them to ignore it on their own forum . . . .

OTOH if you don't want the hassle,  I think we'd all understand if you simply ordered a tube of PDIP ATmega328P chips from MicrochipDirect or a major official distributor and programmed them with your preferred bootloader configured for the 8MHz internal oscillator, and redesign your application for a PDIP AVR in place of a stripped down Arduino Pro Mini clone.
« Last Edit: July 21, 2020, 01:28:08 am by Ian.M »
 

Offline DrG

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #36 on: July 21, 2020, 12:43:09 am »
Did you see the last post on your AVRfreaks thread about explicitly turning off the comparator?
- Invest in science - it pays big dividends. -
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3047
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #37 on: July 21, 2020, 01:12:04 am »
I too would suggest buying an "officially sourced" ATMega32P

I wonder if it's a 328 and not a 328P?  Did you test to see if brown-out-detection disabling actually works, that is, roll the voltage down and see if it detects brown out even when detection is supposedly disabled (by software, non-P can not have BOD disabled in software, so disable it in software and then test, if it still does a brown-out-reset you have a non-P 328)?  I vaguely recall that once upon a time I had some china source ATMega that were remarked as P when they were not P.

I actually just ordered some Pro Minis from Taobao, when they get here I'll check one out.


« Last Edit: July 21, 2020, 01:16:48 am by sleemanj »
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #38 on: July 21, 2020, 03:46:06 am »
Unless you are willing to spend money, time and effort on swapping one of the AVRs with a genuine one from MicrochipDirect, or an official distributor that offers traceability back to Microchip, to see whether or not the genuine chip's sleep current is out of spec, you are pretty much at a dead end.   However if you do consistently find a traceably genuine chip is out of spec, Microchip support *WILL* (eventually) take an interest, even though you are a hobby user.  Register with Microchip's website, log in, then raise a support ticket at http://www.microchip.com/support/hottopics.aspx

If you conclude its just counterfeit chips they are less likely to be interested unless it helps them trace the counterfeits back to their source.   I would suggest posting good closeups of all affected chips you have to their forum, with details of your test methodology, then raising a support ticket and giving them the topic URL.  Its more difficult for them to ignore it on their own forum . . . .

OTOH if you don't want the hassle,  I think we'd all understand if you simply ordered a tube of PDIP ATmega328P chips from MicrochipDirect or a major official distributor and programmed them with your preferred bootloader configured for the 8MHz internal oscillator, and redesign your application for a PDIP AVR in place of a stripped down Arduino Pro Mini clone.

If I could figure out which one to get, I guess I could order a few from Digikey.  But then I'm back to the problem of removing the existing chip from the board and soldering the new one.  Even better would be if I could find a 32FQPT breakout adapter.  Not likely. 

I've already started a thread on AVR Freaks, which I understand is the official forum for these parts.  I posted the markings, but not pictures.  But I get the feeling that there are no company participants there.

Yes, I could use the PDIP chip instead.  But of course that assumes I wouldn't have the same problem with them.  The Mini is just more convenient.

What concerns me is not the counterfeit issue, because that can be solved by getting genuine parts.  But if there's been a silicon revision that's causing this that's not reflected in the datasheet, then there's really no solution for that, and it would affect everything - Unos, Nanos , etc.

« Last Edit: July 21, 2020, 03:50:53 am by Peabody »
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #39 on: July 21, 2020, 03:53:49 am »
Did you see the last post on your AVRfreaks thread about explicitly turning off the comparator?

Yes I did, and it had no effect.  The datasheet even says it has no effect in Power Down sleep.

 
The following users thanked this post: thm_w

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #40 on: July 21, 2020, 04:04:46 am »
I too would suggest buying an "officially sourced" ATMega32P

I wonder if it's a 328 and not a 328P?  Did you test to see if brown-out-detection disabling actually works, that is, roll the voltage down and see if it detects brown out even when detection is supposedly disabled (by software, non-P can not have BOD disabled in software, so disable it in software and then test, if it still does a brown-out-reset you have a non-P 328)?  I vaguely recall that once upon a time I had some china source ATMega that were remarked as P when they were not P.

I actually just ordered some Pro Minis from Taobao, when they get here I'll check one out.

What I really need is an officially sourced Pro Mini.  I guess that would be Sparkfun.

It's not a 328.  I tested both the old  and new Minis with and without the BOD disable, and  both show a 20uA difference.  If I understand correctly, a 328 would have shown no difference because you can't disable BOD on a 328.

I don't know about Taobao, but it would be great if you could do that test.  You'd have to remove the power LED (actually removing the resistor is easier) and the regulator, then flash my test sketch.  Whatever the results, I'd like to see the markings on yours.

 

Offline DrG

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #41 on: July 21, 2020, 04:32:03 pm »
I too would suggest buying an "officially sourced" ATMega32P

I wonder if it's a 328 and not a 328P?  Did you test to see if brown-out-detection disabling actually works, that is, roll the voltage down and see if it detects brown out even when detection is supposedly disabled (by software, non-P can not have BOD disabled in software, so disable it in software and then test, if it still does a brown-out-reset you have a non-P 328)?  I vaguely recall that once upon a time I had some china source ATMega that were remarked as P when they were not P.

I actually just ordered some Pro Minis from Taobao, when they get here I'll check one out.

What I really need is an officially sourced Pro Mini.  I guess that would be Sparkfun.

It's not a 328.  I tested both the old  and new Minis with and without the BOD disable, and  both show a 20uA difference.  If I understand correctly, a 328 would have shown no difference because you can't disable BOD on a 328.

I don't know about Taobao, but it would be great if you could do that test.  You'd have to remove the power LED (actually removing the resistor is easier) and the regulator, then flash my test sketch.  Whatever the results, I'd like to see the markings on yours.

I re-read the entire thread this morning. No, I don't have *the* solution.

It seems to be that you have consistently demonstrated two low power setups, one bad at (again consistently) 150uA.

While not impossible, I think it is unlikely that there is an unknown board revision by Atmel that carries that kind of difference. I think it is unlikely because errata and revisions do get documented. At this point, I don't even think it is a counterfeit or bad batch of chips. Earlier markings had the board revisions marked and I can't figure out what is what largely because I lack patience - https://www.microchip.com/mymicrochip/Data/GBNG-15KQFZ896/pcn_gbng-15kqfz896_part%20marking%20guideline_part2.pdf but I think you have seen Revision D chips that were good and bad.

It smells like some peripheral is getting left on that was not left on earlier (likely correctable in software). If I am able to be be an objective onlooker it really does look that way because, as I said, you have demonstrated that they fall into two bins and each bin has a consistent low power consumption value.

Earlier you wrote "I was able to learn how to use Avrdude to read out the fuse settings and the bootloader code from the old and new Minis.  They are identical, and the bootloader is the stock bootloader.  So at least that settles that issue."

Revisiting the bootloader issue, did you actually determine that the bootloaders were identical or did you assume so because they were "stock"?

I don't know if the stock bootloaders - those that are included in the Arduino IDE have been revised. We know that there is an optiboot (with source code) that I think is separate from those stock bootloaders.

I would clone a good bootloader onto a bad board and test it that way - maybe that is just a PITA suggestion, but I think it would be a definitive test of that issue.

Buying a new Sparkfun board is fine - they revised the board and only offer the newer version. At least you have a solder blob instead of having to remove the regulator. Buying the chips from Microchip is also a good idea. In both cases, however, you are dealing with a bootloader - that *maybe* is relevant. There is so little on those board, especially after your removals, that there just has to be something that we are overlooking - or something that we are erroneously assuming.

« Last Edit: July 21, 2020, 04:54:16 pm by DrG »
- Invest in science - it pays big dividends. -
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #42 on: July 21, 2020, 09:28:09 pm »

I re-read the entire thread this morning. No, I don't have *the* solution.

It seems to be that you have consistently demonstrated two low power setups, one bad at (again consistently) 150uA.

Well, I have one good old Mini at 1uA, and two new batches of bad Minis at 150uA.  The two new batches have different parts on the boards, and while the boards are the same, the silkscreens are different.  So it appears they were from two different production runs with parts sourced from different places.
 
Quote
While not impossible, I think it is unlikely that there is an unknown board revision by Atmel that carries that kind of difference. I think it is unlikely because errata and revisions do get documented. At this point, I don't even think it is a counterfeit or bad batch of chips. Earlier markings had the board revisions marked and I can't figure out what is what largely because I lack patience - https://www.microchip.com/mymicrochip/Data/GBNG-15KQFZ896/pcn_gbng-15kqfz896_part%20marking%20guideline_part2.pdf but I think you have seen Revision D chips that were good and bad.

I finally gave up on those markings guidelines too.  I just couldn't relate them to my chips. But yes, if the last letter of the third line is the revision, then both the old good chip and one of the new bad chips are both D. 

Quote
It smells like some peripheral is getting left on that was not left on earlier (likely correctable in software). If I am able to be be an objective onlooker it really does look that way because, as I said, you have demonstrated that they fall into two bins and each bin has a consistent low power consumption value.

I certainly hope it's something like that, because it would be fixable.  But of course that alone would prove there's been some kind of change.

Quote
Earlier you wrote "I was able to learn how to use Avrdude to read out the fuse settings and the bootloader code from the old and new Minis.  They are identical, and the bootloader is the stock bootloader.  So at least that settles that issue."

Revisiting the bootloader issue, did you actually determine that the bootloaders were identical or did you assume so because they were "stock"?

I read them out to hex files with Avrdude, then compared the files with my hex editor.  Also compared them to the stock bootloader for the Mini in the IDE.  All the files were identical.

Quote
I don't know if the stock bootloaders - those that are included in the Arduino IDE have been revised. We know that there is an optiboot (with source code) that I think is separate from those stock bootloaders.

I would clone a good bootloader onto a bad board and test it that way - maybe that is just a PITA suggestion, but I think it would be a definitive test of that issue.

I have done exactly that.  I burned the stock bootloader and fuses to one of the bad parts. Still 150uA.  I'll say again - the fuses, the bootloader and the sketch are exactly bit-for-bit the absolute same identical in the good and bad chips, and the fuses and bootloaders are the same as stock.  There is no difference.  The old chip works, but the new ones don't.  Unless all the new ones are counterfeits, there has been a revision.

Quote
Buying a new Sparkfun board is fine - they revised the board and only offer the newer version. At least you have a solder blob instead of having to remove the regulator. Buying the chips from Microchip is also a good idea. In both cases, however, you are dealing with a bootloader - that *maybe* is relevant. There is so little on those board, especially after your removals, that there just has to be something that we are overlooking - or something that we are erroneously assuming.

I don't want to get in the habit of paying four times as much for Sparkfun Minis.  And of course if I ordered one, and it worked, but had a 2018 date marker, that tells me nothing.  I have sent email to Digikey asking if they would be able to send me 328P-AU parts with recent date codes.  If they can, and if I can get somebody to switch out the chips on the board for me, that would settle the matter I think.  If that works, then these others probably are counterfeits, but at least I would have a source for good chips.  If it does the 150uA thing, then I think I'm screwed unless there's a software fix.

« Last Edit: July 25, 2020, 04:19:01 pm by Peabody »
 

Offline DrG

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #43 on: July 21, 2020, 10:22:29 pm »

I re-read the entire thread this morning. No, I don't have *the* solution.

It seems to be that you have consistently demonstrated two low power setups, one bad at (again consistently) 150uA.

Well, I have one good old Mini at 1uA, and two new batches of bad Minis at 150uA.  The two new batches have different parts on the boards, and while the boards are the same, the silkscreens are different.  So it appears they were from two different production runs with parts sourced from different places.
 
Quote
While not impossible, I think it is unlikely that there is an unknown board revision by Atmel that carries that kind of difference. I think it is unlikely because errata and revisions do get documented. At this point, I don't even think it is a counterfeit or bad batch of chips. Earlier markings had the board revisions marked and I can't figure out what is what largely because I lack patience - https://www.microchip.com/mymicrochip/Data/GBNG-15KQFZ896/pcn_gbng-15kqfz896_part%20marking%20guideline_part2.pdf but I think you have seen Revision D chips that were good and bad.

I finally gave up on those markings guidelines too.  I just couldn't relate them to my chips. But yes, if the last letter of the third line is the revision, then both the old good chip and one of the new bad chips are both D. 

Quote
It smells like some peripheral is getting left on that was not left on earlier (likely correctable in software). If I am able to be be an objective onlooker it really does look that way because, as I said, you have demonstrated that they fall into two bins and each bin has a consistent low power consumption value.

I certainly hope it's something like that, because it would be fixable.  But of course that alone would prove there's been some kind of change.

Quote
Earlier you wrote "I was able to learn how to use Avrdude to read out the fuse settings and the bootloader code from the old and new Minis.  They are identical, and the bootloader is the stock bootloader.  So at least that settles that issue."

Revisiting the bootloader issue, did you actually determine that the bootloaders were identical or did you assume so because they were "stock"?

I read them out to hex files with Avrdude, then compared the files with my hex editor.  Also compared them to the stock bootloader for the Mini in the IDE.  All the files were identical.

Quote
I don't know if the stock bootloaders - those that are included in the Arduino IDE have been revised. We know that there is an optiboot (with source code) that I think is separate from those stock bootloaders.

I would clone a good bootloader onto a bad board and test it that way - maybe that is just a PITA suggestion, but I think it would be a definitive test of that issue.

I have done exactly that.  I burned the stock bootloader and fuses to one of the bad parts. Still 150uA.  I'll say again - the fuses, the bootloader and the sketch are exactly bit-for-bit the absolute same identical in the good and bad chips, and the fuses and bootloaders are the same as stock.  There is no difference.  The old chip works, but the new ones don't.  Unless all the new ones are counterfeits, there has been a revision.

Quote
Buying a new Sparkfun board is fine - they revised the board and only offer the newer version. At least you have a solder blob instead of having to remove the regulator. Buying the chips from Microchip is also a good idea. In both cases, however, you are dealing with a bootloader - that *maybe* is relevant. There is so little on those board, especially after your removals, that there just has to be something that we are overlooking - or something that we are erroneously assuming.

I don't want to get in the habit of paying four times as much for Sparkfun Minis.  And of course if I ordered one, and it worked, but had a 2018 date marker, that tells me nothing.  I have sent email to Digikey asking if they would be able to send me 328P-AU parts with recent date codes.  If they can, and if I can get somebody to switch out the chips on the board for me, that would settle the matter I think.  If that works, then these others probably are counterfeits, but at least I would have a source for good chips.  If it does the 150uA thing, then I think I'm screwed unless there's a software fix.

*drat*  I am completely and totally out of ideas. You have checked everything that I can think of and checked things that others thought of that I didn't think of and all that is left is....the correct answer. *drat*
- Invest in science - it pays big dividends. -
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3047
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #44 on: July 21, 2020, 10:44:46 pm »
Out of curiosity, more than any particular idea.

Would you like to try my SimpleSleep Arduino library

  https://github.com/sleemanj/SimpleSleep


Code: [Select]
#include <SimpleSleep.h>

SimpleSleep Sleep;

void setup()
{

}

void loop()
{

  for (i = 0; i < 20; i++) {          // all pins to one rail or the other - power saving
    pinMode(i,OUTPUT);
    digitalWrite(i,LOW);
  }

  Sleep.forever();
}

It should behave the same as your test code I think and produce the same results, but worth a shot.
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline SilverSolder

  • Super Contributor
  • ***
  • Posts: 6126
  • Country: 00
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #45 on: July 22, 2020, 01:45:58 am »

[...]

I don't want to get in the habit of paying four times as much for Sparkfun Minis.  And of course if I ordered one, and it worked, but had a 2018 date marker, that tells me nothing.  I have sent email to Digikey asking if they would be able to send me 328P-AU parts with recent date codes.  If they can, and if I can get somebody to switch out the chips on the board for me, that would settle the matter I think.  If that works, then these others probably are counterfeits, but at least I would have a source for good chips.  If it does the 150uA thing, then I think I'm screwed unless there's a software fix.



The picture of the "Good" processor is incorrect in that post (forum has a picture attachment bug that you may have fallen foul of)
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #46 on: July 22, 2020, 03:20:10 am »

The picture of the "Good" processor is incorrect in that post (forum has a picture attachment bug that you may have fallen foul of)

I'd like to know more about the attachment bug, but the pictures look right when I click on them.  The good chip is the one with the 18...  date code at the bottom, and that's what I see when I click on it.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #47 on: July 22, 2020, 03:21:31 am »
Out of curiosity, more than any particular idea.

Would you like to try my SimpleSleep Arduino library

  https://github.com/sleemanj/SimpleSleep


Code: [Select]
#include <SimpleSleep.h>

SimpleSleep Sleep;

void setup()
{

}

void loop()
{

  for (i = 0; i < 20; i++) {          // all pins to one rail or the other - power saving
    pinMode(i,OUTPUT);
    digitalWrite(i,LOW);
  }

  Sleep.forever();
}

It should behave the same as your test code I think and produce the same results, but worth a shot.

Sure.  I'll give it a shot tomorrow.
 

Offline ADI8421

  • Newbie
  • Posts: 5
  • Country: nz
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #48 on: July 25, 2020, 01:39:34 am »
Hi, I've skipped a few posts here so may have missed a solution, but here's my ideas:

I noticed your pro mini arduino board has a 4 ohm series resistor in the RAW power supply line. My identical boards have a 5 ohm.
There is also a diode in the same line for reverse supply protection. I trust you have bypassed these 2 components ?
What about the supplies for both circuits ? Do they use the same DC supply, including the same On/Off switch. Switch contact resistances can vary a lot. I would also remove all electro caps too.
« Last Edit: July 25, 2020, 01:41:17 am by ADI8421 »
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2161
  • Country: us
Re: Arduino Pro Mini - two copies have different sleep currents
« Reply #49 on: July 25, 2020, 04:24:10 pm »

The picture of the "Good" processor is incorrect in that post (forum has a picture attachment bug that you may have fallen foul of)

I went back again and checked it this morning, and it had replaced the correct image that had been there before with a schematic that I had posted in another thread.  So I've deleted the schematic, then attached the correct picture again.  It all looks ok to me now, but that's not to say it won't get messed up again.  Is there any information on what leads to this bug or what can be done to avoid it?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf