Loading the Elevenlabs Text to Speech AudioNative Player...

In this project, we will be developing an IoT sensor node. We'll start with PCB design, manufacturing, programming and finally testing it.

If this sounds interesting to you and you'd like to request a demo or learn more, please contact sales.
Contact Sales
USE Flux Project Requirements Template
GO TO FLUX
Try AI Auto-Layout now!
Check if you got early access
Learn more about AI Auto-Layout
Explore NextPCB Templates
Open Flux to see if you have access
Download the Full Guide
View Projects with Polygons
Open Flux and start teaching Copilot
DOWNLOAD THE PDF
Try GPT-5 in Flux now

Get help with initial brainstorming

Starting a new hardware project can be overwhelming, but the completely overhauled Copilot simplifies the process by guiding you through component selection, spec verification. Just describe your goals and Copilot engages in a focused conversation to refine your requirements like a seasoned hardware engineer.

Copy Prompt
Get help defining your project requirements, block diagram, and research components

Ask me a structured set of questions (about 5 one at a time) to help brainstorm and outline the most important parts of a project including the critical technical requirements, including power, components, performance, constraints, Use case etc  

Always provide multiple options where applicable, considering trade-offs in cost, efficiency, size, and performance. By the end of this process, I want:  

1. A block diagram illustrating the system architecture.  

2. A complete list of all components, including passives and active components.

Copy Prompt
Go from a block diagram to specific components in a BOM

Here's a block diagram of this design. Please recommend at least three ICs from the @library for each block, highlighting their electrical characteristics and the reasons for your recommendations.

Streamline Parts Research

Instead of wading through datasheets and Google searches, use Copilot to select appropriate parts for implementation, recommending main and alternative components that meet design requirements. Tip: You can use tool like @library to direct Copilot to search the part library, or @file to direct Copilot to use datasheet details in it’s responses.

Copy Prompt
Get a list of part recommendations based on your requirements

@library List out 5 switching regulators that I can use for my project with a maximum output current of 2A. Include key parameters such as input voltage range, output voltage range, switching frequency, efficiency, and package type.

Copy Prompt
Extract reference design information from a part’s datasheet

@file extract the following details from the datasheet of @U2  

1. Key features  

2. Functional Pin Description  

   - List each pin with its name, function, and relevant electrical characteristics.  

3. From the Typical Application Circuit:  

   - List all components present along with their values in a table format.  

   - Describe explicitly how each pin is connected.  

4. Any circuit-Specific Design Notes

Copy Prompt
Alternative parts recommendations

Identify alternative components for @U4 with similar functionality, pin configurations, and electrical characteristics. Include key differences and trade-offs.

Copy Prompt
Obtain part’s maximum ratings

@file extract the absolute maximum ratings of @U1 including voltage, current, and thermal limits. Present the data in a clear table format.

Copy Prompt
Component research

@file Explain @U1 in detail, including its purpose, key functions, and common applications. Describe how it operates within a circuit and any notable characteristics. Also, explain the family or series this component belongs to, highlighting its variations, key differences, and typical use cases compared to other models in the series.

Copy Prompt
Obtain component operating conditions

@file Extract the recommended operating conditions for @IC2. Retrieve key parameters such as supply voltage range, operating temperature range, input/output voltage levels, and other relevant conditions specified for optimal performance.

Copy Prompt
Compare different parts

