EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: OM222O on November 02, 2019, 01:30:45 pm
-
Hello everyone! I've designed a universal shunt resistor that can go between 1ohm to 100k ohm and currently the range is selected via driving mosfets via an MCU.
I wanted to use some comparators to make it switch ranges automatically and this is the initial idea I came up with which is very similar to how the LM3914 works:
http://tinyurl.com/yyg49czp (http://tinyurl.com/yyg49czp)
by varying the pot, the comparators turn on and off, but this acts like the "bar mode" which isn't any good in my case. I want only one mosfet that corresponds to that range to be on. I'm not sure what logic I can use to get this conversion to happen but my best guess was using some XOR gates. This is probably embarrassingly simple to solve but I haven't figured it out yet :P
Also ideally I would like to add some threshold to prevent switching between 2 ranges rapidly when the value is close to the transition state, but I'm not sure how to that either :palm:
Edit: I actually managed to get the dot mode working but it's not ideal. I have to either use 1 extra comparator , which messes up the ratios, or use a quad nand to create a NOT and an AND as well as 2 quad XORs. the second approach is more acceptable imho but it would be nice if there was a way to use all XORs without needing extra comparators.
http://tinyurl.com/yxwzfglf (http://tinyurl.com/yxwzfglf)