Flux Blog

News, resources, and company updates

Flux + GPT-5 (Beta)

Open Flux now, switch Copilot to “Next-gen” and see how it handles your next design challenge. The sooner you try it, the more your feedback can shape the next leap in AI-powered hardware design.

|
August 11, 2025
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Create Satisfying Schematics with these Updates

Create Satisfying Schematics with these Updates

Discover our latest schematic design updates that streamline wire adjustments, component alignment, and intuitive pin connections, making your design process faster and meeting your high standards for precision. These enhancements, coupled with our AI design assistant, ensure a solid foundation for your projects.

Adjusting Wires is Much Smoother

Traditionally, the process of fine-tuning wire positions on a schematic felt akin to rewriting an entire chapter of a novel for just a few key edits. Crazy!

With Flux, the narrative changes. Enabling the meticulous adjustment of wire positions without the need to start from zero, we've introduced a drag-and-drop feature for individual wire sections. This allows you to artfully navigate around objects, symbols, and components, ensuring that every wire is precisely where it needs to be. 

This image is an animated GIF showing a user interface from the Flux application, a PCB design software for electronics engineers. The animation displays a portion of an electrical schematic in progress with visible component symbols like resistors, LEDs, and interconnecting lines, suggesting the user is constructing or editing an electronic circuit. The left panel, titled 'LIBRARY', lists electronic components like connectors and terminals, indicating that users can select and place these on their schematic. The top-right corner has tabs for 'Schematic', 'Code', and 'PCB', signifying different workspaces within the app. An 'INSPECTOR' panel on the right side displays information about a selected component, including a thumbnail image of the associated PCB design, a brief description indicating it's a battery management system controller board for lithium battery packs, and additional metadata such as creation date, authorship, and tags like 'Automotive'. The overall impression is of a sophisticated and user-friendly tool for designing and managing PCB layouts.

We've also tackled the pesky issue of fragmented line segments—those tiny, unnecessary elbows in your schematic that disrupt the visual flow. Now, parallel wire segments snap and merge into a singular, streamlined line. This eradicates clutter, simplifying your schematic into a model of elegance and simplicity.

💡 Tip: you can also use ctrl/cmd+click to select an entire net at once!

Create Connections at Lightning Speed ⚡

We wanted to make creating connections more intuitive and faster. So we created some new ways to connect components and draw wires that’ll have you working at lightning speed. 

Drag a component onto another component

Now you can connect components simply by dragging them onto one another. Drag a component until one or more of its pins are on top of the pins from another component, then drop it. Instantly, the overlapping pins become connected. You can leave it there, or drag it away to see the wires. For many cases, this could save you two or more clicks, speeding up your workflow.

The image is an animated GIF that displays the interface of the Flux PCB design software. The GIF showcases the user interacting with the schematic workspace of a printed circuit board design. We can see the mouse cursor moving and selecting a vertical array of net labels or pins on the right side of the schematic, suggesting the user is arranging or inspecting the connections of a component. The 'LIBRARY' panel on the left lists various electronic components such as connectors and terminals, indicating a searchable database of parts that can be added to the design. The 'Schematic', 'Code', and 'PCB' tabs at the top suggest the software's capability to switch between different design views and functionalities. The right side of the interface features an 'INSPECTOR' panel, presumably for displaying detailed information about selected components or design elements, although no information is visible in the panel in the provided GIF. The cosmic background continues behind the interface, providing an aesthetic visual theme.

Drag a component over a wire

Connecting components to existing wires is now a breeze. Drag a component until one or more of its pins overlap with the wire, then drop it. Instant connection!

The image is an animated GIF showing the interface of the Flux PCB design software, where a user is interacting with a schematic layout. The cursor is seen connecting lines to various components, likely to establish electrical connections within the circuit design. The labels on the schematic components, such as HSP_MISO and HSP_CLK, indicate the use of high-speed signal pins, while EXT_5V suggests an external 5-volt power supply connection.

On the left side of the screen, the 'LIBRARY' panel is open, displaying a list of components like connectors and terminals that can be added to the schematic. The right side of the screen features an 'INSPECTOR' panel, where a thumbnail of a PCB design, the name BMS 16s60 along with a description labeling it as a battery management system controller board for lithium battery packs, is visible, along with metadata including the creation date, author's name, and tags such as 'Automotive'.

