#avr Logs

Mar 26 2017

#avr Calendar

12:03 AM daey_ is now known as daey
03:47 AM Emil: enhering: read moar
04:02 AM polprog: Emil: http://i.imgur.com/3Fm9AV1.jpg
04:02 AM polprog: id be happy to improve that
04:03 AM polprog: :)
04:05 AM Snert__: get rid of T2 - there is no need for a darlington that I can see.
04:05 AM darsie: It's not a darlington, IMO.
04:05 AM darsie: T1 turns off T2.
04:06 AM Snert__: ahhh yes. misread that.
04:06 AM polprog: yes, it "amplifies" 3v3 signal to 12V for the MOS
04:06 AM Snert__: so it's just an inverting stage.
04:33 AM Emil: why do it like that?
04:34 AM Emil: why not two mosfets and two resistors
04:34 AM Emil: sorry, three resistors
04:44 AM Emil: Well okay
04:44 AM Emil: :D
04:48 AM polprog: why two mosfets?
04:48 AM polprog: that mosfet has it's threshold voltage over 3v3, it works fine from 5V upwards.
04:49 AM polprog: that why i use T1 and T2 to change the 3v3 signal to 12v signal
04:51 AM Emil: I would design something like this
04:52 AM Emil: https://imgur.com/a/H5V8p
04:56 AM Emil: if you know your voltage levels you can also invert the resistor and zener
04:57 AM Emil: which is what I do
05:01 AM Emil: polprog: takeaway is: remember to use both types, and mosfets are better ;)
05:04 AM Emil: but your works okay, too
05:04 AM Emil: good work
05:19 AM polprog: Emil: thanks! i understand the top one is the mosfet version of my circuit but i dont get the bottom one
08:37 AM JanC_ is now known as JanC
08:39 AM Jan-: how do I make it not-include a file I included with "include file"
08:42 AM Jan-: oh no
08:42 AM Jan-: that's an arduino thing
08:42 AM specing: ?_?
08:42 AM Jan-: sorry
08:42 AM * Jan- will get her coat
08:42 AM * specing burns Jan- at the stakes
08:42 AM Jan-: I know. I know. I'm sorry. Wrong window.
08:42 AM * Jan- wails
08:46 AM Lambda_Aurigae: ard-weenie!
08:46 AM Jan-: I'm just using the IDE to upload my code.
08:46 AM Jan-: but it's being weird :/
08:47 AM Lambda_Aurigae: it's ardweeny..of course it's weird.
09:08 AM Emil: polprog: think of it like a puzzle
09:08 AM specing: ardweirdie
09:58 AM naquad: is there some avr framework for common operations like communication, timers, etc… like arduino but more lightweight? i understand this question should get answer like use arduino, but in some cases it makes more sense to use something like attiny2313a
09:59 AM specing: "use arduino"? In #avr?!?!
10:00 AM polprog: deus vult!
10:00 AM Emil: AVE MARIA
10:00 AM Emil: naquad: no arduino here
10:01 AM Emil: naquad: havent run into one. But making one should be easy
12:48 PM naquad: guys is there a common problem like reading from i2c slave avr device can once send send a byte and another one it yields error?
12:55 PM Lambda_Aurigae: common problem?
12:55 PM Lambda_Aurigae: not likely.
12:55 PM Lambda_Aurigae: sounds likes a code issue.
12:56 PM Lambda_Aurigae: but, if it's not on fire it's a software problem
01:00 PM Lambda_Aurigae: have you done any kind of testing on the slave device itself? a blinky light maybe to see if it gets to its sending routine?
01:00 PM Lambda_Aurigae: or tested the master to see if it is still sending the right data?
01:01 PM Lambda_Aurigae: I have used bitbanged i2c master on pc parallel port to test slaves before.
01:03 PM Lambda_Aurigae: gotta have at least one known good side for it for testing.
01:04 PM Lambda_Aurigae: bus pirate works well too.
01:17 PM polprog: +1 for bus pirate
01:17 PM polprog: or check on a multimeter if there's anything happening on the bus
01:17 PM polprog: i suppose you have pullups?
01:18 PM Lambda_Aurigae: polprog, from what he said, he gets one byte but not the next.
01:19 PM specing: bus pirate sucks
01:19 PM NoHitWonder: analog discovery 2 rules
01:19 PM specing: the took literaly the shitties mcu on the market to do bitbanging with it
01:19 PM polprog: wel in this case the first step is to post the revelant parts of the code
01:20 PM polprog: specing: but it works and it's cheap
01:20 PM polprog: although the speed sux
01:20 PM polprog: i cant get it to work with some embedded linux mobo because the uart is 1Mbaud
01:21 PM polprog: and Bp goes up to 115200
01:21 PM specing: lol
01:22 PM polprog: my guess is that he used some example code for i2c and forgot to put the second byte before STOP condition
01:33 PM polprog: that's why it's not sending it
01:33 PM polprog: naquad: can you post the code?
01:37 PM naquad: polprog, https://gist.github.com/naquad/84892d8937bbf34cd8dd7daaf1665ffd
01:46 PM naquad: polprog, false alarm, seems the problem is related to master device. raspberry pi is working ~ ok
02:00 PM Emil: polprog: you figured out the circuit image?
02:20 PM tpw-rules is now known as tpw_rules
02:20 PM polprog: Emil: i have so many thing on my head today... im trying to sort out some raspi networking stuff, schools tomorrow
02:20 PM polprog: not yet ;)
02:21 PM polprog: and i remind you i have read only up to the MOSFET chapter on The Art of Electronics
02:21 PM polprog: i hope that's enough knowledge for that circuit! :)
02:21 PM specing: How good is that book?
02:28 PM polprog: quite good
02:28 PM polprog: i'd recommend
02:28 PM polprog: it talks about very complicated things in a way a highscooler with a good physics background can understand
02:28 PM polprog: ;)
02:32 PM specing: Fucking awesome
02:33 PM specing: aw damn my physics in highschool waas lame
02:35 PM polprog: Emil: i think i get it. when the bottom mosfet is off then there's no current flowing through the zener, when it's on, then the voltage on the gate of the top mosfet it (Vcc-Uzener) making it on
02:35 PM polprog: right?
02:42 PM rue_house: tom in on vaccation
02:42 PM Lambda_Aurigae: haven't seen him in some time.
02:43 PM rue_house: yea
02:43 PM rue_house: retired, prolly a long vaccation
03:10 PM polprog: i guess i should add a pulldown to my mosfet driver input
03:13 PM Emil: polprog: it had a whole picture and a variation of the one part
03:21 PM polprog: Emil: you mean the drawing you sent me?
03:21 PM Emil: yes
04:36 PM polprog: Emil: i understand them then. cool idea :)
05:03 PM polprog: im volounteering on children robotics club
05:03 PM Lambda_Aurigae: kewl.
05:03 PM Lambda_Aurigae: have done that in the past.
05:03 PM Lambda_Aurigae: hoping to do it again next school year.
05:03 PM polprog: i had a chnace to see the ardweeny
05:04 PM polprog: its really not much in there
05:04 PM Lambda_Aurigae: have 6 kids for my summer electronics and robotics club this year so far.
05:04 PM Lambda_Aurigae: it's just an avr with one of 3 or 4 usb interfaces.
05:04 PM Lambda_Aurigae: well, there are some with arm and pic too.
05:04 PM polprog: there isnt even any input protection, it goes straight into the micro
05:04 PM Lambda_Aurigae: but mostly various avr chips.
05:04 PM Lambda_Aurigae: yeah, so?
05:04 PM Lambda_Aurigae: who uses protection?
05:06 PM polprog: ive seen people on YT connecting that directly to motors
05:06 PM polprog: nb it was in one of the musical floppies video
05:09 PM Emil: lolo
05:11 PM polprog: i think i get that zener and mosfet design of yours
05:13 PM Emil: polprog: you'll have to design the values.
05:13 PM Emil: and if your max input voltgae is like 12 volta dont bother with the zener
05:13 PM polprog: i wont use because of that voltage
05:14 PM polprog: ill also stick with bc847 and 10 resistors
05:14 PM polprog: because they are cheap
05:14 PM polprog: and im.making it in 0603
05:14 PM polprog: ^_^
05:14 PM Emil: polprog: oh you mean you understand the designM
05:14 PM Emil: not "I'm making it"
05:14 PM Emil: ?
05:15 PM polprog: yes! i understand! :D
05:15 PM Emil: good
05:15 PM Emil: also mosfers are also as cheap as transistors
05:15 PM polprog: its very interesting
05:16 PM Emil: and mosfets are better ;)
05:16 PM specing: I was told of a really beefy mosfet
05:16 PM specing: 1640A pulse current, 430A continous at 10V (24V max)
05:16 PM polprog: i paid 30pln (7usd) for 10 power mosfets
05:16 PM Emil: specing: STOP TRYING TO CONVERT ME I AM NOT ALREADY ORDERING PARTS
05:16 PM specing: polprog: how many amps?
05:16 PM specing: this one is 2 eur
05:17 PM polprog: specing: i have a befffy russian thyristor, 600A
05:17 PM Lambda_Aurigae: mosfets are different...each has its uses.
05:17 PM polprog: and the mosfets are 16 and 55 amps
05:17 PM specing: eh, not nearly as amazing
05:17 PM specing: this one has RDSon of 800 microohms
05:17 PM polprog: specing: ill send you a photo of that thyr
05:17 PM Emil: polprog: you can get mosfets for a variety of design considerations, just like transistors
05:18 PM polprog: sure
05:18 PM specing: So far I got 2 people on IRC interested in a spot welder
05:18 PM specing: yay me ;D
05:19 PM polprog: specing: Emil: http://m.imgur.com/n6EbjxO
05:19 PM polprog: iirc the mosfets i use in the project are p16nf06
05:22 PM Emil: https://youtu.be/Ry_MFs5W7jI your daily dose
05:26 PM Lambda_Aurigae: daily dose of what?
05:26 PM polprog: im on mobile, whats that link about
05:26 PM Lambda_Aurigae: the first 10 seconds made me feel like I need a penicillin injection.
05:26 PM enhering: spacing: which kind of spot welder?
05:28 PM specing: enhering: dual pulse, for 18650s
05:29 PM enhering: Do you make them?
05:31 PM specing: No, I want to build myself one
05:32 PM enhering: We used spot welders to weld tiny 10um gold wires to tiny 50um samples
05:32 PM enhering: those were very expensive spot welders
05:32 PM xentrac: ultrasonic, enhering?
05:32 PM enhering: electric discharge, xentrac
05:33 PM enhering: never tried ultrasonic
05:33 PM enhering: we could regulate voltage and time
05:33 PM enhering: using dials
05:33 PM xentrac: I was going to say it seems like a charged capacitor would be adequate for that, but of course that doesn't give you control over the time
05:34 PM polprog: i managed to weld two cables using a 16'000 uF cap once ;)
05:34 PM specing: depends on the capacitor size
05:34 PM xentrac: obvs
05:34 PM specing: these days you can get 3000F capacitors rather easily
05:34 PM enhering: there was a micro controller taking care of the task
05:34 PM Lambda_Aurigae: polprog, used to weld those to a steel wall in the physics lab.
05:34 PM specing: the spot welder I'm looking at building uses a car battery as current source
05:34 PM enhering: I wonder if those spot welders can be made in a cheaper way.
05:34 PM Lambda_Aurigae: had a big box of them...like 30 or 40.
05:35 PM specing: enhering: they most likely can be
05:35 PM Lambda_Aurigae: welded them to the wall in a big smiley face.
05:35 PM polprog: kektri
05:35 PM polprog: kektronix ;)
05:35 PM Lambda_Aurigae: those big multi farad caps don't play nice with hard discharges I hear.
05:35 PM enhering: many labs in the world would want a cheap replacement for those expensive spot welders
05:36 PM polprog: Lambda_Aurigae: it depends
05:36 PM specing: Lambda_Aurigae: s/multi/manymanymany/
05:36 PM Lambda_Aurigae: I remember my first 1F capacitor...was part of a lego mindstorms/technic set.
05:37 PM Lambda_Aurigae: could charge it with the solar panel then switch over and run a motor for almost 4 seconds!
05:37 PM specing: with just 1F?
05:37 PM specing: 0.o I wonder what a 3000F cap would be capable of...
05:38 PM Lambda_Aurigae: it was a teeny motor...not part of the lego set.
05:39 PM Lambda_Aurigae: was a phone vibrator motor.
05:39 PM specing: but still
05:45 PM polprog: i think i saw a radiosonde teardown which was using a 3000F supercap as a primary power source
05:45 PM xentrac: specing: if V=3.3V, then ½V²C = 16 kJ at 3000F
05:45 PM polprog: that baby could melt copper beams
05:45 PM xentrac: not really
05:46 PM xentrac: I mean maybe if they are very small copper beams
05:46 PM Lambda_Aurigae: if you want to see something fun, drop a cheap screwdriver across the terminals of a car battery.
05:46 PM polprog: it wasnt like buolding beams
05:46 PM Lambda_Aurigae: they tend to get glowing bright red before the posts melt.
05:47 PM polprog: more like that
05:47 PM xentrac: supercap capacitance isn't really constant, depends on the speed of charging. on a short timescale they have a small fraction of their rated capacitance
05:48 PM xentrac: it takes a while for the charge to find its way into all the interstices of the carbon foam
05:48 PM polprog: yeah
05:48 PM polprog: i think i have a 1F 3 v supercap
05:49 PM polprog: might build some small avr thingie
05:49 PM xentrac: 16 J
05:50 PM polprog: is it 1/2 g
05:50 PM xentrac: ?
05:50 PM polprog: is it 1/2 * v^2 * c?
05:50 PM xentrac: yeah
05:50 PM polprog: sorry, shit keyboard and sleepy
05:50 PM polprog: ;)
05:50 PM xentrac: because ∫ VI dV
05:50 PM xentrac: uh, dt
05:50 PM xentrac: I guess
05:51 PM xentrac: or I guess more simply ∫ V dQ
05:51 PM polprog: i didnt have differential equations
05:51 PM polprog: not in highschool
05:52 PM xentrac: yeah, I had to study calculus on my own
05:52 PM xentrac: that's an integral
05:53 PM polprog: oh, youre right
05:53 PM xentrac: the basic idea here is that thre energy conveyed by a small bit of charge ΔQ is that small bit multiplied by the voltage that's moving it around
05:53 PM Lambda_Aurigae: precalc in 11th grade..
05:53 PM Lambda_Aurigae: but we got into differential equations in algebra 2 in 10th grade.
05:54 PM polprog: ok, that seems reasonably simple
05:54 PM xentrac: as you go discharging the capacitor, different little bits of charge are at different voltages
05:54 PM xentrac: you could draw a graph of V against Q; it will be a straight line
05:55 PM xentrac: for an ideal capacitor
05:56 PM xentrac: you could divide the Q-axis of your graph into little ΔQ intervals, put a rectangle on each one with the height being the voltage at that point, and sum up the area of those rectangles: Σ V ΔQ
05:56 PM xentrac: and if you do this with progressively smaller ΔQ, you approach the true answer
05:57 PM xentrac: and the notation for that answer is ∫ V dQ
05:57 PM xentrac: dQ is, originally, an infinitesimally small ΔQ
05:57 PM polprog: you must be using some non ascii chars cos my terminal shows them as ?
05:57 PM xentrac: oh, heh
05:57 PM xentrac: yeah
05:58 PM polprog: late night calculus lessons ;) TIL
05:58 PM xentrac: that explains why you thought it was a differential equation :)
05:58 PM xentrac: little delta Q intervals
05:58 PM xentrac: rectangles: sigma V delta Q
05:58 PM xentrac: smaller delta Q
05:58 PM xentrac: answer is integral V dQ
05:58 PM xentrac: infinitesimally small delta Q
05:59 PM xentrac: does that help?
05:59 PM polprog: yeah
05:59 PM polprog: so the total energy is the area under the curve, right?
05:59 PM Lambda_Aurigae: I had to lookup the unicode characters myself.
05:59 PM polprog: thr curve of V vs Q
05:59 PM xentrac: integral V dQ is valid for the energy of whatever circuit; it's just that in this case V and Q are proportional so we can calculate an exact answer, which is the area of the triangle under the line
06:00 PM xentrac: Lambda_Aurigae: I use https://github.com/kragen/xcompose which makes them easy enough to type
06:00 PM polprog: good to understand where does the equation come from
06:00 PM Lambda_Aurigae: I have unicode and coloration turned off in my client.
06:00 PM xentrac: my condolences
06:01 PM polprog: and i have to either reconfugure gnu screen or my client
06:01 PM Lambda_Aurigae: did it on purpose.
06:01 PM polprog: people in other channels use emoji
06:01 PM xentrac: oh, yeah, screen -U
06:01 PM polprog: better put that in screenrc
06:01 PM Lambda_Aurigae: screen reader has fits over emoji crap and unicode in general.
06:01 PM xentrac: and maybe set your LC_ALL to en_US.UTF8
06:02 PM xentrac: Lambda_Aurigae: oh, I see. yeah, I can imagine.
06:02 PM xentrac: polprog: there are some old tips in http://canonical.org/~kragen/setting-up-keyboard
06:03 PM xentrac: en_US.UTF-8
06:04 PM polprog: thx.
06:05 PM polprog: im not sure what time is it at your places guys but its 0035 here and im getting up at 0600 for school
06:06 PM xentrac: 19:36
06:06 PM polprog: xentrac: thanks again for the equation and intgral stuff
06:06 PM xentrac: sure
06:06 PM polprog: see you all
06:06 PM polprog: :)
06:06 PM xentrac: the basic ideas of calculus aren't hard
06:06 PM xentrac: it's more all the mental tricks for getting exact answers easily that are hard
06:07 PM Lambda_Aurigae: and not flipping a bit somewhere.
07:19 PM Tom_itx is now known as Tom_L
08:26 PM postmodern: where can i find an atmega162 or atmega1634 in PDIP form?
08:28 PM Tom_L: probably digikey or mouser if they come in those packages
08:32 PM postmodern: they used to, apparently microchip is cutting back on those package formats for those chips
08:32 PM postmodern: guess i'll go the teensy route
08:36 PM Lambda_Aurigae: atmega162 looks to be available in that package.
08:37 PM Lambda_Aurigae: atmega1634 is not.
08:37 PM Lambda_Aurigae: err..
08:37 PM Lambda_Aurigae: attiny1634
08:37 PM Lambda_Aurigae: never seen an atmega1634
08:40 PM Lambda_Aurigae: looks like the 162 may not be in current production these days.
08:40 PM Lambda_Aurigae: but $4.59 USD at digikey.
08:41 PM Lambda_Aurigae: for $5.15 you can get an atmega1284...
08:41 PM Lambda_Aurigae: much more flash and ram and faster chip.
08:42 PM Lambda_Aurigae: 162 is only 16MHz max where the newer cores are 20MHz
09:55 PM Tom_itx is now known as Tom_L