Author Topic: Atmega328p woes from JLCPCB SMT order  (Read 5344 times)

0 Members and 1 Guest are viewing this topic.

Offline blackstealthTopic starter

  • Newbie
  • Posts: 2
  • Country: ca
Atmega328p woes from JLCPCB SMT order
« on: February 03, 2021, 07:21:54 pm »
I put an ordered on Jan 8th this year for JLCPCB to build some circuit boards and had their pick and place service solder the popular Atmega328p part on.  The Atmega328p accepted a flash no problem, but that's all they would do.  I tried toggling a simple pin, like a blink sketch, no go.  I tried a simple "Hello World" serial test, and only 4 out of the 10 would pass that test.  I spent days going mad trying to figure out what could possibly be wrong.

I removed their 16mhz crystal, and put another 16 mhz crystal that is a known working part.  No improvement.
I replaced the Atmega328p and replaced it with one I had in stock, and presto, it worked perfectly.
I go ahead order new Atmegas from mouser and the problems are all gone.

I sent a message to JLCPCB using the "Quality Complaint button" but it's been over a week and no response from them.

Photos:  I removed the JLCPCB Atmega, and replaced it with one I had in stock.


I am worried that the hot air flow will make components fly off, so I tape them down with yellow kapton tape and remove all JLCPCB atmegas off.


Mouser's atmegas are soldered in and JLCPCB's atmegas are all removed.


Since JLCPCB did not get back to me at all, I am too afraid to use their atmega328p again.  De-soldering / re-soldering those were a pain for me, wasted another day on that.  Lesson learned, design PCB to use through hole atmegas and order microcontrollers from mouser.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16930
  • Country: lv
Re: Atmega328p woes from JLCPCB SMT order
« Reply #1 on: February 03, 2021, 07:37:27 pm »
Post a close photo of cleaned IC you removed. How you programmed fuses, what load capacitance do you use?
Quote
design PCB to use through hole atmegas
And what's the point? They are order of magnitude more difficult to replace. At places you used Kapton tape there was no need for it. Plastic connector is the only place worth to cover.
« Last Edit: February 03, 2021, 07:44:08 pm by wraper »
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9973
  • Country: nz
Re: Atmega328p woes from JLCPCB SMT order
« Reply #2 on: February 03, 2021, 07:42:14 pm »
Also are you sure you got atmega328p and not atmega328pb

Trap for young players.
Usually the last letter on parts doesnt matter much, except when it does lol

Could be fake or just recycled without having every setting reset to stock.

I tend to stay away from very popular chips if possible. Fakes and rejects are more common on popular chips
« Last Edit: February 03, 2021, 07:46:38 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline blackstealthTopic starter

  • Newbie
  • Posts: 2
  • Country: ca
Re: Atmega328p woes from JLCPCB SMT order
« Reply #3 on: February 03, 2021, 07:53:29 pm »
Close up pictures.  I've been using atmegas since 2010.  Load capacitors 18pf.  Fuse set to external full swing.




 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12887
Re: Atmega328p woes from JLCPCB SMT order
« Reply #4 on: February 03, 2021, 08:09:54 pm »
Take a cheap Chinese Arduino Nano or Pro Mini clone, and check if its fake  so you know if the MCU you are going to desolder is any good.  You'll find the fake Atmega detection sketch linked from https://www.eevblog.com/forum/microcontrollers/arduino-pro-mini-two-copies-have-different-sleep-currents/msg3232812/#msg3232812, which also tells you how to interpret the results.

Next, desolder the chinese Arduino's MCU, and replace with one of your JL PCB ATmega328P chips that passed your serial 'hello world' sketch.  Flash it with an Arduino bootloader,  and run the fake ATmega detection sketch on the JL PCB chip.

That should give you a pretty good idea what's doing on.   As your board supports serial comms you could also try the fake detection sketch on a known good chip for comparison.
« Last Edit: February 03, 2021, 08:15:19 pm by Ian.M »
 
The following users thanked this post: WattsThat

Offline phil from seattle

  • Super Contributor
  • ***
  • Posts: 1029
  • Country: us
Re: Atmega328p woes from JLCPCB SMT order
« Reply #5 on: February 03, 2021, 08:15:41 pm »
Post a close photo of cleaned IC you removed. How you programmed fuses, what load capacitance do you use?
Quote
design PCB to use through hole atmegas
And what's the point? They are order of magnitude more difficult to replace. At places you used Kapton tape there was no need for it. Plastic connector is the only place worth to cover.