The top of the interface shows tabs labeled 'Schematic', 'Code', and 'PCB', indicating the software's multi-functional capabilities for designing and programming PCBs. The overall animation shows the process of editing a schematic, highlighting the detailed and precise nature of electronic design work. The background behind the software's user interface continues with the cosmic theme, providing an attractive visual continuity.

Drag a wire over a component’s pin

Now you can create connections while adjusting a wire. Drag an existing wire until it overlaps one or many pins of a component, then drop it, and they’ll become connected.

The image is an animated GIF displaying the user interface of the Flux PCB design software, capturing a user's interactions with an electronic schematic. The animation illustrates a cursor that is connecting a series of net labels or pins, outlined in blue, to corresponding components in the schematic, likely mapping out the signal paths or power connections.

The left side of the interface presents the 'LIBRARY' section, showcasing a searchable catalog of electrical components such as connectors and terminals, which users can add to their schematic. On the right, the 'INSPECTOR' section is visible, showing details for a selected component, the BMS 16s60, which is described as a battery management system controller board for lithium battery packs, along with metadata including its creation date, creator's name, and associated tags like 'Automotive'. The thumbnail of the board indicates it's a physical representation of what the schematic will translate into upon completion.

Above, the interface includes tabs for 'Schematic', 'Code', and 'PCB', suggesting the software's comprehensive capabilities for not only designing PCB layouts but also coding and viewing the physical board layout. The background maintains a space-themed aesthetic, providing a visually pleasing backdrop to the technical work. This GIF demonstrates the schematic editing process in a visually engaging and informative way, showing the meticulous process of PCB design.

Draw a wire over multiple pins

You can create many connections effortlessly while drawing a wire. Draw your wire in such a way that it overlaps multiple pins, then finish drawing. All of the pins will now be connected to the wire! This is super helpful if you have an IC, for example, that needs many pins down a line to be connected to the same net.

The animated GIF showcases a user interface of the Flux PCB design software. It illustrates a user actively engaging with an electronic schematic diagram. The mouse pointer is connecting various pins and components, suggesting that the user is in the process of laying out or modifying the circuit connections. On the left, the 'LIBRARY' pane is visible, offering a selection of electronic symbols like terminals, grounds, resistors, and capacitors that can be added to the schematic.

To the right, the 'INSPECTOR' section displays information about a specific component, referred to as BMS 16s60, which appears to be a battery management system controller board for lithium battery packs. This section includes a thumbnail image of the board, the creation date, and additional tags such as 'Automotive', which indicates the sector of application. Metadata, including a link to the component's source, is also provided.

The top of the interface has tabs labeled 'Schematic', 'Code', and 'PCB', indicating the various functions and views available within the software for creating and programming PCBs. The backdrop of the software's interface is a stylized cosmic image, adding an aesthetic appeal to the technical environment. The animation provides insight into the precision and detail involved in the PCB design process within a modern software setting.

Align components perfectly

We’ve also added new alignment and snapping features, which provide visual guides to ensure that all objects on your schematic are nicely aligned. Just drag two objects near each other and, like magic, guidelines appear to help guide the alignment of your components. 

💡 Tip: You can also highlight components and right click and quickly align vertically,  horizontally, or space evenly. 

This animated GIF displays a user interface from the Flux PCB design software, focusing on an electronic schematic diagram. The animation shows a cursor moving across the screen, highlighting the interactive nature of the software. The user is seemingly reviewing or editing the schematic, with various labeled pins and connection points indicating the layout of an electronic circuit.

On the left side, the 'LIBRARY' pane shows a list of components such as connectors and terminals that can be dragged onto the schematic for design purposes. The right side features an 'INSPECTOR' pane, where a component named BMS 16s60 is detailed as a battery management system controller board for lithium battery packs, along with additional information such as the creation date and associated tags (like 'Automotive').

Tabs at the top labeled 'Schematic', 'Code', and 'PCB' indicate the software's capability to provide different design perspectives and functionalities. The space-themed background behind the interface gives a visual flair to the design environment. This GIF captures the intricate process of arranging and connecting electronic components in PCB design software.

Your New Best Friend, Flux Copilot

Your quest for the perfectly aligned, clutter-free schematic isn't just a solo adventure. Flux Copilot shares your, let's say, 'enthusiastic precision.'

