Author Topic: AI circuit design experiment. Programing the meat of a component sandwich?  (Read 1542 times)

0 Members and 3 Guests are viewing this topic.

Offline excitedboxTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: de
I started doing some experimentation with AI in electronic circuit design and need some help.

I started out with a simple circuit description language which can be used for the human input into the system but will also be used later for a node based visual input system. Then I devised a parts/components database design which the system can use to build circuits from. I have a web scraper that will collect as many datasheets as I can scrape from digikey and manufacturer sites and there is a kicad project to parse through datasheets and extract component specs which I am looking to adapt to fill the database to the brim.

The way I envision the system working is that you place components and draw lines between them and the AI fills in the resistors, caps, inductors, and accompanying circuits. The AI basically takes the output voltage, and current of the pin the connection starts at and matches it with the input requirements (min + max) of the pin it ends at. It gets these values from the DB by querying the parts specified in the code.

Now comes the part I need help with. I need a way for the system to know what is needed for each type of connection or component beyond just matching voltages and amperage. Such as deciding if I need a diode, filtering circuit, voltage multiplier, h bridge etc. For a LED or Button it is easy to add a resistor based on either of those components being used. How can I programmatically decide where to place a filtering cap or diode?

I understand I will need to program these circuits and the equations for which part values to use, but I also need a way for the AI to pick when to use them. The end goal is that you would be able to place an MCU and a motor, lcd, buttons, sensors, adc, and draw lines between them and the AI can fill in the rest.


I will thank people ahead of time for not wasting everyones' time by posting it wont work and other negativity, this is not meant to become a finished product. This is me playing around and pushing myself to see how far I can take it. Mostly to improve my coding skills and knowledge of electronics.
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr

Now comes the part I need help with. I need a way for the system to know what is needed for each type of connection or component beyond just matching voltages and amperage. Such as deciding if I need a diode, filtering circuit, voltage multiplier, h bridge etc. For a LED or Button it is easy to add a resistor based on either of those components being used. How can I programmatically decide where to place a filtering cap or diode?


We decide where to place components depending on the desired function of the circuit, so the question is how to programatically encode such a function. This is probably a difficult problem for a general circuit, I would suggest first  considering some specific classes of circuits where the circuit function can be easily coded by a mathematical function. For example to design a filter (i.e. any linear circuit) we start specyfying its desired transfer function, and it is possible to devise an algorithm for the filter synthesis.
 

Offline unitedatoms

  • Frequent Contributor
  • **
  • !
  • Posts: 324
  • Country: us
AI doing circuit level self replication ? Don't people read in literature that it is the humanity's worst fear.  :)
Interested in all design related projects no matter how simple, or complicated, slow going or fast, failures or successes
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15067
  • Country: fr
I don't know what kind of AI you're going to use, I'm guessing NNs, as they are the most popular approach these days.

I guess you would approach this problem just like any other one based on learning? You'd need to build large data sets with expected outputs versus inputs for a given circuit. As there's obviously a dynamic side here, you'd need to take a look at how it's currently done for things such as music/speech recognition, or moving images.

Once you have that, you'd still need to add a learning "layer" to make your NNs aware of existing components and how they behave.

That looks like a very complex problem.

To make it a bit more tractable, you could approach it as some kind of optimization problem first.
The idea would be to kind of "synthesize and map" the functionality of a given circuit on a predefined array of analog cells which parameters and interconnections could be defined to perform a specific function. NNs or other kind of optimization algorithms, or a mix of both, could be used. For how to devise those generic analog cells, you could find some inspiration from Silego devices or the like.


« Last Edit: January 03, 2020, 04:07:34 pm by SiliconWizard »
 

Offline i_am_fubar

  • Regular Contributor
  • *
  • Posts: 53
  • Country: gb
Most designs are done through piecing together design patterns as opposed to designing from scratch each time.

For instance, low power LED on 5v circuit? 1k series resistor. Yes, you can calculate voltage drop, subtract from rail voltage and calculate that 20mA requires X resistor. But generally this is not needed in 90% of situations.

It may be worth trying to find a library of design patterns. Then based on what components are placed by the user, predict the target design pattern and fill in the blanks.

At that point, timing component selection could be based on known equations from datasheet application notes.

For instance, you place a 555 timer IC and an LED. *Bing*, suggestions - oscillator or timer? What time base.

Then resolve the actual RC(L) values via NN based on timing values.
 

Offline i_am_fubar

  • Regular Contributor
  • *
  • Posts: 53
  • Country: gb
If you really wanna go all out. Regenerative PCB designer please that auto calculates all parasitics and optimal layout for specific requirements :)
 

Offline excitedboxTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: de
Thanks for the great responses.

I will have to use several different AI methods
Multivariable optimization and evolution algorithms should hammer down the specific values for components. But Pattern recognition algorithms will have to detect when to use what sub circuits based on how close the input matches some circuit.

At first someone might simply place a MCU and a motor so the AI would put in a driving circuit. Based on the input power, size of the motor, pin output it can pick the right driving circuit and adjust component sizes to give the motor the right driving voltage. Then you put some buttons and leds, display, and buttons and the AI will ensure everything gets the right voltages which is still quite simple.

Later I want to go beyond that to being able to design circuits such that either through pattern recognition or the user saying I want to build an amplifier or motor driver etc. the AI then can say "ok these are the things a amplifier has and these are the values he is putting in so I need to find a set of components that output these results.

I like the idea of a circuit library that the AI matches. That might even be doable by modifying tensor flow or some other framework that is used for pattern recognition. The AI should then be able to identify the missing parts. Kind of the opposite of what image recognition does where it says these are the 60 or 80% that match, this will show the 20% still missing such as a filtering stage or rectifier. Then pick from a library of these sub circuits to insert. It might be easier to analyze a reference design as a netlist for pattern matching purposes.

I think I like that idea a lot. Make a library of reference circuits and as you design your circuit it generates a net list to use in pattern matching algorithms. Then determine what would make the 2 a better match and let the AI figure out the best components to recreate that net list and achieve the values needed by each component.


I want to calculate the optimal values instead of just putting a 1k resistor in series with an LED for instance because as a circuit becomes more complex there will be consequences to not optimizing. By calculating a optimal value you also give the evolution algorithm a starting point. As the component chain gets longer it might be easier or cheaper to find a LDO that fits if the voltage is a little higher so putting a different resistor is better.



There are a couple companies releasing AI circuit designers this year but it is hard to find information on how they do it. Jitx, Circuit mind, and Contunity, Zuken, Instadeep are all working on automating PCB design.

 

Offline pointhi

  • Contributor
  • Posts: 49
  • Country: at
I also thought about something like that some time ago. My idea was to have prebuilt design blocks where the inputs and outputs are annotated througfully. I would then simply tell the system I want USB, GPS and 2 switches, and it would try to build a working schematic.

In my case, the idea was to encode everything into SMT formulas and let existing solvers take care of finding an optimum. I even wrote some very crude prototype: https://gitlab.com/pointhi/kicad-schematic-builder

When KiCad gets python support for eeschema and abritrary annotations of subschematic pins, I will try to work on it again :P
 

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2154
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
I tried DeepPCB. I am 90% sure it is a fake. I gave it two relatively simple boards with known to be working placement, both triggered errors with no explanation given. I asked by email how trivial a board must be for their AI to handle it and got a canned response with no questions answered. I am sure they have nothing.
Everybody likes gadgets. Until they try to make them.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf