Raspberry Pi 3

The latest and greatest from the awesome Raspberry Pi team! An iterative upgrade but very welcome addition of on-board WiFi and a faster processor.

The latest emonSD for emonPi / emonBase seemed to work out of the box with the RasPi3, however it became apparent that something rather important was missing...serial communication with the emonPi's ATmega328!

The emonPi communicates with the RasPi via GPIO 14/15 which on the Model B,B+ and Pi2 is mapped to UART0. However on the Pi3 these pins are mapped to UART1 since UART0 is now used for the Bluetooth module. However UART1 is software UART and baud rate is dependent to clock speed which can change with the CPU load, under voltage and temperature; therefore not stable enough. One hack is to force the CPU to a lower speed ( add core_freq=250 to /boot/cmdline.txt)which cripples the Pi3 performance.

A better solution for the emonPi is to disable BT and map UART1 back to UART0 (ttyAMA0) so we can talk to the emonPi in the same way as before.

First update:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo rpi-update
To disable onboard Pi3 Bluetooth and restore UART0/ttyAMA0 over GPIOs 14 & 15 modify:
sudo nano /boot/config.txt
Add to the end of the file

We also need to run 

sudo systemctl disable hciuart

to stop the BT modem from trying to use the UART. See RasPi device tree commit for pi3-disable-bt and raspi forum thread discussion.

Reboot and test serial coms with:

sudo minicom -D /dev/ttyAMA0 -b38400

Forum post discussion
There is an issue using the RasPi3 in the emonPi enclosure, for obvious reasons (laws of physics) the on-board Wifi does not like being enclosed in a metal box! We are working on getting some acrylic end-plates cut for testing. If this goes well, we will look at offering the RasPi3 with the emonPi + acrylic end plates on the enclosure to enable the WiFi to operate correctly.

Update: here's a photo of emonPi with prototype acrylic fascias. On-board WiFi works great :-)

emonPi with prototype acrylic fascias

Update: Follow this thread to retain bluetooth functionality >

To engage in discussion regarding this post, please post on our Community Forum.