Battery Backup for your Pi Zero (W)

Battery Backup for your Pi Zero (W) is a very important feature to prolong the life of the SD Card. Many commercially available solutions exist, in the form of Hats, but, unfortunately, it seems that anything that was specifically designed for the Raspberry Pi, can be quite expensive.

The 40 pin header on our Raspberry Pi Zero / Zero W gives us a lot of potentials to expand the functionality of this tiny single-board computer, but it, unfortunately, suffers from two major flaws, from my point of view of course.

  • The pins are scattered all over the place, and not grouped by function.
    Access to the pins is also very cluttered, to keep the overall footprint of the board small.
  • The GPIO pins are 3v only; adding anything that runs on a different voltage becomes a messy
    assembly of wires and level converters and or resistor dividers… going to a breadboard…
Raspberry Pi Zero / Zero W

My Solution

Solving these issues required a lot of deep thinking, it actually took me a few months, during which I looked at various commercial solutions, imagined things in my mind, as well as tested concepts and various modules.

Let us take a look at some of these before I show you the solution that I am currently working on.

Battery Power

I would like to use a single 18650 LiPo cell to power the Pi Zero. Other Battery Backup solutions make use of this as well. In the ideal world, a pair of these in parallel would be great. The 18650 cell is a 3.3 volt ( nominal 4.2v) LiPo cell. The Pi needs 5v to run. This would require a Boost converter, as well as a dedicated LiPo charging circuit to recharge the cell after use.

Many such charging and Boost converters are available, but they seem to suffer from a problem, they need a dedicated charging cycle, during which using the device is not advised.

I could design my own circuit, but as I do not consider myself a proficient power supply designer, and with the huge amount of professionally designed, low-cost modules available, I decided to use the MH CD-42 module instead.

MH-CD42

This module seems to give me all the features I need, with only one exception: The input voltage MUST be between 5.0v and 5.5v. I hope to address that issue later though.

It can source up to 2A at 5v, and most importantly, has a current bypass function, which allows you to charge the battery, as well as power an external device at the same time.

GPIO Pin Grouping and Level Conversion

The next logical step was to design a base-board that contained the 18650 Cell, and power module, as well as provide access to the GPIO pins.

Pi Zero Base Board

I decided to use a 90 degree 2×20 pin Female header to mount the Pi, allowing for plenty of airflow around it to prevent overheating, as well as clearly labelled header pins for access to the GPIO pins.
( Due to logistics issues, the female header pin has not arrived yet).

The logic level conversion was provided on some of the GPIO ( SPI0, SPI1, I2C and UART ) by using the TXS0108E 8Ch Bidirectional Level Shifter chip from TI. Headers in black are 3v ( with exception of GPIO13) and 5v logic pins are on a white header.

Additional Ground and Power headers for 5v and 3v (red headers) were also added.
Finally, a dedicated shutdown button was connected to GPIO26.

Schematic

Testing the prototype

The prototype is still under testing, as mentioned above, I still have to receive the 40 pin female header.
I did however connect the Pi Zero to the board with jumper wires ( 3v, 5v and ground only ) to test operation. So far, the setup provides 5 hours of battery backup with the Pi on idle, no external devices connected and running only an MQTT server on Raspberry Pi Lite OS ( No Gui )

The first revision of the device is available for order at PCBWay

Manufacturing the PCB

PCBWay

This PCB was manufactured at PCBWAY. The Gerber files and BOM, as well as all the schematics, will soon be available as a shared project on their website. If you would like to have PCBWAY manufacture one of your own, designs, or even this particular PCB, you need to do the following…
1) Click on this link
2) Create an account if you have not already got one of your own.
If you use the link above, you will also instantly receive a $5USD coupon, which you can use on your first or any other order later. (Disclaimer: I will earn a small referral fee from PCBWay. This referral fee will not affect the cost of your order, nor will you pay any part thereof.)
3) Once you have gone to their website, and created an account, or login with your existing account,

4) Click on PCB Instant Quote

5) If you do not have any very special requirements for your PCB, click on Quick-order PCB

6) Click on Add Gerber File, and select your Gerber file(s) from your computer. Most of your PCB details will now be automatically selected, leaving you to only select the solder mask and silk-screen colour, as well as to remove the order number or not. You can of course fine-tune everything exactly as you want as well.

