#avr Logs

Jul 12 2017

#avr Calendar

12:26 AM day_ is now known as daey
01:19 AM Emil: wat
01:19 AM Emil: the element does not have polarity
01:20 AM Emil: Jartza: but yeah, dem chips be expensive!
01:22 AM Emil: wtf
01:22 AM Emil: they are
01:41 AM absynth is now known as dan2wik
02:38 AM Thrashbarg_ is now known as Thrashbarg
03:23 AM Thrashbarg_ is now known as Thrashbarg
04:17 AM Jartza: Emil: well, they read wrong if you get chromel & alumel wrong :9
04:24 AM Emil: But
04:24 AM Emil: hooow
04:24 AM Jartza: they just used wrong insulation color in the wire?
04:25 AM Jartza: anyway. just reversed the wires and they work nicely
04:25 AM Emil: No I mean
04:25 AM Emil: if there's two wires
04:25 AM Emil: So two connections
04:26 AM Emil: Ah there's some strange effect going on
04:31 AM Jartza: yeah, Seebeck effect
04:31 AM Jartza: that's how thermocouple works
04:45 AM aaa_: Hi....c .....I have set Fuse bits to 0x62 (8 MHZ clock) but that doest give exact output......Wat may be the problem any
04:46 AM Emil: What's with the .... and c thing
04:46 AM Emil: aaa_: because the rc clock isn't 100% accurate
04:47 AM aaa_: Fuse bit we have set is correct r8?
04:50 AM Jartza: depends of the used MCU
04:50 AM Jartza: and what does "not exact output" mean?
04:52 AM Jartza: https://datasheets.maximintegrated.com/en/ds/MAX31855PMB1.pdf
04:52 AM aaa_: I am getting only 4khz instead of 8 MHz!!
04:54 AM Emil_: stop with the shouting
04:55 AM gjm: pajeet
05:50 AM Jartza: well, pretty hard to say anything without extra info
05:50 AM Jartza: like, what mcu, how do you measure you get 4kHz tc.
05:50 AM Jartza: oh
05:50 AM Jartza: and he quit
05:50 AM Emil_: lol
05:50 AM Jartza: those impatient ones
05:51 AM Jartza: well. seems there's reference design for max31855
05:51 AM Jartza: they seem to have ferrite beads for filtering, and 0.01uF cap between the T- and T+ pins
05:52 AM Jartza: and TVS diodes
05:55 AM Jartza: I don't have ferrites nor TVS diodes, though
05:55 AM Jartza: darn
07:19 AM _abc_: Do you guys know an embedded monitor or avr, with cli, that does not suck?
07:22 AM _abc_: http://community.atmel.com/projects/avr-debug-monitor-cli ?
07:29 AM Emil: _abc_: you mean a serial monitor?
07:30 AM Emil: Or whatcha mean?
07:31 AM Emil: https://www.madresistor.com/diy-vt100/https://www.madresistor.com/diy-vt100/https://www.madresistor.com/diy-vt100/
07:31 AM Emil: https://www.madresistor.com/diy-vt100/
07:31 AM _abc_: Serial embedded monitor, very simple, linkable into C
07:31 AM _abc_: I am already tinkering on my own. Thanks.
07:32 AM _abc_: Emil: this is a good one I know from PJRC https://www.pjrc.com/tech/8051/paulmon2.html
07:32 AM _abc_: http://web.ncf.ca/dunfield/debug.htm more good ones, scroll down to avr
07:34 AM Emil: _abc_: you want a shell on an avr?
07:34 AM _abc_: Not really a shell more like a tiny part of gdb. Or dos debug.
07:34 AM _abc_: Peek and poke vars and so on. Am writing it, can't answer now :)
07:35 AM Emil: You can't do that
07:35 AM Emil: not possible
07:35 AM _abc_: lol
07:35 AM Emil: You'd have to keep track of all the variables
07:35 AM _abc_: Let me crash my avr! I paid for it!
07:35 AM Emil: you can't crash it either
07:35 AM Emil: not possible
07:36 AM _abc_: Of course I keep track of vars. I compiled the program heh. And I have the .lst and .map files.
07:36 AM Emil: ....
07:37 AM Emil: You can peek and poke memory and registers
07:37 AM Emil: but specific variables no, that's a lot harder
07:37 AM Emil: If you do make everything global and volatile then maybe
07:40 AM _abc_: indeed I am after those globals and sfrs
07:44 AM Emil: how independent do you need it to be?
07:47 AM Emil: because simply having a map like struct pair{char *name, unsigned char type, unsigne char *location} variables[ALL_VARIABLES];
07:47 AM Emil: is expensive
07:47 AM Emil: if you can have the name -> index mapping on your computer then it's a lot less expensive
07:49 AM Emil: hmm
07:49 AM Emil: yeah
08:11 AM _abc_: https://en.wikipedia.org/wiki/Resident_monitor#Current_use I updated it a bit, it was only 15 lines before that :)
08:11 AM _abc_: brb
08:12 AM _abc_: Emil: you have no such thing, you have a .map file which maps each symbol to an address in ram in particular. And clearly I am only interested in SFRs and globals.
08:12 AM _abc_: brb2
09:08 AM day is now known as daey
12:27 PM julius: hi
12:27 PM julius: when you use the avr to measure 0-20v, what happens when the voltage goes above 20v? does it just say 20v?
12:30 PM Emil_: _abc_ ...
12:30 PM Emil_: and you fucking quit
12:30 PM Emil_: _abc_ you should learn programming
12:30 PM Emil_: julius: hm?
12:30 PM Emil_: julius: you can't measure 0-20V directly
12:31 PM Emil_: in general though, if your voltage exceeds vref it will read as 1024
12:31 PM Emil_: 1023*
12:46 PM BongoShaftsbury: i need to get 3 phase power in my house
12:46 PM bss36504: BongoShaftsbury: For what?
12:47 PM BongoShaftsbury: never had it before but i could have some nice motors
12:48 PM bss36504: Oh well then in that case, definitely hand a literal bucket full of cash to the power company lol
12:48 PM bss36504: Unless your area already has 3-phase on the poles by your house
12:48 PM julius: Emil_: ah yes..the voltage divider
12:48 PM julius: let me check
12:48 PM bss36504: What do you need three phase motors for? Really large milling machines?
12:49 PM BongoShaftsbury: that's a good idea
12:50 PM bss36504: You could get by with single phase motors or a phase converter for most simple applications.
12:50 PM bss36504: I don't think I could justify the cost of having the utility install three phase unless i was making money off it
12:51 PM BongoShaftsbury: tunnel boring machine
12:51 PM bss36504: lol
12:51 PM bss36504: well in that case...
12:52 PM bss36504: I actually had a neighbor growing up that needed 3 phase for a gigantic veneer lathe he bought. Instead of paying the utility like $150K to add the cabling necessary (we were fairly far from the substation) he just bought an air force surplus 3 phase generator.
12:52 PM bss36504: Like a 50KW generator.
12:52 PM BongoShaftsbury: and fed it diesel
12:53 PM BongoShaftsbury: idk what the wattage was on the ones i worked on
12:53 PM BongoShaftsbury: but they were big af
12:53 PM bss36504: Oh yeah, but for how much he uses it, its still less money than paying the utility in the long run
12:53 PM julius: is this a good way to measure 0-20v? input voltage ----- 8kohm ----- vout ------- 2kohm ------- gnc input: fluctuates between 0 and 20 volts (worst case) when the input is 20v vout is 4v...right?
12:54 PM bss36504: Honestly I have no clue why he even bought the veneer lathe, It was silly. Not like he was starting a plywood company. I think he wanted to make veneers for mandolins, which was his side job.
12:54 PM bss36504: julius: yes
12:54 PM bss36504: That should be fine.
12:54 PM julius: thanks
12:55 PM BongoShaftsbury: i want to get a lathe to cut metal
12:55 PM bss36504: BongoShaftsbury: The great part was the generator was 2-stroke diesel, and it was inside a shipping container. Basically a sound cannon when the doors were open haha
12:55 PM BongoShaftsbury: yes that's why i hate generators
12:55 PM BongoShaftsbury: loud af, smells like diesel
12:56 PM julius: should i attacha tvs in case the input goes >30v which would be 6v at the avr's adc?
12:56 PM bss36504: I mean, it's not ideal, but if youre trying to power something that large, I'd be willing to bet diesel+generator costs significantly less than cabling+electricity
12:57 PM bss36504: julius: Probably just a clamping diode at the input of the AVR would be fine.
12:57 PM bss36504: Maybe a current limiting resistor in there too. Check the AVR's ADC input resistance specs.
12:57 PM BongoShaftsbury: i seen some teraohm resistors
12:58 PM bss36504: Although, the AVR see an input impedance of 8K || 2K which is 1.6K, so you're probably good anyway, current wise. Just slap a schottky diode from the ADC input to VDD.
12:59 PM BongoShaftsbury: the biggest generator i worked on had a dedicated trailor it was mounted on
12:59 PM bss36504: There are some bigg'ins out there
01:02 PM BongoShaftsbury: what are teraohm resistors used for
01:02 PM bss36504: MW scale currents and voltages I assume
01:02 PM bss36504: teraohm is basically an insulator at that point
01:03 PM bss36504: http://www.ohmcraft.com/?gclid=Cj0KEQjwkZfLBRCzg-69tJy84N8BEiQAffAwqgBWabNdSoXEiByJuvEZQopcCmqSd1UE6WiYA-Adz2saArZI8P8HAQ
01:03 PM bss36504: Looks like it's for HV stuff
01:03 PM bss36504: Makes sense I suppose
01:05 PM BongoShaftsbury: if i get a bunch of 50kw generators and hook them up in series i might need to get some of those resistors
01:20 PM xentrac: bss36504: it depends on how much you're powering it and where you are; energy in the form of diesel fuel usually costs about the same as energy in the form of electricity (though there are variations by country) but you lose ¾ of the energy in the generator
01:21 PM xentrac: so in the limit where the cost of cabling and generator go to zero, diesel costs about 4× what electricity costs
01:22 PM BongoShaftsbury: you have to maintain the generator too
01:22 PM xentrac: good point
01:22 PM xentrac: although I think the cost of that scales sublinearly with power output, so in the limit it goes to zero too
02:29 PM BongoShaftsbury: hey guys help me fill in the blank
02:29 PM BongoShaftsbury: make the internet _______
02:30 PM xentrac: baboon
02:32 PM Casper: ban BongoShaftsbury for life from all online presence
02:33 PM BongoShaftsbury: oh no
02:34 PM bss36504: Casper: lol
02:36 PM Casper: or: slower than dialup for BongoShaftsbury, on whatever internet enabled device he will use
03:11 PM Casper: I am not sure what is worse... eternal slowness? or not being able to go online at all...
03:11 PM Casper: mind you, you can't even load an animated gif without having to wait maybe 15-30 minutes or more..
03:16 PM JanC is now known as Guest95169
03:16 PM JanC_ is now known as JanC
04:20 PM day_ is now known as daey
06:04 PM JanC_ is now known as JanC
09:37 PM Emil: What the fuck really
09:38 PM Emil: though
09:38 PM Emil: select(max_fd+1, &set, NULL, NULL, &tv) and I FD_ZERO, FD_SET and reset the tv struct before each call to select
09:38 PM Emil: and then I for loop through all the possible fds
09:38 PM Emil: and it _STILL_ returns instantly and says HEY YOU HAVE SOMETHING INTERESTING IN A FILE DESCRIPTOR BETTER USE THE WHOLE CPU TO TELL YOU ABOUT DAT DAWG
09:39 PM Emil: fuck
09:39 PM Emil: this
09:39 PM Emil: shit
09:39 PM Emil: HOW IS THIS FUKKEN POSSIBLE
09:43 PM Tom_itx: cause it's you
09:45 PM Emil: Prolly
10:08 PM robinak is now known as robink
10:17 PM xentrac: Emil: your tv struct is full of zeroes? That will make it return immediately
10:18 PM xentrac: if you want it to wait forever you need to pass NULL there