Compare LMR33630ADDAR and MP2451DJ-LF-Z in terms of efficiency, output ripple, load regulation, and thermal performance. Highlight key differences in topology, switching frequency, and suitability for a [specific application, e.g., battery-powered wearable]. Provide a recommendation based on [input voltage range, output voltage, current requirements.

Copy Prompt
Consolidate the BoM

Analyze all the parts in the project context and generate a consolidated parts table that optimizes component selection. Specifically, apply the following consolidation rule:

- Identify passive components (resistors, capacitors, inductors) with the same values but different MPNs (Manufacturer Part Numbers).

- Propose a single standardized MPN for each unique value, prioritizing parts with better availability, and popular supplier.

Present the table clearly. The table must strictly list and analyze all passive components in the project context. It must not use vague terms such as “etc.” or truncate the list in any way. The table should have the following headers (Original Part Category (e.g., Resistor, Capacitor, Inductor), Original Values/Specs (e.g., 10kΩ, 1μF, 100mH), Original MPNs (List all variants found in the project), Proposed Consolidated MPN (Recommended single part), Reason for Consolidation (e.g., same specs, better tolerance, reduced part diversity)

Edit Projects with Copilot

Copilot isn’t just here to answer questions—it can take direct action in your project, helping you place components, modify properties, and refine your design faster than ever. Instead of manually searching for parts or tweaking values one by one, you can ask Copilot to handle specific tasks, like adding a resistor with a defined value or updating a component’s footprint.

When Copilot detects an action it can execute, you’ll see an action button appear—click it to apply the change instantly. If you don’t see a button, try rephrasing your request or breaking it into smaller steps. While Copilot can’t yet generate an entire schematic at once, it’s great at guiding you through the process, handling tedious tasks, and keeping your workflow smooth.

Copy Prompt
Add parts to the project

I want the 555 timer to operate at a frequency of 1.5 kHz.

@library add the following components to the project:

- NE555 Timer IC

- 2-Pin Terminal Block Connector (for power input)

- Resistors:

   - R1 = 10kΩ

   - R2 = 100Ω

   - R3 (Current-limiting resistor for output)

- Capacitors:

   - C1 = 100nF (0.1µF)

   - C2 = 0.1µF (Decoupling capacitor)

- Diode: 1N4148

- LED

- Ground connection

Copy Prompt
Add a part to the project

@library add the following components to this project; NE555 Timer IC, 2-Pin Terminal Block Connector (for power input) and two 0603 1k ohm resistors

Copy Prompt
Replace parts

Replace @U1 with an LM2596

Copy Prompt
Quick batch edits to properties

Replace all 100nF capacitors with 10nF

Performing Quick Calculations

When working on a design, precise calculations are key—but instead of crunching numbers manually, Copilot can help streamline the process. Whether you need to size a resistor, calculate power consumption, or verify signal integrity, you can use Copilot to gather equations and relevant data before running calculations.

Start by pulling in the necessary formulas and values using @file or @library, ensuring you have all the details upfront. Once you’ve gathered the required inputs, use the @calculator tool to perform the calculations accurately. Taking this structured approach will help you get the most reliable results from Copilot.

Copy Prompt
Size passives - Sizing passives happens in two steps. First obtain the equations specified in the datasheet. Then perform the calculation

@file obtain the equation for sizing the inductor for @U2, along with the required parameter values needed for the calculation.

Copy Prompt

@calculator calculate the inductor size for U2 needed for my project (Vin = 5V, Vout = 3.3V, Iout = 1A)

Copy Prompt
Using IPC standards calculate ... (e.g., trace width)

@calculator calculate the required PCB trace width for the 12V power rail according to the IPC-2221 standard. The trace should handle a current of 3A with a maximum allowable temperature rise of 10°C. Assume a copper thickness of 1oz and an ambient temperature of 25°C.

Copy Prompt
Calculate decoupling capacitance

@calculator calculate the required decoupling capacitance for @C2 and @C3 considering ±50mv noise/ripple range.

Initial Planning and Brainstorming

Focuses on early project development to establish a solid project foundation.

Thumbnail of the electronic project
Copy PromptSee it in Action
Generate high level block diagram

@copilot, use mermaid-formatted block diagrams to generate 2 well-detailed architecture design of this project for comparison. Make sure to use the technical and functional requirements information.

Thumbnail of the electronic project
Copy PromptSee it in Action
Write a product requirement document with AI

@copilot, I’m designing a custom voice-controlled speaker and I initially want it to have buttons, Bluetooth, Wi-Fi, and rechargeable battery. Help me brainstorm and develop a comprehensive product requirements document. Ask me one question at a time, waiting for my response before moving to the next question.

Thumbnail of the electronic project
Copy PromptSee it in Action
Architecture design review

@copilot, validate the the suggested architecture in the block diagram matches the product requirements set for this project. Point out any missing blocks that would be needed to satisfy the requirements.

Design Circuit Blocks

Brainstorm and optimize modular circuit blocks for faster hardware development.

Thumbnail of the electronic project
Copy PromptSee it in Action
Power tree design

@copilot, based on my requirements, help me figure out the best power architecture for this project. What should the power tree look like?

Select Components

Involves choosing appropriate parts for implementation, recommending main and alternative components that meet design requirements.

Thumbnail of the electronic project
Copy PromptSee it in Action
Main part recommendation

@copilot, here's the block diagram of this design. In a table format, recommend at least 3 IC for each block highlighting the electrical characteristics of the IC and why you recommended it.

Thumbnail of the electronic project
Copy PromptSee it in Action
Minimum set of components to implement the typical circuit

@copilot, list all components specified in the datasheet of U1 for building the typical application circuit. Present the information in a detailed table format with equations needed to size the components.

Thumbnail of the electronic project
Copy PromptSee it in Action
Alternative parts recommendation

@copilot, outline the electrical characteristics of U4 as detailed in the datasheet. Then, suggest at least four drop-in replacement parts, presented in a table format with the columns

  • Replacement Part Number
  • Manufacturer
  • Key Specifications
  • Pin Compatibility
  • Performance Comparison
  • Notes/Comments
Thumbnail of the electronic project
Copy PromptSee it in Action
General parts selection

@copilot, query all components in the schematic that do not have an assigned manufacturer part number (MPN). Compile these components into a table format with the following details: Designator, Component Function, Electrical Properties, and Recommended MPN (Provide a list of recommended part numbers based on the component's properties, focusing on the most popular and widely available parts).

Improve Supply Chain

Focuses on optimizing component selection and management, including consolidating similar passive components and addressing part obsolescence to streamline the bill of materials and reduce costs.

Thumbnail of the electronic project
Copy PromptSee it in Action
Passive component consolidation

@copilot, perform a BoM consolidation review to identify passive components (resistors, capacitors, and inductors) that have similar but different values (within ±50%) and the same package code. The goal is to simplify the BoM and reduce costs by replacing these components with a single value where possible, without affecting the circuit's functionality.

For each group of similar components, compare their electrical and mechanical characteristics, then identify a single value that can replace the others. Provide a detailed comparison table for each group, listing the designators, component values, package codes, and the proposed consolidated value, along with key specifications and any additional notes. Document the final proposed consolidated BoM in a table format.

Thumbnail of the electronic project
Copy PromptSee it in Action
Part obsolescence management

@copilot, identify all components in the schematic that are either obsolete or not recommended for new designs (NRND). Compile these components into a table with the following details: Designator, Description/Function, Obsolete/NRND Status, Recommended Alternative Parts (Suggest at least 2 alternative components and their MPN that are current, widely available, and suitable replacements, based on the original component's specifications).

Calculate Component Values

Involves precise calculations for sizing various components often using Python for accuracy and presenting results in detailed tables.

Thumbnail of the electronic project
Copy PromptSee it in Action
Size passive components of voltage regulator

@copilot, from the datasheet of U1 obtain equations used to

  • set the output voltage to 3.3V
  • size C8, R3 and R7 (Reference the typical application circuit)
  • Size inductor

Calculate these values using python and present the results in a clear and detailed table.

Thumbnail of the electronic project
Copy PromptSee it in Action
Size oscillators and load capacitors

@copilot, use Python to calculate the load capacitors for Y1 using the information from its datasheet.

Thumbnail of the electronic project
Copy PromptSee it in Action
Size limiting current resistors

@copilot, use the datasheets of LED D5 and D2 to obtain electrical characteristics needed to calculate the appropriate current-limiting resistor value. Then use python to calculate the value and present it in a well detailed table forma.

Research Components

Involves detailed examination of integrated components to ensure proper component selection and usage in the design.

Thumbnail of the electronic project
Copy PromptSee it in Action
List IC Pin names and functions

@copilot, from the datasheet of U2 List the pin names, functions, and additional attributes for the IC. Include the following details for each pin in a table format: Pin Name, Function, Pin Type (e.g., power, ground, signal), Pin Direction (e.g., input, output, bidirectional, passive), Default State (e.g., high, low, floating), Voltage Level (if applicable), Additional Notes (e.g., pull-up/pull-down resistor, special considerations).

Thumbnail of the electronic project
Copy PromptSee it in Action
Absolute maximum rating considerations

@copilot What are the absolute maximum ratings for U5? Identify any critical components that must be carefully selected to stay within these limits and present the results in a well detailed table format.

Data Visualization and Analysis

Utilizes Python to create visual representations of design data to assist in analysis and decision-making.

Thumbnail of the electronic project
Copy PromptSee it in Action
Visualize with charts

@copilot, use python to plot a bar graph showing the most expensive components in this design.

Design Reviews

Provides thorough checks of specific circuit elements to verify correct calculations and implementation in the schematic and layout.

Thumbnail of the electronic project
Copy PromptSee it in Action
Review decoupling capacitor presence

@copilot, list all ICs and the decoupling capacitors attached to each. Ensure to include all ICs present in the design, including digital ICs, power converters, LDOs, etc. For every IC, clearly state:

  • What power net the decoupling capacitors are attached to. What is the stated voltage of that net.
  • The voltage rating and value of the attached decoupling capacitors.
  • Signal with the expression “[WARNING]” if any of the following conditions are met: no decoupling capacitors are attached; the voltage of the power net is higher than the voltage rating of the capacitor; No voltage range was stated for the capacitor. Give a separate “[WARNING]” for each condition. Signal with the expression “[OK]” if none of those conditions are met
  • Express the result in a markdown-formatted table
Thumbnail of the electronic project
Copy PromptSee it in Action
Review my current limiting resistors

@copilot, review the design to ensure all current-limiting resistors for LEDs are correctly calculated for a current range of 1mA to 10mA. Follow these steps:

  1. Identify all LEDs and their resistors.
  2. Reference the datasheets for forward voltage (Vf) and current (If). Make no assumptions in this step
  3. Calculate the correct resistor values.
  4. Verify that schematic values match calculations.
  5. Document findings in a table with LED designator, Vf, If, calculated resistor value, schematic value, status, and notes.
Thumbnail of the electronic project
Copy PromptSee it in Action
Calculates and analyzes the efficiency of PMIC in varying load conditions

@copilot, determine the efficiency of U4 at various load conditions, considering that the input is a battery with a voltage range from 4.2V (fully charged) to 3.3V (low battery level). Identify which components in the circuit affect this efficiency and present that in a detailed table. Finally, use python to plot a graph showing the efficiency of U1 across the range of load conditions and input voltages.

Testing and Reliability Analysis

Generates test plans and collaborative workflows, ensuring your hardware is manufactured error-free.

Thumbnail of the electronic project
Copy PromptSee it in Action
Test Plan

@copilot, create a detailed step-by-step plan table for this project to verify its functionality.

Thumbnail of the electronic project
Copy PromptSee it in Action
FMEA Report

@copilot, develop an FMEA (Failure Mode and Effects Analysis) report in a table format that analyzes the systems schematic, each unique component specification, and operational parameters. It should identify critical failure modes, assess their impact, and recommend mitigation actions based on severity, occurrence probability, and detectability. Include columns such as: process step, potential failure mode, potential failure effect, S, O, D, RPN, Action Recommended, and any other you see fit.

Initial Brainstorming

Copilot can help get you started quickly by understanding the requirements and providing guidance.

Architecture diagram of an electronics project
Copy Prompt

@copilot here's a block diagram I've been working on. Can you suggest ICs I might use to implement this in Flux?

A esp32 and couple of relay module with a DC motor
Copy Prompt

@copilot I'd like to build a smart curtain that opens or closes based on the amount of sunshine I want to enter my room. How would you approach designing this? Please ask me questions to help with the development.

A prototype of an electronics project consisting of buzzer, a coin cell battery and looks like an 555 timer IC
Copy Prompt

@copilot I'm designing a PCB for a medical device that measures heart rate and temperature. Can you give me the list of components I will need?

Prototype of a smart watch with an old rare classic LED display
Copy Prompt

@copilot I'd like to build geeky wristwatch with LED display. How would you approach building this? Please ask me questions to help me design this.

Faster Design Iteration

Copilot can connect complex parts for you, explore design options, and provide a bill of materials for a target project.

A graph of battery charging phase
Copy Prompt

@copilot here's a plot of the charging profile of U2. What charging phase would it be in at 3.2V?

Copy Prompt

@copilot, how would I connect these parts to make the LED flash at 1kHz?

Copy Prompt

@copilot, how would I connect these two HDMI connectors as a pass through?

Copy Prompt

@copilot, how should I connect RP2040 and TFT LCD?

Copy Prompt

@copilot can you choose 4 digital pins on the ATMega328P-AU that I have here to use as GPIO given that I am already using some pins for reset, the external clock, UART, and I2C.

Combing Through Huge Datasheets

Copilot can understand datasheets and reference them in its responses. This means you get more accurate responses when asking Copilot questions about specific parts.

Copy Prompt

@copilot what's the max voltage I can supply to U2?

Copy Prompt

@copilot can U2 withstand intense operating temperatures even without a heatsink?

Copy Prompt

@copilot what is the maximum frequency I can reach without an external crystal on U6?

Copy Prompt

@copilot I'm a firmware engineer. How do I configure an interrupt on a pin for U4?

Copy Prompt

@copilot what are the clock requirements for U4?

Copilot as your Flux Tutor

Copilot answers questions about how to use Flux by referencing our documentation. So, instead of getting stuck and searching documentation, you can stay in the flow and get the help you need without leaving your project!

a soic-8 intergrated circuit pin out and its dimension
Copy Prompt

@copilot can you explain the different dimensions of this footprint diagram?

Copy Prompt

@copilot how do I know if a part has a simulation model?

Copy Prompt

@copilot how do I connect ground to these components?

Copy Prompt

@copilot I can't find part on the library what do I do?

Copy Prompt

@copilot how do I know my projects are safe and private?

Copy Prompt

@copilot what resistor do I need to limit the current on LED1 while being driven by U1?

Copy Prompt

@copilot can you help me debugging this circuit, and help me understand if there's any problems?

Copy Prompt

@copilot can you check all my components in my schematic and tell me if I am missing any manufacturer part number fields?

Copy Prompt

@copilot how would I decrease the distance between my ground fill and my vias?

Part Selection

Copilot can provide valuable recommendations to optimize your design based on constraints and specifications.

Architecture diagram of an electronics project
Copy Prompt

@copilot please review this block diagram and compare it to my project, is there anything I'm missing?

Copy Prompt

@copilot what components do I need to power a 30w speaker to this audio driver amplifier?

Copy Prompt

@copilot can you suggest a suitable ADC for microphone pickup going through an Arduino Uno?

Copy Prompt

@copilot can I use U1 to make a 20db gain op-amp?

Copy Prompt

@copilot I want to build a PCB that uses a solar panel to charge a single cell LiPo battery. I want to measure ambient pressure with a microcontroller and send that over WiFi. What are all the components I would need?

Find Alternate Parts

Copilot can offer tailored suggestions and analyze tradeoffs based on your project goals, constraints, and specifications.

Copy Prompt

@copilot can you suggest an alternative to C1 that meets the same specs but is more cost-effective?

Copy Prompt

@copilot are there any alternatives to U2 that have better availability?

✨ Pro Tip: Use @tools to give Copilot more direction

Flux Copilot has a range of tools to help you through your design process. For the best results, use one tool at a time. This helps Copilot focus on a single task, making its responses more accurate and actionable.

  • Use @library to direct Copilot to search Flux’s library of components. This is useful when you want to insert components that are in the parts library.
  • Use @file when you want to direct Copilot to access datasheets, PDFs, or other documents that are attached to your project or components when conducting detailed analysis. You can also attach files to the prompt itself.
  • Use @calculator when you want Copilot to calculate a value with deterministic instead of relying solely on AI reasoning.
  • Use @code to create Python code snippets to create graphs, simulate, or validate design ideas.
  • Use @help to get guidance on using Flux features and best practices.

Flux Copilot is here to make hardware design more straightforward and efficient. By following these prompts and tips, you can streamline your workflow, reduce errors, and tackle each step of your project with confidence. Feel free to share your results and favorite prompts in our Slack Community.

Happy designing!

Copy the Prompt and Try it Now
Design a low-noise microphone preamplifier for an electret condenser mic feeding a 24-bit ADC. You must calculate the bias network, gain-setting resistors, coupling capacitors, input high-pass cutoff, output anti-aliasing RC, and decoupling layout. Follow the op-amp and microphone capsule datasheets, ADC input requirements, and industry best practices. It will be integrated into a design. Supply: 3.3V analog rail. Mic bias: 2.0 V through resistor, current ~0.5 mA. Target gain: 20 dB to 40 dB switchable. Bandwidth: 20 Hz to 20 kHz. Input noise target: as low as practical. Include pop-suppression considerations and star-grounding strategy.

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.

Profile avatar of the blog author

Collins Emasi

Collins is an electronics engineer with a certain knack for IoT and human-centric hardware design. Find him on Flux @collinsemasi

Go 10x faster from idea to PCB
Flux is an all-in-one EDA. Use re-usable blocks, scripting, and a library you don’t have to manage to dramatically reduce the time it takes to go from idea to prototype.
Illustration of sub-layout. Several groups of parts and traces hover above a layout.
Illustration of sub-layout. Several groups of parts and traces hover above a layout.
Build PCBs with an AI Teammate
An AI-powered eCAD platform featuring Flux Copilot—an AI teammate that reviews schematics, reads datasheets, and can even route your board.
Screenshot of the Flux app showing a PCB in 3D mode with collaborative cursors, a comment thread pinned on the canvas, and live pricing and availability for a part on the board.
Build PCBs with an AI Teammate
An AI-powered eCAD platform featuring Flux Copilot—an AI teammate that reviews schematics, reads datasheets, and can even route your board.
Screenshot of the Flux app showing a PCB in 3D mode with collaborative cursors, a comment thread pinned on the canvas, and live pricing and availability for a part on the board.
Build PCBs with an AI Teammate
An AI-powered eCAD platform featuring Flux Copilot—an AI teammate that reviews schematics, reads datasheets, and can even route your board.
Screenshot of the Flux app showing a PCB in 3D mode with collaborative cursors, a comment thread pinned on the canvas, and live pricing and availability for a part on the board.
Flux for Enterprise
Learn how Fortune 500s are revolutionizing hardware design at scale with AI.
Flux for Enterprise
Join leading Fortune 500s and over 300k hardware engineers revolutionizing the way they build PCBs with AI
Flux for Enterprise
Join leading Fortune 500s and over 300k hardware engineers revolutionizing the way they build PCBs with AI