#avr | Logs for 2015-05-05

Back
[07:15:09] <twnqx> for mosfets, Vgs is the destruction voltage, right?
[07:15:22] <twnqx> after which gate breakdown occurs
[07:28:16] <Ad0> threshold
[07:28:34] <twnqx> there are two numbers in this datasheet
[07:28:46] <twnqx> vgsth, and vgs max
[07:29:06] <Ad0> vgs max = maximum gate to source differential
[07:29:23] <Ad0> max voltage that will make it conduct
[07:29:23] <twnqx> before... what happens? smoke?
[07:29:28] <Ad0> I suppose :P
[07:29:48] <Ad0> vgsth is probably the voltage when it starts conducting
[07:30:09] <Ad0> just be safely in between :)
[07:30:23] <Ad0> link to datasheet?
[07:30:25] <twnqx> so if i have source=3.3v, drain= mmm. cmos input, so no current, gate = 24V...
[07:30:36] <twnqx> http://www.fairchildsemi.com/datasheets/BS/BSS84.pdf
[07:30:48] <twnqx> and vgsmax = +-20V...
[07:30:58] <twnqx> while i have 20.7V...
[07:31:05] <twnqx> and i wanted some headroom :/
[07:31:22] <twnqx> basically, i want to build a cmos inverter as "level" shifter
[07:31:42] <twnqx> outside = pretty much undefined, but minimum 24V
[07:31:46] <twnqx> inside = 3.3V cmos logic
[07:33:39] <Ad0> yeah
[07:33:45] <Ad0> you making a high voltage programmer
[07:33:46] <Ad0> or something ?
[07:34:01] <twnqx> no, i have to deal with reading state from home automation stuff
[07:34:14] <twnqx> with signals 24V or "open"
[07:35:53] <twnqx> and i don't want to just abuse clamp diodes and push the 24V into my 3.3V VCC net :P
[07:36:13] <Ad0> http://electronics.stackexchange.com/questions/38098/simple-design-to-switch-24v-from-pic
[07:36:29] <twnqx> opposite direction
[07:36:36] <twnqx> switching the 24V for out is no prob
[07:36:42] <twnqx> i need to sense 24V
[07:36:55] <Ad0> oh right
[07:39:03] <twnqx> also, that schemeatic wouldn't help me as i need high side switching for greater fun :P
[07:40:00] <Ad0> optocoupler?
[07:40:09] <Ad0> http://blog.cornbeast.com/2014/11/detecting-a-higher-voltage-on-a-raspberry-pi-pin/
[07:40:09] <twnqx> too large part count :P
[07:40:16] <twnqx> i need 128 ins and 128 outs in total
[07:40:49] <twnqx> guess i'll just hunt down mosfets with higher vgs survival capability :P
[07:41:18] <twnqx> though 20V would be borderline in rach if i use 5V system voltage
[07:41:19] <twnqx> :>
[07:42:24] <Ad0> yeah
[07:42:31] <Ad0> it would say PANG
[07:43:18] <twnqx> i am already at 256 mosfets, 256 diodes and 256 resistors...
[07:43:29] <twnqx> just for input sensing
[07:44:22] <Ad0> you can also use a voltage divider to bring down the voltage
[07:44:36] <twnqx> incidentally i already have one
[07:45:05] <LeoNerd> 256 GPIOs? How fast do you need them? That's starting to sound like a long SR chain
[07:45:31] <twnqx> i was thinking those nice cheap lattice fpgas
[07:45:43] <twnqx> 5€ each, 64GPIO in logic
[07:45:53] <twnqx> + enough left for SPI to avr
[07:45:58] <LeoNerd> Mmm. FPGA
[07:46:24] <twnqx> and inside... SR's and pin change detection logic
[07:46:26] <twnqx> nothign more
[07:47:52] <Ad0> with an optocoupler you won't bring the noise into your avr either
[07:48:06] <twnqx> the noise will stop at the fpga anyway
[07:48:37] <twnqx> also, spice simulation of the mosfet inverter says it can take 3.3V-24V with no probs
[07:48:43] <Ad0> if the voltage is always 24 V you can voltage divide yourself to 3.3 V
[07:48:44] <Ad0> hehe
[07:48:54] <twnqx> so i don't have to use different resistors to change the voltage :3
[07:49:53] * twnqx wonders if it's worthhile to build a strange charge pump on top of an unknown voltage
[07:51:51] <twnqx> like "i have no clue about the voltage, so i build a virtual voltage 3.3V below whatever it is with an LDO, and then use that to feed a charge pump"
[08:26:11] <xrlk> how is a ternary operator done in scheme
[08:26:34] <xrlk> ok
[08:26:37] <xrlk> nvm tnx
[08:27:13] <LeoNerd> (if cond then else) surely?
[08:27:36] <LeoNerd> Also you probably wanted #scheme rather than #avr :)
[08:27:49] <xrlk> you're right
[08:27:49] <xrlk> tnx
[08:37:34] <twnqx> seems like 56k input resistence + 100k pulldown form a viable voltage divider that gets the range +-3.3 - +-24V into safe regions
[08:39:09] <twnqx> and 150µA seems tolerable as input current
[11:32:31] <EI24> Hi, im i trying to use avr-gcc, however, when i type it in terminal(using linux), i get: avr-gcc: fatal error: no input files. Im certain i have installed everything needed.
[11:33:09] <Fleck> avr-gcc --version
[11:33:35] <EI24> 4.8.2
[11:34:47] <EI24> no its fine.. bahh i made such a stupid mistake, please ignore my question
[12:25:59] <megal0maniac> I'm busy doing serial things with an xmega
[12:26:47] <megal0maniac> I've written a simple echo app, but I seem to be losing characters
[12:27:19] <megal0maniac> I wait for the TXIF to assert before exiting the ISR
[12:30:29] <megal0maniac> I lose character 72 and then approx. every 32nd character after that
[12:30:49] <megal0maniac> Took out the while loop to poll TXIF and it made no difference
[12:31:34] <umquant> Anyone here have experience with zip compression libraries on any 32bit AVRs?
[12:32:07] <LeoNerd> megal0maniac: Try watching the serial line with a logic probe..? See if it fails to be transmitted, or is transmitted but isn't received
[12:32:14] <LeoNerd> Could be subtle timing issues on the receiving side
[12:33:03] <megal0maniac> LeoNerd: I'll let you know what I find in a sec
[12:38:10] <megal0maniac> Looks like the transmission is too fast
[12:38:39] <megal0maniac> I imagined there was some kind of a buffer
[12:47:17] <megal0maniac> LeoNerd: Interesting. I had an if statement which toggled a pin if the data register contained '\n'. I changed that to set the pin high if the buffer overflow flag was set and now it's still lagging behind, but not losing data
[12:48:48] <LeoNerd> Ahyes, debugging by spare GPIO pins :)
[12:48:54] <megal0maniac> http://i.imgur.com/13oicFR.png
[12:48:58] <LeoNerd> I do like that.. it's why I always dislike allocating the last pin to something
[12:49:06] <LeoNerd> I recently moved a bunch of LEDs onto a '595
[12:49:32] <megal0maniac> I have many pins free, it's just the quickest way to check the flag without halting the program :)
[12:49:48] <megal0maniac> Perhaps reading the data register twice messed with the FIFO?
[12:50:15] <megal0maniac> At the beginning, response A was under transmission B
[12:51:01] <LeoNerd> Reading the FIFO register shifts it
[12:54:48] <megal0maniac> Hmmm...
[12:55:00] <megal0maniac> In 1035 characters, it loses 6
[12:55:11] <megal0maniac> Which is fair. The FIFO is only so big
[12:56:37] <megal0maniac> 276 bytes before the 1st drop
[13:17:21] <megal0maniac> Annoyingly, the buffer overflow bit never seems to be set :/
[14:44:13] <hypermagic> hello
[17:20:24] <malinus> Do you guys think/know if the fuses are actually implemented as a small seperate eeprom? (that's my guess)
[17:20:27] <malinus> *how
[18:20:11] <Lambda_Aurigae> malinus, implemented as a small separate flash actually I would think rather than eeprom.
[23:21:32] <ferdna> back
[23:22:23] <Thrashbarg> front
[23:25:09] * Casper flips ferdna upside down
[23:25:35] <ferdna> nooo... my coins!!!
[23:25:47] <ferdna> Thrashbarg, top?
[23:26:00] <Thrashbarg> there
[23:26:04] <Thrashbarg> -->
[23:27:41] <Casper> sup ferdna ?
[23:27:53] <ferdna> hahaha Thrashbarg
[23:27:59] <ferdna> Casper, not much brother and you?
[23:28:04] * Thrashbarg picks up coins
[23:28:11] <ferdna> dont steal!!! dont!!
[23:28:19] <Thrashbarg> >_>
[23:28:19] <ferdna> i ordered some sandals...
[23:28:31] <Thrashbarg> well if YOU'RE not going to pick them up!
[23:28:40] <Casper> not much too, but car is now well lighted inside of it!
[23:29:15] <ferdna> so i ordered my sandals this date: 04/28/2015 8:56 A.M.
[23:29:22] <ferdna> well that is the shipped date/time
[23:29:29] <ferdna> and i still havent received them!!!
[23:29:32] <Thrashbarg> "No part of me would ever be seen wearing sandals!"
[23:30:01] <ferdna> Thrashbarg, yes, i am going to pick them up... casper, flip me upside down!!!
[23:30:17] <ferdna> Casper, ohhh nooo... you mess now with the lights
[23:30:31] <Casper> yup
[23:30:50] <Casper> I'm considering to install some xenon headlights
[23:31:31] <Thrashbarg> is it Xenon or Halogen bulbs that glow blue and blind all oncoming drivers
[23:32:24] <Casper> xenon is the blinder when improprelly installed
[23:32:37] <Casper> you need a projector, not a reflector
[23:33:06] <Casper> a projector actually prevent lights from going "up" and sideway
[23:33:47] <Casper> this is why conversion kits are usually illegal
[23:33:52] <Casper> the housing is not designed for it
[23:33:56] <Casper> and cause issues
[23:34:04] <Thrashbarg> right
[23:36:57] <Casper> funny thing is... I ordered some solder from digikey
[23:37:02] <Casper> received loctite
[23:38:02] <Casper> loctite 60/40 :D
[23:40:59] <ferdna> hahaha
[23:43:12] <Casper> didn't knew that loctite also make solder
[23:47:05] <ferdna> no they dont but the do the same thing... put things together...
[23:47:06] <ferdna> hehehe