With the power of AI at your fingertips, Flux Copilot transforms the art of schematic design into a collaboration with technology. It's not just an assistant; think of it as your detail-obsessed partner in design. Got two components that need a connection? Just whisper sweet nothings (or, you know, actual instructions) to Copilot, and watch it work its magic.

Copilot is here to help you work not just faster or smarter, but at warp speed towards creating that breathtakingly beautiful schematic. Because in the end, a more readable schematic doesn't just mean easier collaboration—it means creating something truly spectacular, together. Sign up for Flux today.

This animated GIF displays the user interface of the Flux PCB design software, focusing on a PCB layout screen. The animation illustrates a cursor moving and placing electronic components onto the black workspace, which represents a printed circuit board. The components, like the one centrally featured resembling a USB port symbol, are rendered in white lines against the dark background, making them stand out distinctly.

On the left, the 'LIBRARY' panel is open, showing various categories of electronic parts, suggesting that the user can search for and select specific items to include in their PCB design. The upper-right section of the interface features an 'INSPECTOR' panel, which seems to offer detailed information about selected objects or components, along with controls for project management.

A project log or chat panel labeled 30 prompts in 30 days indicates an ongoing project or challenge within the application, providing the user with inspiration or guidance for their designs. The background of the interface sports a cosmic theme, maintaining a visually engaging design environment. This GIF captures the moment-to-moment actions of an engineer or designer as they populate a PCB with necessary components using specialized software.

Ready to give Flux’s schematic improvements a try? Start with one of our reference designs today.

|
March 14, 2024
Never Worry About Stackups Again: Introducing the Stackup Editor

Never Worry About Stackups Again: Introducing the Stackup Editor

We’re launching our Stackup Editor: a new and improved way to select your PCB stackup that requires less time, less effort, and is less prone to errors. This is another massive step towards creating a single place where designers can collaborate with each other and the industry as a whole.

An Improved Stackup Workflow

Selecting your PCB’s stackup has always been painstaking and unintuitive. First, you have to talk to the fabrication house, who will send you their stackup capabilities and tolerances via email and PDF. Then, it’s your job to take that information and transpose it back into your design tool, double and triple-checking that you didn’t make any errors in the process. So much back and forth inevitably leads to disorganization, information loss, and sometimes even failure. Not to mention lost time in the process.

If fabrication houses have standardized stackups, why are there so many hoops to jump through just to implement them into your design?

Flux app showing how to add and modify any layers in your printed circuit board stackup configuration

With Flux’s Stackup Editor, we change the narrative. With a simple and intuitive interface built into the tool, the Stackup Editor gives engineers an improved stackup workflow. Just go to your PCB layout, select “Stackup” under “Object-specific rules”, and find everything you need in one centralized location. 

Not only can you edit and create stackups with minimal effort, but you can now also leverage Flux’s community of over 175,000 electrical engineers to take the hard work out of the process. With thousands of projects available to you from the community, you never have to start from scratch. Instead, you can simply find a project that is similar to yours and use that stackup as a template for your own design. 

Finally: stackups no longer live in your email inbox, they live in the tool. And with that, you can save yourself from the wasted time, money, and effort that has been industry-standard for far too long. 

A Central Hub for the Hardware Industry

More importantly, the addition of Stackup Editor aligns with our ultimate goal of creating a single, centralized platform for all of the hardware industry to collaborate. 

Flux app showing how to easily select pre-definted default stackup configurations from top pcb manufacturers so you can get started quickly, also showing here is the ability to create your own custom pcb stackup configurations

With the Stackup Editor, fabrication houses themselves can directly input their stackup options into Flux as templates for designers to choose from. Just go to the fabrication house’s Organization page, find a stackup template from them that matches your project, and fork it for your own design. 

At launch, you can choose from dozens of Stackup templates, including:

With that kind of first-party input from the houses themselves, you can feel confident that your stackups are ready for production before you even get there.

Another Step Forward

The Stackup Editor is another massive step towards creating a single place where designers can collaborate with each other and the industry as a whole. Now Flux offers one place where you can directly access parts from suppliers, designs and references from manufacturers, and stackups from fabrication houses. 

If you want to get hands-on with the Stackup Editor, check out some of our templates and get started today!

|
January 18, 2024
Flux Copilot Can Now See

Flux Copilot Can Now See

For months, we’ve been adding new features and functions to Copilot to help make it the most powerful AI for hardware design in the world. Today, we’re announcing what might be the biggest upgrade yet: Copilot Vision.