7) You can also select whether you want an SMD stencil, or have the board assembled after manufacturing. Please note that the assembly service, as well as the cost of your components, ARE NOT included in the initial quoted price. ( The quote will update depending on what options you select ).

8) When you are happy with the options that you have selected, you can click on the Save to Cart Button. From here on, you can go to the top of the screen, click on Cart, make any payment(s) or use any coupons that you have in your account.

Then just sit back and wait for your new PCB to be delivered to your door via the shipping company that you have selected during checkout.

Compact Remote Alarm Transceiver – Part 2

In part one of this series, I took a look at some of my experiments using different voltage regulators, to design and build the Remote Alarm Transceiver prototype, and also mentioned that I will be looking at a single chip logic converter solution. In this (hopefully short) post, I will take a detailed look at that logic converter chip, as well as show you how it is used.

The Logic Level Converter Chip

I have chosen the TXS0108E Bi-Directional 8-bit Logic-Level Voltage translator from Texas Instruments for this application.

Some of the features of the device is listed below:

• AEC-Q100 Qualified for Automotive Applications
– Device Temperature Grade 1: –40°C to 125°C
– Device HBM ESD Classification Level 2
– Device CDM ESD Classification Level C6
• No direction-control signal needed
• Maximum data rates
– 110 Mbps (push pull)
– 1.2 Mbps (open drain)
• 1.4 V to 3.6 V on A port and 1.65 V to 5.5 V on B
port (VCCA ≤ VCCB)
• No power-supply sequencing required – either
VCCA or VCCB can be ramped first
• Latch-up performance exceeds 100 mA per
JESD 78, Class II
• ESD protection exceeds JESD 22 (A Port)
– 2000-V human body model (A114-B)
– 1000-V charged-device model (C101)
• IEC 61000-4-2 ESD (B port)
– ±8 kV contact discharge
– ±6 kV Air-gap discharge

Datasheet description:

This device is an 8-bit non-inverting level translator
that uses two separate configurable power-supply
rails. The A port tracks the VCCA pin supply voltage.
The VCCA pin accepts any supply voltage between 1.4
V and 3.6 V. The B port tracks the VCCB pin supply
voltage. The VCCB pin accepts any supply voltage
between 1.65 V and 5.5 V. Two input supply pins
allows for low Voltage bidirectional translation
between any of the 1.5 V, 1.8 V, 2.5 V, 3.3 V, and 5
V voltage nodes.
When the output-enable (OE) input is low, all outputs
are placed in the high-impedance (Hi-Z) state.
To ensure the Hi-Z state during power-up or power-down periods, tie OE to GND through a pull-down
resistor. The minimum value of the resistor is
determined by the current-sourcing capability of the
driver.

Typical Application:

Reference Design / Typical Application for the TXS0108E

My Thoughts:

I really like the tri-state (high impedance) mode of the chip, as it allows for isolation between the different voltage level circuits, for example, If I were to communicate on a 5v SPI bus, to another device, I can for instance put the chip in Tri-state mode, and not worry about stray signals interfering from the 3v side.

On the downside, the chip is very small, which makes it a real challenge to solder by hand. On the speed side, It is also not quite as fast as my usual MOSFET based circuitry. It does however do the job it was designed for quite well.

Updated Circuit

Integrating the chip into the existing Remote Alarm Transceiver circuit is very easy, allowing us to replace almost all of the Mosfet-based Logic level converters. We do still need a few of them, as we have only 8 bidirectional channels on the TXS0108.

Schematics

Some Notes on the schematics:

A battery level monitor is connected through a voltage divider, with a MOSFET as a switch to the A0 pin. The voltage divider is set up for a 12v DC input source. The MOSFET is controlled from the D6 Pin.

The reason that I did this is, that I found some parasitic voltage leakage through the A2D converter in a previous design, reducing battery life. My hope is that by only reading battery level when the MOSFET is on, there can be an increase in battery life ( Taking into consideration that the Voltage regulators are not very efficient, it won’t really amount to a big gain unless I switch to an SMPS in the future. )

The PCB

Remote Alarm Transceiver PCB
The PCB

In the picture above, we can see the completed PCB (The relay and buzzer were not populated yet)

Manufacturing the PCB

PCBWay

