I have an external setup of a controller and it's actuator- which consists of inductive solenoids.
I need my Arduino to see the status of those (see if they're activated)
Using resistor divider is suboptimal (I think), since the load is inductive.
Jokes aside- I have ran some simulations for concept proofing with positive results, but could be that I am missing something
So here I am, to double-check
Oh yes, that sound like something I am missing
It's a pretty power intense system, so I doubt it's higher then 0.15-0.2V
I guess it won't result in input being more then 1.5 to become logical 1
Why 3.3volt. The Every uses 5volt-logic.
Why the resistor. Internal pull up on the pin should be the same.
Only three diodes should be needed.
I doubt you need Schottky for that (no harm done), 1N4148 should work.
Make sure your actuators have a diode across.
The above will only work if grounds can be shared.
If not, then use opto couplers, which should be safer for the Every anyway.
Leo..
Assuming that the solenoids have kick-back protection your circuit should work fine.
The nano every is 5V so I'd supply R2 with 5V and decouple the 5V to ground with a cap.
With normal silicon diodes you would then be within the specified voltages for logic levels so you can use a digital input.
VIH = 3.0V; Vih = 2.6V; Vil = 2.2V; VIL = 1.5V
I'd also add a small capacitor from the digital input to ground to match the capacitance of the diodes.
Be aware by doing so you potentially lose useful information.
Just a little something that I am thinking about lately
A reverse recovery time. I think it's not an absolute zero even for Schottky's, so my worry is about MCU receiving 12v on it's input after a mosfet has opened.
Would that be wise to add like 1nf cap in parallel with a pull-up, to consume the peak, or is it something really negligible in my type of application?
R2 will back feed a positive voltage to R1 through D1. Since R1 has a higher voltage, no current should flow. D1 prevents the back feed, so it should work as expected.
Hmm, I really don't think it would make voltage exceed i/o limit. Do you?
I think I confused myself and everyone with "Mosfet has opened"
What I meant is Q1's Drain going from 0V back up to 12V (from R1)
Could those momentarily make it's way to the I/O pin causing damage, or should I not really overthink that?