8-bit Arduino Clones: Atmega 328pb? How to fix computability issues!

Поділитися
Вставка
  • Опубліковано 12 вер 2024
  • #Ad For superb service and quality custom PCBs shipped quickly around the world visit: www.pcbway.com/ for more information and your free quotation!
    Terms & Conditions Apply.
    ==========================
    Are all #Arduino #Nano built the same?
    Well it terns out not so, some of the latest (post 2021) batches of clone boards are coming sipped with the 8bit #atmega328pb as apposed the normal #atmega328p and its the extra 'b' thats makes all the difference!
    In this video we'll look at how to get this new 'pb' variant working with the stock Arduino IDE so you can upload code as you would on a standard clone Nano.
    MiniCore download for Arduino IDE:
    github.com/MCU...
    =======================================================
    Wi-Fi Sheep Patreon: / wifisheep
    Twitter: / wifisheep | @wifisheep
    Don't forget to like and subscribe!!!
    Music Credits - Tracks Used
    Kevin MacLeod - Incompetech.com
    incompetech.com/
    Gocart

КОМЕНТАРІ • 43

  • @basilhsgr5018
    @basilhsgr5018 Рік тому +1

    The most frustrating thing is that these 328PB products are still sold as and even labeled as 328P as you mention. I have two boards with these two chips, I plugged them in both not working, tried a lot of stuff and finally I discovered that 328PB exists... 😂🤣 After that I found your video.
    Thanks and subscribed, nice job.

  • @paulweston1106
    @paulweston1106 2 роки тому +6

    I've had permission issues with Arduino boards and Linux, a simple chmod tends to solve it.

  • @crawlersncustoms
    @crawlersncustoms Рік тому +1

    Thanks for this. It was driving me crazy! I ordered 328P and that's what the listing said, but received 328PB and ran into problems as you can imagine. 6 hours later I zoomed in on the chip to see the faint 328PB stamped and not 328P.

    • @WiFiSheep
      @WiFiSheep  Рік тому +1

      Glad I could help! Totally understand the frustration! Hence this video to help out fellow makers. Hope you've all sorted now?

  • @RogueTrooper488
    @RogueTrooper488 Місяць тому

    WARNING! The ATmega328PB is NOT a drop in replacement for the ATmega328P.
    TLDNR
    See Atmel Technical Note AT15007 "Differences between ATmega328P and ATmega328PB" for more information. Of particular concern is that two of the pins that are used for VCC and GND on the ATmega328P are now I/O pins on the ATmega328PB. Pin 3 is GND on the ATmega328P but is PE0/SDA1/ICP4/ACO/PTCXY on the ATmega328PB. While pin 6 is VCC on the ATmega328P but is PE1/SCL1/T4/PTCXY on the ATmega328PB. If the PCB is made as per the original Nano spec for an ATmega328P then pins 3 and 6 will be connected to the GND and VCC rails respectively. If you use an ATmega328PB firmware and enable either of these pins as output things are not going to end well.
    Pins 19 and 22 have additional functionality on the ATmega328PB but at least these pins are taken out to the ADC6 and ADC7 pins on the Nano. Pin 19 on the ATmega328PB is PE2/ADC6/PTCY/ICP3/SS1 while pin 22 is PE3/ADC7/PTCY/T3/MOSI1.
    The technical note does, however, state that the ATmega328PB is fully software compatible with the ATmega328P so it "should" be possible to upload a Nano firmware to this device and use it as an ATmega328P without the additional features of the ATmega328PB. This assumes that there are no bugs in the firmware which alter any unused/reserved bits in the ATmega328P registers that are used by the ATmega328PB. Such bugs would go unnoticed on an ATmega328P but may cause issues when executed on an ATmega328PB. This caveat also applies to any libraries used. As others have commented the old Nano bootloader appears to work but the new one does not, this may be the reason why.
    The Arduino IDE will not program the Nano bootloader into the ATmega328PB because it has a different signature to the ATmega328P and AVRDude checks this signature before uploading anything. It is, however, possible to upload the firmware from the command line using AVRDude with the -F switch. The -F switch (note upper case) forces AVRDude to ignore the signature bytes and upload the firmware.
    The ATmega328PB also has additional fuse bits and uses a low power oscillator, the rail to rail oscillator option is no longer present. This low power oscillator has a clock failure detection (CFD) circuit and fuse which force the ATmega328PB to revert to an internal 1MHz Calibrated RC Oscillator when it detects missing pulses. This clock failure detection can occur due to poorly routed boards that would not be a problem with a rail to rail oscillator. CFD can only be recovered by power cycling or a hard reset. This can result communication issues and other errant behaviour.
    caveat emptor

  • @TinySpongey
    @TinySpongey Місяць тому +1

    I got some of these a couple of days ago and finally got them working fully. Initially using "old bootloader" worked. Various reports said the old bootloader has bugs so I wanted to update it.
    I tried usbasp but that failed because it said it was the wrong chip signature.
    I tried adding a 328pb board but the implementation I tried failed with a strange avrdude error message when I tried to write the bootloader.
    After readiing a few forums I found out you *can* burn the 328p bootloader by changing the chip spec for the 328pb. That can be done by manually entering the bootloader upload commands it uses with avrdude. When you do that the bootloader will lie to the IDE and it will behave pretty much like a normal 328p thereafter. The two chips are apparenly so similar that will work: but you can't use any new features in the 328pb.
    After finding that solution I found the bug in the other board implementation and now everything works fine.

    • @WiFiSheep
      @WiFiSheep  Місяць тому

      Interesting! First off well done and Second, thanks for sharing your findings! Really useful to feed back into the community :-) - Tom

  • @9A4GEMilan
    @9A4GEMilan 5 місяців тому

    This saves my day, thanks! I ordered from Mouser wrong chip: Atmega328pb and having problem uploading anything to ICT tracker (for tracking high altitude balloons). Now, I will try to do it again with method you described.

  • @innospire3485
    @innospire3485 Рік тому

    It was a Very useful video. Very less people noticed that Arduino UNO and Nano Clone board are available in market using ATmega 328 PB chip-set. This board after programming using ARduino UNO board Selection, it Upload codes. Some Time it Works Properly and Maximum time it works abruptly, Freezes, Restart and many issues.
    I am a Hobbyist and Academic Project developer and I have many Arduino UNO Board with Atmega328 PB Chipset. Finding for the Solution for this clone board and your this video was helpful for me.
    Thanks a Lot.

  • @LoZiooo
    @LoZiooo Місяць тому

    The good thing is that the 328PB has much more peripherals compared to the 328P, you've got 5 timers, 2 UARTs... So we can say that we were not scammed, quite the opposite :'D
    And the other thing is that with my nano board I noticed the TX pin always on when I first plug the board, but I was able to reprogram it by selecting the ATMEGA328P old bootloader... Cheers

  • @bobbycount1503
    @bobbycount1503 7 місяців тому +1

    Got this 328PB Version and after trying many things i discovered ... you can use the standard Nano Settings - BUT you must use ATmega328P (Old bootloader) as the Programmer and everything is ok 🙂

    • @WiFiSheep
      @WiFiSheep  7 місяців тому

      Oh how interesting... is that a fact? Well thanks for the info!

    • @bobbycount1503
      @bobbycount1503 7 місяців тому

      It's a fact. Using it for a few days now - behaves quite as you would expect from a Nano. Just a little anoying to swich from regular to old Bootloader (using both versions) 🙂 @@WiFiSheep

    • @WiFiSheep
      @WiFiSheep  7 місяців тому +1

      If i get a chance, I am going to try this :-) Huge thank you once again for the tip off!

  • @basilhsgr5018
    @basilhsgr5018 Рік тому +2

    Just for the record maybe someone will find it useful.
    Some Pro-Mini 3.3v with 328PB they refused to upload code from Serial/FTDI no matter if the bootloader is OK. Try to upload the sketches via programmer, maybe it will work.

  • @Cesarsound1
    @Cesarsound1 11 місяців тому +1

    I have the same problem with the Chinese Ardunio NANO that comes with the MEGA328PU - TH chip. I can't write the bootloader to it, in the IDE this message comes: avrdude: Expected signature for ATmega328P is 1E 95 0F Double check chip, or use -F to override this check. Does anyone know how to use -F to override this check or solve this problem?

  • @piotrkoper362
    @piotrkoper362 7 місяців тому

    Thanks for the video, you saved three Arduinos from going to trash :)

    • @WiFiSheep
      @WiFiSheep  7 місяців тому

      Glad I could help! I had 30+ of the things for a commercial project so trash wasn't an option :-/

  • @crazymixstudio
    @crazymixstudio 3 місяці тому

    Thankyou for the video...... It helped me a lot

    • @WiFiSheep
      @WiFiSheep  3 місяці тому

      Glad to hear that... I knew when i went though this issue I had to make this video as it would be helpful to so many people!

  • @kristoffersunnhordvik7590
    @kristoffersunnhordvik7590 5 місяців тому

    Serial monitor changes if touching the pins.

  • @R.-.
    @R.-. 2 роки тому +1

    Did you have to figure all this out yourself?
    It strikes me as strange that anyone could make a product this incompatible with no instructions about how to use it.

    • @WiFiSheep
      @WiFiSheep  2 роки тому +4

      I cant take credit for everything, and trust me I did a lot of hours of trying to figure this out. I honestly didn't even know 328pb was a thing until this happened. And the products are still sold as and even labelled as 328p. So theres no additional documentation at all!
      But as ive figured this out, it was important to share with the community, as so many are going to hit this issue going forward.

  • @wilvenlim7469
    @wilvenlim7469 10 днів тому

    Can I do this with just an Arduino uno 328pb???

    • @WiFiSheep
      @WiFiSheep  10 днів тому

      Yes the Nano and Uno share the same chip so the process should be identical.

  • @josephvo223
    @josephvo223 10 місяців тому

    thankyou sir

  • @vinterium
    @vinterium Рік тому

    I tried to find the library and it is gone.😢

    • @WiFiSheep
      @WiFiSheep  Рік тому

      I have just tested the links and library again on a fresh IDE install on another machine and have had no issue... So im not sure what the issue is here?

  • @mechanichell
    @mechanichell Рік тому +1

    I've done everything I can think of with an Arduino Uno with 328PB but no luck any tips?

    • @WiFiSheep
      @WiFiSheep  Рік тому

      If its an Uno are you sure its a 238PB? and not a 238PU?

    • @mechanichell
      @mechanichell Рік тому

      @@WiFiSheep Yeah I looked at it from close up it's a 328PB, looks like the bootloader is successfully installed but I cannot for the life of me upload any code to it.

    • @WiFiSheep
      @WiFiSheep  Рік тому +1

      Make sure your on the correct COMs port for the device, that the 328PB library is installed and running as shown in the video...
      Make sure you have the CH340 drivers installed if your on PC or MAC
      sparks.gogo.co.nz/ch340.html
      If still issues You might want to try refreshing the boot loader.
      Just to be sure... you're not trying to use external HEX uploads like Xloader? As these dont work with 328PBs

    • @mechanichell
      @mechanichell Рік тому

      @@WiFiSheep checked the port, have the library installed, have the drivers intaller, have a fresh bootloader installed, no external uploads either.

    • @WiFiSheep
      @WiFiSheep  Рік тому

      Thats an interesting one! I assume you can use other Arduino ok and the IDE is working? Might be permissions issues, if the IDE is getting blocked... failing that chip or board issue ... might be work hopping on the Arduino Forums