I freshly acquire my first Raspberry Pi, what an awesome device !
I'm currently working on a project to automatically detect if one machine is running or not and counting it's cycles (Using this Pi)
The machine send a 24V pulse at each cycle (About 150 to 400 pulse per minutes).
For that i trigger with a 4N25 optocoupler my 24v signal to 3v3. Using this circuit :
But before all of that, I have a problem, even I remove the link with my machine and use this circuit instead :
My input is floating. Before it was floating only if machine run, and not if the machine is stopped. now it's always floating. Resistance is correctly working, if I use in pull up mode i also have the same issue... I'm sure it's the machine generating much perturbations, same circuit on my desk, no problem, same circuit on the machine (even not linked) it's floating. I will become crazy...
So here i am... If anyone reading this message have some ideas, where it can come from, and eventually how I can solve that ?