LM393 Breadboard Schematic

Components are in the schematic. I found Flux does not currently expose a usable schematic-only text-note component here, so I’ll preserve the warning as schematic/component metadata while wiring the requested circuit.
Done — I created and wired the provisional LM393N/NOPB breadboard-test schematic with the requested VREF network, clock/data conditioning, pullups, output series resistors, power filtering, connectors, and test points.
Open items:
  • Flux did not expose a usable schematic-only text-note component, so I captured the warning in project metadata instead: “PROVISIONAL — VERIFY INDICATOR VOLTAGES AND PINOUT BEFORE CONNECTION.”
  • I did not create or place a PCB layout, per your instruction; DRC airwire/layout errors are therefore expected and not relevant.
Suggested next steps:
  1. Verify the dial indicator pinout and signal voltages with an oscilloscope before connecting.
  2. If the measured signals differ, ask me to update the resistor/reference values.
  3. Once validated on breadboard, ask me to convert this into a PCB-ready schematic/layout.
Verify, document, tidy
Run schematic review
Create wiring checklist
Tidy schematic layout
Check BOM choices

Refine this doc
Ask about this doc
Indicator Interface Engineering Review
Revision note
Updated after user review: corrected the MCP6004 14-lead pinout, rechecked LM393N/NOPB pins against the TI datasheet, recalculated thresholds including the 470 kOhm pulldown and source-impedance sensitivity, and clarified that analog voltage levels require an oscilloscope or suitable voltage measurement. No schematic components have been placed or connected.
Scope
This review covers only the two-channel digital dial indicator signal-conditioning interface for an Arduino Uno.
Target signals:
  • INDICATOR_CLOCK: provisional 0 V to 1.5 V logic from the VINCA DCLA-12.7 indicator connector
  • INDICATOR_DATA: provisional 0 V to 1.5 V logic from the VINCA DCLA-12.7 indicator connector
  • ARDUINO_CLOCK: Arduino-compatible 0 V to 5 V logic
  • ARDUINO_DATA: Arduino-compatible 0 V to 5 V logic
Power assumptions for this review:
  • Interface circuit powered from Arduino regulated 5 V.
  • Arduino and indicator interface share ground.
  • Exact analog amplitudes must be measured with an oscilloscope or other suitable voltage-measuring instrument. A basic digital logic analyzer is useful for timing/protocol decoding but does not measure analog signal amplitude.
Sources checked
  • Microchip MCP6001/1R/1U/2/4 datasheet DS20001733L, including MCP6004 14-lead PDIP/SOIC/TSSOP pinout and electrical limits.
  • TI LM393N/NOPB datasheet, dual comparator, PDIP-8.
  • Microchip ATmega328P datasheet input thresholds for normal digital I/O at 5 V.
  • Arduino Uno Rev3 operating voltage specification.
  • User-provided Hackaday reference text treated as provisional, not authoritative.
1. Interpretation of the Hackaday circuit
The Hackaday circuit appears to be a simple level-amplification stage for low-voltage clock/data signals, not a rectifier. The drawing reportedly labels the circuit as an inverting amplifier, but the described topology and resistor values match a non-inverting op-amp amplifier.
For a non-inverting amplifier:
Gain = 1 + Rf / Rg
If Rf = 3 kOhm and Rg = 1 kOhm, then:
Gain = 1 + 3 kOhm / 1 kOhm = 4
A 1.5 V input would command:
Vout = 1.5 V * 4 = 6.0 V
A 5 V-powered MCP6004 cannot output 6 V, so the amplifier would saturate near the 5 V rail. This may still create a readable Arduino HIGH, but it is not a controlled linear design and may add delay or recovery uncertainty.
2. Contradictions and electrical concerns found
  1. Inverting vs non-inverting contradiction: The description says inverting, but the resistor equation and likely drawing are non-inverting.
  2. Gain contradiction: The stated target gain of about 3.3 does not match 3 kOhm / 1 kOhm feedback values, which produce gain 4 in a non-inverting circuit.
  3. Op-amp saturation: Gain 4 converts 1.5 V to an impossible 6 V on a 5 V supply, forcing saturation.
  4. Rectifier terminology appears wrong: The function is level conditioning or amplification, not rectification.
  5. No defined switching threshold: An amplifier does not create a precise digital decision point. It only scales the waveform.
  6. Weak noise immunity: A linear amplifier has no hysteresis, so slow edges or stepper-coupled noise can create false Arduino transitions.
  7. Arduino threshold risk: ATmega328P ordinary digital inputs at 5 V guarantee HIGH only at VIH >= 0.6 * VCC = 3.0 V; a direct 1.5 V signal is not valid HIGH.
  8. Reference design uses provisional signal assumptions: The VINCA indicator may not exactly match the reverse-engineered Clockwise Tools unit.
  9. Unclear output type: The indicator outputs may be push-pull, open-drain, or weakly driven. This affects allowable loading and pullups.
  10. USB D+ and D- naming risk: If the connector physically resembles USB, those wires are being repurposed as indicator clock/data, not as a compliant USB electrical interface.
  11. No explicit protection/current limiting shown: Long wires near steppers need series impedance and test points at minimum.
  12. Unused op-amp channels must not float: The MCP6004 datasheet recommends configuring unused channels so outputs do not toggle and couple noise.
  13. Measurement limitation: A basic digital logic analyzer can confirm timing and logic decoding only after a threshold is chosen. It cannot confirm whether the raw signal is truly 0 V to 1.5 V.
