Close

Getting it to work

A project log for Gecko Node - Wireless Low Power Sensor

Low Power Temperature/Humidity Monitoring

maxkMax.K 12/26/2017 at 15:571 Comment

After the PCB was mostly assembled, the next step was programming the EFM32. The starter kit board can be configured in software to program an external device. There is also a pin header which includes the needed pins (https://www.silabs.com/community/software/simplicity-studio/knowledge-base.entry.html/2014/11/24/using_an_efm32_start-H9Gy). From there I connected cables to the respective pads on the Gecko Node board (I didn't include a proper programming connector to save space). Because the model of the EFM Zero Gecko that I am using is different from the on in the starter kit, the code needs to be compiled again. When I tried to flash the code for the first time, I was greeted with this error message, which means that pretty much anything could be wrong:

Finding the solution to this was tricky and took me several days and the help of a coworker. I tried cleaning up the soldering connections, used voltages (it's important to power the external efm32 actively, the debug connector won't work for this) and even tried different versions of the Simplicity Studio without success. I also took another EFM32 and dead-bug-soldered it to a socket to rule out any bad connections on the board.

The solution: While doing the layout for the board I was not sure whether the analog voltage supply needs to be connected, since I am not necessarily using any of the analog features of the EFM32. I took this project from github as a template: https://github.com/lemcu/EFM32ZG110-quick-start-board. There, the AVCC pins are separated from VCC by a "do-not-mount" resistor, meaning that they could be left floating. 

During the troubleshooting I even bridged this connection to see if that was the cause of the problem, which did not make a difference. What I had overlooked was an error in the layout, where a node was missing from one of the AVDD pins. 

Because of this, only one of the pins was set to VCC during testing. After finding it, the error was easy to fix with a piece of wire and I was finally able to program the EFM32. 

Because the code was already running on the starter kit board, most features were already implemented. Sending messages with the rf24 was working almost immediately. The only component I had not tested was the HDC1080, which is connected via i2c. The communication is very simple: Sending the i2c address and a write command requests a measurement. After waiting a few milliseconds, the data can be received with a read command. I had some problems getting the HDC1080 to respond to its address at first, because I didn't bit-shift the address at first.


For the base station I am still using an ESP8266 with a rf24 module. I slightly modified the code from the LP Mini (https://hackaday.io/project/16724-lp-mini-low-power-dev-board/log/51421-a-more-complex-example-cat-logging). The ESP now receives a struct of data containing, the temperature, humidity, a char as an ID (to identify the Gecko Node if multiples are used) and a "battery-bit". The battery bit is a neat little feature of the HDC1080, which tells you when the supply voltage drops below 2.8V. 

Discussions

Jan wrote 05/01/2018 at 11:19 point

Very nice project! Had the same issue with the AVCC on my Atmega328. Left it open/forgot to pull it to VCC and had a nice time hunting down that damn error...
Anyway: for my next version of my bee logging device I`ll def. look into thise Gecko MCUs. They look very promising!

Cheers, Jan

  Are you sure? yes | no