Now, not only can you chat with Copilot, but you can also show it what you're working on. What does that mean? Copilot is now the first multi-modal AI for hardware design, and with that, a whole new world of possibilities has opened up for Flux users.

Introducing: Image Input Capability!

Hardware design can be tricky because so much of the thinking is visual and requires context. As an engineer, you’re expected to rely on visual resources like block diagrams, charts, and drawings. But these resources are usually confusing to interpret and separate from your actual design, making them lose their value quickly.

With Copilot Vision, you can now provide Copilot with images as a more natural way to communicate ideas and integrate those resources into your design. Imagine snapping a photo of a block diagram and Copilot instantly understanding what you're trying to build.

Simply provide Copilot an image as a file upload and ask your questions. Suddenly, visual resources are relevant and even powerful for sanity checks. Now, you can ask questions, learn, and get design reviews in entirely new and more effective ways.

Unlocking New Workflows

Imagine you’re working on a project that’s based on an existing block diagram. You need to turn that block diagram into a working circuit, selecting the right components and connecting them in the right way. Normally this would mean reading through datasheets and application notes, but that gets confusing, time-consuming, and hard to keep track of.

Now that Copilot has vision, you have access to powerful new use cases that improve your hardware design workflow.

Part Recommendations: Trying to find the right parts to implement your design? You can now input a block diagram to Copilot and watch it recommend suitable parts for your design by intelligently parsing the diagram into functional sections.

Design Review: Once you make your design, you’ll want to make sure you didn’t miss anything. Copilot can help ensure design quality by comparing your schematic diagram against a block diagram. Copilot's analysis catches discrepancies, such as missing elements in your design that appear in the diagram, and offers you suggestions for improvement.

Chart Interpretation: Confused about how to interpret a chart on a datasheet? Just provide Copilot with an image of the chart and ask it in-depth questions. It will interpret your input and explain any aspect of the chart and how it relates to your hardware design needs.

Dimensional Analysis for Footprints: Have you ever looked at the part drawings and been overwhelmed by all the information and dimensions? Now you can provide an image to Copilot and ask it any question about part dimensions. Copilot efficiently interprets and correlates them to real component footprints, even making educated guesses about component types based on project context.

More Down the Road

This is a major step forward for Copilot, but we’re just scratching the surface of what’s possible. We believe that vision unlocks the doors to so much more down the road, but we’ll need your help! By trying out Copilot with vision, you can help us identify new use cases and steer the direction of Copilot’s future.

Try out Copilot today, and share your feedback with us through our Slack community. Tell us what works well, what could be better, and what other modes of interaction would you want to see us build into Copilot.

|
December 21, 2023
Flux Copilot Just Got Smarter

Flux Copilot Just Got Smarter

Today, we're thrilled to unveil Copilot Experts – a new suite of specialized AI models, each fine-tuned for specific tasks to deliver sharper accuracy and faster performance. Now, you have the power to easily select the AI model that best suits your current task, ensuring more precise and swift responses.

Copilot Experts are more accurate

Today, we're thrilled to unveil Copilot Experts – a new suite of specialized AI models, each fine-tuned for specific tasks to deliver sharper accuracy and faster performance. Now, you have the power to easily select the AI model that best suits your current task, ensuring more precise and swift responses.

How to use Copilot Experts

Accessing Copilot Experts is a breeze. Simply click on the Copilot icon in the comments or chat window, and select your desired expert from the dropdown menu. At launch, we are excited to introduce three distinct expert models:

Generalist: The Versatile All-Rounder

Meet the original Copilot model, now known as the Generalist. This model is your versatile, jack-of-all-trades assistant, ready to tackle a wide array of queries with the same efficiency you've come to appreciate.

For instance, ask the Generalist:

@copilot can you explain to me what’s happening in this circuit?

Librarian: The Parts and Datasheets Specialist

The Librarian shines when it comes to parts inquiries and effortlessly navigating through datasheets. If you're looking to delve into specifics about a component, the Librarian is your go-to expert.

@copilot am I using the right amount of decoupling for U1?

Help: Your Flux Navigator

This is your go-to for Flux product guidance. Have questions about how to use the tool? Don’t feel like sifting through the documentation? Just ask the Help Expert for the answers. For example:

@copilot how do I change the stackup of my PCB?

Copilot shortcuts also get an upgrade

