TheThingsIndustries / generic-node-se

Generic Node Sensor Edition
https://www.genericnode.com
Other
110 stars 31 forks source link

V0.1 HW acceptance testing #28

Closed elsalahy closed 4 years ago

elsalahy commented 4 years ago

Summary:

With the arrival of the node V0.1 PCB, we need to test the first prototype to ensure it is an acceptable prototype that can be used in the development of the device firmware.

The PCB is expected to arrive by 3rd of July and will be soldered and prepared internally for testing and development.

Why do we need this?

To ensure we have a valid HW platform that allows for application development according to the requirements in #7 & #9

What is already there? What do you see now?

What is missing? What do you want to see?

How do you propose to implement this?

Environment:

Baremetal.

Acceptance Criteria:

The acceptance test scenario can be very simple, but must meet the following criteria:

What can you do yourself and what do you need help with?

Will be done by me and @azerimaker.

Below is a breakdown of the various system components.

elsalahy commented 4 years ago

System components that require initial acceptance testing and verification.

Add issue, PR or test code URL in x

SOC (MCU) STM32WLxx_QFN48

SOC (SX1262) STM32WLxx_QFN48

Sensors & External

Secure element

External Flash

Input/Output

Battery

elsalahy commented 4 years ago

@azerimaker Feel free to add below as a sperate comment the components that I might have missed in the same fashion.

Remember this is acceptance testing!

elsalahy commented 4 years ago

Progress update:

elsalahy commented 4 years ago

All can be viewed in this branch up to this commit https://github.com/TheThingsIndustries/st-node/commit/2b0dc248c87f6cd59ee9ff1807d7ed4da6e5d3b2

elsalahy commented 4 years ago

Also created this branch with a basic LED test to be used for observing a normal (non-RTC) running clock and will be used as base for simpler tests

elsalahy commented 4 years ago

ATECC608A-TNGLORA Secure Element test on board #2 is responsive πŸŽ‰ and we can successfully read the serial number image Can be observed in this branch

azerimaker commented 4 years ago

Did a load and a current consumption tests to the BUCK_BOOST converter. Some takeaways:

Buck-Boost-Load-Test-3-SMPS-in

azerimaker commented 4 years ago
  • System reset using the debugger (openOCD or via normal flashing) is misbehaving, either pushing the reset button or removing the battery fixes the issue and boots the new application.

yes, this is a weird issue. I've tried various solutions but none seem to solve this. I'm suspecting that the SoC has a HW bug. Will contact ST on this.

elsalahy commented 4 years ago

Successfully managed to communicate with the SHTC3 temperature and humidity sensor πŸŽ‰ and retrieve readings using the pre-preprepared driver. image

Can be observed in this branch. Update: This was tested on board #2

KrishnaIyer commented 4 years ago

Wow nice. Also SO MUCH PURPLE!

elsalahy commented 4 years ago

LoRaWAN application (LoRa + RTC+ ST LMN stack port) is functional on board #1 and the node joins successfully πŸŽ‰ This validates numerous internal components such as the TCXO, Antenna and the power supply design. image image Can be observed in this branch

elsalahy commented 4 years ago

The Flash seems to be responding to SFDP commands and the Macronix ID (0xc2) is reported correctly image Can be observed in this branch Update: This was tested on board #1

elsalahy commented 4 years ago

The Accelerometer LIS2DH12 is responding on board #1 and x,y,z readings are retrieved successfully. But further investigation is needed as the I2C bus read looks unstable and sometimes when the devices is reset, the Accelerometer doesn't respond even on board #1, and on board 2 the Accelerometer is not responding image

Can be observed in this branch.

azerimaker commented 4 years ago

@elsalahy captured some I2C packets between SHTC3 and the STM32WL. It looks like the bus is functioning normally with the clean edges and I do get some data back from the sensor, but I still can't read the accelerometer. The culprit is either the Accelerometer IC itself or the soldering joints, which I can't really see. I will resolder another IC at home and retest it.
WaveFormsLiveChart

elsalahy commented 4 years ago

@azerimaker Sounds good I'm happy the issue is not with the I2c bus itself, thanks for keeping me updated

elsalahy commented 4 years ago

Progress update:

UART branch.

elsalahy commented 4 years ago

ADC read of the device internal ADC_CHANNEL_VREFINT is 0x6fa which is 1786 as a raw value With calibration equation=Vdd = 3300*(*VREFINT_CAL_ADDR)/ADC_raw = (3300*1510)/1786 = 2790mv ~=2.79 Volt @azerimaker does these numbers look good, do we supply the node with ~ 2.8V? image

The same application failed to read from the buck boost ADC pin PB2 (channel 4) after enabling with PB4 on board #1 Need to try this on other boards to investigate more as it might be a soldering issue of the pins, or ADC read bug in the FW

Can be observed in this branch

elsalahy commented 4 years ago

A small background and update on the RTC issue:

The LoRaWAN example provided by ST, uses the node external 32KH oscillator to provide real-time functionality in the example application and this is used in time stamping the events and sending the sensor data in specific intervals.

The external oscillator becomes unstable in the event of a power reset and then the system initialisation waits on the RTC to stabilise.

Current situation:

Node Number External Oscillator 32KHZ (RTC on LSE ) Debug interface Nreset and reset button
1 ❌ βœ…
3 βœ… ❌
azerimaker commented 4 years ago

Prototype status (continuous update):

Node # PSU SWD VBAT Mon. Load SW.1,2,3 Accel. Temp. Hum. Flash Sec. Elm. Buzzer RTC UART LoRA
1 βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ…
2 βœ… βœ… βœ… βœ… ❌ βœ… ❗ ❗ βœ… β­• βœ… ❌
3 βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ…
4 βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ…
5 βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ… βœ…

legend: βœ… - works well ❌ - doesn't work β­• - erroneous behavior ❗ - untested/unable to test

azerimaker commented 4 years ago

Power supply test

LoRaWAN Tx (Class A) effect on the Battery (yellow) and VDD (blue).

Some key observations:

Fig.1: NewFile1 Fig.2: NewFile6 Fig.3: NewFile5 Fig.4: NewFile7

elsalahy commented 4 years ago

We need to write a small conclusion report and attach it here to close this issue. CC: @azerimaker, can you please write-up the HW observation and the planned HW fixes/modifications. I will write-up the SW observations and bugs/issues that need to be handled.

We should close this issue by tomorrow.

azerimaker commented 4 years ago

Some more low power testing with following setup:

1 min. window average for two periodic wakeups and going into STOP2 mode. Est. battery life 78 days. STOP2-1min-period

Current consumption in STOP2 mode: ~600nA instant, ~2.5 ΞΌA average (periodic pulses by the Buck-Boost converter) STOP2-5sec-window

Est battery life if the device is always in STOP2 mode: :cool: STOP2-5sec-window-cursor

azerimaker commented 4 years ago

All the boards are tested in depth and only one board (2) is partially functional (will debug it later) other are working well.