#avr Logs

Feb 08 2018

#avr Calendar

12:05 AM Emil: hm?
12:09 AM Emil: dgriffi: its just export as pdf
12:09 AM Emil: Would make it a lot easier to give feedback
12:23 AM dgriffi: okay.
12:27 AM dgriffi: Emil: do you not use Kicad?
12:29 AM dgriffi: Emil: https://www.dropbox.com/sh/fy37srxac7yqixa/AAAu1IK4F3S8rWHdNF7OF0n0a?dl=0
01:01 AM Jartza: those are unusable PDFs
01:02 AM Jartza: schematic exported as PDF needs to be one with possibility of text search
01:02 AM Haohmaru: which PDFs?
01:03 AM Jartza: that kind of PDF that dgriffi pasted half an hour ago
01:03 AM Jartza: schematic as PDF but without text search possibility
01:04 AM Haohmaru: kicad
01:04 AM Haohmaru: the stable version puts actual text under the stuff that looks like text
01:35 AM Emil: dgriffi: I do
01:36 AM Emil: dgriffi: but kicad has made it cumbersome
01:36 AM Emil: and pdfs are viewable eveeywhere
01:39 AM * Haohmaru calls the kicad police
01:43 AM Emil: dgriffi: is that diode the wrong way around?
01:44 AM dgriffi: Emil: no
01:45 AM dgriffi: Emil: as-is, the board should be populated with the diode, the VR, but not both.
01:45 AM dgriffi: the VR is for if a 9V battery is used.
01:46 AM dgriffi: the diode is if a 6V battery is used.
01:47 AM dgriffi: using both will cause damage
01:48 AM z999: hey
01:48 AM z999: anyone around
01:48 AM dgriffi: Emil: I might not go with that layout anyhow because 1) a 9V battery won't fit in my choice of case. 2) nor will an AAA holder (3 or 4 cells)
01:48 AM z999: going to start on assignment use amtel studio 7 using asm
01:49 AM z999: remember me?
01:49 AM z999: hi emil
01:49 AM dgriffi: Emil: so I'm going with a pair of double-capacity 2032 holders on the back... and deleting the VR.
01:49 AM dgriffi: Emil: I'm using two stacks of two 2032 cells in parallel... 6V with more amp-hours than a single stack.
01:56 AM z999: in asm to push a stack must you do a ldi first?
01:56 AM z999: hmmm
02:00 AM nuxil: emm. push
02:01 AM z999: hi nuxil
02:01 AM z999: yes push but do i have to do ldi first?
02:02 AM nuxil: you gotta https://www.youtube.com/watch?v=k4onJ7Z2MLI
02:03 AM nuxil: z999, did you look up the push instruction ?
02:19 AM nuxil: z999, you use whatever method for setting a register to a value. example ldi r19, 10; push r19 ; ldi r19 20; "restore r19" pop r19.
02:20 AM nuxil: also. a stack is not first in first out. if you keep pushing it. you need to pop N elements aswell. "its first in last out" :p
02:24 AM Emil: dgriffi: ah I see
02:24 AM Emil: but
02:24 AM Emil: why not just use a regulator that's okay with 9-6v input?
02:25 AM Emil: z999: hi
02:27 AM dgriffi: Emil: the attiny85 requires 4.5 to 5.5 volts to run at 20mhz
02:28 AM dgriffi: Emil: to use a regulator with 6-9v input, I'd realistically have to use 3.5 or so volts.
02:28 AM dgriffi: Emil: putting 6v into a 5v regulator is asking for trouble
02:29 AM dgriffi: and I don't feel very good about trying with 4.5v
02:29 AM Emil: eh
02:29 AM Emil: wat
02:29 AM Emil: dgriffi: there are literally thousands of regulators that take 6-9 and happily output 5 :D
02:29 AM dgriffi: hrmm
02:30 AM Emil: also
02:30 AM Emil: the 5.5v is not somethin you should do
02:30 AM dgriffi: last time I tried driving a 7805 with 6 volts, I had stablity problems
02:34 AM Casper: 78xx is really +2Vout ideally +3Vout
02:34 AM Casper: bellow that you will have issues
03:12 AM Emil: dgriffi: that's why you don't use 7805
03:12 AM Emil: you use something more moern
03:12 AM Emil: modern*
03:13 AM z999: NUXIL, thank you
03:13 AM dgriffi: Emil: are they available in a TO-92 package?
03:13 AM z999: i completed activity 1 and looking into activity 2
03:13 AM z999: i am stuck on activity 2 now.
03:13 AM nuxil: :)
03:13 AM polprog: morning
03:13 AM z999: i'll post instructions and then the little code i wrote. i am getting building errors
03:14 AM z999: https://pastebin.com/WknLR54c
03:14 AM nuxil: polprog, will help you with that one :p
03:14 AM polprog: haha, let me see :P
03:15 AM z999: https://pastebin.com/dfmZpQTf codes but getting build errors
03:16 AM Emil: dgriffi: yes
03:19 AM polprog: z999: what are the errors?
03:25 AM z999: operands out of range
03:25 AM z999: trying to follow the instructions but i am doing it wrong
03:25 AM z999: the script is wrong
03:29 AM polprog: not really
03:30 AM polprog: $19D is a 2 byte constant
03:30 AM polprog: SPL = stack pointer low, is an 8 bit register
03:30 AM z999: LDI r20, $19D
03:30 AM z999: OUT SPL, R20
03:30 AM z999: POP R20
03:30 AM z999: LDI R21, $19C
03:30 AM z999: POP R21
03:30 AM z999: LDI R22, $19B
03:30 AM z999: POP R22
03:30 AM z999: LDI R23, $19A
03:30 AM z999: POP R23
03:30 AM z999: LDI R24, $199
03:30 AM z999: POP R24
03:30 AM z999: LDI R25, $198
03:30 AM polprog: that's how you load into stack pointer : http://www.avr-tutorials.com/general/avr-microcontroller-stack-operation-and-stack-pointer
03:31 AM polprog: in that case the guy loads RAMEND (a constant) into SP, he loads the low byte to SPL and high byte to SPH
03:31 AM nuxil: https://pastebin.com/cSSx5dzM
03:31 AM * Haohmaru sees asm x_x
03:31 AM nuxil: how about like that ?
03:32 AM polprog: still loading 2 bytes into an 8 bit register
03:32 AM polprog: it says "operands out of range"
03:32 AM nuxil: oh. km
03:32 AM nuxil: *ok
03:37 AM z999: ok i changed to sph
03:37 AM z999: but still getting errors
03:37 AM z999: i am wondering if i am followin the instructions right?
03:38 AM polprog: its lower half of $19D to SPL and upper half to SPH
03:38 AM polprog: not sure if your assembler has lo8() and hi8() pseudo-ops
03:38 AM polprog: what assember do you use?
03:38 AM Thrashbarg: could be just low() and high()
03:38 AM polprog: or that
03:39 AM polprog: i just used avr-as so i dont know what other asseblers use
03:39 AM Thrashbarg: I use avra
03:39 AM Thrashbarg: it's easier to use but doesn't integrate into GCC
03:46 AM nuxil: umm. use the x register
03:47 AM z999: i am using amtel studio 7
03:47 AM z999: atmega 328p
03:47 AM polprog: yeah, and using X register helps
03:47 AM polprog: more readable
03:47 AM nuxil: no- for the stack data.
03:51 AM z999: https://pastebin.com/BDTJDQ1E
03:51 AM z999: this is what i have
03:51 AM z999: i have 5 errors
03:55 AM Thrashbarg: nuxil: I wasn't aware you could push a 16-bit register aside from the program counter onto the stack
03:56 AM z999: by the way i know sp value can change but why do you want it to change?
03:57 AM Thrashbarg: it changes when you push or pop a value. Do you know how a stack works? It might be easier with a diagram
03:58 AM z999: i understand that push decrements and pop increments
03:59 AM Thrashbarg: the idea of a 'pointer' in any sense is the data it contains becomes the address the processor uses to perform the operation
04:00 AM z999: thank you
04:00 AM Thrashbarg: so if a pointer 'points to' address $0100 and you write $67 through that pointer (an indexed operation), the memory location at $0100 becomes $67
04:00 AM Thrashbarg: register pairs X Y and Z are pointers too
04:01 AM z999: but why would you want it to change? is it to reflect the new value?
04:01 AM Thrashbarg: the stack has to change automatically or the data structure isn't a stack anymore
04:01 AM Thrashbarg: that is, when you push or pop a value, the address has to change or you'll overwrite existing data
04:02 AM Thrashbarg: https://upload.wikimedia.org/wikipedia/commons/b/b4/Lifo_stack.png
04:02 AM Thrashbarg: the blocks 1 through 6 have their own individual locations in SRAM which don't move. The stack pointer changes to point to the current top-of-stack value
04:03 AM z999: got it
04:03 AM Thrashbarg: cool
04:03 AM z999: thanks for the explanaition
04:03 AM Thrashbarg: no worries
04:03 AM z999: i wish i can finish activity 2 but i am stuck
04:05 AM Thrashbarg: okay the $19D thing is equal to $019D, just the leading zero is removed. That is, it's a 16-bit number
04:05 AM Thrashbarg: and you're trying to load it to an 8-bit register
04:05 AM z999: so change it to sph?
04:05 AM polprog: you need to put one half in sph and another one in spl
04:06 AM z999: how do i do that?
04:06 AM Thrashbarg: no you need to break the number into two parts, one is the upper 8-bits ($01) and the other is the lower 8-bits ($9D)
04:06 AM Thrashbarg: the upper goes to SPH and the lower to SPL
04:06 AM polprog: thats what i meant :P
04:06 AM Thrashbarg: yeah heh
04:06 AM z999: ldi sph , $01
04:07 AM polprog: anyway; you can use the pseudo operands that make it clearer for the reader
04:07 AM z999: ldi spl, $9D?
04:07 AM polprog: or like that
04:07 AM z999: ok will try that!
04:07 AM Thrashbarg: z999: the SP registers aren't accessible directly like that. You need to load the constant $01 and $9D to a register first
04:07 AM Thrashbarg: then to SPH and SPL
04:07 AM z999: oh!
04:07 AM z999: i get it
04:07 AM z999: thank yu
04:07 AM z999: thankyou for your patience
04:07 AM Thrashbarg: but take care you load the first one, then write to the SP
04:08 AM Thrashbarg: not load two values to the one register, because you'll overwrite the first value
04:08 AM Thrashbarg: unless you use two registers
04:08 AM polprog: oh yeah. they are adresses in memory so you use OUT or ST
04:08 AM Thrashbarg: yup
04:08 AM polprog: which is another story on io adresses vs memory adresses :P
04:09 AM Thrashbarg: z999: is the .equ line giving an error? I would've thought it'd be "sp .equ $19d" or "sp = $19d" but not both
04:09 AM z999: thrashbarg, no, but fixing it
04:09 AM Thrashbarg: okay
04:10 AM Thrashbarg: are you familiar with how .equ works?
04:11 AM Thrashbarg: (I've seen people stumble on assembler pseudo-ops before, just checking)
04:11 AM z999: set is better right?
04:11 AM z999: .equ doesn't change
04:12 AM z999: i think .set can change
04:12 AM Thrashbarg: yeah but both only exist when the assembler is running
04:12 AM Thrashbarg: when the assembler spits out the code at the end the numbers associated to those .equ variables are constants
04:13 AM Thrashbarg: do you know how #define works in C? It's similar
04:13 AM Thrashbarg: except you can perform math on the values
04:13 AM z999: invalid definition of spl and sph
04:13 AM z999: Thrashbarg yes i know how define works
04:14 AM z999: .equ and .set are the equivalent
04:14 AM Thrashbarg: yeah
04:14 AM Thrashbarg: well.... nearly :P
04:15 AM Thrashbarg: looking at the first pastebin here... lds r20, $19d will load r20 with the value in SRAM at address $19D, which could be anything
04:17 AM z999: ok i will paste bin again
04:17 AM z999: hold on
04:17 AM Thrashbarg: ok
04:17 AM z999: https://pastebin.com/eLaPcud4
04:18 AM z999: now it is saying spl and sph are invalid
04:18 AM Thrashbarg: ah SPL and SPH are already defined as addresses in SRAM
04:18 AM Thrashbarg: trying to redefine them will cause it to break
04:19 AM z999: ok so what do i do?
04:19 AM Thrashbarg: something more like .set sp=$19D; ldi r20, low(sp); out spl, r20; ldi r20, high(sp); out sph, r20
04:21 AM Thrashbarg: sp is a value internal to the assembler and can be of any magnitude. low(sp) returns the lowest 8-bits of the variable. ldi r20, low(sp) loads that to r20, which then gets sent to spl
04:21 AM Thrashbarg: same deal for high(sp) but it's the upper 8 bits
04:22 AM z999: what about the rest?
04:23 AM Thrashbarg: I'm not sure what you're trying to do with the rest. It makes no sense lol
04:23 AM Thrashbarg: I wasn't here for the start of the conversation
04:23 AM z999: i needed to insert the value in each ram location then pop register r20-r25
04:24 AM z999: hold on i'll paste the instructions again
04:24 AM Thrashbarg: ok
04:24 AM z999: https://pastebin.com/ZBYtmXcV
04:25 AM Thrashbarg: ah I see. So you've set the stack pointer to $19D. Pushing an arbitrary value to the stack will automatically send it to addresses $19D, $19C, $19B (remember how I said the stack pointer 'points' to memory)
04:26 AM z999: YES
04:27 AM Thrashbarg: it also says 'push a different value' so it could be any value you want
04:27 AM z999: how do you suggest i do this?
04:27 AM z999: so i was doing it entirely wrong
04:28 AM Thrashbarg: there was some confusion lol
04:28 AM Thrashbarg: but the point is you get the idea now?
04:28 AM Thrashbarg: anyway, just load r20 (or whatever) with a value of your choice and push the same register to the stack
04:29 AM z999: ok i will try again
04:31 AM z999: how do i do that ram locations part
04:31 AM Thrashbarg: the processor does it for you with the stack
04:31 AM z999: i will cut and paste again to show you what i have
04:31 AM z999: oh
04:31 AM Thrashbarg: push a value onto the stack, the value gets written to RAM at the location the stack pointer is addressing, then the pointer gets decremented
04:32 AM Thrashbarg: so you can push a whole chain of values to the stack. When popping them back off the stack they come back in reverse order
04:32 AM z999: is this better? https://pastebin.com/MFsXZ3WM
04:33 AM z999: is this following the instructions?
04:33 AM z999: i build it. it has no errors now
04:36 AM z999: Thrashbarg?
04:36 AM Thrashbarg: sorry phone
04:36 AM z999: ok
04:39 AM polprog: step it through then and check ;)
04:40 AM z999: polprog ok
04:41 AM z999: i wanted to know if i was followin the instructions
04:41 AM z999: is the code fine?
04:41 AM Thrashbarg: you need to push those values first, then pop them
04:46 AM Thrashbarg: what's happening at the moment is you're loading R20 with 3, then popping an unknown value off the stack into R20, overwriting the 3
04:46 AM z999: push then pop
04:46 AM z999: ok
04:47 AM Thrashbarg: yeah load the value to R20, then push it, load another to R20, push it again, etc
04:47 AM Thrashbarg: then pop to R20, R21, etc
04:49 AM z999: LIKE THIS? https://pastebin.com/eSBNaQve
04:50 AM Thrashbarg: that'll work but you won't get full marks for it
04:50 AM Thrashbarg: :P
04:50 AM z999: WHY?
04:50 AM z999: the popping is at the end?
04:50 AM Thrashbarg: because you'll only be addressing $19D
04:50 AM Thrashbarg: the question asks you to write to $19D, $19C, etc
04:51 AM z999: how do i do the other?
04:51 AM Thrashbarg: okay so the stack is like a stack of plates. Every time you push a value, you write that number onto the plate and put it on the stack...
04:51 AM z999: load both values ?
04:52 AM Thrashbarg: (trying to describe it so you understand it, rather than just giving the answer)
04:52 AM Thrashbarg: your code writes a number to the stack then immediately pops it off
04:52 AM z999: ok
04:53 AM Thrashbarg: the question asks you to write to many addresses, then read them back
04:54 AM Thrashbarg: so the equivalent is to have many plates on the stack
04:54 AM Thrashbarg: not just one, which is what's happening at the moment
04:54 AM z999: so i have to do .set to all those ram locations?
04:54 AM Thrashbarg: nope the stack pointer does that for you
04:54 AM z999: so in what code do i put it in?
04:55 AM Thrashbarg: remember before with that picture how each number was stored in a separate location in memory, and that location was determined by the value of the stack pointer?
04:56 AM z999: so repeat this? LDI R19, LOW(sp)
04:56 AM z999: OUT SPL, R19
04:56 AM z999: LDI R19, HIGH(sp)
04:56 AM z999: OUT SPH, R19
04:56 AM z999: do i change r19 or leave it at r19
04:57 AM Thrashbarg: you don't need to change the value of the stack pointer after you've set it
04:57 AM Thrashbarg: because every time you do a push or a pop its value decrements or increments
04:57 AM z999: ok so how do i change the ram locations?
04:57 AM Thrashbarg: you just push to them
04:57 AM Thrashbarg: the stack decrements
04:57 AM Thrashbarg: push again, it decrements again
04:58 AM z999: how do i enter those ram locations in the code?
04:58 AM Thrashbarg: you don't need to. You've set the stack pointer already to the initial address. When you push a value, the stack pointer decrements
04:59 AM z999: so why did you say i won't get the full points
04:59 AM Thrashbarg: because you won't be writing to $19C, $19B, $19A, etc
04:59 AM Thrashbarg: you'll just be writing to $19D
04:59 AM z999: ok how do i add $19c, $19b, $19A to the code
05:00 AM Thrashbarg: the processor does that for you when you issue a push command
05:00 AM Thrashbarg: the stack pointer is another register
05:00 AM z999: ok you are not understanding my question
05:00 AM z999: and i am not sure how to do complete the activity
05:00 AM z999: and i don't want to spend annother hour going back and forth. i have to turn this assignment in this morning
05:01 AM Thrashbarg: okay so you've set the stack pointer to $19D. You push a register. The value of that register gets written to memory at $19D. The stack pointer decrements. You load another value to a register, push it. That value goes to address $19C because the pointer has already been decremented by the processor
05:02 AM Thrashbarg: and so on
05:02 AM Thrashbarg: then you pop the values back into registers R20 to R25
05:03 AM Thrashbarg: I know we could go back and forward like that but what I'm trying to do is make sure you understand how it works. It's pointless doing this if you don't understand, because you won't be able to understand more advanced stuff later on
05:04 AM z999: OH....
05:04 AM z999: GOT IT
05:04 AM z999: poping is at the end
05:04 AM Thrashbarg: correct
05:04 AM z999: i think is what you are trying to tell me
05:04 AM Thrashbarg: but you see why?
05:04 AM z999: yes!
05:04 AM Thrashbarg: great
05:04 AM z999: i got frutrated because i wasn't understanding before
05:04 AM z999: but everything else is right?
05:05 AM Thrashbarg: like I said, it's a stack of plates. The thing with a stack of plates is you can't pop something from the middle of the stack. You need to go from the top
05:05 AM Thrashbarg: if it assembles, I'd say so
05:06 AM Thrashbarg: and you also understand why it's called a pointer. The register contains a value which 'points' to a memory address
05:06 AM polprog: im getting a signature error with atmega 8 (reads 0x000102). why could that be?
05:06 AM z999: IT WORKED!
05:06 AM Thrashbarg: nice
05:06 AM z999: THANK YOU Thrashbarg
05:06 AM Thrashbarg: no worries
05:07 AM z999: THANK YOU FOR YOUR PATIENCE
05:07 AM z999: i am a beginner at this
05:07 AM Thrashbarg: hopefully if you understand the fundamentals you'll be able to figure out more advanced stuff as it comes your way
05:08 AM Thrashbarg: I was patient because you were saying you weren't understanding it, and that you must be doing something wrong. Not "it's stupid because it doesn't work"
05:09 AM Thrashbarg: polprog: no doubt that's not a valid ATMega code. It could be a bad clock source, incorrect fuse setting, or maybe the Mega is dead
05:12 AM polprog: unplugging some spi slaves helpes
05:12 AM polprog: helped
05:13 AM polprog: this is a board with pluggable modules, i have up to 6 slaves here
05:17 AM Thrashbarg: ah haha
05:19 AM polprog: "programming instructions: 1) remove all modules 2) wave a dead chicken over the PCB 3) start the programming process"
05:19 AM polprog: the stuff that keeps happening here is mysterious sometimes. and in the end it turns out to be a bad cable/connector somewhere
05:20 AM polprog: usually
05:24 AM Haohmaru: i love it when a bug doesn't make any sense, and then when you finally get off your lazy a$$ and turn the scope on - the bug is gone while attached to the scope
05:25 AM Thrashbarg: Heisenbug
05:25 AM polprog: advise user to always have a scope attached
05:25 AM polprog: otherwise void warranty
05:25 AM Thrashbarg: hehe
05:28 AM Haohmaru: that was my solution too, polprog
05:28 AM Haohmaru: the others laughed
05:29 AM Haohmaru: actually, my solution was to include a scope for each unit of the device
05:29 AM Haohmaru: 5euro device, 300euro scope, final price 305 euro!
05:29 AM Haohmaru: almost fits in your pocket!
05:31 AM polprog: once on the market ive seen a soviet portable scope, it had a belt to hang over your neck. it was cute
05:32 AM z999: good night
05:33 AM Haohmaru: polprog wait a minute, did you just assume that?
05:33 AM Haohmaru: in soviet russia, the scope carries YOU
05:36 AM Emil: wtf
05:36 AM Emil: why don't my GND fills render
05:37 AM Emil: Why donät any of my gnd fills render
05:37 AM Haohmaru: what app?
05:38 AM Haohmaru: maybe you haven't filled them
05:38 AM * Haohmaru gives Emil the shovel
05:38 AM Emil: kicad
05:38 AM Haohmaru: press B
05:38 AM Emil: I am :D
05:38 AM Haohmaru: do you have an actual pad inside the zone that is on the GND net?
05:39 AM Emil: I do
05:39 AM Emil: Also FUCK kicads cvpcb
05:39 AM Haohmaru: u sure?
05:39 AM Emil: that tool should be shot
05:39 AM Haohmaru: O_O
05:39 AM * Haohmaru turns the shovel upright..
05:40 AM Emil: Gah
05:40 AM Haohmaru: do you have overlapping zones of higher priority?
05:40 AM Haohmaru: or keep-out zones
05:40 AM Emil: Dunno what the heck kicad was doing
05:40 AM Emil: got it working now
05:40 AM Haohmaru: or maybe "B" didn't respond because the keyboard was ignored
05:44 AM polprog: "donät" now im hungry Emil, thanks
05:45 AM Haohmaru: hahaha
05:53 AM Emil: polprog: is it döner kebab? :D
05:53 AM Emil: or donut
05:55 AM polprog: yeah, with extra thicc meat
05:57 AM Emil: EXTRA THICC
05:58 AM Haohmaru: with loads of PHATT
06:01 AM Emil: 乇乂ㄒ尺卂 ㄒ卄丨匚匚
06:02 AM Emil: https://emil.fi/s/hehehe/
06:04 AM Haohmaru: >:(
06:04 AM Haohmaru: web technologies need to be moderated
06:08 AM Emil: Has the web gone too far
06:10 AM Haohmaru: yes.. WAAAY too far
06:13 AM polprog: http://polprog.net/rtfm
06:13 AM polprog: nothing beats this: http://llamas.haxed.net/
06:15 AM Haohmaru: >8(
06:16 AM * Haohmaru intensifies
06:17 AM polprog: Haohmaru: https://www.youtube.com/watch?v=_cZC67wXUTs
06:29 AM polygon: hello
06:34 AM polygon: [09:28] <dgriffi> last time I tried driving a 7805 with 6 volts, I had stablity problems - well 7805 requires 7-8V to operate
06:42 AM polprog: However, it is commonly accepted that AVR stands for Alf and Vegard's RISC processor.
06:42 AM polprog: interesting
06:42 AM polprog: i was looking up the names of avr arch authors
06:42 AM polprog: https://en.wikipedia.org/wiki/Atmel_AVR#Brief_history
06:45 AM polygon: dgriffi i give you a hint: LD1117S50CTR (STM) and a better one for batteries: LP2985
06:48 AM polygon: polprog: sup dude
06:53 AM polprog: polygon: solving work problems
07:41 AM polygon: hmm, http://data.energizer.com/pdfs/cr2450.pdf http://data.energizer.com/pdfs/cr2032.pdf
07:42 AM polygon: ~240mAh max, rev charge: 1 microampere, good to know
07:48 AM polygon: so it takes 27.397260274 years to recharge this, or it only turns to waste heat then?
08:23 AM polprog: its paczki day today!
08:25 AM polygon: this rechargeable version is crap http://www.batteryspace.com/li-ion-rechargeable-2032-button-cells-lr2032-3-6v-40mah-20d-x-3-2mm-0-14wh-0-012---un-38-3-passed.aspx would like a lifepo4/a123 version, but nobody is interested, because tinytiny
08:31 AM polygon: this looks like a cool tiny battery http://www.batteryspace.com/lifepo4-rechargeable-14430-cell-3-2v-400-mah-0-4a-rate-1-28wh-4-5aa-size-un38-3-passed-1.aspx
08:32 AM polygon: instead of having an rtc batt, i can put one of these in, and go to sleep/stdby mode at low voltage, then recharge
08:50 AM polygon: STM suggests that flash data retention after 1k wites below 85°C is at least 30 years, that is a... fair deal? http://www.st.com/content/ccc/resource/training/technical/product_training/91/e3/aa/26/e6/69/4f/de/STM32L4_Memory_Flash.pdf/files/STM32L4_Memory_Flash.pdf/jcr:content/translations/en.STM32L4_Memory_Flash.pdf
09:55 AM Casper: polygon: seems good to me
10:02 AM polygon: :)
10:02 AM polygon: i charged my multimeter last year for example, can't remember when, i might top it off sometime
10:02 AM polprog: i started using my uni-t back, having two meters helps
10:03 AM polygon: i have connected 2x Li-ion 18650 cells in series instead of the 9V battery, it lasted only like a month with heavy use...
10:15 AM polygon: http://www.batteryuniversity.com/_img/content/DST-cycles-web2.jpg i think his argument about the "cycle life" is invalid because the total charge transferred with more cycles at less charge voltage is not the same. http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries
10:16 AM polygon: cycling within 50% SOC +- DBL_EPSILON % will result in most cycles.
10:45 AM Casper: polygon: I need to redo a study, but last time I checked the charge/cycle balance thing, I came to the conclusion that charging to 100% and discharging down to 30% vs anything else ended up the same
10:46 AM Casper: 85-30 give more cycle than 100-30, but in energy delivered it is basically the same... However if I was designing a product that have to work for 10 years, I might do it for other reasons
10:47 AM Casper: install a bigger battery, software limit the charge and discharge to half the power available initially, increase the top and bottom limit as it age to keep the same runtime
10:47 AM Casper: which is what tesla do btw
10:50 AM polygon: Casper: i can tell you why you get longer life charging to lower voltage, it is because of the degradation of cell at high voltages... 4.1V charge results in 3x longer life lithium cell compared to charging to 4.2V
10:51 AM polygon: 4.2V is the standard 100% "consumer grade" way that they can still get away with
10:52 AM Casper: yeah, however when you check the actual wear, you get like 80% wear due to the cycles, not due to aging
10:53 AM Casper: so it's all good on paper, but not as good in real life..
10:53 AM polygon: 3.95V is the MIL STD method i believe, 50-60% of that "standard" capacity
10:53 AM polygon: "Industrial and military Li-ion batteries designed for maximum cycle life use an end-of-charge voltage threshold of about 3.90V/cell."
10:54 AM polygon: Casper: but aging is continuous with time... if you want a long lasting battery, you need to consider time
10:54 AM learath: that sounds crazy
10:55 AM polygon: Casper: if you leave your lithium batt floating on 4.2V it degrades without cycling
10:56 AM Casper: polygon: I know, for float application it's bad, for cycling one? look at how much you wear it with the daily cycle...
10:57 AM polygon: Casper: as i said, 3x longer life if you go down to 4V1
10:58 AM Casper: cycle? or years?<
10:58 AM polygon: ummm both :)
10:58 AM polygon: i actually have batts that are older than 7 years and still good
10:59 AM polygon: they were resting most of the time about 3V8-4V05
11:01 AM polygon: Casper: what do you say if we create a new standard that defines the lithium battery capacity 50% of that mentioned in the datasheets? ;) about 3.95V and define consumer charge as +100% capacity charge.
11:03 AM polygon: Consumer charge: 4V20, crazy charge: 4V25, insane crazy charge: 4V30, insane crazy bastard charge (danger of fire): 4V35
11:47 AM polygon: Behold' the :) CONFIDENTIAL linear led driver https://www.youtube.com/watch?v=KKd2L9Exw0M
12:05 PM polygon: i have created unusual traffic again according to google :> gugle wanted to know if i am human
12:05 PM polprog: ok google, how do i love
12:17 PM HighInBC: polygon: sometimes I fail turing tests
12:17 PM HighInBC: T
12:34 PM Casper: hmmm I hear an hd clicking... I wonder which one it is...
12:35 PM polprog: the one which you didnt make a backup of
12:35 PM polprog: :)
12:36 PM Casper: nahh
12:36 PM polprog: phew
12:36 PM Casper: I'm destroying data on some old disks
12:36 PM Casper: this one is a 1TB
12:36 PM Casper: plan is to kill the data, then keep the drive for data recovery emergency
12:37 PM Casper: however, this one will go in the trash as the data can't be killed
12:37 PM polprog: what do you mean cant be killed
12:37 PM Casper: which may indicate also a board failure
12:37 PM Casper: can't do a write cycle on it
12:37 PM polprog: thats interesting
12:37 PM polygon: Casper: noo, it has super bearings and magnets inside ;>
12:40 PM HighInBC: data is surprisingly hard to reliably destroy
12:40 PM HighInBC: a good way is to shred, then bake above curie temp
12:40 PM HighInBC: with modern drive nothing you can do with signals to the board will securely erase everything
12:40 PM Casper: HighInBC: true, but the plan is just to make a 1 write cycle pass, this is secure enought for what we plan to do with it
12:40 PM HighInBC: the controllers re-route sectors internally
12:41 PM Casper: secure erase will erase the remapped sectors
12:41 PM HighInBC: indeed, I am a big believer in "secure enough"
12:41 PM HighInBC: perfection is the enemy of good enough
12:41 PM Casper: but really, the goal is more to kill the data, this 'prove' that the board is fine
12:42 PM Casper: might sell the boards
12:42 PM Casper: but not the platters
12:48 PM Casper: I have quite a few hds to pass throught...
12:53 PM Casper: https://i.imgur.com/e03WIcW.jpg <== see.... posting that 20 years ago would be almost a garanted to get broken in :D
12:53 PM polprog: haha
12:54 PM polprog: last time i had a pc gutted like that on my bench was when i was fixing windows bootloader issues on a video edit PC with hirens
12:54 PM Casper: I wish they would have a new version of hirens
12:55 PM Casper: 15.2 is now kinda... old
12:55 PM Casper: still usefull at time
12:55 PM Casper: you saw that blue pc under there?
12:55 PM Casper: that's our server
12:58 PM Casper: https://i.imgur.com/bZQrRXP.jpg <=== it's guts
12:58 PM polprog: looks like any other, semi new pc
12:58 PM polprog: nice
12:59 PM polprog: i have this habit of looking at monitors on pics :P
12:59 PM polprog: you in a shop of some kind?
12:59 PM polprog: six ram slots, wow
01:00 PM Casper: computer repair
01:00 PM Casper: and it's actually 4x ddr2 + 2xddr3
01:00 PM Casper: you can use only one type
01:01 PM polprog: thats unusual
01:01 PM Casper: and 2GB/stick max
01:01 PM polprog: i dont think i ever seen such a mix
01:01 PM Casper: yeah, it's a weird one, asus did a few of those when DDR3 came out, but it was not great
01:01 PM polprog: my "server" https://puu.sh/yE0y2/5f8f5e317e.jpg
01:02 PM Casper: then on the next cpu generation the memory controller was in the cpu, so now they can't patch it like that anymore
01:04 PM Casper: https://farm6.staticflickr.com/5502/12627586724_96c92956fd_o.jpg <=== my home server
01:04 PM Casper: however I changed the ups since
01:04 PM polprog: nice mounting
01:05 PM polprog: its closer to the cloud this way :P
01:05 PM Casper: https://i.imgur.com/q49tdvi.jpg <=== new ups
01:05 PM Casper: https://i.imgur.com/bsXl16b.jpg <=== behind the nas, there is a small patch and switch
01:06 PM Casper: and cable booster used as antenna booster/splitter
01:06 PM polprog: coax? whats that for? DSL?
01:06 PM polprog: or that coax ethernet
01:07 PM polprog: thinnet it was called
01:07 PM Casper: coax for TV
01:08 PM polprog: workshop PC with the ups. put there just so it doesnt stay unused https://puu.sh/zjsZS/2bcc585a7a.jpg
01:08 PM Casper: cat6 for the rest, including phone
01:09 PM polprog: that bench is getting pretty crowded
01:09 PM Casper: https://farm6.staticflickr.com/5546/11959824756_58fef1ebb1_o.jpg <=== my home hackerspace :D warning: huge pic
01:10 PM polprog: holly molly
01:10 PM Casper: (and yes, you can zoom)
01:10 PM polprog: i wish i had a basement like that
01:10 PM polprog: how much was that rigo function gen?
01:10 PM polprog: rigol*
01:10 PM Casper: dunnot, I forgot
01:11 PM polprog: is it good?
01:11 PM Casper: it have some annoying features however...
01:11 PM Casper: it do now smoothly change when you change the duty
01:11 PM Casper: and goes high for 1/4 of a second
01:11 PM polprog: nice scope mount lol
01:11 PM Casper: yup
01:12 PM Casper: 2 screws, put the handle on it, one piece of pipe from the shelf to lock it in place
01:12 PM polprog: is that a ti-83 over the scope?
01:12 PM Casper: https://i.imgur.com/Z8uc07D.jpg <=== started to fix some space issues
01:13 PM Casper: need to move the torture tools a bit to give me more room
01:13 PM polprog: the problem with this workshop is that its also my bedroom
01:13 PM polprog: so not much space can be allocated, not i cant put real stuff like such containers on the wall
01:13 PM Casper: I made the rails
01:14 PM Casper: https://i.imgur.com/r3pIc4g.jpg
01:14 PM Casper: https://i.imgur.com/FPdF6t2.jpg
01:14 PM Casper: https://i.imgur.com/KO9Ejsu.jpg
01:14 PM Casper: https://i.imgur.com/LYEGYV7.jpg
01:14 PM Casper: https://i.imgur.com/9hh6E1A.jpg
01:15 PM polprog: my mother went frantic when i asked her for something to hang the cables on lol
01:15 PM Casper: https://i.imgur.com/TkI5bYw.jpg
01:15 PM Casper: https://i.imgur.com/4nDj18n.jpg
01:15 PM polprog: im in the process of making a shelf for my shop
01:15 PM polprog: bench*
01:19 PM learath: Casper: that is a cool design
01:19 PM learath: french cleats
01:21 PM Casper: very simmilar to the real thing actually
01:22 PM Casper: https://www.usplastic.com/catalog/images/products/totestraysbins/400/52091p.jpg
01:22 PM learath: slatwall
01:22 PM Casper: man that hd is so slooooow
01:22 PM Casper: doing recover on it
01:23 PM Casper: current speed?
01:23 PM Casper: 2.6kB/s, average in the last 25 hours? 9.7kB/s
01:23 PM learath: that's pretty fried.
01:23 PM learath: unless it is rll or something :P
01:23 PM Casper: it is at position 169GB, out of 1TB
01:25 PM polprog: well, put some music on, watch a movie
01:25 PM polprog: if you have to sit there in the lab :P
01:42 PM Casper: too slow even for mp3 :D
02:31 PM dgriffi: polygon: I managed to finalize my design with four cr2032 cells
02:31 PM polprog: im playing with PWM on m8
02:33 PM dgriffi: polygon: cool.. what's the objective?
02:36 PM dgriffi: polygon: I managed to get a somewhat decent handle on PWM with my bluebox project
02:43 PM polprog: dgriffi: you talking to me?
02:50 PM polygon: dgriffi: lel, li-ion would be better
02:50 PM dgriffi: polygon: I'm not going to put a charger circuit into the thing
02:51 PM polygon: dgriffi: not that difficult to make a 4V CCCV charger
02:51 PM dgriffi: polyprog: oh.. yeah.. about PWM. wrong person
02:51 PM dgriffi: polygon: well... what I came up with over the past few hours is that the device can be powered either by four 2032 cells mounted on the back of the board or something off board.
02:51 PM polprog: im trying to output a sine wave
02:52 PM polygon: dgriffi: the simplest is approximately a tl431 and 3 resistors
02:52 PM polprog: polyprog lol :)
02:52 PM polygon: or L1117
02:52 PM dgriffi: polprog: https://github.com/DavidGriffith/bluebox-avr
02:52 PM dgriffi: polprog: feel free to borrow code
02:53 PM polygon: dgriffi: do you make a ± supply ?
02:53 PM polprog: dgriffi: surely ill take a look
02:53 PM polprog: ty
02:54 PM polygon: 1 battery is bad enough but 4? lel
02:54 PM dgriffi: polygon: the device fits into a Hammond 1591XXM. there's enough room for a second board that can contain charging circuitry and a thin rechargable battery pack.
02:55 PM dgriffi: polygon: for now, I'm just going with the one board. I'll tinker with a battery and charger board later.
03:33 PM impulse is now known as Guest14820
03:33 PM HighInBC is now known as Guest84511
04:02 PM polprog: im done for today, time to relax
04:02 PM polprog: :P
04:07 PM antto: no
04:07 PM antto: not yet
04:08 PM * antto throws a stack of Shark energy drinks to polprog
05:09 PM polprog: see what you did antto ? not only i cant sleep thinking of a stepper driver for a motor i fixed, i actually logged in to the shell to see whats on irc
05:09 PM polprog: :P
05:59 PM polprog: night
11:04 PM antto: muhahah
11:44 PM day__ is now known as day
11:45 PM nuxil: sup
11:46 PM * nuxil sips sp,e coffee
11:51 PM nuxil: so i got my diy case/box yesterday. it been traveling the 7th sea's for a while.
11:52 PM nuxil: finally got around to do something with my power supply
11:54 PM nuxil: this psu module i aslo ordered on ebay "which also took 1.5 months on the 7th sea's", is kind of rather accurate.
11:55 PM nuxil: well. not that my dmm is any super accurate mesuring device :p but good enuf. https://gyazo.com/8951cc8c43a37aba3e2f072c1e29a746
11:56 PM nuxil: https://gyazo.com/a88302157466888c2b23f6f6dadb06fa using a totoid transformer.
11:57 PM nuxil: back side https://gyazo.com/a545a4f678670b3f7153d36ae56086c0 | front side https://gyazo.com/1718ec0282b49b99afd0152388432254
11:57 PM nuxil: handle can also be used as a teabag holder https://gyazo.com/dd4d9e5507fad27d9b1cb0514083925e :p
11:58 PM nuxil: now EBAY.. where is the gold plated bannana plugs i ordered...