• Link to X
  • Link to Youtube
Rocket Scream
  • Blog
  • Shop
    • Arduino and Compatibles
      • Mini Ultra Series
      • osPID
    • Component
      • Connector
      • Interconnect & Cables
      • Wires
      • Sensors
        • Temperature
    • Wireless
      • Antenna
      • Module
  • Forums
  • Docs
  • Contact
  • About
  • My Account
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu
  • Shopping Cart Shopping Cart
    0Shopping Cart

Led flickering

You are here: Home1 / Forums2 / Products3 / Mini Ultra Series4 / Mini Ultra (SAMD21 32-bit)5 / Led flickering6

Tagged: Mini Ultra LED LMIC

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • September 11, 2019 at 1:07 PM #13410
    Amir Nathoo
    Participant

    Hi All,
    I received 2 Mini Ultra SAMD21 v3 boards and they are behaving very differently while running the same exact sketch.
    First I had an issue with the Serial which I found out needs to be redifined as SerialUSB. So that’s solved.
    The issue I am now seeing is that when I move one of the board around, the LED on Pin 13 will turn on/off or stay on and flicker continuously. The board is connected via USB to my Mac Book Pro Arduino IDE.

    This is happening on one of the board only and my code does not use the LED at all.
    Any ideas what could be causing this?

    September 11, 2019 at 2:46 PM #13412
    LIM PHANG MOH
    Keymaster

    Amir,
    It looks very likely your code is not uploaded onto the board? The behaviour suggested this possible cause. Can you load a simple Blink code? All IO pins are tested during production including the LED, so I doubt that is the issue.

    Also, make sure your DEVEUI is correctly loaded on the TTN dashboard.

    September 11, 2019 at 3:01 PM #13414
    Amir Nathoo
    Participant

    I loaded the blink code and it’s fine. It blinks on/off

    23:52:12.969 -> LED OFF....
    23:52:12.969 -> LED ON....
    23:52:12.969 -> LED OFF....
    23:52:12.969 -> LED ON....

    However I do get the following error very frequently and I have to push the reset button. It takes sometimes 2~3 attempts to load the code.

    Sketch uses 11676 bytes (4%) of program storage space. Maximum is 262144 bytes.
    Forcing reset using 1200bps open/close on port /dev/cu.usbmodem14201

    Regarding the loraWan join, I am using an already defined DEVEUI which is already added to the Network Server (I am using loraserver.io). I know the code works, because the second Ultra Pro loaded with the same code is working perfectly.

    Here is a partial log

    
    23:57:56.957 -> HUB-001 STARTING...
    23:57:56.957 -> LMIC: Initializing...
    23:57:56.991 -> LMIC: Reseting...
    23:57:56.991 -> LMIC: Starting OTAA...
    23:57:56.991 -> [do_send] Get sensor data...
    23:57:56.991 -> ============================
    23:57:56.991 -> T = -15 *C
    23:57:56.991 -> H = 45 %
    23:57:56.991 -> P = 1012 hPa
    23:57:56.991 -> M = 75 %
    23:57:56.991 -> G = -17 *C
    23:57:56.991 -> L = 55245 lux
    23:57:56.991 -> ============================
    23:57:56.991 -> [do_send] Packet queued
    23:57:56.991 -> EV_JOINING
    23:57:56.991 -> EV_TXSTART
    

    Don’t pay attention to the data, they are bogus for now 🙂
    And what seems to be happening is the Join request isn’t being received by the gateway at all.

    • This reply was modified 6 years, 8 months ago by Amir Nathoo.
    September 11, 2019 at 3:52 PM #13417
    LIM PHANG MOH
    Keymaster

    However I do get the following error very frequently and I have to push the reset button. It takes sometimes 2~3 attempts to load the code.

    For more consistent uploading, double press the reset button in quick succession after pressing the upload button. The upload process is a bit inconsistent due to the timing and it happens with the SAMD21 bootloader unfortunately.

    Is the DIO1 jumper at the back of the board shorted? We need that to be shorted so the LMIC can check the pin when it is waiting for a response. The radio was also tested (but without the DIO1 pin shorted) and verified working during production.
    There are a host of other possible reason like boards are too near the gateway or antenna frequency mismatch.

    Are you able to enable further debugging on the LMIC section (must be enable from LMIC header file)? We might be able to see what is wrong there.

    September 11, 2019 at 4:26 PM #13419
    Amir Nathoo
    Participant

    Is the DIO1 jumper at the back of the board shorted?

    I haven’t shortened the jumper. The odd thing is again the second board working as expected and it’s not altered either.
    I tested the boards with the same antenna and with only 1 device connected at a time. The gateway is about 12 meters away and separated by a ceiling.
    As far as I can tell the join request isn’t being received by the gateway and the board is basically stuck waiting for a response. I’ll enable LMIC debug tomorrow (it’s late here) and report my findings.

    September 11, 2019 at 4:47 PM #13421
    LIM PHANG MOH
    Keymaster

    Take a look at the tutorial here. Although it is for TTN, the hardware setup is valid for any LoRaWAN server.

    September 12, 2019 at 12:41 AM #13427
    Amir Nathoo
    Participant

    The code I am using is proven to work as expected and I already adapted it based on the tutorial. It’s working perfectly on one of the board.

    But I added DEBUG to LMIC (also had to redefine Serial to SerialUSB in the config and it is throwing an Assert because the Radio went to sleep after sending the join request.

    09:33:42.503 -> EV_JOINING
    09:33:42.503 -> EV_TXSTART
    09:33:42.538 -> FAILURE 
    09:33:42.538 -> /Users/anathoo/Documents/Arduino/libraries/MCCI_LoRaWAN_LMIC_library/src/lmic/radio.c:746
    
    static void startrx (u1_t rxmode) {
        ASSERT( (readReg(RegOpMode) & OPMODE_MASK) == OPMODE_SLEEP );
        if(getSf(LMIC.rps) == FSK) { // FSK modem
            rxfsk(rxmode);
        } else { // LoRa modem
            rxlora(rxmode);
        }
        // the radio will go back to STANDBY mode as soon as the RX is finished
        // or timed out, and the corresponding IRQ will inform us about completion.
    }

    It’s failing here: ASSERT( (readReg(RegOpMode) & OPMODE_MASK) == OPMODE_SLEEP );
    This seems to confirm what you were saying about shorting the DIO1 jumper, correct?
    But why this would only affect this one particular board and not the other?

    • This reply was modified 6 years, 8 months ago by Amir Nathoo.
    September 12, 2019 at 12:51 AM #13430
    Amir Nathoo
    Participant

    As a quick (and dirty) experiment, I commented out the ASSERT and the device eventually joined

    
    09:44:58.149 -> [do_send] Packet queued
    09:44:58.149 -> EV_JOINING
    09:44:58.149 -> EV_TXSTART
    09:44:58.892 -> EV_TXSTART
    09:45:06.551 -> EV_TXSTART
    09:45:08.216 -> EV_TXSTART
    09:45:18.271 -> EV_TXSTART
    09:45:25.227 -> EV_TXSTART
    09:45:30.248 -> EV_JOINED
    09:45:30.248 -> netid: 0
    09:45:30.248 -> devaddr: 83FB40
    09:45:30.248 -> appSessionKey: 651336BA162C8C845A17F578FACAF0
    09:45:30.248 -> netSessiomKey: 54A84A2189EC1AFAA18E187547745994
    09:45:30.248 -> sequence up: 0
    09:45:30.248 -> sequence dn: 0
    09:45:30.248 -> 
    09:45:30.248 -> EV_TXSTART
    09:45:31.290 -> EV_TXCOMPLETE Done Sending data (includes waiting for RX windows)
    

    Note that the joine took a long time, so timing seems to affect the reliability of success when the DIO1 Jumper is opened.

    Now here is a very basic question (I am not a hardware engineer). How do I short that DIO1? Do I just solder the pins together. Or maybe try to solder a jumper, so it’s configurable?

    September 12, 2019 at 1:04 AM #13432
    LIM PHANG MOH
    Keymaster

    This seems to confirm what you were saying about shorting the DIO1 jumper, correct?
    But why this would only affect this one particular board and not the other?

    The LMIC has always been using the DIO1 to check the state of the transceiver. As the pin is not shorted to DIO1, it could be floating.

    Now here is a very basic question (I am not a hardware engineer). How do I short that DIO1? Do I just solder the pins together. Or maybe try to solder a jumper, so it’s configurable?

    Please take a look at this image for shorting the connection. A blob of solder will short it easily.

    September 12, 2019 at 1:13 AM #13434
    Amir Nathoo
    Participant

    Yes. That did it! After shorting the connections for both RST and DIO1 the board is now consistently joining successfully.
    Well, really appreciate the help (and the patience) with this. I can safely say the boards have been validated to work as expected, except for that LED light staying on on one of them. But it doesn’t seem to affect any operations.

    I am now eager to update my LMIC sketch to use the low power mode. I’ll take a closer look at the tutorial for that.
    Thanks again for that bit of hand holding 🙂

    September 12, 2019 at 1:26 AM #13436
    LIM PHANG MOH
    Keymaster

    No problem Amir, glad to help.

    You should drive the LED to a known state else it would be floating. For low power, turn it off (active low).

    September 13, 2019 at 5:34 AM #13447
    Amir Nathoo
    Participant

    That’s exactly what I am doing. It’s on when the radio is on to transmit and then off when in standby. That way I can also tell when data is being sent. I haven’t taken any measurement, but the sleep/wake cycle seems to be working as expected.

    I am not using the LowPower library, though. Just using the RTC library like in the tutorial. I am not sure the standby API from the library is working the same way for the SAMD21.

    September 13, 2019 at 10:40 PM #13456
    LIM PHANG MOH
    Keymaster

    I am not using the LowPower library, though. Just using the RTC library like in the tutorial. I am not sure the standby API from the library is working the same way for the SAMD21.

    RTC library is enough. The LowPower library support was written by me prior before they implemented the sleep functionality to the RTC library.

  • Author
    Posts
Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.
Log In
Log In
Register Lost Password

Follow us on Twitter

Tweets by rocketscream

Information

  • About
  • Contact
  • Covid-19 Shipment Update
  • Ordering Info
  • Returns
  • Shipping Info
© Copyright - Rocket Scream Electronics
  • Link to X
  • Link to Youtube
Scroll to top Scroll to top Scroll to top

This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.

OK

Cookie and Privacy Settings



How we use cookies

We may request cookies to be set on your device. We use cookies to let us know when you visit our websites, how you interact with us, to enrich your user experience, and to customize your relationship with our website.

Click on the different category headings to find out more. You can also change some of your preferences. Note that blocking some types of cookies may impact your experience on our websites and the services we are able to offer.

Essential Website Cookies

These cookies are strictly necessary to provide you with services available through our website and to use some of its features.

Because these cookies are strictly necessary to deliver the website, refusing them will have impact how our site functions. You always can block or delete cookies by changing your browser settings and force blocking all cookies on this website. But this will always prompt you to accept/refuse cookies when revisiting our site.

We fully respect if you want to refuse cookies but to avoid asking you again and again kindly allow us to store a cookie for that. You are free to opt out any time or opt in for other cookies to get a better experience. If you refuse cookies we will remove all set cookies in our domain.

We provide you with a list of stored cookies on your computer in our domain so you can check what we stored. Due to security reasons we are not able to show or modify cookies from other domains. You can check these in your browser security settings.

Google Analytics Cookies

These cookies collect information that is used either in aggregate form to help us understand how our website is being used or how effective our marketing campaigns are, or to help us customize our website and application for you in order to enhance your experience.

If you do not want that we track your visit to our site you can disable tracking in your browser here:

Other external services

We also use different external services like Google Webfonts, Google Maps, and external Video providers. Since these providers may collect personal data like your IP address we allow you to block them here. Please be aware that this might heavily reduce the functionality and appearance of our site. Changes will take effect once you reload the page.

Google Webfont Settings:

Google Map Settings:

Google reCaptcha Settings:

Vimeo and Youtube video embeds:

Other cookies

The following cookies are also needed - You can choose if you want to allow them:

Privacy Policy

You can read about our cookies and privacy settings in detail on our Privacy Policy Page.

Privacy Policy
Accept settingsHide notification only