A new feature introduced in the AVR® DB family is the Analog Signal Conditioning (OPAMP) peripheral. In this example, the OPAMP is used together with an Analog Comparator (AC) to form a current spike detector. This Mindi simulation simulates the circuit described in the AN3860 - Overcurrent Protection Using the Integrated Op Amps on AVR DB appnote. The simulation consists of a model of a DC fan, models of the AVR DB Op Amps and generic components representing the rest of the functionality of the AVR DB.
- AN3860 - Overcurrent Protection Using the Integrated Op Amps on AVR DB
- AVR128DB48 device page
- AVR128DB48 Curiosity Nano User Guide
Download and open the Mindi schematic here
Press the play button to simulate with an example stimulus source.
There are several parameters that can be changed so the DC model:
- Motor_DCR1 is the internal resistance of the DC motor
- Motor_L1 is the internal inductance of the DC motor
- Internal_Loss1 is the mechanical losses of the motor
- Motr_L2 is the inertia of the motor
- SpeedConversionK is the electromotive force constant or the motor torque constant
There are several application specific parameters:
- The gain of the Op Amps can be changed by changing the relationship between R4 and R5 and between R6 and R7
- The AC trigger level by changing AC_Trigger_Lvl1
You can download and install the Mindi simulation tool, or use another SPICE simulator of your own preference. For use with different simulators, a plain spice model can be found in "Opamp_AVR_DB.txt" to replace the mindi-optimized ".lb"