His point was to not have JLCPCB install the chip.  Though, why use TH at all.  Clearly he knows how to solder SMDs.  Just drop the part from the BOM.

On a related note, I've found LCSC (JLCPCBs disti) to be oddly spotty with Atmel chips.  They don't seem to carry any of the more recent ATTiny chips (1 series, for example) and their prices are often higher than western distis like Mouser and Digikey.  I wonder if they are getting their supplies through a 3rd party which makes counterfeits a distinct possibility.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3029
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Atmega328p woes from JLCPCB SMT order
« Reply #6 on: February 03, 2021, 10:28:48 pm »
Hmm.  Reset issue would be my first guess.  Do you have an external pullup for reset or are you relying on the internal one?
~~~
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 Peabody

  • Super Contributor
  • ***
  • Posts: 2041
  • Country: us
Re: Atmega328p woes from JLCPCB SMT order
« Reply #7 on: February 03, 2021, 11:34:12 pm »
I can't see all the markings clearly.  Do all the JLCPCB Atmegas have identical markings?

Atmel
MEGA328P
U-TH
35473D
2025TYT

And what about the Mouser chips?  How are they marked?

Is there any chance this is a bootloader thing?
 

Offline lutkeveld

  • Regular Contributor
  • *
  • Posts: 126
  • Country: nl
Re: Atmega328p woes from JLCPCB SMT order
« Reply #8 on: February 04, 2021, 07:04:05 am »
Have you burned the exact same bootloader on both?
 

Offline JLCPCB Official

  • Regular Contributor
  • *
  • Posts: 129
  • Country: hk
Re: Atmega328p woes from JLCPCB SMT order
« Reply #9 on: February 04, 2021, 07:48:32 am »
    When customers have questions about the quality of JLCPCB's products, we need to clearly state:
    First of all, our service can operate at a very low gross profit margin and provide users with more favorable prices. The main reason is the efficiency improvement brought by advanced technology and equipment. But this does not mean that we will provide inferior source materials. A large number of users choose JLCPCB, and it has been extolling its good reputation for 15 years because of its reliable quality.
    LCSC is China's largest component mall, with 400,000 kinds of components in stock. lcsc knows that any component problem will broke the entire electronic project or systems, and the component supply control is extremely strict to ensure the reliable quality of the supply of components.
    Usually, the staff will respond quickly to complaints with suspected quality, usually within 24 hours. We keep smooth communication and reduce communication barriers and misunderstandings.
    For the SMT project of JLCPCB, the component library of mouser and digikey will be supported in the future, and it is expected to be realized in 2021. Those who trust JLCPCB's services please also trust the quality of our products' raw materials and components. Thanks for all the attention
   
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9973
  • Country: nz
Re: Atmega328p woes from JLCPCB SMT order
« Reply #10 on: February 04, 2021, 08:18:38 am »
I've had counterfeit parts from PCBway, it can happen from all of the cheaper hobbits PCB companies.

Unless you make it clear on the BOM where each part can be purchased from you will get bad parts from time to time.
Once I started giving directions on the BOM for authorized sellers the problem stopped occurring.

The other option is to use a more professional PCB company, but they usually won't do small orders.
They do have much better QC though.
« Last Edit: February 04, 2021, 08:21:31 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3029
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Atmega328p woes from JLCPCB SMT order
« Reply #11 on: February 04, 2021, 08:56:34 am »
Counterfeit is possible of course, but, I wouldn't jump to that conclusion.

The counterfeits (the first and only known to date) discovered last year were only found because somebody noticed that the sleep current was higher than expected, otherwise they (in so far as anybody has seen) operated normally.

It would be an interesting counterfeit that worked well enough to accept and read back flash, but failed at sucha  fundamental thing as toggling a GPIO.