This PCB was manufactured at PCBWAY. The Gerber files and BOM, as well as all the schematics, will soon be available as a shared project on their website. If you would like to have PCBWAY manufacture one of your own, designs, or even this particular PCB, you need to do the following…
1) Click on this link
2) Create an account if you have not already got one of your own.
If you use the link above, you will also instantly receive a $5USD coupon, which you can use on your first or any other order later. (Disclaimer: I will earn a small referral fee from PCBWay. This referral fee will not affect the cost of your order, nor will you pay any part thereof.)
3) Once you have gone to their website, and created an account, or login with your existing account,

4) Click on PCB Instant Quote

5) If you do not have any very special requirements for your PCB, click on Quick-order PCB

6) Click on Add Gerber File, and select your Gerber file(s) from your computer. Most of your PCB details will now be automatically selected, leaving you to only select the solder mask and silk-screen colour, as well as to remove the order number or not. You can of course fine-tune everything exactly as you want as well.

7) You can also select whether you want an SMD stencil, or have the board assembled after manufacturing. Please note that the assembly service, as well as the cost of your components, ARE NOT included in the initial quoted price. ( The quote will update depending on what options you select ).

8) When you are happy with the options that you have selected, you can click on the Save to Cart Button. From here on, you can go to the top of the screen, click on Cart, make any payment(s) or use any coupons that you have in your account.

Then just sit back and wait for your new PCB to be delivered to your door via the shipping company that you have selected during checkout.

Compact Remote Alarm Transceiver – Part 1

As part of my experiments with LoRa and the easy to use ATMega328P, I have recently designed quite a few LoRa based projects. In this final 2 part series, I will look at two additional projects, part of a Remote Alarm Transceiver, where I experimented with a changing a few things:

– Using LM317G adjustable voltage regulators.
– Replacing my standard N-MOS based logic level converters with a dedicated chip.

Remote Alarm Transmitter
LoRa Remote Alarm Transmitter – with Onboard Relay putout and two sensor inputs

How does this differ from my other LoRa Based projects?

The PCB presented above does in fact not really differ a lot from any of my existing LoRa based projects.
However, there are a few subtle changes, mainly experimental changes, brought on by factors such as component availability and an attempt to reduce component counts and board size.

The first of these changes is using the LM317G voltage regulator, in the place of my usual LM1117 3.3 and 5.0 LDO regulators.

The LM317 is an old device, It has been on the market for a long time. It can supply up to 1.5A of current, and a single device can be configured to supply a wide range of different voltages by just changing two resistors. This seemed quite attractive to me, as it is getting quite difficult to reliably get quite a few components on time, and with decent pricing in the post-Covid-19 world.

The second major change would be moving away from my existing N-Mos based Logic converter setup, where I used the BSS138 and 10K resistors as logic converters. This setup works perfectly, but it has the drawback of requiring quite a lot of components. for example:

To provide logic conversion to an RA-02 module, with access to all the IO Lines (GPIO0-5 included) required 12 BSS138 Mosfets and 24 10k resistors. This is quite a lot of components. A dedicated logic converter chip would thus be a much more attractive solution.

Driver circuitry for sensor Inputs, consisting of a simple transistor input, and an optically isolated Relay output completes the circuit.

Using the LM317

LM317 Typical use circuit - Fixed Voltage

The output voltage of the LM317 is typically set using two resistors, with a suitable current rating, using the following Formula

VOUT = 1.25 * ( 1 + R2/R1 )

It is also common to use a variable resistor at R2, to have fine control over the output voltage. This is due to the fact that stock resistor values do not always give you the exact voltage you require. You should also take into account that using a 5% resistor will be less accurate than a 1% resistor.

The grid below is a list of common stock resistor values for R1/R2, with the resulting voltage produced.

R1 vs R2 Grid for use in selecting fixed output voltage

R2\R1150180220240270330370390470
681.821.721.641.601.561.511.481.471.43
821.931.821.721.681.631.561.531.511.47
1002.081.941.821.771.711.631.591.571.52
1202.252.081.931.881.811.701.661.631.57
1502.502.292.102.031.941.821.761.731.65
1802.752.502.272.192.081.931.861.831.73
2203.082.782.502.402.272.081.991.961.84
2403.252.922.612.502.362.162.062.021.89
2703.503.132.782.662.502.272.162.121.97
3304.003.543.132.972.782.502.362.312.13
3704.333.823.353.182.962.652.502.442.23
3904.503.963.473.283.062.732.572.502.29
4705.174.513.923.703.433.032.842.762.50
5605.925.144.434.173.843.373.143.042.74
6806.925.975.114.794.403.833.553.433.06
8208.086.945.915.525.054.364.023.883.43
10009.588.196.936.465.885.044.634.463.91
120011.259.588.077.506.815.805.305.104.44
150013.7511.679.779.068.196.936.326.065.24
180016.2513.7511.4810.639.588.077.337.026.04
220019.5816.5313.7512.7111.449.588.688.307.10
270023.7520.0016.5915.3113.7511.4810.379.908.43
330028.7524.1720.0018.4416.5313.7512.4011.8310.03

