Today I will leave the usual compilers and IDE’s aside, and I will take a quick look at the MPLAB Mindi™ Analog Simulator, based on the SIMetrix/SIMPLIS simulation environment, with the added benefit of proprietary model files from Microchip. Thus, in addition to generic circuit devices, one can to use those proprietary models to simulate many Microchip analog components.
At the core of MPLAB Mindi™ lies SIMPLIS (SIMulation of Piecewise LInear Systems), a circuit simulator designed to handle the simulation challenges of switching power systems. Similarly to SPICE (Simulation Program with Integrated Circuit Emphasis), SIMPLIS works at the component level but is 10 to 50 times faster. For switching power systems, the piecewise linear (PWL) in SIMPLIS can provide superior convergence behavior compared to SPICE.
Before going into the particularities of MPLAB Mindi, it’s worth noting here that there’s also a free version SIMetrix/SIMPLIS Elements which one can use without license or copying restrictions, for personal, educational and business use. The SIMetrix/SIMPLIS Elements comes with all the features of the full version, but the size of the circuit that can be simulated is limited. However, those limits are generous enough for them to be used for real work, especially when it comes to the simulation of simple circuits — such as the case of many student projects.
Same as the SIMetrix/SIMPLIS Elements, MPLAB Mindi is also free, but it comes with the added functionality provided by the pre-installed proprietary model files from Microchip. There are over 300 model libraries, covering a wide range of Microchip products: Operational Amplifiers, Instrumentation Amplifiers, Active Filter Circuits, MOSFET and Motor Drivers, PWM and non-PWM Power Controllers, Power Modules, LED Drivers, Switching Regulators, Generic switch, and passive components. One should know that to download MPLAB Mindi you need to have a Microchip account and to accept the terms and conditions of MPLAB Mindi.
In Mplab Mindi you can find a wide range of possible applications, such as:
- Generate BODE responses for active and passive filter systems.
- Evaluate transient responses to a wide variety of input conditions.
- Generate closed-loop stability responses for control systems, including switch mode power supplies and motor drive applications.
- Verify slew rates and drive strengths through power drive or signal conditioning chains.
- Model noise effects in signal conditioning or control systems.
Transient analysis: a virtual workbench
In today’s blog post I will focus only on transient analysis, which resembles the method of bench testing a circuit. In the transient analysis, one simulates the behavior of the circuit over a specified period and saves all the results — i.e., all the voltages and currents in the circuit — to the hard disk. After the simulation is complete, one can then randomly probe the circuit to look at any voltage, current, or device power over the analysis time frame. Fixed probes can be placed on the circuit before running the analysis, and the corresponding waveform at that point of the circuit will be automatically displayed.
In a way, it’s just like probing your circuit with an oscilloscope, but with some added benefits. For example, here you have access to current probes — good ones are obscenely expensive in real life. With MPLAB Mindi it takes only a few clicks to probe current flow through your circuit — just think on probing the current through an inductor.
There are some differences between real-life testing and simulation. One is that the simulation works for a specified time only. If you want to make changes to your circuit, you have to make those changes and then re-run the simulation. The second big difference is that nothing could go wrong in the simulation. You can see if the current or the voltage go beyond the maximum limits of a specific component — without releasing the magic smoke.
Simulation of the MCP16331 click
The best way to show you the capabilities of MPLAB Mindi is to simulate some circuits. And the best candidate I had for simulation is an MCP16331 click board from MikroElektronika, a buck-boost converter built around the highly integrated, high-efficiency, fixed frequency, step-down DC-DC converter Non-Inverting Buck-Boost Application MCP16331, in a topology similar to the one indicated in figure 7–2, on page 31 of the MCP6331 datasheet.
I will start with the schematic of the click board, keeping only the area highlighted in red:
The schematic has to be created in MPLAB Mindi. When starting Mindi, you have the option to start either a new SIMetris schematic or a SIMPLIS schematic. The choice is easy to make: the MCP16331 IC is available only in SIMPLIS. As such, we start a new SIMPLIS schematic; we go to Microchip Library → Power Management → Switching regulators, and we place one MCP16331IC. The closest thing to the BZT52C2V7 Zenner diode is a 21N5224V/PS, and instead of the AO3418 MOSFET, I used one IRF530, which exceeds the specifications of the original MOSFET. A 66Ohm resistor being used as a load.
Three waveform generators are used to simulate the power supply, the output of the MCP4921 DAC and to drive the EN line.
The schematic in MPLAB Mindi is:
Now everything is set up, let’s do some transient analysis.
On the product page of MCP16331 we find the following power-up sequence:
1. Disable the MCP16331 by setting the mikroBUS™ pin RST (EN) low (GND)
2. Set the desired output voltage via SPI (see the software section below)
3. Enable the MCP16331 by setting the mikroBUS™ pin RST (EN) high (5V)
Why this? What happens if we do otherwise?
Let’s simulate the power-up sequence, with EN being driven before DAC output is set:
We notice that, both in buck and boost modes, the output voltage grows rises to over 12V if VDAC = 0 and EN is active.
Let’s repeat the simulation, this time applying EN before VDAC is set:
Quite a different thing, isn’t it?
The relation between Vout and VDAC
Once again, a simple simulation. This time I’ve set VDAC as a triangle signal.
Once again, a nice graphic. We can see here that the output voltage is inversely proportional to VDAC.
Current flow through the inductor
It looks I’m asking a bit too much from the click board, the current is quite high… I will change the load to 200 Ohms.
Measuring the currents in the real life, with the average tools in the hobbyist lab is very difficult, as it requires a current probe, an expensive piece of equipment. In the simulation, you get this easy by just placing an inline current probe.
A few final words
MPLAB Mindi is very easy to use. If you have basic knowledge of how a simulation program works, you will be ready to use Mindi in just a few hours.
Even a simple thing as a click board can become complicated when you take a closer look. This time MPLAB Mindi has allowed me to an analysis that would prove otherwise difficult, or just impossible due to lack of dedicated test equipment.
Many click boards can be simulated in MPLAB Mindi, as they are built with Microchip components that you can also find in Mindi. By simulating those click boards in MPLAB Mindi, you can get a better understanding of how those click boards work.
Originally published at https://electronza.com on March 26, 2018. Moved to Medium on May 1, 2020.