Objective
The objective of this project is to design and simulate a non-inverting Schmitt trigger using a voltage comparator and positive feedback.
The circuit is intended to convert a slowly varying input signal into a stable digital output while preventing unwanted switching caused by noise near the switching threshold.
Design Specifications
| Parameter | Value |
|---|---|
| Supply voltage | 5 V |
| Reference voltage | 2.5 V |
| Upper switching threshold | 3 V |
| Lower switching threshold | 2 V |
| Hysteresis width | 1 V |
| Comparator | MCP6561-OT |
| Output configuration | Push-pull |
Working Principle
A conventional comparator changes its output state according to the voltage difference between its non-inverting and inverting inputs.
When noise is present near the switching threshold, the comparator may switch repeatedly.
A Schmitt trigger uses positive feedback to establish two different switching thresholds.
- When the input rises above the upper threshold, the output switches HIGH.
- When the input falls below the lower threshold, the output switches LOW.
- Between the thresholds, the output retains its previous state.
The hysteresis width is calculated as:
VH = VTH+ − VTH−
VH = 3 − 2 = 1 V
Circuit Design
The circuit uses an MCP6561 comparator powered from a 5 V supply.
The input signal is connected to the non-inverting terminal through resistor R1. Positive feedback is provided from the comparator output to the same terminal through resistor R2.
The inverting terminal receives a nominal 2.5 V reference, generated using two equal resistors connected as a voltage divider.
| Component | Value | Function |
|---|---|---|
| R1 | 10 kΩ | Input resistor |
| R2 | 50 kΩ | Positive feedback |
| R3 | 10 kΩ | Reference divider |
| R4 | 10 kΩ | Reference divider |
| U1 | MCP6561-OT | Comparator |
Design Calculations
Assuming negligible current entering the comparator's non-inverting input, Kirchhoff's Current Law gives:
(Vin − V+) / R1 = (V+ − Vout) / R2
Rearranging:
V+ = (R2 × Vin + R1 × Vout) / (R1 + R2)
At the switching point:
V+ = Vref = 2.5 V
Upper Switching Threshold
Initially, the comparator output is LOW. Assuming an ideal LOW output voltage of 0 V, the circuit is designed to switch HIGH when the input reaches 3 V.
2.5 = (3 × R2) / (R1 + R2)
R2 / R1 = 5
Choosing R1 = 10 kΩ gives:
R2 = 50 kΩ
Lower Switching Threshold
When the output is HIGH, we assume an ideal output voltage of 5 V.
The lower switching threshold can be determined from:
2.5 = (R2 × Vin + 5 × R1) / (R1 + R2)
Substituting R1 = 10 kΩ and R2 = 50 kΩ:
2.5 = (50 × Vin + 50) / 60
Vin = 2 V
The theoretical switching thresholds are therefore 3 V and 2 V, corresponding to a 1 V hysteresis width.
KiCad Simulation
The circuit was implemented in KiCad using the MCP6561-OT comparator symbol and a manufacturer-provided SPICE subcircuit model.
A VPULSE source was used to generate a rising and falling input voltage.
| Parameter | Value |
|---|---|
| Initial voltage | 0 V |
| Peak voltage | 5 V |
| Rise time | 10 ms |
| Fall time | 10 ms |
| Pulse width | 10 ms |
| Period | 40 ms |
| Transient analysis duration | 80 ms |
| Time step | 10 µs |
Simulation Observations
The transient simulation completed successfully, and the comparator output exhibited switching behaviour as the input voltage varied.
The output waveform showed distinct HIGH and LOW states. However, the switching thresholds have not yet been conclusively verified against the theoretical targets of 3 V and 2 V.
Further investigation is required to determine the actual switching voltages and to verify the operation of the positive-feedback network.
Therefore, the present simulation represents an initial functional test rather than complete validation of the hysteresis specifications.
Conclusion
A non-inverting Schmitt trigger was designed using an MCP6561 comparator and positive feedback.
Theoretical circuit analysis established a 5:1 feedback resistor ratio for the desired switching thresholds of 3 V and 2 V under ideal output-voltage assumptions.
The circuit was implemented and simulated in KiCad. Further verification of the actual switching thresholds is required before the design can be considered fully validated.

No comments:
Post a Comment