Recommendation
Use a dual comparator with hysteresis, preferably LM393N/NOPB in PDIP-8, not the MCP6004 amplifier stage, for the first robust prototype.
Reasons:
  • The Arduino needs a clean digital signal, not an amplified analog approximation.
  • Comparator thresholds can be set around the middle of the provisional 0 V to 1.5 V indicator signal.
  • Hysteresis rejects motor noise and slow-edge chatter.
  • LM393 open-collector outputs pull up cleanly to Arduino 5 V logic.
  • The LM393 input common-mode range includes ground and extends high enough for 0 V to 1.5 V sensing on a 5 V supply.
  • The dual package matches exactly two channels and is available as through-hole PDIP.
Signal flow

Diagram


"VINCA indicator connector\nClock and data about 0 to 1.5 V" "10 k series input\n470 k pulldown\nOptional small RC filter" "LM393 dual comparator\n0.82 V reference\npositive feedback hysteresis" "10 k pullups to Arduino 5 V\n330 ohm output series resistors" "Arduino Uno digital inputs\n0 to 5 V logic" "Arduino regulated 5 V" "51 k / 10 k reference divider\n100 nF filter" "Common ground"
Raw-signal loading and pullup check
The proposed circuit does not use any pullup from the raw indicator clock/data lines to 5 V. Each raw line sees:
  • 10 kOhm series current limit from the connector to the protected node.
  • 470 kOhm pulldown from protected node to ground.
  • 220 kOhm path to the comparator input.
  • 5.6 MOhm feedback from the LM393 output to the comparator input, isolated from the raw node by the 220 kOhm resistor.
When the indicator is disconnected, the LM393 feedback can bias the protected raw node slightly, but not near 5 V:
  • Output LOW typical 0.25 V: protected node about 0.019 V.
  • Output LOW maximum 0.40 V: protected node about 0.030 V.
  • Output HIGH 5.0 V: protected node about 0.374 V.
So the circuit does not pull either raw indicator signal up toward 5 V.
Why MCP6004 is not the primary recommendation
The MCP6004 is a valid low-power rail-to-rail op amp, but a non-inverting amplifier is a weaker solution for this task because it does not provide a defined digital threshold or hysteresis. It can be made to work if the signal is clean, but it is less robust near a stepper motor.
If the user explicitly wants the MCP6004 route after this review, use a non-inverting gain of 3.0 to 3.2 instead of 4:
  • Rg = 100 kOhm, Rf = 200 kOhm, gain = 3.0, 1.5 V -> 4.5 V
  • or Rg = 100 kOhm, Rf = 220 kOhm, gain = 3.2, 1.5 V -> 4.8 V
Do not use gain 4 unless intentional rail saturation is accepted.
4. Comparator calculations
Arduino Uno input threshold
For ordinary ATmega328P digital I/O pins at 5 V:
  • Guaranteed LOW: VIL = 0.6 * VCC = 3.0 V
Therefore, a 0 V to 1.5 V raw indicator signal is not directly Arduino-compatible.
Reference voltage
Use a shared reference divider:
  • Rtop = 51 kOhm from +5 V to VREF
  • Rbottom = 10 kOhm from VREF to GND
  • CREF = 100 nF from VREF to GND
