• There are several questions to answer and steps to take:

    • SW1: What's the debounce value you use in the options of the setWatch() ?
    • HW1: What's the value of the potentiometer?
    • HW2: LM393 has two comparators, ground the inputs of the second one (pin 5 and 6).
    • HW3: Put a current limiting resistor in series with the red LED.
    • HW4: Minimize the number of breadboard connections connections (feed from same rails only).
    • HW5: Put a decoupling capacitor on GND and VCC pins of comparator (w/ shortest connections)

    Your RED LED has a forward voltage of about 1.8...2.2v... and you run it on an open collector on 3.3V. Since you obviously get information back from your Espruino, it does not take the 3.3 power supply down to make Espruino brown out, but for sure it stresses the the 3.3V rail and the comparator output, which can deliver max 18mA (datasheet https://www.fairchildsemi.com/datasheets­/LM/LM2903.pdf). The comparator can obviously handle the short-cut to ground, but usually weak connections in the breadboard become the current limiters and with that all the points start to 'jump' around... and that's where I guess the 'vibration' comes from:

    • Comparator switches on
    • LED draws current
    • Current changes voltages relevant to comparison
    • Change in voltages relevant to comparison makes the comparator to switch off
    • ...and so on...

    I may be totally off, but that's what I would do for sure as first thing is HW3... w/ a 100..200 Ohm resistor in the loop. To check if the LED is the (only) culprit, just run the circuitry without the LED.


Avatar for allObjects @allObjects started