New & Reviewed

Better hardware design with Flux.AI

Liam Davies

Issue 72, July 2023

Flux.AI is one of the most interesting pieces of electronic design software we’ve come across, so we just had to check it out. Here are our thoughts!

Design software for makers is essential. Its uses range from schematics, simulation and PCBs all the way to fully-fledged 3D models and EMI simulations. Want to move from the “a mess of soldered wires”-era to the slick, compact circuit board era of a project? You’ll probably need to learn at least one of the many circuit design software packages available. Bottom line - they’re an incredibly important part of any electrical engineer’s or maker’s toolbox.

However, design software has been known to be quite clunky. Many designers and engineers still use software like LTspice and EAGLE that have been around for decades with minimal fundamental changes in functionality. The UI is ugly, the keyboard shortcuts are esoteric, and yet, they’re still the standard for many tinkerers and engineers. One could argue they’re fairly static for a reason - massive changes in usability will significantly impact the speed and reliability of design workflows. But above all, these software packages stand the test of time because they work, and they work well. If it works, why change it?

LTspice is not new software, but many tinkerers (ourselves included) couldn’t go a day without it.

On the other hand, it’s 2023. We now have access to incredibly powerful computers and optimisation systems that give us the capability to design our systems faster and with better performance than ever before. There are a few software packages that are beginning to explore modern design techniques, such as EasyEDA and KiCAD with their web-connected designs and modern UIs.

Flux.AI is the first software we’ve seen that has truly tried something new in this hardware design space. We had an opportunity to talk directly with Kerry from Flux and learn first-hand about the possibilities they’re exploring.

Flux.AI

Flux is a web-based circuit design software. You don’t need to download anything to your computer - just head to flux.ai and create a project. When we first started experimenting with the software, we immediately started noticing a few resemblances to the Google Suite of collaborative tools (Google Docs, Sheets, etc). Users of traditional EDA software will find the UI familiar, but with a number of modern changes. A dark theme is available - a sight for sore eyes - and most UI elements are sleek and easy to navigate.

We liked that it wasn’t simplistic. Some innovative web tools we’ve seen take this a step too far and start stripping back useful functionality in order to simplify the interface more. We won’t name names!

First Impressions

After signing up for a free account and creating a project from the main view, we experimented by creating some basic test circuits in the editor. The internal code is mostly written in TypeScript from what we can tell, so performance is fast, and it’s a joy to drag elements from the sidebar into the workplace.

Collaboration is supported, which is a big change for electronic design software. Like Google Docs, the cursor of fellow collaborators can be seen working in the document, and changes are live. Forget juggling files across Dropbox or Git commits!

One thing we started to miss quite quickly was the ability to snap elements to the grid. Currently, elements can be dragged anywhere, so it's important to be accurate with your wire connections to bridge everything together properly. We found some components can end up slightly misaligned, which can lead to confusion about whether a wire node is actually connected.

Sometimes, dragging and connecting wires can be unintuitive. Tooltip boxes can pop up over a wire node, which can be frustrating to connect properly. Dragging a capacitor, for example, on top of an existing wire won’t replace it with the target component like LTspice does - it just connects it over the top.

Other UI elements like comments can also be weirdly scaled and difficult to read on the screen. However, from a holistic view, most of these issues are minor - we expect that most of these issues will be resolved as more users jump on-board with Flux. Flux certainly looks to be consolidating their position as a viable alternative to classic design software, and, at time of writing, fixing small bugs is probably a lower priority than adding awesome new features. Speaking of which…

AI Copilot

Around a fortnight before writing this, Flux released an extremely interesting new tool: Copilot.

Essentially, it’s ChatGPT for your electronic design projects, but with a fully contextual and fundamental understanding of the components in your project. We’ve tried asking ChatGPT how to design basic circuits before, however, it has no awareness of the other components in your project.

Copilot isn’t intrusive - it doesn’t place components in your project. Like ChatGPT, it’s a Large Language Model (LLM) and doesn’t currently have the ability to actually modify your schematic. To activate it, ping it with @copilot in a comment on your schematic with your request. Here is an example we tried with an ATmega328P chip:

