That sensor has an NPN output. That means, an NPN transistor pulls the output down if the sensor is triggered, otherwise the output is disconnected.
This is your current circuit.
simulate this circuit – Schematic created using CircuitLab
The lowpass filter is between the internal 100k pullup in the Raspberry Pi, and your capacitor. Your resistor ...
Here's information I found on the sensor:
some hookup information: http://pliki.aksotronik.pl/NJK-5002c.pdf
a demo using an Arduino: https://www.youtube.com/watch?v=Vc0LKeh_0FQ
previous SE question: How to replace a switch with a NJK-5002c hall sensor?
The interesting tidbit in the SE question is:
The NJK-5002c doesn't have a lot of documentation, but I'...
I've had similar problems with similar speed sensors on trucks. The problem might be the cable itself acting as antenna and picking up radiated noise. Check the signal with a scope, are you picking up stray spikes etc along with the pulse train?
The first thing I would try is to replace the cable with a shielded version and then obviously also try to keep it ...
Since we're talking about touch switches it would be reasonable to just poll them every so often. Using an interrupt seems like overkill.
If you're low on pins, you could consider an I2C expander like the PCF8574 which can detect change-of-state on any pin and issue an interrupt. Your Arduino would then go read the state and update the button touch state.
If you are looking for making an interrupt on each input change and then search for the changed input, I usually use 'XOR' gates (or equivalent depending on rising/falling edge) for finding any change on inputs. You need to create 8 input 'XOR' gates (using multiple 2 or 4 input gates) and connect the output to the interrupt pin. If any pin change happens, ...
Based on the solution from programmersought.com
Clear TIM_SR_UIF flag before every HAL_TIM_Base_Start_IT() call
#define FIX_TIMER_TRIGGER(handle_ptr) (__HAL_TIM_CLEAR_FLAG(handle_ptr, TIM_SR_UIF))
Tested on STM32F407 Discovery board.
What you have written is correct in itself, but I'm not sure what purpose it serves.
It's at too low a level to understand when you need to use interrupts or what they do for you. You can't see the wood for the trees.
However it's too high level and not detailed enough to implement interrupts on any particular machine, as they will have different specific ...
Your understanding is generally correct. You have mentioned a few things that are device-specific to an extent, such as writing 1s and 0s to enable and disable interrupts, since some architectures work slightly differently, and not all processors allow nested interrupts.
Yes, it's possible and should work OK but the whole circuit must be considered live.
Table 3 of the BTA12 datasheet states that for a "Standard triac" IGT is 25 to 50 mA for quadrants I - II - III and 50 to 100 mA for quadrant IV at VD = 12 V, RL = 30 Ω.
@Spehro says that the -600B is not rated for quadrant IV switching. I'd believe him but I can't ...