#avr Logs

May 09 2017

#avr Calendar

12:22 AM rue_house: wait wait wait...
12:25 AM rue_house: it took 3 days to assemble 4 printers?
12:25 AM rue_house: and they were already designed?
03:25 AM vishwin60 is now known as vishwin
04:03 AM Jartza: rue_house: it took 3 days to assemble 4 printers, but most of the guys didn't have any previous knowledge about working with 3d printers, electronics or 3d printing at all
04:03 AM Jartza: and I was acting as instructor, and also built that one machine as "reference printer"
04:04 AM Jartza: surely, we used a chinese kit printer, but I had prepared the bootcamp so that we didn't quite follow the instructions and also replaced some parts with better ones
04:37 AM Emil: hmm
04:37 AM Emil: Here's a thing to know
04:45 AM Emil: Here's a good thin to know: OSHPark does 2mil solder mask stop mask expansion
04:45 AM Emil: So you can get solder mask in very tiny spaces, like in between TDFN leads
04:45 AM polprog: wow
04:46 AM polprog: i will still practice homemade boards for single-sided pcbs
04:46 AM Emil: Me, too
04:46 AM Emil: but real boards are so much better ;)
04:47 AM polprog: they look professional, but sometimes i want the board nao!
04:47 AM Emil: If only instead of 3x oshpark did 1x orders
04:47 AM Emil: that'd be great
04:47 AM polprog: i still have my boardhouse. and i always order 3 pcs
04:47 AM Emil: Like instead of 30 euros for 3 boards it would be 10+x euros for a single board
04:48 AM polprog: assuming i may break one during development
04:48 AM Emil: I would order a lot more pcbs
04:48 AM polprog: heh, i never needed :P
04:49 AM polprog: gtg, o/
04:50 AM LeoNerd: I find the 3 pieces thing useful these days; if nothing else I can just sell the other two :)
04:50 AM LeoNerd: In fact that's how I started on Tindie
04:55 AM Emil: Hmm
04:56 AM Emil: well actually I'll probably do sell the other two :D
05:16 AM skz81: LeoNerd, Tindie ? It's an app where you swipe for a lover^W maker ?
05:22 AM Emil: What was the ^Code that undid/removed last character?
05:22 AM dunz0r: ^H isn't it?
05:23 AM Emil: lov^H^H^Hluser?
05:23 AM Emil: like so?
05:24 AM Emil: I find it has a lot more comedic value when you exaggarate it
05:28 AM LeoNerd: skz81: https://www.tindie.com/stores/leonerd/
05:29 AM skz81: Emil, for that, since I use backspace... I doubled-up my productivity !
05:30 AM Emil: LeoNerd: how much is the tindie overhead?
05:30 AM skz81: LeoNerd, :) just kidding :)
05:31 AM Emil: skz81: but it doesnt look dramatic enough
05:33 AM Emil: skz81: actually
05:33 AM Emil: ^H IS backspace
05:34 AM Emil: so doing backspacex3 should result in ^H^H^H
05:34 AM skz81: Emil, yeah, i meant the "backspace KEY* "
05:34 AM skz81: (which is strikable at once using only one finger :p )
05:36 AM Emil: If you are an efficient vim purist ^W, otherwise n times ^H
05:36 AM skz81: Not only vim understands that
05:38 AM skz81: I use it in bash mainly
05:39 AM LeoNerd: Emil: In terms of money? not a lot... I forget offhand; can look it up
05:59 AM Emil: LeoNerd: would appreciate it
06:03 AM LeoNerd: Emil: Today I just sold an $8 board + $5 shipping and their total fee was $1.37
06:12 AM Emil: That's quite a lot
06:12 AM Emil: Even patreon takes just 5%
06:23 AM LeoNerd: It's not great, but it is very low effort
06:23 AM LeoNerd: I basically don't bother with anything like "advertising" and I still get orders every couple of weeks or so
06:24 AM Emil: that's pretty nice
06:24 AM Emil: and looking at your prices, it's not too bad
06:24 AM Emil: though I suspect your hourly profit is not that good
06:24 AM Emil: depends on how big your stock is, though
06:24 AM LeoNerd: Oh indeed so. Idon't really think I'd make enough out of it to actually run as a real salary business
06:24 AM LeoNerd: But that wasn't really my plan
06:25 AM Emil: yeah
06:59 AM Emil: https://www.youtube.com/watch?v=dxiCnhH6TcM
08:17 AM Lambda_Aurigae: https://i2.wp.com/microcontrollerslab.com/wp-content/uploads/2014/07/difference2.png?w=927 what do we think about this method of measuring mains voltage with microcontroler?
08:44 AM polprog: that op-amp part is still a mystery for me. but im close in the book :)
11:53 AM CipherWizard is now known as CWiz
01:12 PM polprog: rofl
01:12 PM polprog: somebody ported JVM onto AVR
01:12 PM polprog: yes, it's java!
01:12 PM polprog: http://www.harbaum.org/till/nanovm/index.shtml
01:12 PM polprog: 20k operations per second on an 8MHz clock
01:13 PM polprog: wow
01:32 PM antto: why java, when you can have arm cortex.. on an attiny iirc
01:32 PM * antto runs
01:36 PM Emil_ is now known as Guest28352
01:40 PM aczid: actually, you can buy Javacards which have a sort-of JVM on it and are based on 8-bit AVRs
01:40 PM aczid: but that is really cool :D nice polprog
01:57 PM bss36504: polprog: This guy did a JVM for AVR as well. He also ported linux to AVR, which was pretty cool: http://dmitry.gr/index.php?r=05.Projects
01:58 PM Emil: polprog: "only" 400 cycle overhead
01:58 PM Guest28352 is now known as Emill_
01:59 PM Emill_ is now known as Emil_
02:33 PM Emil: Hmm, I wonder if I could manage 16 cycle overhead
02:34 PM Emil: depends on how, more
02:34 PM Emil: hmm, having a parallel bus ram would be required for continued execution
02:35 PM Emil: depends also how wasteful encoding would be used
02:37 PM Emil: Hmm, how about a byte for op and then 2/4 bytes for arguments
02:37 PM Emil: I think 16 cycle overhead could be achievable
02:58 PM Emil: Lambda_Aurigae: you asked about the circuit for measuring mains
02:58 PM Emil: Lambda_Aurigae: well, it simulates allright
02:58 PM Emil: just as long as you remember isolation it should be okay
03:00 PM Emil: https://emil.fi/jako/linkit/acavr
03:07 PM Lambda_Aurigae: some avr32 chips had a jvm in hardware.
03:07 PM Lambda_Aurigae: well, bytecode interpreter anyhow.
03:09 PM specing: the ARM9 I have can execute some java bytecode directly
03:09 PM specing: AT91SAM9260
03:44 PM antto: Emil isn't it a good idea to put a capacitor to block DC from the mains?
03:44 PM antto: somewhere before the opamp
03:44 PM antto: maybe after the big resistors
03:55 PM * antto zaps Emil with 220VAC.. thru a 2.4Meg resistor..
04:11 PM Emil: antto: block what dc?
04:12 PM Emil: Any potential difference will be quickly dissipated and even if you have a capacitor it doesnt prevent the initial spike
04:12 PM Emil: But sure, one can put series caps there
04:13 PM bss36504: I'm pretty sure you could dispense with the resistors entirely and just use a capacitor divider.
04:16 PM * antto pours Emil a glass of criticizm, with two ice cubes and a straw
04:18 PM antto: Emil okay, i was just seeing a few naughty electrons flowing all the way from mains thru some resistors and onto the other side where you'd eventually measure with ADC
04:18 PM bss36504: antto: What would this DC offset be referenced to? If you have proper isolation, there shouldn't be any common-mode DC shooting through the amplifier.
04:18 PM antto: no idea if that's "fine" .. i'm just highly respected by anything above 1mV
04:19 PM antto: "if you have proper isolation" i bet that's someone's famous last words ;P~
04:20 PM bss36504: Oh I'm certain, but if it's your last words you probably have much more significant problems on your hands than a few mV getting to your ADC
04:21 PM antto: okay.. 1Meg is a lot of resistance
04:23 PM bss36504: But at any rate, the resistance is irrelavant. There should be no DC offset with respect to the GND that the ADC is using for a reference. The op amp is acting differentially, so any common mode present on the inputs won't get through.
04:23 PM bss36504: irrelevant*
05:13 PM Emil: bss36504: yeah
05:14 PM Emil: bss36504: I mean, in theory capacitive divider is possible
05:15 PM Emil: the problem is that "they dont consume energy" us absolute bullshit :D
05:17 PM Emil: But yeah, with proper isolation all static charge should equialise quickly and effortlessly
05:30 PM Lambda_Aurigae: I'll probably just use one of these DMM chips I have here if it has a fast enough read time.
05:32 PM impulse: anyone cross compile from gentoo for AVR?
05:32 PM impulse: i'm having some trouble setting up my environment
05:33 PM Emil: impulse: https://emil.fi/avr
05:33 PM Emil: impulse: those are the packages you need
05:33 PM Emil: and they should be all available on gentoo
05:33 PM Emil: what's the issue
05:33 PM Emil: ?
05:34 PM Emil: correction
05:34 PM Emil: I know they are available on Gentoo
05:34 PM impulse: getting this when i try to build gcc:
05:34 PM impulse: configure: error: C compiler cannot create executables
05:34 PM Emil: havw you tried googling?
05:34 PM impulse: yea
05:35 PM impulse: someone said to remove the sanitize use flag, but it didn't help
05:35 PM Jartza: hello
05:35 PM Jartza: hmmh
05:35 PM Emil: and you have tried to emerge the software?
05:35 PM Jartza: I'm starting to recover from the 3 day 3D printing bootcamp, lol
05:36 PM Emil: impulse: you are using avr-gcc, right?
05:36 PM impulse: Emil: yes and yes
05:36 PM impulse: well trying to build avr-gcc
05:37 PM Emil: https://wiki.gentoo.org/wiki/Arduino
05:37 PM Emil: mentions some critical info
05:38 PM impulse: hmm i'll try that thanks
05:40 PM impulse: was about to try stable anyway
05:41 PM impulse: and probably should have been my first thought. i got ruined by some gcc bugs a few years back
05:41 PM Emil: heh
05:50 PM jaakkos: is it clear why Arduino AVR's digitalWrite() doesn't use sbi/cbi instead of the |= / &= approach to the output register? the idea is of course that less instructions would be needed and interrupts don't need to be disabled
05:54 PM cehteh: digitalWrite is a huge mess
05:54 PM cehteh: https://pastebin.com/dSRSxgax
05:55 PM Lambda_Aurigae: digitalwrite is an abomination and should be killed with fire...
05:55 PM cehteh: as most of arduino :D
05:56 PM cehteh: bloat, no correct error handling, blocking and busy loops everywhere
06:01 PM jaakkos: cehteh: ok though this is in 2013 :)
06:02 PM cehteh: did anything change?
06:06 PM jaakkos: not really it seems.
06:07 PM jaakkos: I'm a bit surprised that code expands to that...
06:07 PM jaakkos: I would be even more surprised if most of that got executed instead of jumped over
06:08 PM jaakkos: that code is here https://github.com/arduino/Arduino/blob/b276a75d13cf9a560f002a108f908902f963b111/hardware/arduino/avr/cores/arduino/wiring_digital.c#L133
06:08 PM jaakkos: oh well in 2012, but it's unchanged
06:09 PM Lambda_Aurigae: whoever wrote that used to work for microsoft.
06:45 PM JanC is now known as Guest59098
06:45 PM JanC_ is now known as JanC
09:24 PM Tachyon` is now known as Tachgone
11:43 PM daey_ is now known as daey