Simple Analog Circuits with GPT-4 ?
Its Friday and I was curious to try the new GPT-4 with a simple analog electronic design just to see if this model-based text generation can handle specification-like input and create something that can be useful in the design process.
I did not know what to expect in terms of its ability to generate electronic analog circuits.
I asked GPT-4 for the creation of a simple switch, but add in a constraint to limit the slew rate (speed at which the output voltage can be switched on). It is not a very hard problem to solve for someone in the field, but requires an understanding of MOS transistors, the terminology, principles of operation, knowledge of circuit design and so on... Not a trivial task for an AI to understand.
ChatGPT is also able to write letters and code various algorithms, so I figured I can give it a shot with circuits and see what comes out of its newly updated electronic brain...
Here is the first response of GPT-4 with minimal context. I was surprised by the level of details and depth of explanations
It picked up all the basic elements of the request. It also suggested a PMOS transistor which is a good start. Its one very large transistor however, so the suggestion is interesting, but an overkill for the specifications. Nevertheless, it is workable. It will definitely not burn up switching the required current.
GPT-4 went on with some calculations based on the transistor characteristics which seems OK and the time constant calculation is valid.
This circuit will have a behavior that limits the output voltage rise rate, but the GPT-4 model missed out on the fact that MOS transistors are non-linear devices and that the output will not track the gate voltage. It will be highly dependent on the temperature and many other factors.
It also has a bug because the two resistors are affecting each other as they are connected to the gate and I think that this basically hits the limits of what generative AI can do. They will give you all the main elements, but the interactions between them (in the analog sense) will not be considered. I am sure a researcher somewhere will hook the output to an analog simulator and train improved models, its just a question of time...
Switching Sides
I asked GPT-4 to transform the circuit from a high-side switch to a low-side switch but asking it indirectly specifying to use a NMOS.
I like how it kept the context of the initial request and reworked the circuit around this new demand, keeping other constraints and inferring that it is now a low-side switch.
That new transistor, the 2N7002 is interesting because its a very small one and will likely burn holding 1A of current continuously. Nevertheless, the overall explanations and approach is valid and the analysis is useful.
Can I get a circuit out of GPT-4 ?
GPT-4 cannot output images, so it is unable to display a circuit, but is able to output a SPICE netlist which is the textual representation of a circuit:
I tried to do a simulation and the circuit is valid (accepted by the simulator), but something was off and it was not working directly. I did not go further with that (its Friday...), but I find it still quite impressive because SPICE is a lesser used language and more niche than Python or Javascript.
Miller Effect ?
Just for fun, I asked to exploit the Miller Effect that is typically used to make better slew-rate limiting circuits with transistors. I was not expecting GPT-4 to be able to adapt, since it's a bit more complex and deeper in the topic:
I ended up with a 'network error' on GPT-4 (maybe because I left the session to try out the circuit in SPICE...).
Overall, I must say that for those types of niche problems, GPT-4 is impressive considering that the model also handles so many other different type of tasks.
Is GPT-4 going to take our expert jobs ?
Not yet! In conclusion, it's quite interesting to see how quickly the GPT models are able to tackle problems and provide insights in such a vast array of fields. I feel that it will augment the speed and efficiency of how people handle problems. It is a lot faster than digging the information from books and searches.
It is not going to replace accumulated expertise and insights, but recalling basic notions and guiding the conversation with the AI engine can lead to a more productive, faster knowledge gathering. I think one has to be careful not to take directly the output and assume that the design process is over. I can predict that will result in the magic smoke puffing out of circuits if they are directly implemented as-described by the tool without careful considerations of how they are integrated.
It is just the beginning and its very exciting to see the fast progress.
Senior Analog Design Engineer at Bosch
1yIt would be cool if Gen AI can generate a circuit diagram for presentation or publication purpose. Since sketch it in Visio is usually tedious.
System Automation at Hylas Technology
2yJust wonder if you work a simulated wheastone bridge with several resistors connected around the bridge to compensate for span and shift temperature changes in order to calculate a equivalent resistor or the exact value of a specific one. ?
I work with CEOs who are committed to creating environments where energy, creativity, and meaningful achievement flow daily
2yGreat work Jean-Samuel Chenard, I was going to try the AI answer from Chatsonic to create an answer (which has data up to now instead of 2021 for chatGPT) sadly I don't have any credit after playing extensively during vacations :)