Support for new Arduino Hardware platform: WavGat UNO R3 compatible board



  • Hi,

    Did use for several projects already clone Arduino's from AliExpress without any problems regarding the compatibility with the Arduino main stream.
    For the last order, I didn't look very closely to the brand of the clone, finding me know with some problems.
    I ordered some WavGat Arduino uno boards (https://www.aliexpress.com/item/high-quality-One-set-UNO-R3-CH340G-MEGA328P-for-Arduino-UNO-R3-USB-CABLE-ATMEGA328P-AU/32810623079.html)
    If I can believe the information given, they are using an ATMEGA328P clone as processor.

    After some tweaking of the specific WavGat Arduino drivers (they are not really maintained by the manufacturer to follow the new Arduino 1.8.x branch 😞 ), I could compile the sketches without errors.

    The blinking led sketchs worked without any problem. The next step was an example of MySensors, drivers, AltSoftSerial, the serial monitor is outputting data (example uses 9600 baud). So far, so good.

    The next example was a distance sensor (example from the site): result was garbage in the serial monitor.
    I activated MY_DEBUG, same result, garbage in the serial monitor.
    Tested at several bauds : 300, 2400, 9600, … : all same result, garbage.
    The same script works like a charm on a real Arduino board, so it is not a programming error in the sketch.

    So for testing, I created a minimum script with only a serial print "hello world". Works! No garbage in the serial monitor.
    Started to add the first lines specific for MySensors

    #define MY_DEBUG
    #define MY_RADIO_RFM69
    #define MY_BAUD_RATE (9600ul)

    #include <SPI.h>
    #include <MySensors.h>

    void setup() {
    // put your setup code here, to run once:
    Serial.begin(9600);
    }

    void loop() {
    // put your main code here, to run repeatedly:
    Serial.print("hello world");
    Serial.println();
    }

    When adding the #include <MySensors.h>, the serial monitor begins with outputting garbage.

    So it is clearly that somewhere in the MySensors library something happens to produce this.
    Very probably it is due to the no 100% compatibility of the WavGat Arduino.

    The problem: where to begin the debug?
    I searched the site, but till now, didn't find any information to guide me in the correct direction.


  • Mod

    @evb I ran into the same trap and ordered some nano's with fake avrs a while ago. These require separate board files etc. Too much hassle IMHO.
    Better count your losses and order a board with a real atmega



  • @evb
    Yes as Yveaux suspects, it might be fake/counterfeit Atmega328 CPU that is on your Uno R3 device

    Sparkfun have a good story to read about this topic, and those ATmega328 was actually something else. so basically you can have no trust in a China-supplier, but you can also be lucky and actually find a good supplier and real good ATmega328
    https://www.sparkfun.com/news/364



  • I don't think they are fake otherwise they won't do anything.
    They work with normal sketches, even used several MySensors sketch examples, running without any problem, provided that I don't include the <MySensors.h> line.

    Because the board does need his own files to work in the Arduino IDE, the used Atmega clone is too different from the normal line of Atmega's (clones).
    Searching on Google revealed that probably this board is using a LogicGreen LGT8Fx8 chip instead of an ATMega328P.
    (https://forum.arduino.cc/index.php?topic=560692.0)
    When I go into the folders of the specific driver files for the IDE, I see folders with names like lgt8f88a, etc...

    Meanwhile, I tested the setup with another Chinese brand of an Arduino clone. These clones don't need specific drivers files, you can just use the Aduino Genuino board. Everything is working.

    It is just challenging if I could make it work with these WavGat brand of so-named Arduino uno's.


  • Mod

    @evb said in Support for new Arduino Hardware platform: WavGat UNO R3 compatible board:

    It is just challenging if I could make it work with these WavGat brand of so-named Arduino uno's.

    Yes, you probably can. However, is it worth the effort ?...



  • This post is deleted!


  • Hi there! This thread is very old by now -- I am posting for the benefit of others who find the thread the same way I did.

    If you multiply the baud rate by 0.75 as you initialize SoftwareSerial, it works fine!

    For example, if you want 9600 baud,:

    //9600 baud on wavgat R3
    SoftwareSerial.begin(9600 * 0.75);
    

    I believe something is off with the CPU frequency of the WAVGAT UNO R3 clone boards. It seems to be 1.33x faster than the F_CPU value defined in the header files.

    I discovered this by manually testing different interim baud rates until I found the absolute end limits where my 9600 baud data was getting only slightly garbled, found 6790 / 7610 to be the pain points, thus 7200 is right in between, which is equal to 9600 * 0.75.

    Hope this helps someone. 🙂



  • ...and a few minutes after posting, I discovered this:

    https://github.com/dbuezas/lgt8fx

    Arduino Hardware Support Package for LGT8F's

    Adding this URL to your board manager, you get a properly working platform where the SoftwareSerial baud rates are as they should, and you even get to choose the clock frequency, from 1 MHz_all the way up to 32 MHz, twice as fast as a genuine ATMEGA328P. I'm starting to like these boards now!



  • @konbaasiang nice, good to know.
    I am having problems with SPI interface.
    For example i have a 2.4" TFT+XPT2046 touch controller+SD card reader( all on SPI), after many tests i found out that sometimes, reading from XPT2046 SPI, wavgat add 0x1000h which is impossible since the xpt2046 controller has a 12 bits adc. TFT and card reader are Ok instead.
    With genuine arduino all work as expected.
    Still testing wavgat+NFR24L01, sometimes works sometimes doesn't.
    Regards



  • @konbaasiang
    Thanks for the update.
    I've still the wavgat uno R3 boards somewhere, so I will try it 🙂


Log in to reply
 

Suggested Topics

  • 1
  • 2
  • 2
  • 6
  • 10
  • 1

2
Online

11.4k
Users

11.1k
Topics

112.6k
Posts