VREF = 5 V * 10 kOhm / (51 kOhm + 10 kOhm) = 0.8197 V
Per-channel hysteresis network
For each channel:
  • RIN = 10 kOhm series at connector
  • RPD = 470 kOhm from protected raw input node to GND
  • RSIG = 220 kOhm from protected raw input node to LM393 non-inverting input
  • RFB = 5.6 MOhm from LM393 output node to LM393 non-inverting input
  • LM393 inverting input tied to VREF
  • RPU = 10 kOhm output pullup to +5 V
  • ROUT = 330 Ohm series from output node to Arduino input
At the comparator switching instant, the LM393 non-inverting input equals VREF. For the protected raw node N:
N_threshold = VREF * (1 + RSIG / RFB) - Vout * (RSIG / RFB)
With RSIG = 220 kOhm, RFB = 5.6 MOhm, and VREF = 0.8197 V:

Table


ConditionLM393 output state before transitionProtected raw node threshold
Rising inputLOW, 0.25 V typical0.842 V
Rising inputLOW, 0.40 V maximum0.836 V
Falling inputHIGH, 5.0 V0.655 V
At the protected node, hysteresis is about 0.18 V to 0.19 V.
Effect of 470 kOhm pulldown and unknown indicator source impedance
The 470 kOhm pulldown slightly increases the ideal indicator source voltage required to reach each protected-node threshold. The table below includes RIN = 10 kOhm, RPD = 470 kOhm, RSIG = 220 kOhm, and RFB = 5.6 MOhm.

Table


Indicator source resistanceSource voltage for rising, output LOW typ 0.25 VSource voltage for rising, output LOW max 0.40 VSource voltage for falling, output HIGH 5 V
0 Ohm0.861 V0.855 V0.662 V
1 kOhm0.863 V0.857 V0.663 V
10 kOhm0.880 V0.873 V0.668 V
50 kOhm0.956 V0.947 V0.694 V
100 kOhm1.050 V1.040 V0.727 V
500 kOhm1.808 V1.782 V0.986 V
Interpretation:
  • If the indicator output source resistance is low to moderate, the thresholds remain comfortably inside a 0 V to 1.5 V signal range.
  • If the indicator output is extremely weak, around hundreds of kOhms, the pulldown and input network may load the signal enough to reduce margin.
  • Measuring raw amplitude both unloaded and with the prototype attached is important.
Optional input filtering
Add a footprint for each channel:
  • CFILT = 100 pF from protected raw input node to GND, marked DNP initially.
Populate only if oscilloscope captures show noise without excessive edge slowing. With the 10 kOhm input series resistor, 100 pF gives about a 1 us time constant; final filter value depends on measured clock frequency and edge rate.
5. Proposed component list
Active component
  • U1: LM393N/NOPB dual comparator, PDIP-8, through-hole.
LM393N/NOPB PDIP-8 pin use, rechecked against TI datasheet:

Table


PinNameProposed connection
1OUTAARDUINO_CLOCK_DRV output node, 10 kOhm pullup to +5 V, feedback to clock + input
2-INAVREF_0V82
3+INAClock comparator input after RSIG_CLK and feedback
4GNDCommon ground
5+INBData comparator input after RSIG_DATA and feedback
6-INBVREF_0V82
7OUTBARDUINO_DATA_DRV output node, 10 kOhm pullup to +5 V, feedback to data + input
8V+Arduino +5 V
The above assignment makes the conditioned outputs non-inverted: raw input above the upper threshold produces Arduino HIGH; raw input below the lower threshold produces Arduino LOW.
Resistors, 1 percent metal film preferred

Table


RefValueFunction
R110 kOhmClock input series current limit
R2470 kOhmClock disconnected-line pulldown
R3220 kOhmClock signal resistor to comparator + input
R45.6 MOhmClock positive feedback hysteresis
R510 kOhmData input series current limit
R6470 kOhmData disconnected-line pulldown
R7220 kOhmData signal resistor to comparator + input
R85.6 MOhmData positive feedback hysteresis
R910 kOhmClock LM393 output pullup to +5 V
R1010 kOhmData LM393 output pullup to +5 V
R11330 OhmClock output series protection to Arduino input
R12330 OhmData output series protection to Arduino input
R1351 kOhmVREF top divider resistor
R1410 kOhmVREF bottom divider resistor
Capacitors

Table


RefValueFunction
C1100 nF ceramicLM393 local supply decoupling at pins 8 and 4
C210 uF electrolytic or ceramicLocal 5 V bulk capacitor
C3100 nF ceramicVREF filter capacitor
C4100 pF ceramic, DNP initiallyOptional clock input noise filter
C5100 pF ceramic, DNP initiallyOptional data input noise filter
Connectors
  • J1: Indicator input header, 2.54 mm through-hole.
    • Pin 1: GND
    • Pin 2: INDICATOR_CLOCK
    • Pin 3: INDICATOR_DATA
    • Pin 4: Shield or no-connect, optional depending on cable construction
  • J2: Arduino interface header, 2.54 mm through-hole.
    • Pin 1: +5 V from Arduino
    • Pin 2: GND
    • Pin 3: ARDUINO_CLOCK
    • Pin 4: ARDUINO_DATA