As you can see from the table above, using stock resistors, the output voltage is reasonably accurate, but it is quite obvious that you will need a potentiometer to get exact values.
Another issue will definitely be heat dissipation. In my PCB design, I have used the SOT-223 package of the component, with a PCB heatsink, built directly into the layers. With the LM1117 LDO regulators, these work extremely well.

Logic Level Conversion

In this design, I used my standard Logic Level conversion circuit, comprised of a BSS138 N-Mos with two 10 k resistors. This circuit, although a bit cumbersome with lots of components if you need many logic converters, is very stable, and functions extremely well.

Conclusion

This circuit was designed as a two-part prototype, with the goal of experimenting with different voltage regulators, and in part 2, with a single chip 8 channel logic converter. As such, I do not feel comfortable releasing the full schematics to you at this stage, do so anyway in the interest of learning. The circuit works, but there are many issues with the regulators:



– Overheating at input voltages above 8.0v
The PCB heatsink will have to be improved, or even a different package for the LM317 with the possibility to attach an external heatsink.

– The voltages do not seem stable, especially on the 3.3-volt side.

Manufacturing the PCB

PCBWay

This PCB was manufactured at PCBWAY. The Gerber files and BOM, as well as all the schematics, will soon be available as a shared project on their website. If you would like to have PCBWAY manufacture one of your own, designs, or even this particular PCB, you need to do the following…
1) Click on this link
2) Create an account if you have not already got one of your own.
If you use the link above, you will also instantly receive a $5USD coupon, which you can use on your first or any other order later. (Disclaimer: I will earn a small referral fee from PCBWay. This referral fee will not affect the cost of your order, nor will you pay any part thereof.)
3) Once you have gone to their website, and created an account, or login with your existing account,

4) Click on PCB Instant Quote

5) If you do not have any very special requirements for your PCB, click on Quick-order PCB

6) Click on Add Gerber File, and select your Gerber file(s) from your computer. Most of your PCB details will now be automatically selected, leaving you to only select the solder mask and silk-screen colour, as well as to remove the order number or not. You can of course fine-tune everything exactly as you want as well.

7) You can also select whether you want an SMD stencil, or have the board assembled after manufacturing. Please note that the assembly service, as well as the cost of your components, ARE NOT included in the initial quoted price. ( The quote will update depending on what options you select ).

8) When you are happy with the options that you have selected, you can click on the Save to Cart Button. From here on, you can go to the top of the screen, click on Cart, make any payment(s) or use any coupons that you have in your account.

Then just sit back and wait for your new PCB to be delivered to your door via the shipping company that you have selected during checkout.

Special Limited Offer – Get your PCB for only $1

PCB for only $1

Every once in a while, we get an opportunity to take advantage of an exceptional deal. Recently, the friendly people at PCBPartner.com reached out to me with another great deal… “Get your next PCB for only $1!”

You will get the following:
10 FR-4 PCB, 1 or 2 layers, with Green Soldermask, in dimensions not exceeding 100mmx100mm, Manufactured and delivered to your door for only 1 (one) $USD.
This promotion will be valid until 31 May 2022, with AIRMAIL shipping included.

Promotion from PCBPartner

Who is PCBPartner.com

PCBPartner.com is owned and operated by Kinji Group, established in 1997. We have over 20 years of experience in PCB manufacturing, PCB design, component manufacturing and distribution, PCB assembly and PCB CAD software development.

While Kinji Group has 3 PCB factories in China, we have also developed strategic partnerships with more than 15 other factories around Asia. We, therefore, have a large group of specialists in PCB manufacturing, quality control, technical support and part sourcing to support your innovative ideas and products.

