Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

50%
+0 −0
Q&A Need guidance: Sensing 12 V and protecting hall sensor input

The BJT is overkill and might have issues of its own (voltage spec, ESD etc) and you don't need to switch a lot of current either. Also a plain zener is too slow to help against spikes, you need a ...

posted 11mo ago by Lundin‭

Answer
#1: Initial revision by user avatar Lundin‭ · 2025-10-22T13:35:00Z (11 months ago)
The BJT is overkill and might have issues of its own (voltage spec, ESD etc) and you don't need to switch a lot of current either. Also a plain zener is too slow to help against spikes, you need a TVS.

Similarly with the optocoupler, it is overkill and in general just a last resort in case you suspect very bad conditions on-site (bad grounds etc). Additionally, an optocoupler turns into a useless waste of space when you use same grounds on the primary and secondary as in your schematic - it literally does nothing except adding BoM cost. Beware of the [Arduino optocoupler disease](https://electronics.stackexchange.com/questions/714850/what-is-arduino-optocoupler-disease)!

The most standard way to do this is a simple voltage divider as in my answer here: https://electronics.stackexchange.com/a/756620/6102 Which is more or less identical to your 2) schematic so that's what I would use. It doesn't matter if it's a MCU or a hall effect sensor you need to protect. Simple, inexpensive, safe.

Except you can use a much higher series resistor towards the MCU, the value is by no means critical but high resistance means better protection of the MCU pin in case of mishaps.

Also consider that the Schottky diodes will have some forward voltage so you won't cap the signal level to exactly 3.3V but rather to 3.3V + V<sub>fwd</sub>. BAT54 got roughly 0.3V<sub>fwd</sub> so you should place it towards a +3V ref in case the exact voltage is important.