Forum Replies Created

Viewing 15 posts - 151 through 165 (of 196 total)
  • Author
    Posts
  • in reply to: ADC input status during low power mode? #7626
    LIM PHANG MOH
    Keymaster

    Hi,
    I think you might have already found your answer in the forum.
    But, as I have been using the same resistor divider and a capacitor to measure the battery voltage using the internal 1.1V reference all this while but it is always on pin ADC6 or ADC7. So, if you look at section 23.9.5 of the datasheet (register DIDR0), that might be answer. I have yet to dig the Arduino core on whether they does this when using the pin as an analog pin. Chances is they don’t as this is granular detail in power optimization but I could be wrong.

    LIM PHANG MOH
    Keymaster

    I don’t think it’s hard to use the same code base for the Seeduino LoRaWAN. It’s basically replacing the LMIC portion (SPI based) with the RHF76-052AM portion (UART based). I have never use that RHF76-052AM module, so I’m not sure.

    in reply to: Best radio library #7536
    LIM PHANG MOH
    Keymaster

    Hi Francisco,
    It’s best to use the RadioHead library. The board was heavily tested with this library and if you look at the examples bundled with the RadioHead library, you’ll notice there are guides within the examples for the Mini Ultra Pro. This is for both RFM95W and RFM69HCW radios.

    Arduino LMIC is only for RFM95W to run LoRaWAN stack on the board.

    LIM PHANG MOH
    Keymaster

    Hi,
    Take a look at our guide here. You don’t have to use our low power library for that as the RTCZero library has a function call to put it into standby mode (lowest deep sleep mode).
    Or you can take a look at our TTN guide.

    in reply to: low power library that actually compiles for the Mega2560 #7464
    LIM PHANG MOH
    Keymaster

    It looks that problem stems from the AVR runtime library power.h that has been wrongly patched and accidentally removed the power_usart3_disable() and power_usart3_enable() functions. Will look into this in January as I’m super busy at the moment unfortunately. But, you can add the necessary macro retrieved from earlier version of the AVR runtime library.

    Would be great if you had a mini-Mega2560

    ATMega2560 is a super expensive chip for an 8-bit MCU.

    Also:
    ‘shop’
    ‘Arduino Official’
    http://www.rocketscream.com/blog/product-category/boards-kits/arduino-and-compatibles/arduino-official/
    goes nowhere.

    No longer selling official Arduino boards. Will remove them, thank you very much for pointing this out.

    in reply to: Serial.flush() and FONA #6957
    LIM PHANG MOH
    Keymaster

    Are you sure they are empty? flush() could be implemented in Stream class. I could be wrong because I rarely use 32U4.
    Try putting some characters into print() and call flush() before sleep. See whether all characters are sent before sleep.

    Else it is best to simply put a delay by comparing it to millis(). Just estimate the time by calculating how many bytes you are sending.

    in reply to: Adafruit feather 32u4 FONA wakeup, no Serial.print #6945
    LIM PHANG MOH
    Keymaster

    The 32U4 USB needs to be detach before entering a power down mode and attach back once awake.
    So, it supposed to look like this:

    USBDevice.detach();
    // Add your wake up source here, example attachInterrupt()
    LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
    USBDevice.attach(); 
    delay(1000); // In order for PC to have enough time to show the connected COM port

    But, unfortunately, if you look at the core code and search for USBDevice.detach(), you’ll see that it’s an empty function (not implemented). So, you need to add the detaching the USB portion before sleep:

    // Disable USB clock 
    USBCON |= _BV(FRZCLK);
    // Disable USB PLL
    PLLCSR &= ~_BV(PLLE); 
    // Disable USB
    USBCON &= ~_BV(USBE); 
    // Add your wake up source here, example attachInterrupt()
    LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
    USBDevice.attach(); 
    // In order for PC to have enough time to show the connected COM port
    delay(1000); // In order for PC to have enough time to show the connected COM port

    Also add some delay in the setup code portion so you have enough time for code uploading.

    • This reply was modified 6 years, 7 months ago by LIM PHANG MOH.
    in reply to: MFRC522 RFID Compatibility? #6901
    LIM PHANG MOH
    Keymaster

    Hi Juanma,
    Unfortunately I have never tried any NFC reader to date.

    in reply to: SCA and SDL pins #6899
    LIM PHANG MOH
    Keymaster

    They are on A4 (SDA) and A5 (SCL).

    in reply to: Mini Ultra Resetting #6897
    LIM PHANG MOH
    Keymaster

    Hi Jeremy,

    Depending on which XBee module you use, the XBee could consuming more than the 250 mA of current during transmission? If yes, you would need an external regulator as the on-board MCP1700 is good up to 250 mA. You can also try to add some bulk capacitor on the 3V3 before trying the external regulator approach. Based on my past experience on using XBee (older models though circa 2009-2012), the TX current can be very high.

    in reply to: Keep Time and Save Power #6850
    LIM PHANG MOH
    Keymaster

    No it would not work if put to sleep. That’s how the Time library work without a physical alarm as it depends on the millis() to count time. The synchronization only happens in setup() to let the Time library knows the real calendar time. From there on wards, it depends on millis() to compute the alarm time in the future. millis() doesn’t run in sleep as it depends on timer 0.

    in reply to: Keep Time and Save Power #6841
    LIM PHANG MOH
    Keymaster

    You would need to call the sync function again once awake from the 8 s power down period. Best method is using an external RTC with interrupt like DS3231. That way you can put the MCU to sleep forever and once the alarm fires, the interrupt pin will wake the MCU. But, again the millis() is stop during these sleep period. I don’t quite get why you need to maintain the millis().

    in reply to: Keep Time and Save Power #6833
    LIM PHANG MOH
    Keymaster

    The time library depends on either the millis() OR an external hardware RTC. In power down sleep mode, the Timer 0 that millis() uses is stopped. Best way is to use an external hardware RTC and tie an external interrupt capable pin such as pin D2 or D3 to wake the processor up from power down sleep.

    • This reply was modified 6 years, 7 months ago by LIM PHANG MOH.
    in reply to: Rocket Scream Mini Ultra Pro V2 – Sleep Mode #6761
    LIM PHANG MOH
    Keymaster

    Hi Thomas,
    It looks like you are powering the board from VIN (judging from your comment on PG LED turning ON), hence the mA range. If you want to achieve 20 uA, please power it through the Li-Ion/Pol connector as shown in this guide.

    You can think VIN as your secondary power (external DC, solar power) that is not always around. PG turns on when a valid and good VIN is applied on VIN or the USB port is connected.

    in reply to: Connection to TTN With OTAA #6711
    LIM PHANG MOH
    Keymaster

    Hi Matthias,

    A quick question – do I actually need to read out the Device ID of the Mini Ultra Pro and inserting it into the TTN dashboard?
    I mean, couldn’t I make up my own Device ID (or let TTN generate one) and insert that Device ID into the LCIM code that I upload to the Ultra Pro Mini? Or is the actual hardware Device ID necessary (if so, why)?

    You can used a random number during development, but in real LoRaWAN deployment, it is necessary to have a unique 64-bit ID. So, every single device is unique in the network. For example, every single RN2483/RN2903 module has an unique 64-bit ID too (same ID chip used on the Mini Ultra Pro V2). When doing an OTAA, basically you join the network through a process of exchanging some unique keys with the backend to enable the network to differentiate each devices globally (before assigning the dynamic DevAddr). You might want to read the importance of it here.

Viewing 15 posts - 151 through 165 (of 196 total)