Our over 500 employees are spread across 8 branches in Mainland China (Shenzhen, Dongguan, Shanghai, Wuxi, Chengdu, Xiamen), Hong Kong SAR, and Taiwan. And we’re still growing!

Why Should you use PCBPartner for your next PCB order?

Variety of PCB Material

Up to 54 layers during PCB manufacturing.

FR-4 with different tg (135,150,170),
CTI 600 (Halogen free) PCB material,
Aluminium base PCB,
Flexible PCB,
Rigid-Flexible PCB,
Rogers, and many more materials.
Whatever material you need, they can deliver.

Special PCB Specifications:

Regular PCB production for these special PCB specifications

● Impedance control

● Custom-layer stack up

● 1-3 oz copper thickness for outer/inner layers

● Hard gold, ENEPIG, OSP surface finish

● Two different solder mask colours on one PCB

● Edge connector plating

● Edge plating

● Via filled with aluminium/resin

● And more…

Fast Lead Time

Turnaround is quick as prototypes usually take as little as 24 hours to produce, with a direct pickup service from their warehouse. They partner with DHL and FedEx for this to make sure you get your PCB in the shortest time possible. They also offer express production options for small and medium-sized batches so that you get your boards EVEN quicker.

Competitive Pricing

Get competitive pricing on prototypes and your future mass production. For any mass production orders, contact them so that they can find the best pricing and shipping solutions to maintain your competitiveness

Ordering boards in bulk? Save more the larger your order:

US$10 off orders of 100+

US$10 off orders of 100+

US$50 off orders of 500+

US$120 off orders of 1000+

Quality Control

After 20 years, they have built a strict standard of quality – their quality control teams ensure all PCBs pass the AOI and E-test with 100%.

Technical Support

They have an experienced PCB manufacturing and engineering team to help you detect potential mistakes in your Gerber files. They also use – and have used for 15+ years – a reliable PCB testing software solution, iPCB, to detect mistakes in designs.

Excellent Customer Service Team

They have a passionate (and patient!) customer service team to help you solve any problems while ordering, handle engineering questions, or answer any after-sales service request. They will respond to you within 1 working day, that’s their customer service guarantee.

Flexible Payment Term

If you have a large amount of PCB to order every month and want to work with them for AMS 30 payment, they will be happy to sign an agreement with you.

Promotion from PCBPartner

Easy to Use RA-02 Breakout Module

Original RA-02 breakout Module, next to improved RA-02 breakout Module

Most Makers and electronics enthusiasts may already know of the RA-02 LoRa Module. Many of them might own an RA-02 Breakout module or two… For those who do, they will surely know about the problems encountered with using this particular breakout module…

The RA-02 module, in itself, is a great piece of kit, and when used on a custom PCB, which was designed with all the little secrets of this module taken into consideration, is a pleasure. Using the RA-02 breakout module, in its existing form factor, does however present quite a few unique challenges, which, if you are unaware of them, can cause quite a few frustrating moments, or even result in permanent damage to the module…

In this post, we will focus on :
1) The Challenges of the existing commercially available RA-02 Breakout Module
2) My Solution to above mentioned Challenges
3)Testing the Module
Maker Uno – An Arduino Uno Clone
Maker Nano RP2040
Maker Pi Pico – Raspberry Pi Pico breakout module


What are these challenges:

1) The module is based on the SX1278 chip from Semtech and is a 3v device. The IO pins are NOT 5v compatible but seem to work for a few hours or so when used with 5v… This causes many people, especially on Youtube, to assume that it is ok to send 5v logic signals to this module…

I have still not seen any Youtube video telling viewers to at least use a resister divider or logic converter… People just don’t know, and those that know seem to be keeping quiet!

Adding logic converters is in fact specified by the datasheet.

2) Adding logic converters means adding additional wiring, and for a breadboard based project, that adds to the complexity.

3) You have a total of 4 ground pins that need to be connected. not connecting all of them, causes funny things to happen, from overheating down to failure… ( My personal experience while researching this project)

4) The existing breakout module is not breadboarding compatible, resulting in a floating assembly with wires going everywhere, which results in unstable connections etc…

Basically something similar to the picture below:

RA-02 breakout Module (original) with Maker Uno and Level converter module

In this picture, I have an existing RA-02 Breakout Module, with an 8 channel Logic converter and an Arduino Uno clone, along with all the needed wiring to make this setup possible… Quite a lot of wires indeed…