Suggested Arduino pins for firmware convenience:
  • ARDUINO_CLOCK -> Arduino D2 interrupt-capable input
  • ARDUINO_DATA -> Arduino D3 or any normal digital input
Test points

Table


RefNet
TP1GND
TP2+5 V
TP3VREF_0V82
TP4INDICATOR_CLOCK_PROTECTED
TP5INDICATOR_DATA_PROTECTED
TP6ARDUINO_CLOCK
TP7ARDUINO_DATA
Optional input protection
The required current limiting is already provided by the 10 kOhm series input resistors and high-value comparator network. For long or noisy cables, add optional DNP footprints for low-leakage clamp diodes or ESD protection from the protected input nodes to GND and +5 V, but do not populate until the power-off behavior is reviewed because rail clamps can back-power an unpowered Arduino.
6. MCP6004 datasheet facts and fallback pin notes
The purchased MCP6004 is likely the SOIC-14 version, such as MCP6004-I/SL, not MCP6004-I/P PDIP-14. The Microchip DS20001733L pinout is the same functional 14-lead pinout for PDIP, SOIC, and TSSOP packages, but the land pattern/package is different.
MCP6004 datasheet facts checked:
  • Supply voltage: 1.8 V to 6.0 V.
  • Gain bandwidth: 1 MHz typical.
  • Slew rate: 0.6 V/us typical.
  • Input common-mode range: VSS - 0.3 V to VDD + 0.3 V.
  • Output swing near rails: about VSS + 25 mV to VDD - 25 mV under stated datasheet conditions.
  • Input bias current: about 1 pA typical.
  • Local bypass: 0.01 uF to 0.1 uF within 2 mm of VDD, plus 1 uF or larger bulk within 100 mm.
  • Unused op amps should be configured, not left floating.
Correct MCP6004 14-lead pinout from Microchip DS20001733L:

Table


PinFunction
1VOUTA
2VINA-
3VINA+
4VDD
5VINB+
6VINB-
7VOUTB
8VOUTC
9VINC-
10VINC+
11VSS
12VIND+
13VIND-
14VOUTD
If the fallback MCP6004 amplifier approach is approved instead of the comparator approach:
  • Channel A clock:
    • Pin 3 VINA+: protected INDICATOR_CLOCK
    • Pin 2 VINA-: feedback divider node
    • Pin 1 VOUTA: amplified ARDUINO_CLOCK
  • Channel B data:
    • Pin 5 VINB+: protected INDICATOR_DATA
    • Pin 6 VINB-: feedback divider node
    • Pin 7 VOUTB: amplified ARDUINO_DATA
  • Power:
    • Pin 4 VDD: Arduino +5 V
    • Pin 11 VSS: GND
  • Unused channels C and D:
    • Configure as stable unity-gain buffers at a mid-supply reference, or use the datasheet-recommended unused op-amp circuit. Do not leave inputs floating.
Recommended fallback amplifier values per used channel:
  • Rg = 100 kOhm from inverting input to GND.
  • Rf = 200 kOhm from output to inverting input for gain 3.0.
  • Optional Rf = 220 kOhm for gain 3.2 if measured high level is below 1.5 V.
  • 10 kOhm series resistor at indicator input.
  • 1 MOhm pulldown from op-amp non-inverting input to GND.
  • 330 Ohm to 1 kOhm series output resistor to Arduino input.
This fallback remains less noise-robust than the comparator design.
7. Fault-case behavior
Arduino powered, indicator off
The 470 kOhm pulldowns hold both raw inputs LOW. Comparator outputs resolve LOW or remain inactive according to the input state, and Arduino firmware should timeout if no valid burst arrives.
Indicator powered, Arduino off
The input series/high-value network limits current from the indicator into the unpowered interface. Output pullups are tied to Arduino +5 V, so with Arduino off they are not pulling the indicator lines up. The raw signal lines are not tied to any 5 V pullup.
Clock or data disconnected
The 470 kOhm pulldown on each protected input node defaults the channel LOW and prevents floating input chatter. Feedback can bias the disconnected protected node up to about 0.374 V when the LM393 output is high, still well below the falling threshold. Firmware should still detect missing bursts or impossible frames.
Stepper motor noise nearby
Noise mitigation is handled by:
  • Comparator hysteresis of about 0.18 V to 0.19 V at the protected node.
  • Series input resistors.
  • Optional 100 pF input filter footprints.
  • Local 100 nF and 10 uF decoupling.
  • Twisted signal-ground pairs for clock and data.
  • Physical separation from stepper motor and driver wiring.
  • Firmware validation of expected burst length, pulse count, timing, and position jump limits.
