Determine if voltage is going through a resistor or not

Voltage spikes can exceed 50 V...
100 nF will do.
Any schotky type diode should do.

     5V
      |
      _       

      ^
      |
------+-----
      |
      =
      |
     Gnd

Locally I can get Schottky Diode 1N5819 (40 V, 1A), I see other people use it for such protection circuits, so I assume it will work.

I have made a mistake by putting the 5v pin there. The board is actually a 3.3v Wemos, so it's probably a good idea to use the 3.3v pin.

Does this look correct?

You might want to add another diode from gnd to A0 to protect from negative spikes...

Since I'll be powering the Arduino via a USB adapter, are all grounds the same (car ground, usb ground, and arduino ground pin)?

I was looking at another threat, is this what you mean?

image

You need to check whether the usb adapter has connected ground from input to output.
If it is connected, it is best to connect your voltage divider to arduino gnd. That prevents creating ground loops.

Thanks to all the advice, I now have the analogue measurement working!

Of course I went to try the circuit out with some leds. Which brought me to a problem with the MOSFETs. Initially I experimented a lot with the circuit and got something working. Exactly how I don't remember, but as it is now, using N channel MOSFETs means they will never turn on. I also have P channel MOSFETs, if I would prefer them to never turn off...

Is there a way to implement a high side switch without adding 17 more components and making 20 trips to the electronics store?

I was really excited that I'll probably get to install this tomorrow, but no luck unfortunately..

Your circuit in post 26 cannot work, the MOSFET source terminals are shorted together, N channel MOSFETs won't work like that anyway. Start over with fixing your drawing in post 18 (it's upside down), power flow should be + at top to - at bottom, signal flow should be signal source to left, destination to right.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.