Certainly some more investigation would be interesting.  As above, I'd be looking at RESET.  If RESET isn't being pulled high externally (or weakly), just relying on the internal pullup (which maybe if is counterfeit isn't there), then it could well (SPI) program and readback ok, but do nothing otherwise.
~~~
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 gnuarm

  • Super Contributor
  • ***
  • Posts: 2235
  • Country: pr
Re: Atmega328p woes from JLCPCB SMT order
« Reply #12 on: February 04, 2021, 09:17:56 am »
I would be very interested in hearing how this is resolved.  blackstealth, please get back to us if you hear from JLC. 

Looks like someone from JLC replied to this thread, but they posted an image of a support reply to someone, but it is not clear if that was blackstealth's query about the problem or not. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 
The following users thanked this post: WattsThat

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9973
  • Country: nz
Re: Atmega328p woes from JLCPCB SMT order
« Reply #13 on: February 04, 2021, 11:04:48 am »
One possibility is they are recycled chips and did not get fully reset to default state when they were erased, fuse bits etc..

Fuse bits is the fist thing I would check between working and non-working AVRs
« Last Edit: February 04, 2021, 11:06:34 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline TheHolyHorse

  • Regular Contributor
  • *
  • Posts: 179
  • Country: se
  • You don't need to be confused, just understand it.
Re: Atmega328p woes from JLCPCB SMT order
« Reply #14 on: February 04, 2021, 01:26:51 pm »
One possibility is they are recycled chips and did not get fully reset to default state when they were erased, fuse bits etc..

Fuse bits is the fist thing I would check between working and non-working AVRs

It would be bad if they were recycled and not mentioning it when selling them.  :palm:
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16930
  • Country: lv
Re: Atmega328p woes from JLCPCB SMT order
« Reply #15 on: February 04, 2021, 01:37:35 pm »
Package and marking look legit to me. If they were recycled, they would need to be blacktopped and remarked to have such fresh date code. As op did not bother to check if crystal was actually oscillating and what was on reset pin, and decided to just brute-force the problem by throwing the parts onto it, hard to say what was an issue. Might be a marginal design which did not work with particular batch of MCUs or say conductive-ish flux. I wonder if he bothered to check if VDD was actually 5V which is required for 16MHz operation.
Also there are other oscillator related fuses other than
Quote
Fuse set to external full swing.
It can be configured as ceramic resonator and "full swing crystal oscillator" at the same time.
« Last Edit: February 04, 2021, 02:39:46 pm by wraper »
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2041
  • Country: us
Re: Atmega328p woes from JLCPCB SMT order
« Reply #16 on: February 04, 2021, 02:48:23 pm »
I'm the one who started all the fuss last year.  The result of that was that Microchip confirmed that the chips I sent them were counterfeit.  In addition, a chip which functioned properly in all respects was also deemed a counterfeit by Microchip.  My suspicion is that the Arduino clone market has been rife with counterfeit chips, which worked ok, for years, but I can't prove that.

Personally, I don't have a problem with counterfeits so long as they work properly.  But if we now have another example of chips which don't work, we need to get to the bottom of it.  I'm confused by the picture.  The markings appear to be genuine.  So is that a picture of the bad chips or the replacements?

We need to get blackstealth to run Kevin Darrah's test sketch on the bad chips, and perhaps reflash the fuses and bootloader.  Or if he doesn't want to be bothered with it further, Kevin might be willing to test them, or I could privately send blackstealth contact information of a VP at Microchip to whom he could send the chips for evaluation.

In any case, if we now have counterfeits with seemingly valid markings, and which have been modified to pass Kevin's test, but which don't work, we need to know that.  Last year's examples at least had what turned out to be goofy markings, and none passed Kevin's test.  But all  of that could have been corrected on the next production run of counterfeits.

So hopefully blackstealth will return to this thread shortly, and we can get to the bottom of this.
 

Offline 48X24X48X

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: my
    • Rocket Scream
Re: Atmega328p woes from JLCPCB SMT order
« Reply #17 on: February 04, 2021, 03:03:02 pm »
I did tested JLC's assembly using 10 pieces of the ATMega328P-AU. And I verified the fuses last time and it seems legit. The sleep current is also spot on. But, I wouldn't rule out any counterfeits IC too on top of the technical issues discussed here.

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1269
  • Country: ru
Re: Atmega328p woes from JLCPCB SMT order
« Reply #18 on: February 08, 2021, 01:36:39 pm »
The MCU you took from the Arduino board has the fuses and bootloader properly installed. You can only program flash files with the program code in them and they will work.

From LCSC, you have received completely clean MCUs. Maybe that's the problem? You can run Mega without a bootloader, but you need to write the fuses correctly.

Try to return one MCU to your board, read fuses from the Arduino, and write them to the MCU that you think is faulty.
It is not known how you create the program, if in Arduino, then use the option "write bootloader" - it also sets the fuses correctly.
And sorry for my English.
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2041
  • Country: us
Re: Atmega328p woes from JLCPCB SMT order
« Reply #19 on: February 08, 2021, 02:57:20 pm »
I assume the replacement chips he got from Mouser were also completely clean.

Well, I hope he will return to the thread with more information.
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1269
  • Country: ru
Re: Atmega328p woes from JLCPCB SMT order
« Reply #20 on: February 08, 2021, 04:59:43 pm »
I assume the replacement chips he got from Mouser were also completely clean.

Well, I hope he will return to the thread with more information.

The person wrote two messages and disappeared. Either he is desperate and upset, or it is a lie to the Chinese comrades.
There are lies in the world now... We often see this. :-//
And sorry for my English.
 

Offline phil from seattle

  • Super Contributor
  • ***
  • Posts: 1029
  • Country: us
Re: Atmega328p woes from JLCPCB SMT order
« Reply #21 on: February 08, 2021, 05:28:09 pm »
I assume the replacement chips he got from Mouser were also completely clean.

Well, I hope he will return to the thread with more information.

The person wrote two messages and disappeared. Either he is desperate and upset, or it is a lie to the Chinese comrades.
There are lies in the world now... We often see this. :-//
Many things are possible here though the truth is most likely the simplest explanation. We often see "drive by" posters that never come back.  Some percentage are likely disinformaticheks but I think most are not.
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1269
  • Country: ru
Re: Atmega328p woes from JLCPCB SMT order
« Reply #22 on: February 08, 2021, 05:44:58 pm »
I assume the replacement chips he got from Mouser were also completely clean.

Well, I hope he will return to the thread with more information.

The person wrote two messages and disappeared. Either he is desperate and upset, or it is a lie to the Chinese comrades.
There are lies in the world now... We often see this. :-//
Many things are possible here though the truth is most likely the simplest explanation. We often see "drive by" posters that never come back.  Some percentage are likely disinformaticheks but I think most are not.

I agree! Everything is possible. And the Chinese guys could sit in the trough.

But the strange thing is that a person for more than 10 years is engaged in a simple 328p crystal, but the test is performed by replacing the MPU, replacing the oscillator. After all, you could watch the generation on a quartz resonator, you could apply external clocking to check the chip, go through step-by-step debugging on the chip, etc. I don't remember if there is a clock from the internal generator in 328p, which you can switch to to check. There is a JTAG boundary scan present or not.

But I would not be in a hurry to make loud statements without finding the reason reliably. I also had situations when the AVR did not take off immediately, most often it was my soldering errors, but I looked for the reason and did not panic. :) I was happy with the STM32 with a reliable start, without fear of losing the start due to faulty fuses. Now I miss simple AVRs with a good IDE and great Atmel examples/solutions that could be hoped for and used intelligently, understanding what is going on. :)
And sorry for my English.
 

Offline riyadh144

  • Supporter
  • ****
  • Posts: 111
Re: Atmega328p woes from JLCPCB SMT order
« Reply #23 on: February 08, 2021, 06:22:55 pm »
Yeah I don't think we should come to conclusions until we see some real evidence, schematics, layout, microscope shots, scope shots of waveform, and most importantly the code.
 

Offline 1276-2449-1-ND

  • Regular Contributor
  • *
  • Posts: 63
  • Country: ca
Re: Atmega328p woes from JLCPCB SMT order
« Reply #24 on: February 11, 2021, 03:05:49 pm »
I have the same suspect ATMEGA328P U-TH microcontrollers from LCSC.

I had problems programming them too, and it seemed to have to do with clocking. I suspected that these ICs have some sort of weird clock feature/limitation that hasn't made it into the documentation yet (like how the 328PB had people scratching their heads for a while.)

Microchip put out a notice that they were relabeling their ICs, and I think that the U-TH has more to do where it was manufactured than what the ICs. There's a discussion about it here: https://www.avrfreaks.net/forum/another-it-fake-chip-thread-atmega328pu-th-tqfn-pkg

I don't have time to look into it further, but I can send a few chips to people who want to examine them.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf