#avr | Logs for 2012-04-20

Back
[05:06:13] <mitsakos> hello, i'm designing a power supply about 10A 0-30V. For testing i have connected 4 x 2n3055 in parallel with 0.22R at each emitter. I supply these transistors base with another variable psu and i have put a load of 4 Amp at 10V. What impress me is that all 2n3055 are getting very hot. Four 2n3055 are supposed to handle 480Watt in total or 120Watt each. By drawing 4A at 10V there is 10Watt on each transistor about 8% of load
[05:06:13] <mitsakos> all transistors are attached on heatshink
[05:07:58] <RikusW> mitsakos: why not use a smps instead ?
[05:08:05] <mitsakos> instead of hat?
[05:08:08] <mitsakos> *what
[05:08:28] <RikusW> use a switchmode psu, its much more efficient
[05:08:28] <mitsakos> the second psu is used as the input variable voltage not the current source
[05:08:53] <mitsakos> the source will be a smps
[05:09:33] <RikusW> linear regulation at high currents is quite inefficient....
[05:09:35] <mrfrenzy> mitsakos: your calculation is incorrect
[05:09:42] <mitsakos> ?
[05:09:54] <grummund> measure Vce then multiply by Ice
[05:10:01] <mrfrenzy> what is your transformer voltage?
[05:10:09] <mitsakos> 30V at 10A
[05:10:24] <mrfrenzy> 30vac?
[05:10:35] <RikusW> vdc I guess
[05:10:39] <mitsakos> it is an smps which output is 30V 10A
[05:10:45] <mrfrenzy> ok
[05:11:02] <RikusW> mitsakos: why not attach a buck regulator then ?
[05:11:07] <mrfrenzy> then yor transistors are dissipatinh 80w
[05:11:32] <mrfrenzy> (30-10)*4
[05:12:10] <mitsakos> 80/4=20watt each
[05:12:17] <mrfrenzy> yes
[05:12:21] <mitsakos> yes i forgotten the voltage drop
[05:12:33] <mitsakos> and they heat that much at 20watt?
[05:12:38] <mrfrenzy> eeds a hefty heatsink. or fan
[05:12:49] <mitsakos> http://www.flickr.com/photos/developthefuture/7094206281/in/set-72157629490548248/
[05:12:55] <mitsakos> there they are
[05:13:00] <grummund> mitsakos: what is deg.C/W of your heatsink?
[05:13:19] <mitsakos> i don't know
[05:13:19] <mrfrenzy> try putting yor hand on a 25w inca lightbulb
[05:13:30] <grummund> mitsakos: the heatsink should be specified deg.C/W
[05:13:40] <mitsakos> mrfrenzy that's true
[05:13:52] <mitsakos> grummund let me check
[05:15:05] <mitsakos> so if i draw high currents at low voltages the transistors will fet hotter
[05:15:14] <grummund> yes, exactly.
[05:15:28] <karlp> heat comes from watts, be that high voltage or high current....
[05:15:48] <mitsakos> yes
[05:15:52] <mitsakos> hm...
[05:16:11] <grummund> worst case would be say 10A @ 1V output.
[05:16:15] <mitsakos> is there any way to drop the source voltage when big currents draw?
[05:16:38] <mrfrenzy> if you have a couple of old cpu coolers they can dissipate around 150W each
[05:16:59] <mitsakos> that's a good idea
[05:17:01] <mrfrenzy> yeah. buck regulator
[05:17:07] <grummund> mitsakos: you can have the source voltage track just above the output voltage
[05:17:29] <mitsakos> http://www.acdcshop.gr/heatsinktypehlength100mm2xto3-p-7809.html i can't see any specifications
[05:17:43] <mitsakos> how?
[05:18:08] <mrfrenzy> but 10A vRiable regulator is not easily designed
[05:18:11] <grummund> mitsakos: depends on the source
[05:18:23] <RikusW> karlp: he means if the output is lower voltage more voltage is dropped on the 2n3055's
[05:18:25] <mitsakos> the source is a fixed smps
[05:19:11] <grummund> i have a twin 5A 60V PSU here... ;)
[05:19:25] <grummund> linear
[05:19:50] <RikusW> mitsakos: is there a optocoupler on that smps of yours ?
[05:19:57] <grummund> in theory that means with 5A @ 1V output the transistors will be dissipating 300W per channel
[05:19:58] <RikusW> and maybe a TL431 ?
[05:20:56] <mitsakos> i have a Masteck 0-30V 0-5A workbench power supply and uses multiple secondary transformer windings to adjust the source voltage depending on the output voltage to limit the 2n3055 wattage. You can understand this by varying the voltage, you can hear relays opening and closing
[05:21:27] <mitsakos> i don't know i haven't opened it
[05:21:32] <mitsakos> it is on a metal case
[05:21:47] <grummund> mitsakos: right, that sounds plausible. So what are you doing actually...?
[05:22:18] <mitsakos> what do you mena?
[05:22:47] <karlp> RikusW: ah right, gotcha.
[05:22:49] <RikusW> what do you want to do with your custom psu ?
[05:22:49] <grummund> so you are designing a 2nd psu, or what?
[05:22:54] <mitsakos> RikusW do you mean that there is an opto inside the smps which can adjust the output voltage?
[05:23:27] <RikusW> mitsakos: you might be able to mess a litte with the feedback loop, but do be careful
[05:24:14] <grummund> why?
[05:24:30] <RikusW> maybe use a variable resistor to slightly alter the tl431 voltage and see what happens (if there is a tl431...)
[05:24:53] <mitsakos> i'm designing a power supply 0-30V 0-10A using as a source a 30V 10A smps. Now for testing i have just connected the 4 x 2n3055 in parallel and i supply their base with a second variable supply just to see if they work and for current source i have the smps at 30V 10A
[05:26:24] <grummund> ok, 30V 10A smps is fixed output?
[05:26:47] <jacekowski> mitsakos: not really the best design
[05:26:55] <jacekowski> mitsakos: try adjusting that 30V
[05:26:57] <mitsakos> the problem was that the transistors when i draw a current of 4A at 10V the transistors where getting very hot. But you mentioned me that Vce Ice calculates the wattages and not only Ve Ie as i used :P
[05:27:01] <jacekowski> mitsakos: it shouldn't be very hard
[05:27:34] <jacekowski> mitsakos: transistors in this case are just like a variable resistors
[05:27:41] <jacekowski> mitsakos: so you have 20V drop on them
[05:27:51] <mitsakos> jacekowski you mean depending on the output i want to prevent 2n3055 overheating?
[05:27:54] <jacekowski> mitsakos: so you end up with 80W of power disippated on them
[05:28:09] <jacekowski> mitsakos: no, adjust output voltage in SMPS directly
[05:28:12] <RikusW> jacekowski: I already mention he should look for a TL431, those are quite common in smps
[05:28:13] <grummund> that has been said already
[05:28:36] <jacekowski> having linear stage after smps is kinda pointless
[05:28:46] <grummund> rubbish
[05:29:02] <karlp> it's pretty common for small board power supplies actually
[05:29:04] <mitsakos> i use this one http://www.ebay.com/itm/150471457799?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649#ht_3834wt_956 i don't know if anyone has used it before
[05:29:05] <jacekowski> he just wants a simple power supply
[05:29:25] <karlp> smps up to level X, linear back down to different digital domains
[05:29:26] <jacekowski> that can deliver quite a lot of juice
[05:31:04] <mitsakos> there is an adjusting potentiometer at the side but it makes small corrections from 30V to 40V
[05:31:58] <grummund> mitsakos: do you really need 10A ?
[05:32:27] <mitsakos> not know but you never know
[05:32:32] <mitsakos> *not now :P
[05:32:35] <jacekowski> mitsakos: yeah, look where that goes
[05:32:35] <grummund> mitsakos: you know most bench PSUs are typically 0-30V 0-2A
[05:32:41] <jacekowski> mitsakos: and mod it so it goes 0-30V
[05:33:14] <RikusW> mitsakos: if there is already a pot it should be quite easy to modify
[05:33:34] <mitsakos> jacekowski: but will it have the same performance? or it will lose tha stability at the control loop?
[05:33:50] <mitsakos> the pot is there to adjust the output error
[05:37:31] <mitsakos> i think i'm going to put some coolers
[05:39:28] <RikusW> mitsakos: that pot is probably connected to a TL431, have a peek ?
[05:39:46] <mitsakos> nop
[05:39:52] <grummund> mitsakos: if you look up the same heatsink on say farnell there should be a datasheet there
[05:39:58] <mitsakos> i'll check it when i go home
[05:41:18] <mitsakos> RikusW: if there is TL431 what can i do?
[05:41:44] <mitsakos> change the value of the pot giving the option to adjust the voltage at a lower value?
[05:48:35] <mitsakos> i found one similar heatshink on farnell with Thermal Resistance: 2.3?C/W
[05:50:25] <grummund> so at 10W the transistor will be 23 deg.C above ambient
[05:50:25] <mitsakos> which means it cools 2.3C/watt?
[05:52:54] <mitsakos> so if we have 23 ambient temp transistor will be 66 right?
[05:52:59] <mitsakos> sorry 46
[05:53:16] <grummund> yep
[05:53:56] <grummund> there is also thermal resistance between transistor case and transitor junction, specified in the transistor datasheet
[05:54:07] <grummund> along with max junction temperature
[05:55:26] <mitsakos> i think that i'll put a cooler and everything will be ok :P
[05:56:47] <grummund> what case style 2n3055 ?
[05:58:46] <RikusW> mitsakos: check the TL431 datasheet
[05:59:11] <RikusW> its used in the feedback loop as a variable "zener"
[05:59:19] <mitsakos> to-3
[05:59:48] <RikusW> you'll need to do some math for a different value pot or so
[05:59:54] <grummund> TO3 is 1.5 deg.C/W
[06:00:03] <mitsakos> RikusW i'll check it thank you.
[06:01:06] <mitsakos> grummund so at 10watt i'll have 15C + 23C = 38C + 25C (ampbient) = 63C
[06:01:08] <mitsakos> right?
[06:01:14] <RikusW> that is if there is a TL431, but its quite likely
[06:01:27] <mitsakos> RikusW never know :P
[06:01:45] <grummund> mitsakos: to calculate junction temperature for a single transistor, yes.
[06:01:52] <RikusW> only way to know is to grab a srewdriver and open the case ;)
[06:02:10] <grummund> mitsakos: but remember you have the heatsink shared betwen 4 :P
[06:02:12] <mitsakos> grummund i have two transistors on each heat shink so i have to multiply this by two?
[06:02:25] <grummund> yeah
[06:02:30] <mitsakos> oh perfect
[06:02:32] <mitsakos> :P
[06:02:39] <mitsakos> 126 C ?
[06:02:42] <grummund> no
[06:03:04] <RikusW> mitsakos: even if you can adjust the smps to 20V it will help a lot
[06:03:47] <grummund> each transistor is 1.5 degC/W, and the heatsink is 2.3 degC/W overall.
[06:04:30] <mitsakos> RikusW you mean to keep the 2n3055 and just drop the source voltage to drop the transistor heat?
[06:04:42] <mitsakos> depending on the output voltage
[06:05:10] <mitsakos> grummund so 53 C
[06:06:10] <grummund> how many transistors per heatsink?
[06:06:19] <mitsakos> two
[06:06:46] <RikusW> mitsakos: that would be one way of doing things
[06:07:19] <RikusW> mitsakos: or research buck regulators....
[06:08:24] <mitsakos> will be a dc-dc at 10A ?
[06:08:39] <RikusW> yes
[06:08:49] <grummund> so overall (1.5 + (2 * 2.3)) deg.C/W, means 10W is ~60 deg.C rise above ambient.
[06:09:01] <RikusW> buck regulators are fairly simple and don't need isolation since you already have that
[06:09:12] <grummund> that is for internal transistor junction
[06:09:34] <RikusW> so a transistor/mosfet coil diode cap and pwm ic is what you need
[06:09:48] <RikusW> maybe a output filter coil too
[06:09:55] <RikusW> adjusting the smps itself would be the preferred way of doing things ;)
[06:10:18] <RikusW> have to run
[06:13:16] <mitsakos> RikusW you told before that 1.5 is for the transistor and 2.3 for the heatshink so. 1.5x2 transistors x 10Watt = 30 for the heatshink 2.3 x 10Watt = 23 if the ambient is 25 in total we have 30+23+25=78~80
[06:14:07] <mitsakos> sorry i mean grummund
[06:15:38] <grummund> at 10W each transistor junction will be 15 degC above case temperature
[06:15:49] <grummund> not 30
[06:16:40] <grummund> at 10W per transistor the heatsink will be 20W
[06:16:59] <grummund> x 2.3
[06:17:37] <mitsakos> ah yes
[06:17:39] <grummund> 15 + 23 + 25 = 63
[06:18:07] <mitsakos> yes but you have 2 transistors on each heat shink so 15x2
[06:18:43] <grummund> no, think about it. :P
[06:18:48] <mitsakos> :P
[06:19:44] <grummund> each transistor, even if not fitted with heatsink, has temperature difference between case and junction.
[06:19:46] <mitsakos> you sae at 10watt EACH transistor junction will be 15degC
[06:20:05] <grummund> 15deC above case temperature
[06:20:27] <mitsakos> aaaa?? this is the temperature between the TO-3 case and the silicon
[06:20:33] <grummund> correct
[06:20:36] <mitsakos> now i undestand what you mena by junction
[06:20:37] <mitsakos> :P
[06:20:49] <grummund> it's the silicon temperature you should be worried about :P
[06:20:57] <mitsakos> yes
[06:21:24] <mitsakos> so the TO-3 temp should be about 50C
[06:21:36] <grummund> case or junction?
[06:21:39] <mitsakos> case
[06:21:54] <mitsakos> but 50C i don't think that is that hot to can't hold your finger on it
[06:21:55] <grummund> assuming 10W at 25C ambient, yes.
[06:22:11] <grummund> so don't touch it ;)
[06:22:13] <mitsakos> cause yesterday i tryied it it was very ht
[06:22:24] <mitsakos> so maybe it was more than 50C
[06:22:39] <grummund> 60C is about the pain limit where you cannot hold it
[06:23:24] <grummund> the silicon junction will be spec.d to 125C or more
[06:23:32] <mitsakos> never mind, i'll try to adjust the smps output voltage and if i can't i'll add a cooler on each heatshink
[06:23:43] <grummund> :D
[06:23:47] <mitsakos> spec.d ?
[06:23:51] <grummund> specified
[06:23:55] <mitsakos> a :P
[06:24:00] <grummund> see datasheet!!
[06:24:11] <mitsakos> yes i have seen it
[06:24:22] <mitsakos> but i didn't understand the shorcut of spec.d :P
[06:25:34] <grummund> it should say max junction temp. and also thermal resistance junction to case.
[06:26:23] <grummund> multiply these figures and you will see how they specify max Power @ 25C.
[06:26:36] <grummund> Ptot
[06:29:27] <karlp> thermal engineering is awesome
[06:29:55] <karlp> (be careful of datasheets that talk about power dissipation in stirred oil baths, if you're going to be using it in air)
[06:30:02] <Tom_itx> fry the finger test is as well
[06:30:09] <mitsakos> if can drop the source voltage at 20V i think that it will be good for worst situations like 10A 1V then i'll have 20-1=19V * 10A = 190W/4 ~ 50watt each transistor 50watt*2=100watt per heatshink =230C+ (1.5*50) = 305C
[06:30:20] <mitsakos> lol omg :P the transistor will be liquid
[06:30:45] <Tom_itx> nitrogen cooling
[06:31:15] <karlp> glycol jacket all the things!
[06:36:52] <mitsakos> grummund am i right?
[06:57:06] <grummund> 305C _above_ ambient, yes. ;)
[07:22:04] <inflex> heh
[08:02:09] <tosmo> i realised that i never explicitly configure the TXD0 pin as output. why does it work anyway?
[08:03:20] <tosmo> i thought about this because i now want to explicitly have TXD0/RXD0 as input, as i have to wire the TXD/RXD pins to the usart0 pins (usart0 is defect, but the preripherial circuitry is connected to usart0)
[08:04:07] <tosmo> with TXD/RXD i meant TXD1/RXD1
[08:08:04] <tosmo> or otherwise: would it be any problem to shortcut TXD0 and TXD1 ? at what point ar those defined to be outputs when i don't do it myself? and as it works without explicit DDRx assignment, there must be some kind of automatic output-configuration?
[08:22:02] <karlp> the datasheet will show you the power on reset values for DDRx and PORTx, and what those bits mean...
[08:22:24] <karlp> I mean, if it's only allowed to be an input or an output, of course it has to default to one of them.
[08:25:53] <tosmo> could it be that it will be output (alternate pin function) as soon as sonn as the RXEN0 bit is set?
[08:26:28] <tosmo> .. TXEN0 i mean
[08:26:38] <tosmo> well maybe thats it, i'll search the datasheet for more
[08:30:34] <grummund> tosmo: yes when tx is enabled that overrides the ddr value
[08:31:11] <grummund> so by default it's an input until you enable tx
[08:39:33] <tosmo> thanks
[08:42:18] <JyZyXEL> PB0 == 1; PB1 == 2; PB2 == 4?
[08:55:50] <RikusW> JyZyXEL: yes
[08:56:12] <RikusW> err the defines is 0 1 2 3 4
[08:56:21] <RikusW> the values is 1 2 4 8 16 32....
[08:56:45] <JyZyXEL> thats what i said, right?
[08:56:54] <RikusW> this (1<<PB4) == 0x10 == 16
[08:57:33] <RikusW> PB0 == 0 PB1 == 1
[08:57:45] <JyZyXEL> oh
[08:57:55] <RikusW> PB5 = 5
[08:58:04] <JyZyXEL> interesting that the pin value is the right operand of the bitshift
[08:58:28] <asteve> that's the point
[08:58:33] <RikusW> that is to convert it to a bitmask
[08:59:41] <JyZyXEL> the right operand means by how many positions you want the left operand to be shifted
[08:59:52] <JyZyXEL> and the value for PB7 is probably quite huge
[08:59:53] <RikusW> yes
[09:00:05] <RikusW> for PB7 it is 0x80
[09:00:11] <RikusW> that is 128
[09:00:22] <RikusW> you do know hex and binary right ?
[09:00:29] <JyZyXEL> so its shifting the position 128 times
[09:00:41] <RikusW> no 7 times
[09:00:50] <RikusW> 0x80 == 128 == 1<<7
[09:01:11] <RikusW> == 1000 0000
[09:01:13] <JyZyXEL> i thought it was 1<<128
[09:01:28] <RikusW> no
[09:01:52] <RikusW> you really need to learn hex ;)
[09:02:07] <RikusW> and bitwise operators, avr code use it a LOT
[09:02:17] <JyZyXEL> im currently trying
[09:02:19] <RikusW> and its quite simple really
[09:03:03] <JyZyXEL> im still working on deciphering the meaning of these: PORTB |= (1<<whateverpinyouwanttosethigh); PORTB &= ~(1<<whateverpinyouwanttosetlow);
[09:03:14] <JyZyXEL> or how they work and why they work
[09:03:16] <RikusW> a = a & b; is the same as a &= b;
[09:03:45] <karlp> JyZyXEL: all you really need to know is that those are the two ways of setting and clearing a single bit reliably.
[09:04:24] <RikusW> PORTB &= ~(1<<4) ------> PORTB = PORTB & 0xEF;
[09:04:33] <RikusW> ~ inverts all bits
[09:04:48] <RikusW> & is and --- | is or
[09:05:02] <JyZyXEL> karlp: id rather know exactly how they work
[09:05:43] <RikusW> JyZyXEL: you can even do PORTB |= (1<<PB1) | (1<<PB5);
[09:05:45] <karlp> if you want to understand them, get a pencil and paper and write things out in full binary and go through them by hand until you're satisfied that they work.
[09:05:57] <RikusW> PORTB &= ~((1<<PB1) | (1<<PB5));
[09:06:04] <JyZyXEL> yes thats what im doing
[09:06:14] <RikusW> good idea karlp
[09:06:22] <RikusW> thats the only way to learn it
[09:06:25] <JyZyXEL> but these PB's were confusing me
[09:06:51] <RikusW> JyZyXEL: its defined in avr/io.h
[09:07:00] <RikusW> which include the avr specific defines
[09:07:06] <JyZyXEL> ill take (1<<PB5) into closer inspection
[09:07:18] <JyZyXEL> first thing is to figure out what PB5 is
[09:07:26] <RikusW> #define PB5 5 in the header
[09:07:52] <RikusW> bit values will always be between 0 and 7
[09:08:05] <JyZyXEL> im having trouble finding it
[09:08:20] <RikusW> JyZyXEL: you're using linux or win ?
[09:08:24] <JyZyXEL> lin
[09:08:36] <JyZyXEL> i tried finding it with google
[09:08:54] <karlp> (hover over the PB5 and hold ctrl on your keyboard..... if you're using a worthwhile ide... ;)
[09:09:52] <JyZyXEL> yeah i wish
[09:11:21] <JyZyXEL> maybe /usr/lib/avr/include/avr/iotn2313.h
[09:11:36] <RikusW> look in the package manager for avr-gcc include dirs...
[09:11:45] <JyZyXEL> #define PB5 5
[09:11:45] <RikusW> seems like you found it ;)
[09:12:16] <RikusW> do you use t2313 or t2313a ?
[09:12:43] <CapnKernel> JyZyXEL: If you run avr-gcc -E yourprogram.c, you'll see that PB5 gets changed to 5
[09:12:43] <JyZyXEL> PB0 = 0; PB1 = 1; PB2 = 2; PB3 = 3; PB4 = 4; PB5 = 5; PB6 = 6; PB7 = 7
[09:12:57] <tosmo> when i want a pin to be completely passive / inactive or do / suffer nothing from applied voltages, would i want the pullup resistors to be there or not? (PORTx setting when DDRx = 0x00)
[09:13:24] <CapnKernel> If you want to leave it unconnected, then activating the pull-up is a good idea
[09:13:36] <JyZyXEL> now i can do it on paper
[09:14:22] <CapnKernel> If you activate the pull-up, then as far as other components are concerned, that pin will no longer be passive / inactive
[09:14:45] <JyZyXEL> so for (1<<PB5) we start with 0b00000001 and shift it to left 5 times
[09:14:51] <tosmo> CapnKernel: well, it is physically connected, but i don't want it to intefere in any way
[09:15:16] <JyZyXEL> result should be 0b00100000
[09:17:43] <CapnKernel> You don't want the AVR to influence the surrounding circuit?
[09:18:28] <JyZyXEL> so now we have PORTB |= 0b00100000
[09:18:49] <JyZyXEL> PORTB is 0 because all the pins are low
[09:19:27] <JyZyXEL> so 0b00000000 | 0b00100000
[09:19:32] <JyZyXEL> thats gonna be 0?
[09:19:37] <CapnKernel> tosmo: No such thing as "in any way"
[09:19:41] <karlp> no, you have misunderstood what OR does
[09:19:48] <JyZyXEL> oh thats OR
[09:19:58] <karlp> bitwise OR,
[09:20:02] <karlp> emphase on bitwise.
[09:20:16] <RikusW> JyZyXEL: 0b00100000 == 0x20
[09:20:23] <CapnKernel> The input is high impedance, it will act as a resistor of 10Mohm or thereabouts. It also has capacitance.
[09:20:27] <RikusW> use kcalc
[09:20:32] <CapnKernel> So there's no such thing
[09:20:57] <CapnKernel> But for most circuits the influence is so small that you can set it to input, and not worry about it
[09:21:00] <JyZyXEL> ok with bitwise OR it works and makes sense
[09:21:06] <karlp> (RikusW: don't bring in the hex equivs of things, they don't matter)
[09:21:09] <CapnKernel> But in this case, you *don't* want to turn on the pull-up
[09:21:25] * RikusW likes hex ;)
[09:23:11] <JyZyXEL> binary gets fun once you start mixing in different endianness
[09:23:45] <karlp> fortunately, most datasheets are written in the same way
[09:24:04] <JyZyXEL> i think in networking different endian is used
[09:24:13] <JyZyXEL> than what computers usually use
[09:24:18] <RikusW> JyZyXEL: big endian yes...
[09:24:43] <karlp> JyZyXEL: remember, endianness has nothing to do with what you're doing.
[09:24:54] <RikusW> only the bytes is the "wrong" way round, not the bits
[09:25:00] <tosmo> hm. i do DDRE = 0x00; PORTE=0x00 and still the TX0 and RX0 pin on port E are high. how comeß
[09:25:03] <tosmo> ?
[09:25:19] <RikusW> did you turn on the UART ?
[09:25:30] <RikusW> it overrides DDRE
[09:26:00] <tosmo> no didnt. maybe its due to the serial->usb converter connected to those pins
[09:26:58] <RikusW> and reading from PINE will give random bit values since the pins are floating now...
[09:27:47] <RikusW> the usually do tend to high or low, probably due to manufacturing defects, but its unpredictable
[09:28:02] <RikusW> or maybe its just the charge present on the pin
[09:29:24] <RikusW> makes me think of the time when I toggle the logic state of a gate by simply touching 5V with a piece of insulated wire and then to the input of the gate, it turned on, touching the wire to ground and then the input turned the gate off :-P
[09:29:27] <tosmo> so no i connected RXD0 <-> RXD1 and TXD0 <-> TXD1 (to access the usb converter hardwired to RX/TX 0). receiving works, but not sending. i don't get that..
[09:29:47] <RikusW> that would probably count as a few nC or so of charge
[09:30:24] <RikusW> shouldn't it be crossed over ?
[09:31:53] <tosmo> no, i basicly want to substitute usart0 by usart1 because the receiver in usart0 is damaged (echo test gives me garbage, sending is fine)
[09:32:45] <tosmo> so i want to passivate RXD0 / TXD0 pins and shortcut them to RXD1 / TXD1 to acess the serial2usb chip
[09:33:56] <tosmo> now receiving on usart1 works, but not sending (on the oscilloscope i see that it sends, but it doesn't get to the usb converter. but remember, sending on usart0 worked, so what else can be wrong here?)
[09:36:25] <RikusW> You're sure you turned on RXEN ?
[09:36:38] <karlp> for anyone thinking about endianness: http://commandcenter.blogspot.com/2012/04/byte-order-fallacy.html
[09:37:31] <RikusW> tosmo: if TXD0 works use that to transmit and use RXD1 to receive ?
[09:37:36] <RikusW> it should work ok
[09:38:10] <RikusW> so bridge only RXD0 - RXD1
[09:38:34] <tosmo> hm right *g. probably the best for now
[09:41:57] <RikusW> karlp: I like that guy's idea :)
[09:46:05] * karlp too :)
[09:46:46] <CapnKernel> Random means you can't know beforehand what the result will be
[09:47:02] <CapnKernel> Whereas if you've just read one value from the pin, I bet you'll read the same value again next time
[09:47:09] <CapnKernel> You can say the result is undefined
[09:47:47] <RikusW> CapnKernel: undefined then
[09:54:25] <jacekowski> karlp: that's a lot of BS
[09:55:11] <karlp> what part?
[09:55:15] <jacekowski> karlp: endianess is important,
[09:55:57] <jacekowski> yes, local machine endianess is not really important
[09:56:04] <karlp> that's all he's trying to say I think.
[09:56:19] <karlp> of course it's important when you're pulling a byte stream off a socket/network if
[09:56:20] <jacekowski> what is important is endianess of data you have
[09:56:25] <karlp> but once it's local, you should stop doing things with it.
[09:56:30] <karlp> yes, absolutely.
[09:56:44] <karlp> I think he's only trying to say stop doing things that care about the host endianness.
[09:56:59] <karlp> or at least, that's all I took it mean.
[09:57:59] <jacekowski> that reminds me of some LED display
[09:58:04] <jacekowski> as in, 8 2 colour LEDs
[09:58:07] <jacekowski> with serial protocol
[09:58:16] <jacekowski> very simple serial protocol
[09:58:19] <jacekowski> clock, data, sync
[09:58:36] <jacekowski> clock to clock it, data is just data with 1 for ON 0 for off
[09:58:58] <jacekowski> and sync to indicate begining of new data set
[09:59:02] <jacekowski> to be displayed
[09:59:56] <jacekowski> 1st LED was controlled by 1st bit of second nibble, 2nd LED was controlled by 1st bit of first nibble
[10:00:25] <jacekowski> then 1st LED second colour was controlled by 2nd bit of first nibble
[10:00:43] <jacekowski> anyways
[10:00:46] <jacekowski> i have to go
[10:00:51] <RikusW> argh...
[10:01:23] <jacekowski> it took me a while to reverse engineer it
[10:01:38] <jacekowski> at first i thought it's just nibbles are swapped
[10:01:57] <RikusW> it exists ?! ugh
[10:02:07] <RikusW> thats bad design ;)
[10:02:31] <RikusW> unless whoever did it to ease pcb layout...
[10:03:00] <jacekowski> nah, it's PIC based
[10:03:04] <karlp> "sw can fix it!"
[10:03:15] <OndraSter> hehe
[10:03:20] <RikusW> or break it :-P
[10:03:33] <karlp> cheaper than spinning a new board rev :)
[10:04:05] <karlp> I've seend and heard of some godawful hacks in sw for early board revs.
[10:04:56] <OndraSter> we've all done it :)
[10:05:24] <karlp> ahh, friday afternoon.
[10:05:30] <karlp> tests all pass.
[10:05:41] <karlp> do I write more and see it start to fail?
[10:05:48] <karlp> or chill out for an hour and go home early?
[10:05:49] <OndraSter> no
[10:05:53] <OndraSter> hooome!
[10:06:29] <karlp> girlfriend's still at work for another 4 hours, and I'm about 2 days behind on my estimates, so think I may actually start the next phase
[10:06:41] <OndraSter> oh
[10:06:43] <OndraSter> yees
[10:07:04] <karlp> now, how does one do object composition in C?
[10:07:24] <karlp> I have an existing set of structs that I want to add extra data to.
[10:07:25] <karlp> bleh.
[10:07:32] <karlp> I guess I have to make my own wrappers of them.
[10:08:47] <asteve> karlp: go to the pub
[10:09:42] <asteve> drink The Rev. James if you can find it
[10:09:46] <asteve> http://www.sabrain.com/beers/draught/cask-beers/the-rev-james
[10:25:17] <karlp> I wish I could get cask beers here.
[10:25:52] <karlp> while the bottled selection has grown from almost nil to no-longer-apallinglybad-now-just-medicore, the tap selection is still incredibly narrow
[10:32:40] <asteve> karlp: where are you?
[10:33:31] <karlp> sunny iceland
[10:34:08] <asteve> ah
[10:40:13] <JyZyXEL> how do i go about keeping a port value stored in eeprom?
[11:24:19] <JyZyXEL> what makes testing a nightmare is that it seems to be totally random if the command "screen /dev/ttyUSB3 9600" works
[11:25:11] <JyZyXEL> used together with "cu -l /dev/ttyUSB3 -s 9600" and replugging the cable and randomly the serial connection starts working
[11:27:42] <JyZyXEL> does someone have a trick that always establishes a reliable serial connection with the device?
[11:31:47] <karlp> yeah, use usb.
[11:32:02] <JyZyXEL> you mean don't use usb?
[11:32:43] <JyZyXEL> i mean usb has traditionally been the definition of unreliability
[11:32:43] <karlp> no, I mean use usb natively instead of serial :)
[11:32:51] <karlp> hahah
[11:33:21] <JyZyXEL> all the FT232 seem to behave this way on my linux box
[11:42:37] <JyZyXEL> i don't really understand how your supposed to initialize or connect to them
[11:42:53] <JyZyXEL> or set all the parameters
[12:18:08] <Jonny0stars> Hello I'm having some issues compiling a program for my Arduino (ATMega328P), the problem seems to lie with the /usr/avr/include/avr/eeprom.h header file
[12:19:50] <JyZyXEL> ok so USART_transmit(uchar data) takes a single char, what about strings?
[12:20:59] <JyZyXEL> trying to figure out how to USART_tx the value of PORTB as base10
[12:21:05] <Jonny0stars> On compilation I get the following error - http://pastebin.com/VLPz1khA
[12:22:28] <amee2k> hmm... are there still manufacturers making ICs with matched transistors on it?
[12:22:45] <Jonny0stars> I ran a diff on the eeprom.h file and one from http://www.wrightflyer.co.uk/avr-gcc/ and both matched
[12:23:18] <amee2k> like LM394, but i'd need at least three transistor in the same part. common base connection is acceptable, but especially the emitters need to be independent!
[12:24:27] <JyZyXEL> so its like a char -> base10 -> char[]
[12:26:50] <JyZyXEL> theres gotta be a function for that already in the library somewhere?
[12:26:55] <Steffanx> itoa
[12:27:02] <karlp> you're in C land now.
[12:27:08] <karlp> stop thinking about strings :)
[12:27:21] <JyZyXEL> i changed my thinking into char arrays
[12:27:31] <amee2k> or anyone got a keyword to search for? looking for "transistor arrays" only brings up piles of "digital transistors" shit :/
[12:27:54] <RikusW> amee2k: what do you want to do with it ?
[12:28:17] <amee2k> build a current mirror, but without emitter degeneration
[12:28:41] <amee2k> hint: purpose made current mirror ICs are not acceptable. i really meant it when i said i need matched transistors.
[12:29:59] <JyZyXEL> oh the more accurate description of what im trying to do is to convert an unsigned char to ASCII
[12:30:20] <amee2k> snprintf()?
[12:30:28] <asteve> JyZyXEL: write a method?
[12:31:46] <RikusW> amee2k: something like this -> Super Matched Bipolar Transistor Pair Sets New Standards for Drift ... ??
[12:31:58] <RikusW> http://www.google.com/search?q=transistor+pair
[12:32:08] <JyZyXEL> asteve: use a method from the library instead?
[12:32:30] <RikusW> amee2k: google Differential Transistor Pair that might help
[12:32:32] <asteve> nah, recreate the wheel whenever possible
[12:32:58] <amee2k> RikusW: first result for "transistor pair" is wikipedia on "darlington pair" :P
[12:33:07] * RikusW guess asteve's projects take forever to complete :-P
[12:33:12] <asteve> they do!
[12:33:26] <asteve> but that's because of lack of focus and the desire to drink beer and hang out with my girlfriend and dog
[12:33:38] <amee2k> "differential transistor pair" brings up lots of stuff on differential amplifiers :/
[12:34:08] <JyZyXEL> whats the difference of utoa() and itoa()
[12:34:15] <RikusW> amee2k: both needs to be npn right ?
[12:34:18] <amee2k> also, just a pair won't cut it. i need at least three
[12:34:23] <amee2k> yeah
[12:34:25] <RikusW> JyZyXELJagged: unsigned vs signed
[12:34:35] <JyZyXEL> ok i want utoa()
[12:35:00] <amee2k> http://www.analog.com/en/special-linear-functions/matched-transistors/mat14/products/product.html
[12:35:03] <amee2k> like this one
[12:35:14] <JyZyXEL> ok so what the heck do i #include when i want that?
[12:35:27] <amee2k> but one that is still in production, and ones that cost less than 20 quid are highly appreciated >_<
[12:35:36] <karlp> but you want three?
[12:35:44] <karlp> I don't think you're going to find that anytime soon.
[12:35:48] <JyZyXEL> #include <stdlib.h>
[12:35:52] <amee2k> three is really four with one unused >_>
[12:35:56] <JyZyXEL> or #include <avr/stdlib.h>
[12:36:04] <karlp> matched pairs in the same package are/were common, I never saw a fourpack or a threepack
[12:36:07] <amee2k> so anything with more than three will do fine, but just two won't cut it
[12:36:24] <karlp> what on earth are you doing that you need three for, that need to be that closely trimmed?
[12:36:39] <amee2k> multi channeled current mirror
[12:36:56] <karlp> so, go analog on it's arse and use 3 sets of 2 to get 1 set of three
[12:36:59] <amee2k> if i don't use emitter degeneration, they need to be matched from what i understand
[12:37:19] <karlp> if you're entering a world of analog, go all the way
[12:37:22] <amee2k> 3 sets of two?
[12:37:40] <JyZyXEL> would i save space if implement the conversion myself?
[12:37:59] <amee2k> JyZyXEL: most likely. base conversion is somewhat trivial
[12:38:08] <karlp> I'm sure you can make an analog equivalent using multiple pairs
[12:38:22] <JyZyXEL> i know there some way of doing ti with '0'-PORTB/10 and '0'-PORTB/100
[12:38:55] <karlp> sprintf(yourbuf, "%x", yourvar) JyZyXEL
[12:39:02] <amee2k> successive division with residue!
[12:39:20] <JyZyXEL> it converts stuff to ascii
[12:39:53] <asteve> JyZyXEL: that won't do what you think
[12:40:45] <JyZyXEL> ok ill just use stdlib
[12:41:17] <JyZyXEL> its better practice anyways
[12:42:05] <RikusW> JyZyXEL: why not convert it ot hex instead ? that is rather trivial
[12:42:23] <JyZyXEL> oh i guess that would work too
[12:42:42] <JyZyXEL> what do i use for that?
[12:43:22] <RikusW> itoa or printf should work
[12:43:34] <RikusW> or you can do a bit of bitshifting
[12:44:03] <JyZyXEL> isn't printf used to print lines on stdout on a computer?
[12:44:12] <RikusW> and use an array like char tohex[] = "0123456789ABCDEF"
[12:44:26] <RikusW> snprintf then
[12:44:43] <RikusW> JyZyXEL: you can somehow reroute it to the uart
[12:44:57] <JyZyXEL> oh...
[12:44:59] * RikusW forgot exactly how (again...)
[12:48:07] <JyZyXEL> chat text[3] should be enough?
[12:48:19] <JyZyXEL> oh wait no i was doing hex
[12:48:31] <JyZyXEL> text[2]
[12:49:12] <JyZyXEL> The function itoa() converts the integer value from val into an ASCII representation that will be stored under s. The caller is responsible for providing sufficient storage in s.
[12:49:19] <JyZyXEL> it doesn't say anything about hex
[12:50:20] <RikusW> and one for the null char
[12:50:30] <JyZyXEL> ok i better give it 5 then
[12:50:42] <karlp> use the examples about setupping up stdio properly in: http://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html
[12:50:48] <JyZyXEL> just to be safe
[12:50:49] <karlp> and then just use printf() anyoldway you way.
[12:51:09] <karlp> you provide the uart_putchar method, and you're off.
[12:51:16] <JyZyXEL> ill foreach the char array to USART_tx
[12:51:29] <JyZyXEL> or for() if C doesn't have foreach
[12:54:26] <JyZyXEL> so im guessing radix means the number system?
[12:54:35] <JyZyXEL> that would be 16 for hex
[12:54:37] <RikusW> yes
[12:54:42] <RikusW> yes
[12:56:49] <JyZyXEL> char text[5]; itoa(PORTB, text, 16); for (int i = 0; i < 5; i++) USART_Transmit(text[i]);
[12:57:41] <RikusW> for (int i = 0; i < 5 && text[i]; i++)
[12:58:09] <RikusW> you probably want to put a \r\n after that too
[12:58:38] <JyZyXEL> well, yes
[12:59:24] <JyZyXEL> im guessing i really only need an array with size [3]
[12:59:25] <karlp> man, just use printf.
[12:59:28] <karlp> how much memory have you got?
[12:59:35] <JyZyXEL> i have no clue
[12:59:35] <karlp> are you trying this on a tiny25 or something?
[12:59:41] <JyZyXEL> t2313
[13:00:03] <karlp> use printf, it's awesome.
[13:00:17] <karlp> or, don't use text, use binary and parse it on the computer side.
[13:00:25] <karlp> you're going in between.
[13:01:05] <JyZyXEL> main.c:64: error: ‘for’ loop initial declaration used outside C99 mode
[13:01:15] <karlp> isn't C fun?
[13:01:32] <JyZyXEL> ill google for C99 compatible for loop then i guess
[13:01:45] <karlp> just move the int i = out to a liine before
[13:01:52] <karlp> or change your makefile to use c99
[13:02:11] <karlp> add -std=gnu99 to your CFLAGS
[13:02:16] <karlp> call it a day
[13:02:24] <RikusW> int i; for (i = 0; i < 5 && text[i]; i++)
[13:09:37] <JyZyXEL> it is in fact working
[13:10:58] <JyZyXEL> i got all my basic functionality done now, time to tidy up
[13:11:16] <asteve> can you reassign i in a for loop?
[13:11:36] <asteve> i guess you'd just use a while
[13:12:18] <RikusW> asteve: you can set it to 0 in the loop :-P
[13:13:06] <asteve> for ( i = 0; i < 5; i++) { if (i > 3) { i = 0; } }
[13:13:10] <asteve> that's what I'm getting at
[13:14:24] <RikusW> what for ?
[13:14:32] <RikusW> thats a while(1)....
[13:16:06] <asteve> RikusW: i know, it was more of a question of "is it possible" vs. "does it make sense"
[13:16:57] <RikusW> its possible, and sometimes useful too
[13:17:24] <JyZyXEL> http://pastebin.com/raw.php?i=9SCp6VAb
[13:17:27] <JyZyXEL> theres my full code
[13:18:17] <asteve> it's something i've never done in my years of doing things
[13:18:29] <karlp> asteve: it's totally legit
[13:18:40] <asteve> http://www.youtube.com/watch?feature=endscreen&NR=1&v=d9gAqvttwq8
[13:18:41] <JyZyXEL> its probably really bloated compared to what its functionality
[13:18:43] <asteve> that is a legit
[13:18:45] <karlp> sometimes done to skip ahead through a table if you realised you're in the wrong part of it
[13:19:27] <RikusW> asteve iirc I did it a few times, but fairly rarely
[13:20:00] <JyZyXEL> basically its just a way to set PORTB thru USART and have the state survive resets
[13:20:28] <JyZyXEL> one thing i noticed is every time i reflash the state is reset to 255
[13:21:10] <JyZyXEL> and why EEPROM_LOCATION is (void *)37 i have no clue, but that was what someone else was using to store a byte :D
[13:21:38] <JyZyXEL> apparently totally arbitrary locations are popular amongst eeprom tutorial writers
[13:21:49] <JyZyXEL> they never use location... say like... ZERO
[13:22:21] <JyZyXEL> i wonder if there is some reason?
[13:22:34] <RikusW> use 0 if you please ;)
[13:22:53] <JyZyXEL> is it more likely to get overwritten or something
[13:23:13] <RikusW> if you overwrite it yes..
[13:23:23] <JyZyXEL> i wouldn't mind a location that has a default value of 0
[13:24:10] <JyZyXEL> but im guessing since location 37 becomes 255, avrdude sets eeprom all ones during flashing?
[13:24:12] <RikusW> so you want to read and write PORTB via usart ?
[13:24:22] <JyZyXEL> yeah
[13:24:45] <RikusW> reading must be from PINB....
[13:25:08] <RikusW> I'd just read the raw value and send that to the pc
[13:25:24] <RikusW> unless you want it displayed in a terminal
[13:25:37] <RikusW> like minicom or hyperterm
[13:26:53] <JyZyXEL> hmm well i guess i didn't need to conversion at all really yeah
[13:27:33] <JyZyXEL> im not even sure if ill ever need to get the state as the MCU handles toggles already
[13:28:30] <RikusW> I did some code to read/write to any memory location, then you can access any register from the PC
[13:29:08] <JyZyXEL> that would have worked too
[13:29:14] <RikusW> and another command with a & + | mask
[13:29:20] <OndraSter> RikusW, I've done that too... in assembler!
[13:29:34] <RikusW> OndraSter: I did it in asm too
[13:29:46] <OndraSter> :P
[13:29:57] <JyZyXEL> i mean theres three use cases, i either wanna turn off/turn on/toggle a certain bit of PORTB
[13:30:06] <JyZyXEL> and this over a UART from computer
[13:30:32] <RikusW> Z = ptr; ld r16,Z or r16,r17 and r16,r18 st Z,r16
[13:30:43] <RikusW> for changing bits on the register
[13:31:01] <OndraSter> hmm how much processor time would require grabbing data from TCP and shoving them to some DSP? :)
[13:31:20] <OndraSter> brb, gotta reboot router, it keeps resetting wifi /
[13:32:27] <JyZyXEL> im sure theres some way to achieive it with very little MCU code
[13:32:32] <OndraSter> ok
[13:32:35] <OndraSter> sockets survived
[13:32:46] <OndraSter> JyZyXEL, so atxmega should be able to do it? :)
[13:36:25] <OndraSter> decoding online stream and shoving it into the DSP shouldn't be that hard | easy (depends on whether you are optimist or pesimist) :P. And if the DSP could do it on its own, it would be the k3wliest
[13:36:36] <OndraSter> but I will put this into my drawer anyway
[13:37:19] <JyZyXEL> OndraSter: well i already had the hardware in the first place
[13:37:36] <JyZyXEL> but the chinese firmware on it was hopeless
[13:37:40] <OndraSter> lol
[13:37:44] <OndraSter> wait, what are we talking about
[13:37:58] <JyZyXEL> my project
[13:38:00] <OndraSter> ohh
[13:38:14] <OndraSter> I thought you were talking about the DSP and that you had the hardware already lol
[13:41:14] <RikusW> The Spoon -> http://pastebin.com/UQLWXSPa :-D
[13:48:34] <karlp> OndraSter: get a bigger chip?
[13:49:54] <OndraSter> karlp, it was just one of the dumb ideas that I think of for 10 secs and then trash them :P
[13:50:12] <karlp> goodo :)
[14:54:02] <mitsakos> has anybody used TL494 for smps design?
[14:56:01] <RikusW> I did a 12V to 360V dc-dc converter
[14:56:14] <asteve> quite a step up
[14:56:21] <RikusW> there is an application circuit in the datasheet
[14:56:34] <RikusW> asteve: on a custom wound transformer too
[14:56:55] <RikusW> + a voltage multiplier
[14:56:55] <Tom_itx> wtf for?
[14:57:20] * RikusW attempted to do a dc to ac 220V converter
[14:58:23] <RikusW> base drive for the transistors on the HV side presented some difficulties
[14:58:42] <RikusW> will try magnetics
[14:59:10] <RikusW> seems such a converter can be made bidirectional too
[14:59:31] <RikusW> to charge the battery or supply AC using the same circuit
[14:59:59] <mitsakos> i have a stable 36V 10A smps power supply and what i want is to do is use it as a current source for a workbench power supply i'm building 0-36V 0-10A. I use 4x3n055 in parallel but they are getting very hot in low voltage, high currents because of the voltage drop. So what i want is if there is a way to drop the voltage of the smps in order to reduce the voltage difference of Vin/Vout
[15:00:48] <OndraSter> mitsakos, depends on the construction
[15:01:04] <mitsakos> it has an adjust pot for error correction
[15:01:19] <mitsakos> it is about 1K and it adjusts output voltage from 30 to 40V
[15:01:23] <OndraSter> without schematics...
[15:01:34] <mitsakos> i replaced it with a 10K pot
[15:01:37] <OndraSter> but most likely the pot is in series with another resistor
[15:01:38] <mitsakos> the voltage reduces
[15:02:00] <OndraSter> why not use the SMPS on its own as a bench power supply?
[15:02:18] <mitsakos> but below ~18 volt it occures a sound like comming from coild maybe of the low duty cycle/frequency
[15:02:42] <OndraSter> inductor/cap are squeaking, normal stuff
[15:03:19] <OndraSter> it is happening in my other project as well... and I have there just battery, going through relay to capacitor
[15:03:21] <mitsakos> when i turn the pot suddenly the voltage drops slowly but when i turn it on the other way to increase the voltage the voltage increases the speed i turn the pot
[15:03:24] <OndraSter> and it is making sound as well
[15:03:34] <OndraSter> (I am switching the load on the capacitor in few tens of kHz)
[15:03:50] <OndraSter> mitsakos, because the cap has to discharge
[15:04:01] <mitsakos> yes
[15:04:11] <mitsakos> so this can't be used for bench power supply
[15:04:20] <OndraSter> so put there steady load :)
[15:04:22] <mitsakos> that's why i'm going to use extra adjust
[15:04:40] <OndraSter> or make the output cap smaller (not sure if that is the smartest idea though)
[15:05:21] <mitsakos> is the sound coming normal? i'm wondering if the duty cycle is to low to burn the FETs
[15:05:42] <OndraSter> dunno, i never really cared unless it actually went up in smoke myself
[15:05:49] <OndraSter> I like the way of being taught by errors
[15:05:50] <mitsakos> hah
[15:06:18] <mitsakos> but what i noticed is that the sound stops when you put a load
[15:06:24] <OndraSter> todays play, faaaaar from final (probably gonna be disassembled and assembler later again)
[15:06:25] <OndraSter> http://imgur.com/gKZ9J
[15:07:08] <RikusW> to low frequency on the old monochrome monitors causes the flyback coil to spark :-P but then again we're talking about 9kV...
[15:07:58] <RikusW> mitsakos: smps tend to become silent when loaded
[15:07:59] <mitsakos> i also tried replacing the timing resistor to change the working frequency from 50khz to 100khz but sound didn't disappeared
[15:08:27] <RikusW> rather leave it at 50kHz, it was designed for that
[15:08:55] <OndraSter> talking about SMPS, I have got here one LCD TV
[15:09:07] <OndraSter> I thought it had failed caps - they were bulky etc, so I changed them
[15:09:11] <OndraSter> but still it doesn't power on
[15:09:21] <OndraSter> I probed the voltage outputs...
[15:09:35] <OndraSter> 5V rail keeps going from 2.5V and drops to 0.. then again to 2.5V
[15:09:56] <OndraSter> so I went to the HV side and probed the SMPS controller (it is actually powered directly from the input mains, it has builtin regulator or what)
[15:10:08] <RikusW> sounds like the pwm ic protection mode
[15:10:10] <OndraSter> it _does_ oscillate and power the output
[15:10:15] <OndraSter> but at about 500Hz
[15:10:21] <OndraSter> instead, by datasheet, 67kHz
[15:10:31] <RikusW> what is its number ?
[15:10:40] <OndraSter> duh, let me check, it can be barely read :)
[15:10:42] <mitsakos> what if i try to put a bigger pot than 10K will it make it burn?
[15:10:58] <mitsakos> if 10K makes noise what 20k will do?
[15:11:18] <RikusW> mitsakos: there is probably resistors in series with the pot, try changing that ?
[15:11:28] <RikusW> mitsakos: did you find a TL431 in there ?
[15:11:39] <mitsakos> yes it doesn't matter which one you change
[15:12:01] <mitsakos> TL494 and an OP Amp
[15:12:08] <OndraSter> http://www.datasheetcatalog.org/datasheet2/7/0yxtz884zrxugptyus8egwidrhwy.pdf RikusW
[15:12:10] <OndraSter> should be this one
[15:12:36] <RikusW> OndraSter: how big is that ds ?
[15:12:45] <OndraSter> half megabyte I think
[15:13:10] <RikusW> yes
[15:13:27] <RikusW> seems this site supports resuming :)
[15:13:53] <RikusW> datasheetarchive doesn't, and don't tell you the file size either :(
[15:15:24] <mitsakos> RikusW the TL494 has two resistors in series at the positive input of the error correction Op Amp connected to ground. The one is the pot and the other a fixed value resistor.
[15:15:55] <mitsakos> the manufactorer had this pot for small adjustments
[15:16:03] <RikusW> OndraSter: probably some of the auto restart modes being triggered
[15:16:25] <OndraSter> yeah
[15:16:29] <OndraSter> I blew the fuse in it though
[15:16:32] <OndraSter> and I forgot to pick them up
[15:16:34] <OndraSter> today
[15:16:35] <RikusW> mitsakos: where does the pot center pin go ?
[15:16:40] <OndraSter> gonna have to wait till monday
[15:16:41] <mitsakos> nowhere
[15:16:49] <mitsakos> that was what i was looking for
[15:17:17] <RikusW> OndraSter: check the Vcc circuit for that chip too
[15:17:30] <mitsakos> i thought that he used it as a voltage divider but it finally seemed not
[15:17:38] <RikusW> OndraSter: whats the mains voltage over there ?
[15:17:44] <OndraSter> 230
[15:18:11] <RikusW> then the cap in there should measure about 350V
[15:18:16] <RikusW> Vdc
[15:18:21] <OndraSter> I know
[15:18:23] <OndraSter> I measured that
[15:18:50] <RikusW> That startup cell is quite common in newer smps ic's
[15:18:51] <OndraSter> then I connected ground signal on scope probe to the rectified ground on the input caps
[15:19:02] <OndraSter> ..
[15:19:11] <OndraSter> not sure if that was the problem and it didn't like the connection or what
[15:19:15] <OndraSter> but the fuse blew
[15:19:17] <RikusW> OOOOHHH !! BANG
[15:19:27] <OndraSter> ground != ground appearantly
[15:19:35] <RikusW> ground is at -175V :-D
[15:19:57] <OndraSter> how come?
[15:20:01] <OndraSter> if you rectify it..
[15:20:15] <OndraSter> it doesn't go -230 .. 0 .. 230
[15:20:30] <OndraSter> but 0... 330
[15:21:10] <RikusW> ground is at the negative side of the ac sinewave....
[15:21:33] <OndraSter> hmm
[15:21:36] <OndraSter> well, lesson learned
[15:21:52] <OndraSter> for future - how the hell should I measure the ripple then, if I can not get proper ground point :P
[15:22:05] <RikusW> the LV DC side is scope safe though
[15:22:21] <RikusW> isolation transformer if you can get one
[15:22:26] <OndraSter> can not
[15:22:27] * RikusW don't even have that
[15:23:29] <RikusW> I usually check every component on the HV side
[15:23:39] <OndraSter> but.. how :P
[15:23:44] <OndraSter> without ground signal it goes fairly crazy
[15:23:59] <OndraSter> without conencted ground*
[15:24:29] <RikusW> while it is off of course
[15:24:35] <RikusW> unsoldering the stuff
[15:24:58] <RikusW> or removing enough connection to measure the rest
[15:25:16] <OndraSter> how am I supposed to measure the gate etc while it is off :P
[15:26:10] <RikusW> measure the LV side...
[15:26:51] <OndraSter> that is not fun :(
[15:27:13] <RikusW> check the Vcc supply circuit and all feedback paths
[15:27:27] <RikusW> if nothing is wrong there it might be the ic itself
[15:28:04] <OndraSter> in the worst case I can always get separate SMPS board with 5V and 15V or whatever it outputs and separate LCD backlight SMPS and power it all from that :P
[15:28:41] <RikusW> I prefer working on smps's thats OFF
[15:28:54] <RikusW> much safer and much less BANG prone
[15:29:20] <OndraSter> I've burnt few SMPS controllers... (TI TPS54527)... one died during night when I was sleeping, dunno how
[15:29:26] <OndraSter> the other one died by my fault :(
[15:30:05] <RikusW> I've probably repaired > 60 pc smps by now
[15:30:26] <OndraSter> :)
[15:30:37] <RikusW> usually its surge damage or faulty caps
[15:30:46] <OndraSter> sure, those are easy to fix
[15:31:02] <OndraSter> but the rest.... I just throw them out or keep few parts and throw the rest away, unless it is some high quality one (on the other hand those do not blow up easily)
[15:31:19] <RikusW> did you use proper low esr caps ?
[15:31:28] <OndraSter> sure
[15:32:41] <RikusW> that protection modes can make troubleshooting difficult... but it will also prevent bangs
[15:33:35] <OndraSter> I, myself, hate AC and analog signals :P
[15:35:06] <RikusW> When I started on pc smps it took like a day or 2 or 3 to get it fixed
[15:35:19] <RikusW> now its and hour or 2 or even less
[15:35:26] <OndraSter> :)
[15:35:33] <OndraSter> isn't it all the same, just different chips?
[15:36:36] <RikusW> more or less
[15:36:52] <RikusW> pc smps use push-pull
[15:37:47] <RikusW> your chip use a flyback converter
[15:38:07] <OndraSter> pushpull = low & high side FETs, right?
[15:38:43] <RikusW> yes
[15:38:53] <OndraSter> yay, they _have_ learned me something in the school :P
[15:39:18] <RikusW> pc smps use a single coil in series with a cap on the HV side
[15:39:38] <RikusW> then 2 transistors to +175 and -175
[15:39:58] <RikusW> and center tap on the LV side
[15:40:06] <OndraSter> hah
[15:40:18] <OndraSter> that explains why they always have 200V caps :P
[15:40:29] <RikusW> and 2 of them
[15:40:33] <OndraSter> yep
[15:41:20] <RikusW> in between those 2 is usually 0V and earthed too
[15:41:40] <RikusW> earth came loose on my one PC's plug....
[15:42:10] <RikusW> so when I touched the PC case and a real earth there was this tingling sensation...
[15:42:25] <OndraSter> I had similar experience on my mother's old PC
[15:42:30] <RikusW> fairly iritating
[15:42:35] <OndraSter> surprisingly it was only around the VGA connector
[15:42:40] <OndraSter> probably something going from the LCD?
[15:43:23] <RikusW> it happend while plugging in a serial device that was earthed...
[15:43:39] <RikusW> I could see tiny sparks as I connected it
[15:44:09] <OndraSter> hehe, yep
[15:44:20] <OndraSter> I had to be touching heater that was next to the PC
[15:44:33] <OndraSter> I tried changing PC PSU - nope, PC GPU - nope...
[15:44:35] <RikusW> lol
[15:44:40] <OndraSter> then the LCD screen went dead actually
[15:44:43] <RikusW> PC ground...
[15:45:01] <OndraSter> it is somewhere on the panel itself actually, because when I disconnect the LVDS internal cable, it powers up
[15:46:13] <RikusW> the same one your trying to repair now ?
[15:46:23] <OndraSter> no
[15:46:28] <OndraSter> this is LCD TV :)
[15:46:31] <OndraSter> 22"
[15:46:38] <OndraSter> that one was ooold 15" LCD with analog only
[15:47:16] <RikusW> you say there should be 5V on the output ?
[15:47:39] <OndraSter> 5V on the 5V outputs, yes
[15:48:05] <RikusW> I have an easy way to test the optocouple and TL431
[15:48:23] <RikusW> disconnect the psu from the other electronics
[15:48:53] <RikusW> and put 5V in or whatever voltage goes to the TL431
[15:49:00] <OndraSter> funny thing - I have got full datasheet of the "IO" board that contains the "CPU", memories, connectors, everything
[15:49:05] <OndraSter> but NOT the power supply
[15:49:08] <RikusW> measure the other side of the optocoupler
[15:49:08] <OndraSter> it was made by another company :(
[15:49:20] <RikusW> having a variable psu works great for this
[15:49:24] <OndraSter> :)
[15:49:44] <RikusW> but the psu have to be disconnected from the other stuff
[15:50:55] <RikusW> having a look at the resistors with the TL431 will tell you the output voltage too
[15:52:06] <OndraSter> first things first, I am actually finishing school in the next month and I should start learning for the final exams
[15:52:17] <Landon> _start_ >.>
[15:52:23] <OndraSter> you're right
[15:52:25] <OndraSter> screw that lol
[15:53:23] <Landon> I took the poor approach in school :P "if I have to study, isn't worth knowing"
[15:53:33] <Landon> but then... 20% of the work for 80% of the grade
[15:53:46] <OndraSter> :D)
[15:54:01] <RikusW> LG LCD's like to use FAN7601
[15:55:48] <OndraSter> thanks for all the help, RikusW and Landon and others, gonna change my position to horizontal one :D
[15:55:49] <OndraSter> brb
[15:56:33] <Landon> oh god, don't take my study advice
[15:56:45] <RikusW> lol
[15:56:53] <OndraSter> lol
[15:57:04] <OndraSter> the only thing I will really have to look at is literature
[15:57:08] <OndraSter> 20 books I should have read
[15:57:11] <OndraSter> and authors to it
[15:57:18] <OndraSter> but... what is this... book?
[18:02:39] <JyZyXEL> what is _BV() ?
[18:07:40] <inflex> a macro that converts to (1<<x)
[18:07:55] <inflex> eg _BV(PB0) === (1<<PB0)
[18:07:59] <inflex> I prefer the latter personally.
[18:08:27] <JyZyXEL> ew, a macro
[18:10:52] <JyZyXEL> PORTD |= (1<<PD4)|(1<<PD5); would that turn on the internal pull-ups for Port D, pins 4 and 5?
[18:25:33] <JyZyXEL> what is _SFR_BYTE()?