My solution:

I design and use quite a few LoRa PCBs and on all of them, I implement logic conversion using the BSS138 N-MOS Mosfet and 10k resistors. It is a cheap and reliable solution, but it can take up quite a lot of space on a PCB, as this means 11 Mosfets and 22 10k resistors if I were to provide level conversion to all of the RA-02’s GPIO and IO pins…

I also have the constant problem of many unnecessary wires, many of which sometimes fail straight out of the box, when prototyping something. I partly solved that by designing a few dedicated PCB solutions, but that is not always ideal,

Using a dedicated Logic Converter IC, and Mosfet based converters to make up the difference, on a breadboard compatible module, seemed like a good idea, so I went ahead and designed the following solution:

RA-02 breakout Module on a breadboard

The breakout board module is breadboard compatible, and also has clearly marked pins to indicate the 3v and 5v sides of the module.

Testing the Module:

Using a 5v device ( Cytron’s Maker Uno )

For my first test, I decided to test with an Arduino Uno Clone, since that is what most Makers and students will have access to. I used Cytron’s Maker Uno platform, which is equipped with some added goodies, in the form of diagnostic LED etc to make prototyping a lot easier.

RA-02 breakout Module, connected to Maker Uno

As we can clearly see, It is only necessary to connect to the 5v logic side of the module, as well as provide 3v and 5v + GND to the module

In this test, I used Sandeep Mistry’s LoRa Library, with the Arduino IDE to do a quick test sketch.

Connections are as follows:

RA-02 Module Maker Uno

MISO D12

MOSI D11

SCK D13

NSS D10

RST D9

DIO0 D2

OE D8

Full code download

Let us look at some important sections though, to thoroughly understand how to use the module:

Pin Declaration

#include <SPI.h>       // include libraries

#include <LoRa.h> // I used Sandeep Mistry’s LoRa Library, as it is easy to use and understand

const int csPin = 10;     // LoRa radio chip select

const int resetPin = 9;    // LoRa radio reset

const int irqPin = 2;     // change for your board; must be a hardware interrupt pin

const int OEPin = 8;     // Output Enable Pin, to enable the Logic Converter

In the Setup function, we need to do a bit of extra work, since our Maker Uno ( or your Arduino Uno ) is a 5v device…

void setup() {

 Serial.begin(115200); // initialize serial

 pinMode(OEPin,OUTPUT); // Setup the OE pin as an Outout

 digitalWrite(OEPin,HIGH); // and Pull it High to enable the logic converter

 while (!Serial);

 Serial.println(“LoRa Duplex – Set spreading factor”);

 // override the default CS, reset, and IRQ pins (optional)

 LoRa.setPins(csPin, resetPin, irqPin); // set CS, reset, IRQ pin

 if (!LoRa.begin(433E6)) {       // initialize ratio at 433 MHz

  Serial.println(“LoRa init failed. Check your connections.”);

  while (true);            // if failed, do nothing

 }

 LoRa.setSpreadingFactor(8);      // ranges from 6-12,default 7 see API docs

 Serial.println(“LoRa init succeeded.”);

}

A comparison, using the standard RS-02 Breakout module, together with one of my own “Arduino type PCB”

ATMEGA328P with 8 Channel Logic Converter.

Original RA-02 Breakout Module, connected to an ATMEGA328P PCB with onboard Level converters

As we can see, you need quite a lot more wires to make this work. It is also worth noting that we have only 8 level converters on this ATMEGA328P PCB, in order to use all of the RA-02’s GPIO, we will need to add an additional external logic converter as well.

Using a 3v Device:

Cytron’s Maker Nano RP2040

For my second test, I decided to be a bit brave, and try to use the new Raspberry Pi Pico ( RP2040 Microprocessor ). I have quite a few of them lying around and have never really done a lot with them, due to the fact that I do not really like using MicroPython or CircuitPython, and also because the recently released Arduino Core for the RP2040 still being quite new… I decided to use a development board that I recently bought from Cytron, the Maker Nano RP2040, as it has all the added diagnostic features to make my life a bit easier, I will also include a test with an original Pi Pico board, to make it more accessible to everyone out there.

RA-02 Breakout Module, connected to Maker Nano RP2040

