You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"shortDescription": "This repository provides a bare metal Microchip Studio project for a core independent overcurrent protection and handling with auto-calibration of current draw trigger level using the internal OPAMP, TCD and AC.",
# Update the title for avr128db48-overcurrent-protection-studio here
5
-
6
-
<!-- This is where the introduction to the example goes, including mentioning the peripherals used -->
4
+
# AVR128DB48 Current Spike Detection
5
+
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. The fan is enabled by a TCD waveform output. This output will be shut off automatically when the current spike is detected by the detector, making it an ideal solution for applications where functional safety is needed. An example of an application where a current spike might indicate failure or danger, is a computer fan. Under normal operation, the current consumption is nonlinear, but does not exceed a certain threshold, dependent on the fans spec. By autotuning the gain of the internal OPAMP by using the internal resistor ladders, we can automatically boost the signal to a measurable range, and automatically set a trigger level for the AC by use of the on board DAC to define what an "unnaturally" high current consumtion is, indicating a touch or something stuck in the fan.
7
6
8
7
## Related Documentation
9
8
10
-
<!-- Any information about an application note or tech brief can be linked here. Use unbreakable links!
11
-
In addition a link to the device family landing page and relevant peripheral pages as well:
12
-
- [AN3381 - Brushless DC Fan Speed Control Using Temperature Input and Tachometer Feedback](https://microchip.com/00003381/)
13
-
- [PIC18F-Q10 Family Product Page](https://www.microchip.com/design-centers/8-bit/pic-mcus/device-selection/pic18f-q10-product-family) -->
9
+
*[AN3860 - Overcurrent Protection Using the Integrated Op Amps on AVR® DB](https://microchip.com/DS00003860)
- Microchip PIC18F-Q Series Device Support (1.4.109) or newer [(packs.download.microchip.com/)](https://packs.download.microchip.com/) -->
15
+
*[Microchip Studio](https://www.microchip.com/mplab/microchip-studio) 7.0.2542 or later
16
+
*[Atmel AVR-Dx_DFP version 1.6.76](http://packs.download.atmel.com/#collapse-Atmel-AVR-Dx-DFP-pdsc) or later
17
+
* For the MCC MPLAB® X version of this project, please go to [this repository](https://github.com/microchip-pic-avr-examples/avr128db48-overcurrent-protection-mplab-mcc.git)
18
+
* For the Atmel START version of this project, please go to [this repository](https://github.com/microchip-pic-avr-examples/avr128db48-overcurrent-protection-studio-start.git)
23
19
24
20
## Hardware Used
25
21
26
-
<!-- All hardware used in this example must be listed here. Use unbreakable links!
<!-- Explain how to connect hardware and set up software. Depending on complexity, step-by-step instructions and/or tables and/or images can be used -->
34
32
35
-
## Operation
33
+
## Setup
34
+
* Hook up the circuit as shown in the figure below
35
+
* For minimal noise, soldering the circuit onto a perfboard/stripboard is prefered, although a breadboard could be used with worse performance
<!-- Explain how to operate the example. Depending on complexity, step-by-step instructions and/or tables and/or images can be used -->
38
+
## Operation
39
+
* Connect the AVR128DB48 Curiosity Nano to a computer using a USB cable
40
+
* Download the zip file or clone the example to get the source code
41
+
* Open the .atsln with Atmel Studio
42
+
* Press *Start without debugging* or use CTRL+ALT+F5 hotkeys to run the application
43
+
* After the LED stops flashing, it is done calibrating
44
+
* Gently apply preassure to the fan, being very careful not to hurt yourself. The fan should now stop.
45
+
* Click the onboard button (SW1) to re-enable the fan
38
46
39
-
## Summary
40
47
41
-
<!-- Summarize what the example has shown -->
48
+
## Conclusion
49
+
After going through this example, you should have a better understanding of how to combine the OPAMP and AC peripherals to make a current spike detector.
0 commit comments