We didn’t say anything about the rest of our circuit - we just asked what frequency our oscillator crystal should be.

It recognised the components, it considered different design solutions and gave us a definite recommendation.

Let’s try something else:

A shortened version of Copilot’s response is below:

Here's the final list of components:

  • Op-amp: LM358 (SOIC-8 package)
  • R1 and R2: 4 kΩ each (0603 package)
  • C1: 3.1 nF (0603 package)

Please note that this design is for a single-pole low-pass filter with a simple topology, and it might not have the best performance characteristics in terms of rejection, roll-off, or phase response. For more advanced performance, consider using a multi-pole filter with Butterworth, Chebyshev or other advanced topologies.

Wow. This is genuinely impressive. It doesn’t show a physical schematic layout, but it still has excellent theoretical understanding of circuit theory. This is really impressive. We’ve spoken plenty about modern AI tools and their capabilities recently in DIYODE, so we won’t delve too far into this. If you do want to see more though, check out Flux’s twitter account: @MadeWithFlux

Shortcuts

We’d argue that shortcuts deserve their own category for new software, because having the ability to make tasks subconscious with keyboard shortcuts is absolutely vital. Like Google apps, a big list of shortcut keys can be found with the Ctrl+/ key, so we spent some time experimenting to see how fast we could make our workflow.

While there isn’t any ability to use “letter” shortcuts like LTspice - e.g. G for Ground, V for Voltage, it’s possible to bind your favourite components to the number keys 1-5. This is handy, but even with our limited experimentation, we started running out of component slots quite quickly.

Simulation

Unlike KiCAD, EasyEDA and other popular EDA software, Flux integrates automatic simulation when you’re working with virtually no setup. There isn’t even any dedicated “Simulation” tab in the software. If you’re in the schematic, the simulation is automatically enabled.

The only requirement of the simulation view is that you need to have simulation models available for the targeted part. This means that, currently, you can’t simulate more complex parts like microcontrollers or anything beyond very basic ICs. You can, however, write your own part simulation models with the programming system, which we’ll get into shortly.

PCB View

The PCB design workflow in Flux is slightly different from other software you may be familiar with - there is no process for ‘exporting’ parts to the PCB layout. Flux, like the Simulation view, automatically transfers your parts to the PCB layout, provided that you have a footprint and pinout associated with each. This makes it incredibly easy to experiment with different footprints and layouts without needing to pull changes from your schematic every time you make a change.

However, besides that, it’s as simple as clicking on traces to route a PCB. It’s not the most refined experience in the world, as you’ll need to set up your own DRC (Design Rule Checking) so you don’t run into faulty PCBs. We’re looking forward to seeing how this experience will change over time as more updates are released for the PCB editor.

Custom Parts

Flux has made it very easy to integrate custom parts into the software, allowing users to create “Components” which consist of individual components inside them.

For example, if you have many LEDs with individual drivers and supporting circuitry, you can save a lot of headaches by simply converting each section into a component. Your final schematic will use your created components, which contain the individual circuitry inside each component.

However, the “component” system is more than just a symbolic container in the schematic - it also maintains its layouts as it carries over to the PCB. The component can have its own PCB layout, so when placed into a larger design, the constituent parts won’t need to be replaced! Awesome!

There are some minor issues we’ve found with this component system, such as reference designators. Multiple copies of components will use the same designators when duplicated. For example, two components containing a resistor called R1 will not rename the second to R2 - this could confuse both human assemblers and automated PCB services if the PCB is exported.

A Vision For Manufacturers

The needs of makers and engineers hugely influence the design decisions for a large software such as Flux. However, during our chat, Flux remarked on something bigger they’d like to look into in the future:

This is a really interesting concept, and, for the first significant time in the modern “maker” industry, we may be able to truly interact closely with manufacturers of our favourite designs. Instead of trawling the web for poor-quality or mis-translated datasheets, we can simply use the fully implemented and tested on Flux and natively integrate them into our designs.

