LowPowerLab Forum

Software support => Pi Gateway => Topic started by: amadeuspzs on March 27, 2021, 03:22:36 PM

Title: Pi Hat PCB feedback?
Post by: amadeuspzs on March 27, 2021, 03:22:36 PM
Hi there,

I couldn't find a simple Raspberry Pi Hat for the RFM69HW with just an SMA connector.

I've come up with the following if anyone had any feedback, particularly around the transmission line which I've surrounded with GND and kept as short as possible.

(https://user-images.githubusercontent.com/534681/112732366-768c2e80-8f31-11eb-9239-4a6da642ffa1.png)

(https://user-images.githubusercontent.com/534681/112732349-53617f00-8f31-11eb-9d9d-04174b97d7cc.png)

(https://user-images.githubusercontent.com/534681/112732368-7724c500-8f31-11eb-8529-4849279a232c.png)

Ignore the pin header render - the header will be female and go underneath the board to connect to the rpi pins 17-26. I'll add silkscreen info as well.
Title: Re: Pi Hat PCB feedback?
Post by: Jason on May 07, 2021, 07:31:18 PM
That looks really cool!

Did you end up making it and trying it out?

What is your reasoning for doing it this way without having a micro controller between the radio and the pi?
Title: Re: Pi Hat PCB feedback?
Post by: amadeuspzs on May 08, 2021, 08:37:35 AM
I did indeed make it and found two errors:

1. I messed up the footprint of the GPIO header; KiCad's default is left to right but on the Pi it's top to bottom
2. I guessed a trace width, instead of calculating an impedance matched trace.

I've since fixed 1 and 2 (with a coplanar waveguide with ground calculated using KiCad's tool) and am just waiting for the PCBs to (very very slowly) arrive from JLCPCB.

When it's up and running I'll share here.

The motivation for this is that I don't need the full functionality of the Pi Gateway/PiHat etc - I just need access to read/write packets from the RFM chip using the python wrapper https://pypi.org/project/rpi-rfm69/ so I can send on the data via MQTT to Home Assistant (https://github.com/amadeuspzs/rfm69-pi-avr/blob/master/hub-pi/hub.py).

A
Title: Re: Pi Hat PCB feedback?
Post by: Felix on May 08, 2021, 10:32:53 AM
Thanks for the update.
One thought I have is whether this type of approach with radio driven by a software driver can even work reliably.
Latency is of utmost importance especially when ACKs are involved, and a low power node cannot sit in RX mode a "long" time to wait until a OS decides to give attention to a received package at the gateway, and then wait until it has the next turn to the GPIO to send a reply.
I have not even tried actually, hence my blurb. I have always used a Moteino which handles all the RF part, or lately the RFGateway board (https://lowpowerlab.com/shop/product/196). Then the Pi has no knowledge of the RF part, and can nicely meet the separation of concerns pattern.
Title: Re: Pi Hat PCB feedback?
Post by: amadeuspzs on May 14, 2021, 10:07:29 AM
Hi Felix,

Thanks for your response. The rfgateway looks awesome! I couldn't see a guide but high level how does it work? The micro records any packets received asap into flash memory and provides them in buffered format to the Pi?

RFM69 <> Micro w/ Flash <> Pi

Would you flash your own sketches for RFM69 <> Micro, and what would you recommend for Micro <> Pi? UART? How would you expect most people to consume that - python or straight into https://github.com/LowPowerLab/RaspberryPi-Gateway ?

This is no doubt a terrible idea as you point out, but for a network of only a couple of nodes I'm hoping I'll be able to get away with it. There is no flashing required as I'm just reading directly from the RFM69 module (your caveats applied...). Maybe once I've got the network working (ref: https://lowpowerlab.com/forum/rf-range-antennas-rfm69-library/any-tips-for-mounting-an-antenna-on-a-house-roof/) I'll move to something more robust.

(https://user-images.githubusercontent.com/534681/118279262-da0ef300-b4c2-11eb-9b71-f7a8fa0c45da.jpg)