Help with fifo_full error on Espruino Wifi #4720
Replies: 1 comment
-
Posted at 2018-12-17 by @allObjects I assume that you have a hum or open wire somewhere that makes your comparator act like a multi vibrator around the switching point. You would need something like a Schmitt trigger with - configurable - hysteresis. You even may use your comparator with some added components to avoid the 'vibrating' - see https://daycounter.com/Calculators/Comparator-Hystereses-Calculator.phtml Could you show the setup of the circuitry in a uploaded picture? Posted at 2018-12-17 by user96205 Here’s a photo of the board Attachments: Posted at 2018-12-17 by @allObjects There are several questions to answer and steps to take:
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:
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. Posted at 2018-12-18 by @gfwilliams @allObjects is likely spot on - it'd be interesting to see if just removing the LED fixes it. But just to add to this, if you have an input that really does fluctuate a massive amount, It's not at nice, but you could just 'poll' the input:
Although the best solution is to try and 'clean up' the input. In your case you could add hysteresis by putting a high value resistor from the output of the comparator back into one of the two inputs (doing it to one will make it oscillate even more, the other should really sort it out). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-12-17 by user96205
I’ve read the other posts about the fifo_full error. I get why it throws but I need help getting around it.
I’m trying to build a circuit very similar to the Espruino guide for setWatch on analog inputs using the lm393.
I have a very simple script and circuit. The circuit uses a potentiometer and LM393 comparator. I setWatch on the digital output of the LM393 with the repeat option set to false.
When the potentiometer is over 50% The value goes high and powers an led. The callback function passed to setWatch is called many times and I get the fifo_full error.
I want the pot crossing over the 50% threshold to call the callback once. I’ll be implementing something similar to the guide on the lm393 (as I stated)
What’s going wrong and how do I get around it?
Beta Was this translation helpful? Give feedback.
All reactions