Any Arduino nerds?

The only way I know of to do that is to change one of the fuses. And I'm not sure I would be able to do that.

Could I possibly look at the resonator pins on my scope? My scope is only a toy, and won't go anywhere near 8MHz, but would the average voltage be in the middle?

Reply to
Peabody
Loading thread data ...

I don't know for certain, but I'm pretty sure there are no sales of "second s" to prevent exactly this sort of situation. The potential damage to a se mi maker's reputation of releasing bad parts is not worth the few pennies o f extra revenue.

Counterfeit is another animal. The processes used in most MCUs are so well established and the tools so easy to use, it is not really difficult at al l to knock off the simpler devices. Someone posted info on counterfeit ARM processors. I'm sure the AVR is much easier to duplicate since it has muc h less random logic. There is a lot of price pressure in the hobby market too, so a great place to sell "almost" copies.

It will be interesting to see what you find when you get to the bottom of t his.

--

  Rick C. 

  -+ Get 1,000 miles of free Supercharging 
  -+ Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

I'm thinking more of the internal RC clock. The frequency of the crystal c lock is fixed, so the current draw is only proportional to the voltage, not the square. An RC would run faster if the threshold is fixed, so the curr ent would increase for the higher voltage and increase again for the faster speed. But they probably use a proportional threshold which keeps the fre quency roughly the same. So this is likely a red herring. Just a thought.

--

  Rick C. 

  +- Get 1,000 miles of free Supercharging 
  +- Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

There's one other possibility. Despite the 328P marking, the new ones might be 328 parts. That could account for the power difference (the inability to turn off BOD during sleep on the 328).

Reply to
Peabody

I would suggest erasing the chip and reloading the boot code. At least that will answer the software/hardware question.

Reply to
david eather

So post the link to it.

It doesn't have to be. Leakage currents tend to increase exponentially with voltage. If there is some kind of clock running, the capacitances getting charged and discharged could be voltage dependent, which can add another no n-linearity. Clock frequency shouldn't be voltage dependent, but if it does increase with supply voltage, that could another non-linearity.

There are lots of parts in a microcontroller, and lots of opportunities for complicated behavior.

uA

Since Bob Widlar people don't design their integrated circuits around resis tors - it's hard to get anything that acts much like a resistor on an integ rated circuit and what you tend to end up with if you need one is frequentl y horribly non-linear.

--
Bill Sloman, Sydney
Reply to
Bill Sloman

formatting link

But the test sketch goes into power-down sleep, which turns off all oscillators unless the WDT is running, and that's turned off separately. This all works in the old chip. If any clock is still running in the new chips, that would be a processor problem, not a PC board problem.

Reply to
Peabody

+1 for Klaus.

Swapping chips between the two boards would remove any doubt about whether it's the chip, or the board.

Cheers, James Arthur

Reply to
dagmargoodboat

I think I'm ready to say what the problem is.

To review - I've made sure the old Mini and both new Minis have the same fuses, bootloader and test sketch. All the boards look identical. With the regulator and power LED removed, there isn't much left on the board that could account for the high sleep current in the new Minis.

This morning I tested the theory that the big cap on Vcc was leaking, With the regulator removed, the big cap on the Raw input wasn't used anymore. So I connected its plus end to the Vcc cap (same size = 10uF), and tested the Mini again. My thought was that if adding the second cap to the output did not change the sleep current, then at least I know the Raw cap isn't leaking.

And sure enough, the sleep current was still 150uA.

So with a known good capacitor, I removed the Vcc cap, leaving only known good one in the circuit. If the Vcc cap had been leaking, the sleep current would now drop to 1uA.

But the sleep current stayed at 150uA.

So I think I'm ready to declare that the board and its parts are ok, and the problem is the processor. I don't know specifically what's wrong. It could just be a bad run, or a mis-labeled part, or a counterfeit, but the processor seems to be the problem. I think confirming evidence is the big difference in current drawn between old and new when I ground the reset pin. There's nothing on the board except maybe the resonator that could have any effect on reset current.

I don't have any rework gear that would let me switch the processors, and the odds that I could do that successfully with my soldering iron are very low. So unless someone has another idea, I think I need to give up on these. Whatever is wrong is nothing I can fix.

