#avr Logs

Oct 31 2021

#avr Calendar

03:57 AM mekilladi: hello
04:05 AM nohit: hi
04:05 AM mekilladi: max clock frequency of atmega32?
04:05 AM mekilladi: 20 or 16 or 240 ?
04:05 AM mekilladi: internet is confusing
05:40 AM rue_mohr: which what then?
05:40 AM rue_mohr: I'd not be surprised if they could be pushed way higher than 16
05:42 AM rue_mohr: that page is funny tho, should say 16MHz - 240MHz
05:42 AM rue_mohr: whats funny, is that the avr is faster
05:43 AM rue_mohr: and the reason its faster is because its running dedicated software, no "OS" overhead
05:43 AM rue_mohr: realtime
05:44 AM rue_mohr: real-realtime
05:44 AM rue_mohr: not OS "Well, you had to wait for the scheduler" realtime
06:34 AM twnqx: <LeoNerd> AVR is nice :) <- I'd change that to "bare metal is nice"
07:15 AM exp: bare metal is assembler surely
07:15 AM exp: and is very not nice
07:15 AM exp: avr is nice because avr-gcc/avr-libc exists, IMO
07:15 AM exp: the same amount of work has to be done for every other platform
07:15 AM exp: it's just you have to do a bit more of it
07:32 AM Thrashbarg: bare metal is very not nice if you have to do anything somewhat complicated
07:37 AM exp: a consultant I work with knows only assembler
07:37 AM exp: and it's crazy to me
07:37 AM exp: he can't even do floating point stuff
07:37 AM exp: as it is just too tedious and taxing
07:38 AM exp: i told him to go play with an arduino for a few weeks and i'll bootstrap him onto our AVRs
07:39 AM Thrashbarg: in what area does he offer consultation???
07:39 AM exp: RF design
07:40 AM Thrashbarg: yup there it is
07:40 AM exp: he's an older gentleman
07:40 AM Thrashbarg: yes I thought that might be the case :)
07:40 AM exp: know a few of them?
07:40 AM Thrashbarg: that pool of expertise is dwindling ...
07:40 AM exp: most of our RF guys are of that age, a worrying thing really
07:41 AM exp: yeah I'd love to learn it but I need years of maths training
07:41 AM Thrashbarg: it's a black art, anything over about 30MHz that doesn't involve switching
07:41 AM exp: indeed
07:41 AM exp: i think i understand all the concepts and factors
07:41 AM exp: but ask me to design a matching network and i'm SOL
07:42 AM Thrashbarg: hell anything over 1MHz that doesn't involve switching is probably a black art to most :P
07:42 AM Thrashbarg: ouch
07:42 AM exp: i'm having to dive into complex analysis to do final revisions on a power supply design
07:42 AM exp: but boy is it killing me :)
07:42 AM Thrashbarg: ahh
07:43 AM Thrashbarg: yea most of my power electronics ventures end up releasing a lot of magic smoke..
07:43 AM exp: luckily the first design only needed some minor revisions
07:43 AM Thrashbarg: good yea
07:43 AM exp: a TVS diode as I didn't have enough capacitance at a switch node, and slowing a control loop down which is a bit annoying
07:43 AM exp: I'm trying to fit a 12v, 25A capable supply in 110x30mm though so...
07:44 AM Thrashbarg: ah right yeah
07:44 AM Thrashbarg: was looking at several BLDC motor controller boards out of a model of battery operated vacuum cleaners. They kept on blowing up after about a month of operation and shoring the battery dead. They were up to their tenth revision
07:44 AM exp: I've only been in this career about 14-15 months now
07:44 AM exp: and it's kinda shocking to me the poor quality of many designs
07:45 AM Thrashbarg: I'm not entirely sure why but their high side N FET driver was connected to ground through a 10k ohm resistor :/
07:45 AM Thrashbarg: yup
07:45 AM exp: Thrashbarg: avalanche protection?
07:45 AM exp: 'protection'
07:45 AM Thrashbarg: what's that? :)
07:45 AM exp: I can't tell if you're joking :)
07:45 AM Thrashbarg: I am
07:45 AM exp: good good
07:46 AM Thrashbarg: the gate is supposed to be floating though
07:46 AM Thrashbarg: controlled by the gate driver
07:46 AM exp: oh on the gate? who knows, maybe the gate driver is high impedance at startup
07:46 AM exp: this is the last thing i had to tear apart: https://i.imgur.com/GieAepz.jpg
07:46 AM Thrashbarg: it's floating through a charge pump. Put a resistor on it and it'll go linear
07:47 AM exp: that's an X10 PC interface by the guys who designed X10, 30 years on
07:47 AM exp: Thrashbarg: yeah you have to be really careful with a lot of those charge pumps, they can deliver only microamps
07:47 AM Thrashbarg: yup
07:47 AM exp: the chip i'm using for this supply design, the BQ25720 seems like they're really pushing what they can achieve
07:47 AM Thrashbarg: exp: every revision board had resistors on the gate drivers' outputs :P
07:47 AM exp: it's a tiny chip, with a bunch of control loops, and their gate drivers are *weak*
07:48 AM exp: 6-7.5 ohms and only 6v
07:48 AM Thrashbarg: :/
07:48 AM Thrashbarg: that board looks like a consumer amplifier from the mid 90's
07:49 AM exp: https://fccid.io/B4SCM15A/Schematics/Exhibit-B-Schematics-per-2-1033-b5-347598.pdf is its schematic, more or less
07:49 AM exp: i only reverse engineered the input side, but it's a mess
07:49 AM exp: R1 is the failed one, although something in the diode bridge or zener behind it is also dead
07:50 AM exp: a trivial simulation shows R1 peaks at ~1.2W and it's a half watt rated part shoved into the corner of the case
07:50 AM exp: it's not even bad design at that point but sheer negligence
07:50 AM Thrashbarg: yup...
07:50 AM exp: i wonder if you have any insight as to why C1 exists though
07:51 AM exp: in combination with D7 it too forms a rudimentary charge pump
07:51 AM exp: if I lower the ESR in simulation I can get bounces way over 100v on that line
07:51 AM exp: and.. I don't really get it
07:52 AM Thrashbarg: depends on where the tap is in the transformer, but surely there are less complicated, simpler ways of doing mains presence detection???
07:52 AM exp: it's the clock for the x10 signal i think
07:53 AM Thrashbarg: ah yea I see
07:53 AM exp: for this sort of thing before i've used an AC opto and used the LED forward voltage to provide a very brief pulse
07:53 AM exp: but here I think they want a square wave so they get AC polarity info too
07:53 AM Thrashbarg: yeah .... that could easily be done on the secondary surely?
07:53 AM exp: the secondary on this is only for power too
07:53 AM exp: they have a separate isolation xformer for signal
07:53 AM exp: which i also don't understand
07:54 AM exp: that power xformer is most of the weight and 1/4 of the board
07:54 AM exp: they even use the capacitive isolation trick with C7
07:54 AM exp: could literally just hang the supply off that?
07:54 AM exp: I've yet to bother simulating the tuned parts of the circuit, but it's a 120khz signal and I assume I can just buy inductors precise enough these days
07:55 AM exp: I'm considering just running my own board off to replace this, as replacement units are very rare and obviously have the same design flaws
07:55 AM Thrashbarg: that's nuts
07:55 AM Thrashbarg: lol reverse biased zener diode to reduce the dissipation on the 5V regulator
07:56 AM exp: it's a legitimate technique ;-)
07:56 AM exp: until it fails of course
07:56 AM Thrashbarg: yeah lol
07:56 AM exp: the USB side of this is all fully functional still
07:56 AM exp: but it draws ~18mA from the battery supply
07:56 AM exp: even with AC presence, and I can see blackening around I think R4
07:56 AM exp: so something's popped there too
07:59 AM Thrashbarg: they've done the old trick of having a small capacitor on the input and a large capacitor on the output of a linear regulator too lol
08:00 AM exp: I must admit I don't know whether that's forbidden these days
08:00 AM exp: I don't know the series they're using at all, and I've only used a few of the older series of 1117s etc that need decent ESR for stability
08:00 AM Thrashbarg: eh it's not the best thing to do
08:01 AM exp: mostly using NCP730s now Ti's parts are unavailable for my stuff
08:01 AM Thrashbarg: hmm
08:01 AM Thrashbarg: argh it's 23:15 need sleep
08:01 AM exp: NZ?
08:01 AM exp: oh wait 30 minutes off? i don't even know!
08:01 AM Thrashbarg: haha
08:01 AM Thrashbarg: Adelaide, South Australia
08:01 AM Thrashbarg: there's a funny story about the half hour thing
08:02 AM exp: aaah, you guys changed your timezones recently didn't you?
08:02 AM Thrashbarg: no about 120 years ago
08:02 AM exp: hmm, there was some change in australia recently i swear :)
08:02 AM exp: used to maintain a timezone database, that wasn't fun
08:03 AM Thrashbarg: hm I'm not aware of that one
08:03 AM exp: jesus it might have been 12 years ago looking at wikipedia
08:03 AM exp: i am old :(
08:03 AM Thrashbarg: heh
08:04 AM exp: anyway nice chatting with you Thrashbarg
08:04 AM Thrashbarg: o/
08:04 AM exp: o7
11:18 AM specing_ is now known as specing