#avr Logs

Mar 13 2021

#avr Calendar

12:11 PM cehteh_ is now known as cehteh
12:22 PM nohit: -- Feb 13
09:40 PM ferdna: can you guys provide me with a solution... i was thinking on a voltage divider but dont know how to make an adjustable one...
09:41 PM ferdna: my problem is...
09:41 PM ferdna: I need to know that my wire has 9v-80v... i need to conver that to 3.3v
09:43 PM Thrashbarg: 80V is pretty high. What's it used for? You can use a trimmer with a high value resistor between it and the voltage source as a divider too
09:44 PM ferdna: Thrashbarg, it is variable... it is a 12v signal... but it can go as high as 80v
09:44 PM ferdna: so it needs to be variable...
09:45 PM Thrashbarg: what do yo mean? Do you mean automatically adjusted so it's always 3.3V?
09:46 PM ferdna: yes.
09:46 PM cehteh: you can just clamp it with a zener
09:46 PM ferdna: Thrashbarg, a voltage divider with resistors is always fixed
09:46 PM Thrashbarg: does it switch off?
09:46 PM Thrashbarg: yea
09:46 PM ferdna: Thrashbarg, yes it does...
09:46 PM ferdna: it does switch off
09:46 PM Thrashbarg: yea so use a 3.3V zener
09:47 PM ferdna: ohhh
09:47 PM Thrashbarg: just make sure the resistor you choose between the voltage and the zener limits the current enough when it's at 80V
09:47 PM cehteh: you only want to sense if there is voltage or not? but it can be up to 80V?
09:47 PM cehteh: i
09:48 PM cehteh: i usually have a stash of 4.7V zeners for such things, from there on (assume 5V) you can divide it to 3.3v
09:49 PM ferdna: cehteh, correct... i do only want to sense if there is voltage up to 80v
09:50 PM cehteh: the commn fet-as-level shifter works also for that, but 80V is too highl for tiny small signal fets like the 2n7000
09:50 PM ferdna: zener will work for me
09:50 PM cehteh: ferdna: and when there is no voltage it means its GND or floating?
09:50 PM cehteh: or some fraction of the voltage?
09:50 PM ferdna: floating
09:50 PM cehteh: also .. long wire/noise/esd? .... add a cap
09:51 PM ferdna: cehteh, nice
09:51 PM ferdna: do you have an example schematic?
09:54 PM cehteh: moment
09:54 PM Thrashbarg: https://www.electronics-tutorials.ws/diode/diode_7.html
09:54 PM Thrashbarg: that's really all it needs to be
09:55 PM cehteh: https://tinyurl.com/yhdxze7f
09:56 PM ferdna: nice!
09:56 PM ferdna: thank you guys!
09:57 PM Thrashbarg: huh... I thought Falstad did that originally :P
09:57 PM Thrashbarg: http://falstad.com/circuit/
09:57 PM cehteh: they work together
09:57 PM Thrashbarg: ok
09:58 PM cehteh: https://github.com/sharpie7/circuitjs1
10:22 PM ferdna: cehteh: on my research i found out that the design you sent me.. its called a shunt regulator
10:23 PM cehteh: partly .. first R and zener yes, the other 2R form a divider and with the capacitor you get a lowpass filter
10:24 PM ferdna: cool cool
10:38 PM rue_shop1: anyone awake?
10:41 PM rue_shop1: gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_10_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO15);
10:41 PM rue_shop1: this line is changing C14 to an output