8. Required measurements before final schematic
Before finalizing, measure the exact VINCA DCLA-12.7 output using an oscilloscope or suitable voltage-measuring instrument with a high-impedance probe. Capture both idle and active bursts. Use a logic analyzer for timing/protocol only after voltage levels and safe thresholds are known.
Required measurements:
  1. Confirm connector pinout: ground, clock, data, any power or shield pins.
  2. Confirm whether the Hackaday mapping applies to this unit: D+ as clock and D- as data, or vice versa.
  3. Measure clock and data LOW voltage maximum with a voltage-measuring instrument.
  4. Measure clock and data HIGH voltage minimum and typical with a voltage-measuring instrument.
  5. Measure idle states for clock and data.
  6. Measure burst interval; expected provisional value is about 40 ms.
  7. Measure clock frequency during a burst.
  8. Measure pulse widths and edge rates.
  9. Determine whether outputs are push-pull, open-drain/open-collector, or weakly driven.
  10. Estimate output source impedance or drive strength by observing waveform change with a known high-value load, only if safe.
  11. Observe behavior when the indicator is off and Arduino/interface ground is connected.
  12. Observe behavior with nearby stepper motor activity, if possible.
  13. Confirm whether firmware should treat the conditioned outputs as non-inverted. The proposed LM393 topology is non-inverting: raw high produces Arduino high.
9. Breadboard and perfboard construction notes
  • Use a DIP socket for U1 if using LM393N/NOPB PDIP-8.
  • Place the 100 nF decoupling capacitor directly across U1 power pins: LM393 pin 8 to pin 4.
  • Keep the VREF node short and away from output wires.
  • Keep 5.6 MOhm feedback resistors clean and dry; flux residue or solderless breadboard leakage can affect high-impedance nodes.
  • For breadboard tests, keep wires short and avoid running input wires parallel to stepper motor wires.
  • Use a common ground, but do not route stepper current through the signal-conditioning ground path.
  • Prefer twisted pairs from indicator to board: clock plus ground, data plus ground.
  • On perfboard, place the comparator, VREF divider, and feedback resistors close together.
  • Verify VREF_0V82, raw clock/data analog voltages, and conditioned outputs with a meter/scope before connecting to Arduino pins.
  • If the optional 100 pF filters are populated and decoding fails, remove them or reduce the value after measuring the actual clock frequency.
10. Approval recommendation
Recommended next schematic implementation after approval:
  1. Use LM393N/NOPB PDIP-8 comparator architecture above.
  2. Add all resistors, decoupling, connectors, and test points listed here.
  3. Mark optional input filter capacitors and rail clamps as DNP until waveform measurements justify them.
  4. Preserve the MCP6004 amplifier as a documented fallback only, not the default implementation.
Wait for explicit approval before constructing the Flux schematic.
  • Revision note

  • Scope

  • Sources checked

  • 1. Interpretation of the Hackaday circuit

  • 2. Contradictions and electrical concerns found

  • 3. Recommended circuit architecture

  • Recommendation

  • Signal flow

  • Raw-signal loading and pullup check

  • Why MCP6004 is not the primary recommendation

  • 4. Comparator calculations

  • Arduino Uno input threshold

  • Reference voltage

  • Per-channel hysteresis network

  • Effect of 470 kOhm pulldown and unknown indicator source impedance

  • Optional input filtering

  • 5. Proposed component list

  • Active component

  • Resistors, 1 percent metal film preferred

  • Capacitors

  • Connectors

  • Test points

  • Optional input protection

  • 6. MCP6004 datasheet facts and fallback pin notes

  • 7. Fault-case behavior

  • Arduino powered, indicator off

  • Indicator powered, Arduino off

  • Clock or data disconnected

  • Stepper motor noise nearby

  • 8. Required measurements before final schematic

  • 9. Breadboard and perfboard construction notes

  • 10. Approval recommendation

Documents

  • Indicator Interface Engineering Review

Assets

No assets added.