Once again, I used Sandeep Mistry’s LoRa Library, with the exact same Arduino sketch, used for the Maker Uno test. (I obviously needed to change the pin numbers though, as the RP2040 uses different pins for its SPI interface).

Maker Nano RP2040 RA-02 Breakout Module

NSS 17

MOSI 19

MISO 16

SCK 18

RST 9

DIO0 8

In this case, we DO NOT need the OE pin, as the RP2040 is a native 3v device. The level converter can thus stay disabled, with its pins in tri-state ( high impedance ) mode.

If we look at the code, it is similar to the Maker Uno’s code, with only the Pin declarations needing a change

#include <SPI.h>       // include libraries

#include <LoRa.h>

const int csPin = 17;     // LoRa radio chip select

const int resetPin = 9;    // LoRa radio reset

const int irqPin = 8;     // change for your board; must be a hardware interrupt pin

byte msgCount = 0;      // count of outgoing messages

int interval = 2000;     // interval between sends

long lastSendTime = 0;    // time of last packet send

// Note that SPI has different names on the RP2040, and it has 2 SPI ports. We used port 0

// CIPO (Miso) is on pin 16

// COPI (Mosi) is on pin 19

// SCK is on pin 18

// CE/SS is on pin 17, as already declared above

I did not use a breadboard, in order to make things as easy as possible.

Cytron’s Maker Pi Pico – A Pi Pico on a breakout PCB

RA-02 Breakout Module, connected to Maker Pi Pico

To make things a bit easier, without having to resort to using a breadboard, I decided to do the Original Pi Pico test using the Maker Pi Pico PCB. This PCB is basically a big breakout module, with detailed pin numbers and some diagnostic LEDs, but it also uses a native Pi Pico, soldered directly to the PCB, by means of the castellated holes… So, While technically not being a true standalone Pico, It makes my life easier and was thus used for the test, as I can be sure that the pins are labelled exactly the same as on the original Pico.

The code used for the Maker Nano RP2040 works perfectly, with no changes required.

This post is getting quite long by now, so I have decided not to include my tests of the ESP-12E ( NodeMCU ) or ESP32 development boards here as well… They also function as expected.

In Summary

When I started this project, I set out to solve a problem ( personal to me ), that could potentially help a lot of other people use the RA-02 Module for more projects and tasks. The Breakout module in its current form can also be used with the RA-01h module (915Mhz Module) without any changes. All GPIO pins are broken out, and accessible through full logic converted pins on both sides of the breakout module.

I hope that this will be useful to someone. I am also not releasing the full schematics at this stage, as I may decide to make some minor cosmetic changes in the near future.

The PCB can however be ordered from PCBWay in its current form and works 100% as expected. The BOM file is available with the ordered PCB as usual.

PCBWay Banner

This PCB was manufactured at PCBWAY. The Gerber files and BOM, as well as all the schematics, will soon be available as a shared project on their website. If you would like to have PCBWAY manufacture one of your own, designs, or even this particular PCB, you need to do the following…
1) Click on this link
2) Create an account if you have not already got one of your own.
If you use the link above, you will also instantly receive a $5USD coupon, which you can use on your first or any other order later. (Disclaimer: I will earn a small referral fee from PCBWay. This referral fee will not affect the cost of your order, nor will you pay any part thereof.)
3) Once you have gone to their website, and created an account, or login with your existing account,

PCBWay Start Quotation Page

4) Click on PCB Instant Quote

PCBWay Instant Quote

5) If you do not have any very special requirements for your PCB, click on Quick-order PCB

Quick order PCB from PCBWay

6) Click on Add Gerber File, and select your Gerber file(s) from your computer. Most of your PCB details will now be automatically selected, leaving you to only select the solder mask and silk-screen colour, as well as to remove the order number or not. You can of course fine-tune everything exactly as you want as well.

PCBWay PCB parameters
PCBWay PCB Parameters - Page 2

7) You can also select whether you want an SMD stencil, or have the board assembled after manufacturing. Please note that the assembly service, as well as the cost of your components, ARE NOT included in the initial quoted price. ( The quote will update depending on what options you select ).

PCBWay Stencil
PCBWay Checkout

8) When you are happy with the options that you have selected, you can click on the Save to Cart Button. From here on, you can go to the top of the screen, click on Cart, make any payment(s) or use any coupons that you have in your account.

Then just sit back and wait for your new PCB to be delivered to your door via the shipping company that you have selected during checkout.