We recently launched Copilot Shortcuts, which are powerful pre-made questions that you can ask Copilot with the click of a button. With Experts, those Shortcuts now automatically route to the best Expert for the job - meaning you get the best answers without having to do any work.

Flux copilot chat screen showing how you can access powerful pre-made questions that you can ask Copilot with the click of a button. With Experts, those Shortcuts now automatically route to the best Expert for the job - meaning you get the best answers without having to do any work.

Copilot Experts is a testament to all of the feedback we’ve gotten from the community over the last year. Try out the Copilot Experts today to see how we’re taking your feedback, and using it to make the best AI tool in the industry!

|
November 21, 2023
AI Shortcuts for PCB Design

AI Shortcuts for PCB Design

Today, we’re excited to be launching the next step in Copilot’s evolution: the Copilot Context Menu. It lets you access Copilot with the click of a button. Simply right-click on a component or project, and choose the prompt you want to use.

AI at the Click on a Button

The Copilot Context Menu makes harnessing the power of Copilot easier than ever before. By giving users a list of predetermined prompts and actions to choose from, the Context Menu lets you access Copilot with the click of a button. Simply right-click on a component or project, and choose the prompt you want to use.

Some options include:

  • Check Decoupling Capacitors: Decoupling capacitors can be confusing. If you’ve ever wondered whether a part needs them, whether you have enough of them, or if your values are correct, Copilot has you covered with a ready-made prompt.
  • Explain: Not sure what’s happening in a circuit? Just select the “Explain” prompt and Copilot will give you a detailed explanation of your schematic.
  • Recommend Replacement: Worried about your part’s availability? Select this prompt and Copilot will search through thousands of components to find the perfect replacement for your circuit.

Improve Productivity, Remove Bottlenecks

Copilot relies on Large Language Model (LLM) technology, whose quality and accuracy may vary. For this reason, it’s important to think of Copilot as a tool to augment your work, not a replacement for a real engineer. But, now that Copilot is even easier to use, the opportunities are endless.

As a professional, you can catch errors earlier on, save time, and reduce risks in your design. As a student, you can learn faster and get a deeper understanding of your designs. As anyone who loves hardware, you can have more confidence in your design knowing that a powerful AI has your back every step along the way.

Get Started Now!

Copilot keeps getting better, but it would be meaningless without the Flux community. The real power of Copilot lies in what each Flux user will create with it. We can’t wait to see what amazing designs you all come up with. So what are you waiting for? Try out Copilot today!

|
October 26, 2023
How to design and deploy a LoRa IoT sensor node with RP2040

How to design and deploy a LoRa IoT sensor node with RP2040

The blog details the creation of a LoRa IoT sensor node for agriculture, focusing on PCB design, power management, wireless connectivity, and sensor integration using the RP2040 microcontroller. It aims to bridge the technology gap in farming, enhancing productivity through data-driven insights.

Story

I live nestled in the heart of an agrarian country. Here, the soil holds tasteful tales of the past and the future of our economy. If you like numbers, here’s a bunch for you, Agriculture contributes approximately 33% of our GDP and employs more than 40% of our total population. You see, my journey into this project wasn’t fueled by a quest for innovation, but if I end up innovating something, I accept that. It was fueled by a need to improve, even just a tiny bit, the current state of affairs. USAID published an article saying that in recent years agricultural productivity has stagnated. Current methods of farming are pretty archaic and if we are to depend on these same methods to boost our productivity, we risk being obsolete as well.

One of the biggest challenges that farmers currently face is the gap that exists between them and the technology that could improve their output. This project aims to eliminate that gap. I have built an IoT sensor node that can be deployed to the farm and collect important parameters for a farmer which can be analyzed and used to maximize productivity. With this aim in mind, I have to solve several challenges including:

  • It has to be powered by a battery and be solar rechargeable.
  • The sensor nodes must be cost-effective because a number of them will have to be deployed.
  • It has to be able to send information to the cloud using LPWAN.
  • It can communicate with industry-grade sensors.

To solve these four main problems, I started by drafting a block diagram that provides an overview of the electronics.

An initial block diagram of Green Dot Board project that provides an overview of the electronics.

Generally, the aim is to have a node that includes a high-performance, low-power, low-cost microcontroller at the heart of the board which can support industry-grade sensors using RS485 protocols, a low-power wide area networking module, a power management circuit that can supply power to both the MCU and any peripherals connected.