Any experienced maker will immediately realise the time-saving potential of this idea. Imagine being able to drag-and-drop a 100% correct submodule into your design, directly sourced and tested by the manufacturer. Manufacturers will benefit too, as it allows their end-customers to buy their products with less concern as to how they will integrate into the design.

Programming

Between the “Schematic” and “PCB” tabs at the top of the project editor, the “Code” tab lies dormant, ready for tech-savvy makers to implement their own functionality into their projects.

We have many scripts on our computers in the DIYODE office for automating all sorts of tasks, so we were immediately intrigued by this. Flux.AI includes a handy reference to their code library, which allows automatic handling of code values and assignments. For example, here is a short snippet of code on the website:

// Convert units
= 22ohm to mOhm
// Calculate LED Ballast
= ledBallast(0.02, 2.9)
// get the objects position rule
= this.rules.position
returns "12mm 3mm"

The integrated Flux code can be used for picking suitable component values, such as calculating gain for transistor circuits using commonly-available resistor values.

Currently, it only supports JavaScript and TypeScript, but the developers have stated their interest in adding support for other languages such as Python too. The integrated IDE is based on Microsoft Visual Studio Code, so it’s very fluid to work with. The code itself is fairly straightforward and can be used to natively integrate with the simulation system. The simulation engine itself is also extremely powerful and has clearly been designed with a serious attention to detail.

A high-level view of Flux’s simulation engine

Flux.AI has made it clear that the average user shouldn’t have to worry about all this maths stuff, though:

During our brief time with the code system, we did find that while the code is easy to write and understand, there were some interesting quirks with the API itself. Here is some example code that Flux provides for a resistor:

// listen to the simulation setup event
flux.on("setup", (event) => {
    flux.simulationModel = {
        type: "resistor", // The type of model we want to set
        resistance: 1000, // The resistance of the resistor
        map_input_to_terminal_uid: "1e5f31d6-2e01-427f-18b7-c4661ce4f0d2", 
// map the terminals
        map_output_to_terminal_uid: "d6839958-464a-22d4-c933-293fecbddc1c", 
// map the terminals
    };
});

The terminal mapping UIDs are slightly unintuitive, which Flux.AI talks about more on its ‘What's Supported’ pages. This leads to a bit of copy-pasting across the editor, which can be confusing for beginners.

Unfortunately, we didn’t get a lot of time to experiment with and test the limits of the system. We’d love to revisit this in future when we see the Code system become fully integrated with other design tools too.

Pricing

Whenever we review software, we always delve into the pricing model for the software - we always find it reveals a lot about the underlying business model and where the priorities of the designers lie.

Flux.AI is clearly designed to be community first - most people will use the ‘Free’ tier, which includes almost all functionality indefinitely. The main limitation that the ‘Free’ tier has is a limited number of private projects, which mirrors the approach platforms such as GitHub has towards pricing.

We appreciate this pricing strategy, as most individuals won’t care about private projects, and their works can contribute to the public library of parts. Companies - both small and large - will pick the ‘Pro’ or ‘Organisation’ tiers for $12/editor/month and $45/editor/month respectively. These tiers offer private projects and additional business-orientated features. We can see Flux.ai becoming an incredibly powerful platform for small IoT businesses that require collaboration-focused software with minimal learning curve and a price that won’t break the bank.

Final Thoughts

We were quite excited to write this review, as Flux is one of the first promising leaps we’ve seen in the electronic design space for a few years now. Sure, there are more advanced design suites available for engineers and technical simulation packages, but few are readily available and accessible to the average tinkerer. Flux is promising an exciting lineup of features that has the potential to completely change the way makers design, build and test their products.

If you’re interested in giving Flux.AI a go, head over to Flux.ai and sign up for a free account. Let us know what you come up with at @diyodemag.

Example Project
Mobile Example
The Flux.AI website has comprehensive tutorials and videos, including this one about ground fills.
Flux encourages its community to use and reuse components. No more trawling through datasheets!