#avr Logs

Mar 30 2017

#avr Calendar

04:12 AM polprog: is it possible that lm358 cuts output if it's overloaded?
04:15 AM polprog: i had to put some resistors in series with the 4ohm speaker
04:19 AM Emil: yes it has a thermal shutdown
04:19 AM Emil: imho
04:19 AM polprog: oh
04:20 AM polprog: anyway, i finished the pcb for my driver
04:20 AM polprog: https://puu.sh/v3bKk/f18252d457.png
04:20 AM polprog: what do you think?
04:21 AM Emil: ah no actually
04:21 AM Emil: it just ouputs constant 40mA
04:21 AM Emil: and will die
04:21 AM polprog: weird, still works
04:21 AM polprog: ;)
04:22 AM polprog: so i guess it's not applicable for driving speakers
04:22 AM Emil: why use te copper plane for the text instead of silk?
04:24 AM polprog: it's still a proto, i just want to cut expenses
04:24 AM Emil: eh?
04:24 AM Haohmaru: what if it stops working once you move the text to the silkscreen layer ;P~
04:25 AM polprog: if this ever goes to "production" i'll add proper markings like labels and stuff
04:25 AM Emil: polprog: you are ordering the pcb?
04:25 AM Emil: ah you ate diying it
04:25 AM polprog: oh, and removing the text changes the temperature coeficents /s
04:26 AM Emil: I'd increase clearance between the mosfets
04:26 AM polprog: i may try my hand at etching it, the size matches the empty PCBs i have
04:26 AM Emil: just a bit
04:26 AM polprog: i felt they were too close...
04:27 AM Emil: then increase clearance
04:28 AM polprog: the thick track clearance?
04:28 AM Emil: perhaps just change the orientation
04:28 AM Emil: polprog: no the mosfets
04:29 AM Emil: the mosfets are very close together
04:29 AM Emil: also add mounting holes
04:29 AM Emil: makes your life easier
04:29 AM Emil: a single one will do
04:29 AM polprog: oh, mounting holes, i knew i forgot something
04:30 AM Emil: why do you have 8 resisytor
04:30 AM Emil: s?
04:31 AM Emil: no wait they are diodes?
04:31 AM polprog: theese are leds and resistors ;)
04:31 AM polprog: the mosfets are now spaced ~2mm apart
04:32 AM Emil: ah
04:32 AM Emil: but
04:33 AM Emil: well
04:34 AM Emil: I think it can work but keep in mind that as LEDs they have a vf and if you have gate capacitance it can charge to that
04:35 AM Emil: but it probably works
04:36 AM polprog: they are connected in series with resistors, and the inputs will be gpio, so the gates are either clamped to 3v3 or 0v
04:37 AM Emil: I know how they are wired
04:37 AM Emil: you can simulate it with falstad
04:38 AM polprog: that's a piece of software i suppose?
04:38 AM Emil: you dobt know falstad?
04:38 AM Haohmaru: polprog falstad.com/circuit
04:38 AM Emil: and select the fullscreen
04:38 AM polprog: aht, that online sim
04:40 AM Emil: I would have a a bypass resistor also
04:40 AM Emil: ~100k
04:41 AM Emil: so a pulldown in parallel with the led and resistor
04:42 AM polprog: that's a good idea
04:43 AM Emil: you can put it directly to the gate
04:43 AM Emil: for example
04:44 AM Emil: or actually they will fit with the other smds too
04:45 AM polprog: surely they will fit somewhere
04:45 AM polprog: falstad seems to ignore the fact that a gate capacitance exists
04:46 AM Emil: of course
04:46 AM Emil: no surprise there. Just add it yourself
04:48 AM polprog: "capacitor loop wit no resistance", so what
04:50 AM polprog: ok, i think i see
04:55 AM dgriffi2: I have a gizmo that takes 6v at 700ma. I want to put a supercap in it so it doesn;t lose setting when unplugged. how do I choose the right cap?
04:56 AM polprog: calculate proper RC constant
04:56 AM polprog: you can imagine the gizmo as a resistor
04:58 AM enhering is now known as Guest90020
05:05 AM Emil: dgriffi2: for how long?
05:05 AM Emil: a battery is a much better option
05:06 AM dgriffi2: five minutes or so
05:07 AM dgriffi2: it's a clock radio
05:07 AM Emil: You better find a beefy super cap then
05:07 AM Emil: Unless you shut it mostly down
05:08 AM dgriffi2: hmm.. i guess it be better to identify what chip holds settings and power onky that
05:08 AM polprog: yeah, it's probably gonna be an all-in-one chip
05:08 AM polprog: no luck there
05:08 AM polprog: you should really consider a battery backup since a cap this size would be expensive
05:11 AM Emil: dgriffi2: it is probably quite easy to modify it to make it enter low power mode when losing fixed power
05:11 AM Emil: and then holding settings is easy af
05:13 AM Ad0_: d
05:13 AM Ad0_ is now known as Ad0
05:19 AM Emil: And if you do go thr supercap wst
05:19 AM Emil: you need to edd s boost converter
07:50 AM Lambda_Aurigae: all of my bedside clocks have a battery slot for a 9V backup
07:50 AM Lambda_Aurigae: it keeps the clock running when I lose power so I don't have to reset every time.
07:50 AM Lambda_Aurigae: and I never pay more than $8.00 for a clock radio.
07:51 AM Haohmaru: hahaha
07:51 AM Haohmaru: u h4x0r
07:51 AM Lambda_Aurigae: I have at least 5 of them in the house.
07:51 AM Lambda_Aurigae: I don't add the battery
07:51 AM Lambda_Aurigae: they come standard.
07:51 AM Lambda_Aurigae: well, I add the battery but the slot and hookup is there.
07:51 AM Lambda_Aurigae: nothing particularly fancy.
08:05 AM arij is now known as arij_work
08:15 AM polprog: i used to have that kind of "american-style" clock-radio with maind and a battery backup
08:15 AM polprog: im saying american-style because i dont often see those in other countries ;)
08:17 AM Lambda_Aurigae: there are other countries?
08:17 AM Lambda_Aurigae: I thought everybody had just moved here.
08:17 AM Lambda_Aurigae: except the chinese....don't have enough room in wyoming for all of them.
08:18 AM * polprog chuckled
08:39 AM xentrac: hmm, I'm not sure if the clock radios here in Argentina have battery backups
08:39 AM xentrac: but we have a lot more power outages than anywhere I've lived in the US
11:31 AM JanC is now known as Guest23500
11:31 AM JanC_ is now known as JanC
12:15 PM ASRock_pc is now known as Tom_work
02:56 PM julius_: hi
02:57 PM julius_: anybody tried to control a AV load with a mosfet? theres a shematic here (sorry for the ugly link): https://forum.allaboutcircuits.com/proxy.php?image=http%3A%2F%2Fi1279.photobucket.com%2Falbums%2Fy529%2FTahmidMahbub%2FAC%2520Load%2520Control%2F01.png&hash=b5ab2785e58c7ef040346081fab630d7
02:57 PM julius_: AC load
03:13 PM xentrac: I'm no expert but I think people usually use triacs for that
03:14 PM xentrac: that way they don't have to worry about the drain and the source both running far enough away from the gate voltage to turn it off and possibly blow the FET
03:15 PM xentrac: if you're talking about small signals, though, like audio or whatever, sure, people use MOSFETs all the time for that with a little DC bias
03:17 PM xentrac: like I think that's the only reason the CD4051 is still in enthusiastic use decades after almost all the rest of the CD4000 part family is obsolete
03:20 PM xentrac: but while the 4051's 125Ω Ron is just fine for audio signals and even some RF, it's rated for 10mA — you can't even run an indicator LED at full power off of it in-spec
03:29 PM arij_work is now known as arij
03:46 PM cehteh: julius: interesting idea, but has its implications
03:49 PM Emil: Heh
03:49 PM Emil: It's always funny how attached you get to the order of your channels
03:58 PM Emil is now known as Guest95318
04:00 PM Emil_ is now known as Emil
04:00 PM Guest95318 is now known as Emil_
04:21 PM julius_: xentrac, load would be 12v, 1a
04:21 PM julius_: cehteh, not a good design decission?
04:22 PM julius_: im not playing with mains voltage...
04:22 PM cehteh: dont forget the current has to go through 2 diodes, you have 2 times diode drop
04:22 PM cehteh: what kind of load?
04:23 PM xentrac: a 12-watt load apparently
04:23 PM julius_: water pump for indoor use
04:23 PM polprog: just get a decent plugpack, if you are unsure
04:23 PM cehteh: and that isnt DC?
04:23 PM xentrac: does it really need AC?
04:23 PM polprog: or one of those LED PSUs
04:23 PM xentrac: I mean it's hard to believe it's using a synchronous motor?
04:23 PM cehteh: i got some camping van pumps these run on DC
04:24 PM julius_: got the original power adapter here, and it says 230v ~ and 12v ~
04:24 PM cehteh: but, well you may try that, could be working
04:24 PM cehteh: measure it
04:24 PM polprog: chech that with a meter
04:24 PM julius_: of course i just tried attaching dc voltage to it, but it just makes a short noise and then stops
04:24 PM polprog: oh
04:24 PM cehteh: i bet its just rectified but no cap
04:25 PM cehteh: ah ok
04:25 PM julius_: let me check the output
04:25 PM julius_: of the power adapter
04:25 PM cehteh: well then syncron motor w/ trafo
04:25 PM cehteh: but then .. you cant regulate that this way either
04:25 PM cehteh: want to switch on/off only?
04:29 PM xentrac: I guess that's pretty conclusive proof that it needs AC :)
04:30 PM julius_: with this kind of low power i assued it would be dc...i would like to control it with pwm
04:30 PM xentrac: you could feed it a 35V square wave
04:30 PM julius_: also the power supply is heavy...its probably a lot of copper in there
04:30 PM xentrac: you may not be able to control it with PWM in a useful way though
04:30 PM polprog: what is the thing in general?
04:31 PM xentrac: a pump
04:31 PM cehteh: anyway you have an inductive load, so you need to protect the fet from overvoltage when it switches
04:31 PM julius_: but for indoor....let me lookuo the right word
04:31 PM polprog: id have a couple of 12vdc pupms, you can get those cheap
04:31 PM polprog: i wouldnt bother
04:31 PM julius_: yep, got a mtb1045 in place
04:31 PM xentrac: if it's a synchronous motor, which seems weird given that it's 12 watts, you need to vary the frequency rather than the amplitude to control its speed
04:31 PM polprog: you could try an autotransformer
04:32 PM polprog: but i dont know how would it work
04:32 PM cehteh: http://tinyurl.com/mwxpwez
04:32 PM cehteh: is what i come up with ..
04:32 PM julius_: i got some cheap car front window washer pumps here, they work but they are fucking loud...this was actually supposed to be the "silent" replacment
04:32 PM xentrac: polprog: what, and control the autotransformer from a motor? :)
04:32 PM polprog: oh, forget the autotrafo then
04:32 PM cehteh: or .. just use a damn relais :D
04:33 PM cehteh: may need a snubber too
04:33 PM polprog: i know, amplified pwm with a lowpass to generate sine /s
04:33 PM cehteh: err that diode in the middle is wrong
04:33 PM julius_: xentrac, how would a squarwave make it move...wouldnt it miss the negative voltage parts?
04:34 PM cehteh: does it have 3 wires?
04:35 PM Emil: if it's frequency that you need to control then speed control is easy
04:35 PM polprog: if i understand correctly it like thoe mains pumps but in 12V range?
04:35 PM Emil: julius_: it's a filter
04:35 PM Emil: julius_: the motor acts like a filter itself
04:35 PM julius_: 2 come out of the power adapter then they are feed into a manual switch that controls the pump and a ligtning bulb...either only light, or only pump or both
04:36 PM Emil: The only downside of motors like those is that chaging direction is hard (you need to rewire the capacitors)
04:36 PM cehteh: julius: so do you only need to turn it on/off or regulate it?
04:36 PM julius_: for now on/off would be enough
04:36 PM Emil: julius_: then feed it squarewave
04:37 PM Emil: you can also use pwm to make sine
04:37 PM xentrac: julius_: if the motor only has two wires it can't tell whether you're going from 0V to 34V or from -17V to +17V
04:37 PM julius_: yes will try that tomorrow
04:37 PM xentrac: cehteh: what's the MTBF of a relay operated at 60Hz? :)
04:37 PM polprog: ny guess is that if the psu works why not use a cmos switch
04:38 PM Emil: xentrac: pls no
04:38 PM Emil: that's like satan666 level "lets break shit"
04:38 PM cehteh: xentrac: i meant feeding AC .. then switch it on/off when he need (few times a day?)
04:38 PM polprog: krrrrr
04:39 PM julius_: toast is ready, please excuse me for a few minutes
04:39 PM xentrac: cehteh: oh, that makes a lot more sense
04:39 PM cehteh: julius: anyway .. switching an inductive load will kill the fet .. you need something to mitigate that
04:39 PM cehteh: even relay contacts dont like 3kV voltage car overs
04:39 PM cehteh: arc
04:40 PM xentrac: Emil: if neither the motor nor the driver circuitry has a path to ground, what's the harm of the 0 to 34V square wave?
04:40 PM Emil: xentrac: less efficiency, unlikely spurious transmissions
04:40 PM cehteh: http://tinyurl.com/l83t6a2 .. snubber, but values need to be determined
04:40 PM xentrac: cehteh: he says he's "got a mtb1045 in place" but I don't know what that is
04:40 PM cehteh: i dont know either :D
04:40 PM Emil: xentrac: also one should use H bridge
04:41 PM xentrac: it isn't clear that this is a case where you can use an H-bridge
04:41 PM Emil: But having a fixed voltage one one side and nmosfet pwm:ing to gnd the other also works
04:41 PM Emil: xentrac: eh?
04:41 PM cehteh: if one wants to control a syncron motor from a DC source then h bridge yes
04:41 PM Emil: Sure it is
04:42 PM cehteh: but if it just shall be simple, on/off .. relay
04:42 PM xentrac: we don't know if it's a synchronous motor or what
04:42 PM Emil: xentrac: wasn't that established above
04:42 PM xentrac: all we know is that on 12VDC it "just makes a short noise and then stops"
04:42 PM Emil: Anycase, with a H bridge you can drive whatever style oyu want
04:42 PM Emil: it's a flexible design
04:42 PM cehteh: but it requires a lot more programming, esp when it needs to be efficient
04:43 PM Emil: eeeh
04:43 PM Emil: it requires one more line of code than your relay ;)
04:43 PM xentrac: there could be electronics inside the pump that would be unhappy about having the rails of their power supply alternately grounded
04:43 PM Emil: xentrac: just stop
04:43 PM Emil: The pump should also read what it wants as input
04:44 PM polprog: a tiny chip calculating cycles for planned failure
04:45 PM xentrac: it says 12V ~
04:46 PM Emil: xentrac: then it's clear as day
04:46 PM Emil: xentrac: H bridge works best
04:46 PM xentrac: tell julius_, not me
04:47 PM Emil: xentrac: you were the one to start with "there could be electronics inside that would be unhappy..." ;)
04:47 PM xentrac: you told me to stop, and I did
04:47 PM julius_: xentrac, square wave is no problem...but why 34v....since its originally 12, why not 24v?
04:49 PM julius_: on the pump it says ac 12v, 50hz
04:50 PM xentrac: P-P vs. RMS
04:50 PM julius_: xentrac, thats a shottky diode...but that was my bad, that would only work for a DC motor
04:50 PM xentrac: a schottky diode?
04:50 PM julius_: yes, to capture the voltage spikes when it shuts down
04:50 PM julius_: not in this case, sadly
04:50 PM Emil: julius_: if it is 12v~ that means the actual P-P voltage is 12*sqrt(2)*2
04:51 PM julius_: ah ok
04:51 PM Emil: julius_: but
04:51 PM xentrac: I was thinking that if you wanted to fake a 12VAC RMS sine wave with PWM you would need 17V above and below your neutral wire
04:51 PM Emil: julius_: if you drive it with a H bridge you only need 17v source
04:52 PM Emil: xentrac: which means only he needs 17V source, not 34V
04:52 PM julius_: h bridge means 4 mosfets?
04:52 PM xentrac: I agree that a 17V source would be a lot better
04:52 PM Emil: julius_: you can quite safely take pretty much any 16-19v laptop power
04:52 PM Emil: julius_: you can google it
04:53 PM julius_: ah, great...that is somthing i got from old thinkpags
04:53 PM julius_: thinkpads
04:53 PM Emil: julius_: 4 mosfets or 4 transistors
04:53 PM Emil: P and N
04:53 PM Emil: 2 of each
04:54 PM julius_: can i just start with a 50% duty cycle and a 19v dc input as a square wave?
04:54 PM julius_: i should get another pump from ebay...but the square wave experiment sounds interresting
04:55 PM Emil: julius_: probably
05:01 PM cehteh: julius: https://www.amazon.de/Comet-Tauchpumpe-Elegant-Durchlauf-Spannung/dp/B001CV02U4/
05:02 PM cehteh: powerful, silent 12v DC
05:05 PM julius_: yeah was just checking ebay....they are not that expensive
05:07 PM julius_: i wonder who buys a pump for ~6€ including shipping that got a direct connection to you wall plug
05:07 PM julius_: probably if you plan to not life that long
05:10 PM cehteh: synchon motors can be quite easily build with all electric parts encapsulated non moving
05:11 PM Emil: julius_: it might work with one sided pwm but it will run horribly
05:14 PM Emil: Also you'll need a protection diode
05:18 PM polprog: driver parts come tomorrow
05:18 PM polprog: cant wait
05:18 PM julius_: Emil, you mean running a ac pump with a reactangular dc voltage?
05:18 PM julius_: polprog, i know the feeling :)
05:18 PM Emil: polprog: share a picture of final design
05:19 PM Emil: polprog: also you did keep in mind that "Vth" is not the same as "V_will_pass_maximum_current", right?
05:19 PM polprog: its on the big computer, im on mobile
05:19 PM polprog: yes, i know the vth stuff
05:19 PM Emil: julius_: one sided pwm will work but horribly. H bridge will work just nicely
05:19 PM Emil: polprog: good
05:19 PM Emil: polprog: post a picture when you can
05:20 PM polprog: sure
05:20 PM polprog: i havent ordered the pcbs yet
05:20 PM Emil: polprog: seed/itead/dirty/crow/osh/so-on
05:21 PM Emil: Osh is pretty damn kawaii because they accept Kicad files directly <3 :3
05:21 PM polprog: Emil: how is oshpark when it comes to shipping?
05:21 PM Emil: polprog: 23 days from order to doorstep, cheapest option
05:21 PM julius_: Emil, thanks
05:22 PM Emil: polprog: shipping is free
05:22 PM polprog: i have a local millhouse in pl, they takie kicad files and i get a silkscreen+mask in a week
05:22 PM Emil: polprog: nice
05:22 PM polprog: :)
05:22 PM Emil: But really, oshpark is great
05:22 PM xentrac: polprog: who are they?
05:22 PM polprog: this one may be even cheaper cos its one sided
05:23 PM polprog: xentrac: some small factory in the lake districk
05:23 PM polprog: t*
05:23 PM Tom_L: 1&2 are the same i bet
05:23 PM polprog: maybe
05:23 PM polprog: xentrac: want a link?
05:24 PM Emil: Post a link
05:24 PM polprog: but i will try osh someday
05:24 PM polprog: i like purple
05:24 PM Emil: Tom_L: 1&2 what?
05:24 PM Tom_L: sided boards
05:24 PM Tom_L: hackvanna is good too
05:24 PM Emil: lI don't understand
05:24 PM polprog: im not sure if they speak english, but here you go
05:24 PM polprog: http://www.fabrykapcb.pl
05:25 PM Emil: Tom_L: oh you mean price
05:25 PM Tom_L: yeah
05:25 PM Emil: depends on shop but probably yeah
05:25 PM Tom_L: you don't see many single sided boards anymore really
05:25 PM Emil: For very small quantities and one off orders single side can be a few cents cheaper
05:26 PM polprog: if i get bored at home i might etch stuff
05:26 PM Tom_L: out of all the copper i acquired, very little of it was single sided
05:26 PM polprog: and i didnt even plan making it single sided
05:26 PM Emil: polprog: try etching
05:27 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/etching/Copper1.jpg
05:27 PM Tom_L: a few of the 'scraps'
05:27 PM polprog: Emil: i have all the resources to etch at home
05:27 PM Emil: polprog: why haven't you etched already, then? :D
05:27 PM Tom_L: i've done a few
05:27 PM Tom_L: pretty decent results
05:27 PM polprog: Tom_L: is it bare pcb or failed runs?
05:27 PM polprog: on the pic
05:27 PM Emil: that's bare
05:27 PM Tom_L: purchased from a board house that closed
05:28 PM Tom_L: i kept enough to keep me until i'm gone
05:28 PM Tom_L: had around 2 pickups full
05:28 PM Emil: If I purchase copper to be etched, I only purchase pretreated double side
05:28 PM Emil: Even though they have an expiration date
05:28 PM polprog: what
05:28 PM Emil: They are just so much easier to use
05:28 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/etching/Copper3.jpg
05:28 PM Tom_L: half sheets
05:29 PM Tom_L: i cut to store
05:30 PM polprog: oh the cat came
05:30 PM Emil: polprog: http://www.tme.eu/fi/katalog/#id_category=112714&search=fr4&s_field=accuracy&s_order=DESC&visible_params=2%2C1037%2C443%2C442%2C138%2C2550%2C139%2C329%2C1038&used_params=1038%3A4799%3B
05:31 PM xentrac: polprog: thanks, bookmarked :)
05:35 PM polprog: Emil: i like those protoboards http://www.tme.eu/fi/katalog/#search=dip-smd&s_field=accuracy&s_order=DESC&id_category=112711&page=1
05:35 PM polprog: xentrac: you sure you will be able to communicate with them? ;)
05:37 PM xentrac: if I'm in Poland I'm sure I'll figure something out ;)
05:37 PM Rez is now known as LoRez
05:37 PM polprog: heh, i dont think id ever guess that xentrac :)
05:38 PM polprog: its quite late and the cat wants to sleep, gtg
05:38 PM polprog: ill post the board tomorrow
05:38 PM julius_: found a pc water cooling pump, it is 12v dc but it got a 3 pin connector for a computer mainboard.....was connectin number 3 the one that tells the pc how fast the pump/fan is turning?
05:38 PM polprog: see you!
05:39 PM polprog: julius_: yes
05:39 PM julius_: ah good
05:39 PM julius_: gn8
05:39 PM Emil: polprog: good night
07:10 PM strikeone88: Anybody around?
07:10 PM strikeone88: I finished by custom made car-horn with a tone generator. hehehe
08:01 PM Chillum: noice
11:57 PM daey_ is now known as daey