In this project, I will be describing how I accomplished that in the Green Dot Board. You can head to the Project and clone or fork it to have edit access.

Step 1: Power Management: Brave board

One of the most important features of the Green Dot Board is power management. As described in the core requirements of the system, is the ability to work autonomously for years without any power concerns. I therefore decided to start by designing a power management circuit and making sure that works fine first to de-risk the whole system.

Most of the sensors that can be hooked onto this system require either 3.3V, 5V, or 12V. I therefore designed the power management circuit to be able to deliver all these powers. You can check out the Brave Power management circuit here. This board can be powered by either LiPo batteries, 4V - 6V solar power panels, or a Micro USB. From these inputs, there is a set of dedicated components to generate and regulate each of the mentioned outputs.

a) 12V and 5V Rail

Starting with the 12V and 5V rail, I used the high-efficiency MT3608L 1.2MHz step-up converter. I used a voltage divider circuit to adjust the output of the component and used an SPDT switch to enable switching between the 12V and 5V output.

  • Setting the output voltage can be calculated using the following equation.

Vout = Vref x (1 + R1/R2) where Vref = 0.6V as per the datasheet

  • Recommended values for the inductor are 4.7uH - 22uH and the high switching frequency of the regulator enables me to select small components here.
  • For the input and output capacitors, 22uF ceramic capacitors have either X5R or X7R type of dielectrics.

b) 3.3V Rail

For the 3.3V rail, I first use an RT8059 converter which is a high-efficiency Pulse Width Modulated (PWM) step-down DC/DC converter, capable of delivering 1A output current over a wide input voltage range from 2.8V to 5.5V. This was very ideal for my case since the LiPo batteries I will be using have a nominal voltage of 3.7V, a maximum of 4.2V when fully charged, and a minimum of about 3.0V when fully discharged.

  • You can set the output voltage using a voltage divider circuit using the same equation we’ve seen.
  • For the inductor selection, you can use the following equation to get an approximate value for the inductor.

where the ripple current can be approximated as 30% - 40% of the maximum output current

I then used an ultra-low loss power distribution switch with a programmable current limit to protect the power source from overcurrent and short circuit conditions. Current limiting is set by connecting a resistor Rset from ISET Pin to GND. To get the value of the Rset you want, you can use the following equation.

Rset = 6800/Current(A)

c) Charging circuit

For charging the batteries, I used the CN3063 which is a constant-current /constant-voltage linear charger for single-cell Li-ion and Li-Polymer rechargeable batteries. This device is ideally suited for solar-powered applications but it can also work with the USB specifications. It has a regulation voltage preset at 4.2V with 1% accuracy but can also be changed using a resistor. the device accepts input voltages of 4.4V to 6V meaning we would have to use a small solar panel delivering about 5W.

Some interesting features I haven’t mentioned yet of this device include the following.

  • Programmable Charge Current: With an external resistor, the continuous charge current can be programmed up to 600mA, providing flexibility in charging requirements.
  • Adaptive Charging: The on-chip 8-bit ADC adjusts the charging current based on the output capability of the input power supply, making it suitable for diverse scenarios.
  • Status Indication: The open-drain output pin indicates the charger's status, providing visibility into the ongoing charge cycle.

The charge current is set by connecting a resistor Riset from the ISET pin to GND. The ISET pin’s voltage is regulated to 2V during constant charge current mode.

Ich = (Vset / Rset) x 900

I then used two diodes to direct current from both USB and Solar to the charging circuit.

Improvements for a V2 level, so reading the value with an MCU will prove invaluable.

  • I also realized that there are scenarios where I would have both a solar panel and a USB connected to the brave board. Although nothing gothic happens to the board, I will have an automatic switch using a MOSFET to disconnect the Solar panel when both the solar panel and the USB are connected to the board.

Step 2: Wireless Connectivity

For wireless connectivity, LoRaWAN was an obvious selection. I won’t go deep into the theory behind LoRaWAN, all I can say now is that LoRaWAN stands as a low-power, wide-area networking protocol, leveraging the LoRa radio modulation technique as its foundation. Its primary function lies in establishing wireless connectivity for devices to the internet. For example, enabling your motion sensor to have a heart-to-heart with your alarm system and notify you when unprecedented motion is recorded.