I guess I could do some destructive testing - removing everything else from the board except the processor and resonator, and might even reflash it to use the internal 8Mhz oscillator, then remove the resonator. But my guess is the sleep current is still going to be 150uA. I thought it might be possible that the new ones are 328, not 328P, but that's not right. Both the old and new ones have a 20uA increase in sleep current if the BOD is not disabled. There would be no increase with a 328.

So I'm going to order another batch from another source if I can find some with different markings on the 328P. I just wish I was able to pin down what's actually going on with the processor.

Thanks to everyone for the comments and suggestions.

Reply to
Peabody

I don't know the processor or the tools, but if it were a PIC I'd say make sure all your unconnected I/O is set to output, or input with a pullup/down. Floaty inputs can do weird things.

--
Cheers 
Clive
Reply to
Clive Arthur

I'd swap the Mega with a part from a reputable distributor to test this theory at this point rather than playing more whack-a-mole.

You'd have to burn the Mini bootloader on the blank chip but not too hard if you have a hot air station and some surface-mount to DIP adapters.

Reply to
bitrex

Whoops, nevermind you say you can't do that. Hot-air stations aren't that expensive tho. The 32-TQFP is big enough that you could probably pull off the swap with a regular electric heat-gun if you're careful.

Reply to
bitrex

The code he posted sets all the I/O to the output state driven low, that's the most power-saving state for the AVR.

Reply to
bitrex

Probably good to check though that all the pins have in fact been driven into the low state correctly.

Reply to
bitrex

Wait, wasn't isn't there some difference between a 328P and a 328PU - I forget what it is exactly but maybe someone knows and can rule it in or out

formatting link

Reply to
david eather

My re-work station consists of an electric hotplate and an excellent $35 hot-air SMD tool I got from eBay.

But you can get by with even cruder equipment--a hotplate and a heatgun would be enough to remove parts, and a regular soldering iron is more than good enough to solder them back on.

The trick to soldering SMD IC's is to add liquid flux on the pads, then drag the iron across the leads. You'd think that would bridge all the leads together, but instead the solder magically jumps to the leads, leaving nice clean gaps in-between. (Bridges, if they occur, are fixed with more flux and another touch of the iron.)

IOW it might not be worth it to you for such inexpensive boards, but you definitely could if you wanted to.

Cheers, James Arthur

Reply to
dagmargoodboat

e

the

t

With

.

sted

tput

t

wn

d

It

he

big

d

nd

ery

from

to

ess

th

s

ome

n

ut

pu

There are some pinout differences between 328 and 328P. Pin 6 might be a problem. If pin 6 was previously tied to Vcc and is now an output pin set to 0V, that's bad.

But you'd think it would be drawing a lot more than 500uA.

Table 1-1.? Pin Functionality Difference between ATmega328 Variants and ATmega328PB

32-pin TQFP/MLF package ATmega328 variants ATmega328PB ==> Pin 3 GND PE0/ACO ==> Pin 6 VCC PE1

Both chips are drawing absurdly too much for sleep mode.

Consulting the processor datasheet, with no watchdog Iq should be

Reply to
dagmargoodboat

ame

th the

hat

With

re.

tested

output

n't

nown

and

. It

the

e big

et

uld

and

very

n

e from

it to

guess

be

Both

is

some

own

out

28pu

ts and ATmega328PB

He's measuring 0.4 uA in the one case. Why is that too high???

150 uA in the other case is the number he is complaining about.
--

  Rick C. 

  ++ Get 1,000 miles of free Supercharging 
  ++ Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

Just wanted to report that I burned the bootloader to make the 328P run on the internal 8MHz oscillator, then reflashed the sleep current test sketch. It still drew 150uA.

So then I removed everything else from the board, one item at a time, and tested again after each removal. But with only the processor remaining, I still get 150 uA. So I think that confirms to my satisfaction that something is wrong with the processor chips. Anyway, I've order another batch of Minis from a new source. I hope they will do better. Thanks for everyone's comments and suggestions.

Reply to
Peabody

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.