AI and Electronics circuit design

AI seems to be everywhere these days. The use of AI in creating electronic systems is rapidly advancing. And AI-driven tools can now play a role in several stages of the design process. Certainly, for parts selection and pcb layout optimization, but recent advances hold out the promise that AI can begin to automate the creation of optimized circuit designs. Or can it? Can today’s AI create practical, workable, and complete designs for a real-world electronic circuit?

We recently had the occasion to design a simple low voltage cutoff for a 12 VDC battery powered device. The goal was to prevent battery drain during extended periods between active use. Of course, there are many different circuit designs that can work. Here’s ours as a reference:

Whitespace schematic-ai1

The design started as a two FET solution, the additional FET was added to drive the gate for the load FET harder to sharpen the transition. Let’s see if ChatGPT can come up with something similar.

Since the Generative AI of ChatGPT allows a degree of variation in the building of the generative response (I’ll write more about the GenAI process in another post), I ran the following query several times:

"Design an electronic circuit for a battery powered device to cut off the device when the battery voltage drops below 12.4 volts. Use FET transistors. Do not use relays. Current draw when the device is cut off should be less than 50 microamps."

Prompt engineering is also a bit of an art. For a few of the runs I had to specify that the design use a Zener diode for the voltage reference.

Each suggested response identified the right basic components (Zener, P channel FET for voltage monitoring, and N channel FET for the load switching), and provided good basic discussion on the general approach. Actual circuit topology is provided only as a ‘plaintext’ diagram – no schematic capture feature is yet available. One example is provided below.

None of the example circuit designs, however, yielded an actual working circuit. Frequently components referenced in the discussion of operation were omitted from the circuit schematic. Component connections were misplaced or otherwise unworkable.

One of the key limitations of current end-user available GenAI systems is that inherent in how they work, they create a response that only ‘appears’ to mimic the data the system was trained on. Fine reasoning and end-to-end valid logic is still a work in progress. Any results generated for design work will need to be scrupulously vetted for accuracy and correctness.

There are some specialty AI systems that show promise of doing better. Claude.ai is one, Circuitmine.io another. Still at today’s level of proficiency, for actual circuit design GenAI is likely only useful to get a junior engineer pointed in the right direction. We humans will have to stay in the game a while longer.

In a follow-up post we’ll discuss which steps in the design evolution can best use AI to aid the process.

Thanks for reading.


A ChatGPT response:

To design a battery protection circuit that cuts off a battery-powered device when the voltage drops below 12.4 volts using FET transistors and with a current draw of less than 50 microamps, you can follow this approach:

Components Needed:

  1. N-channel MOSFET: For switching the load on and off
  2. P-channel MOSFET: For voltage sensing and control
  3. Zener Diode: To set the reference voltage
  4. Resistors: To set the reference voltage and create a voltage divider
  5. Capacitors: To stabilize the voltage and filter noise

Circuit Design:

  1. Voltage Sensing and Reference Voltage
    • Zener Diode: Choose a Zener diode with a breakdown voltage close to 12.4V. For instance, a 12.4V Zener diode or a combination of diodes to achieve a similar reference voltage.
  2. Circuit Components:
    • R1: Divider resistor
    • R2: Divider resistor
    • R3: Pull-up resistor
    • R4: Resistor to limit current through the Zener diode
    • C1: Capacitor to filter noise (e.g., 10uF)
  3. Circuit Operation:
    1. Voltage Divider for Reference:
      • Use a voltage divider to scale down the battery voltage to a level suitable for comparison. For example, if using a Zener diode with a breakdown voltage of 12.4V, you can design a voltage divider to set the reference at this voltage.
      • V_ref = V_battery * (R2 / (R1 + R2))
    2. Zener Diode Reference:
      • Connect the Zener diode in reverse breakdown mode to set the reference voltage. The Zener diode will turn on when the voltage across it reaches 12.4V.
    3. Control FET:
      • P-channel MOSFET: Use this to sense the battery voltage and control the N-channel MOSFET.
      • Connect the Zener diode across the gate and source of the P-channel MOSFET.
      • The source of the P-channel MOSFET is connected to the positive battery voltage.
    4. N-channel MOSFET:
      • Use this MOSFET to switch the load on and off.
      • Connect the drain of the N-channel MOSFET to the negative side of the load.
      • The source of the N-channel MOSFET is connected to the ground.
      • The gate of the N-channel MOSFET will be driven by the drain of the P-channel MOSFET.

Circuit Diagram:

Battery Positive (+)
|
|
[R4]
|
|------->| Zener Diode (12.4V)
|
|
[R1]-------> Gate of P-channel MOSFET
|
|
[R2]
|
|
Ground

P-channel MOSFET:
Source ----> Battery Positive (+)
Gate -------> Junction of R1 and Zener Diode
Drain -------> Gate of N-channel MOSFET

N-channel MOSFET:
Source ----> Ground
Gate -------> Drain of P-channel MOSFET
Drain -----> Negative side of Load

Operation:

  1. When the battery voltage is above 12.4V, the Zener diode is not conducting, and the P-channel MOSFET is turned off. As a result, the gate of the N-channel MOSFET is held low, allowing current to flow through the load./li>
  2. When the battery voltage drops below 12.4V, the Zener diode starts conducting, turning on the P-channel MOSFET. This action pulls the gate of the N-channel MOSFET low, turning it off and cutting off the load.

Notes:

  • Component Selection: Ensure that the FETs you choose have a low gate threshold voltage and low leakage currents to maintain the current draw requirement.
  • Capacitors: Use capacitors to stabilize the reference voltage and prevent oscillations or false triggering.

This design ensures that the load is disconnected when the battery voltage falls below 12.4V, while keeping the current draw well within the specified limit.

WhitespaceSo, what do you think?