LoRaWAN boasts several features that position it as an ideal fit for our IoT applications:

  • Long Range: As the name suggests, LoRaWAN provides long-range communication, making it a great choice if we are deploying a sensor node at the end of a large farm.
  • Low Power Consumption: LoRaWAN operates with a low-power design, allowing our IoT devices to conserve energy and operate on battery power for extended periods.
  • Low Data Rates: While not suitable for high-bandwidth applications, LoRaWAN's low data rates are perfect for transmitting small packets of data at regular intervals. This makes it suitable for applications like sensor networks and monitoring systems where periodic updates are sufficient.

I decided to choose the SEEED Studio’s LoRa-E5 module because it has built-in AT command firmware, making it easy to create prototypes or applications with just a few simple commands. However, soldering the module onto the board was probably the most challenging bit of the whole Green Dot development process. The module is small, and I don’t believe I had the right tools to handle that kind of hand soldering. It was only after I got soldering flux, and a better soldering iron tip that I was able to finish the job.

Designing around this module is quite simple. I connect UART and NRST to the host MCU to send AT commands. In addition, I connect Pin24 to a tactile push button because the grounding of the module will force the module to enter Boot upgrade mode. This module works on 3.3V so I also make sure to provide that.

a) Registering our LoRa Module

To register a device to a LoRaWAN platform, you can choose either of two options, Activation By Personalization (ABP) or Over The Air Activation (OTAA). One of the main differences between the two is that ABP offers simplicity and speed, while OTAA provides enhanced security through dynamic key exchange so for our case we will use OTAA to register our device.

When registering a device using OTAA (Over-The-Air Activation) in a LoRaWAN network, you typically need the following information:

  • Device EUI (Extended Unique Identifier): A unique identifier for the device. This is often a hardware-specific identifier burned into the device. This can be generated and written to the device but I’m going to just read it directly.
# Generating the Device EUI
import secrets

dev_eui = secrets.token_hex(8).upper()
print("DevEui:", dev_eui)

# Reading it
dev_eui = read_id(b'DevEui')
print("DevEui:", dev_eui)

  • Application EUI (AppEUI): A unique identifier for the application. This is required for OTAA and is assigned to the application by the network provider. It serves as a way to associate the device with a specific application. You may obtain it from your LoRaWAN network provider, or you can generate it yourself. It is a 64-bit (8-byte) value.
app_eui = secrets.token_hex(8).upper() # Formerly called JoinEUI
print("AppEUI:", app_eui)
  • Application Key (AppKey): A secret key shared between the device and the network server. This key is used during the OTAA process to establish a secure connection. The AppKey is typically kept confidential and should be known only to the device and the network server. It is a 128-bit(16-byte) value. Similarly, you can use a random value as your AppKey.
app_key = secrets.token_hex(16).upper()
print("AppKey:", app_key)

I’ll be using Loriot for this demonstration because that was readily available to me, but the same concepts apply to other similar platforms like The Things Network (TTN). Step 1 would be to enroll a device by providing the generated keys and a name for the device.

The next step would be to make sure those same keys are written to the LoRa module. This can be done as shown below.

from credentials import *
def configure_lora_module():
    set_work_mode("LWOTAA")

    # Set OTAA parameters
    set_id("AppEui", app_eui.encode())
    set_key("APPKEY", app_key.encode())
    set_id("DevEui", DevEui.encode())

    # Join the network using OTAA
    status = join_network()
    return status

Step 3: Selecting a Microcontroller

Choosing the right microcontroller is pivotal for the success of an IoT sensor node. Considering the requirements of low cost, low power, efficiency, and an easy development environment. I decided to go with the Seeed Studio’s XIAO RP2040. This breakout features the RP2040 microcontroller from Raspberry Pi bringing with it high performance, low cost, and ease of use to the microcontroller space.

Some of the features outlined on Seeed Studio’s website include:

  • High Performance: Powered by Raspberry Pi 2040 chip, dual-core operating up to 133 MHz, equipped 264KB of SRAM, and 2MB of onboard flash memory.
  • Ultra-small Design: 21 x 17.5mm, Seeed Studio XIAO series classic form factor, suitable for wearable devices
  • Multiple Development Interfaces: 2x buttons, 11x digital / 4x analog pins, 1x I2C interface, 1x UART port, 1x SPI port, and 1x SWD Bonding pad interface
  • Multiple Developing Platforms: Support Arduino / MicroPython / CircuitPython development, friendly for beginners, satisfied for electronics enthusiasts.

This SEEED module has an onboard RGB LED which we will use to visually illustrate the state of the system.

Sensor Interface

When it comes to interacting with sensors, the green dot board can hook up UART, I2C, and RS485 sensors. The connection block also has a set of two pins which can be used as programmable IO pins using the RP2040.

For the RS485, I’m using the SP3485 a +3.3V low-power half-duplex RS485 transceiver with a 10Mbps data rate. The RS485 standard allows for multi-drop (multiple devices on the same bus) and long cabling lengths. In addition, it offers great noise immunity. Some of the sensors that can be connected include the following;

The supporting components around the RS3485 include a bypass capacitor, a pull-up resistor on the RO line, and a termination 120-ohm resistor at the end of the twisted pair A B cables. I used a 120 ohm because the twisted pair cable used in RS485 is defined to have a characteristic impedance of 120 ohms and so by adding a 120-ohm resistor at the end of an RS485 transmission line, the signal will be dampened by the resistor instead of reflected into the bus.

The last bit is to route to my microcontroller.

NOTE: During testing, I realized something that you might have already noticed from this schematic, I had forgotten to connect the ENABLE pins from the SP3485 to my microcontroller. This will be done in my second revision.

Firmware

I wrote a simple MicroPython code to that sends some data to the cloud as proof of concept. The code can be found on my GitHub Profile. I started by writing simple functions to interact with the LoRa module and then used those functions to join the network and send data to the cloud.

# This function sends an AT command to the LoRa module
def send_at_command(command, response_timeout=5000):
    uart.write(command + b'\r\n')
    time.sleep_ms(response_timeout)
    return uart.read().decode('utf-8')

# This function sends hex data and blinks the onboard RGB LED when successfully sent
def send_msghex(hex_data):
    command = b'AT+MSGHEX=' + hex_data
    response = send_at_command(command)
    if "ERROR" not in response:
        blink_rgb_led(PURPLE)
    if "FPENDING" in response:
        print("Downlink Received!")
    print(response)

In the main file, I start by importing the required libraries and defining the firmware parameters.

import time
import machine
from machine import Pin, I2C, deepsleep

import SHT31
from lora_lib import configure_lora_module, send_msghex

# Define firmware parameters
UPLINK_INTERVAL = 60000         # In milliseconds
FIRST_TIME = True

# Configure SHT31 Sensor
i2c = I2C(id=1, scl=Pin(7), sda=Pin(6), freq =400000)
sensor = SHT31.SHT31(i2c, addr=0x44)

I then enter an infinite loop that first checks whether It’s the first time we are running the code, if it is then we join the network, if not we continue with the rest of the code that first reads sensor values and then sends then converts the values into hexadecimal for transmission. After transmission, the system sleeps for the defined uplink interval period.

# Loop after joined network
while True:
    if FIRST_TIME:
        # Configure LoRa Module
        status = configure_lora_module()
        FIRST_TIME = False

    # Read sensor data
    temp_humi = sensor.get_temp_humi()
    humidity = temp_humi[1]
    temperature = temp_humi[0]

    # Convert into hex for transmission
    sensor_data_hex = f'{int(humidity * 100):04x}{int(temperature * 100):04x}'

    # Transmit data
    send_msghex(sensor_data_hex)

    # Sleep for UPLINK INTERVAL (adjust as needed)
    print(f"Temperature: {temperature}")
    print(f"Humidity: {humidity}")
    time.sleep_ms(UPLINK_INTERVAL)

The final setup looks as shown below. I’m looking into getting a 3D-printed enclosure to just keep everything nice and tidy.

The green dot board powered by Lithium ion battery with temperature and humidity sensor attached in it
Green Dot with temperature and humidity sensor

Conclusion and final remarks

And there you have it folks, The Green Dot Board. This journey has been a total delight for me from the very beginning and I hope you can say the same thing. You can see below an illustration of how data is being received in the cloud. The next step from here would be to build either a custom dashboard to display all this information or to use a platform like Datacake which would integrate seamlessly with Loriot or TTN to do the data visualization.

A screenshot of a LORIOT dashboard showing the last 10 records from the green dot board with its attached sensor
Snippet of how data looks in LORIOT

I will be implementing some of the issues that arose along the way and updating the design in flux. You should be getting prompts of new updates as I do then and either choose to receive or deny them. Accepting updates is as simple as clicking the accept button.

|
March 13, 2024