#avr | Logs for 2012-01-20

Back
[00:00:02] <Roklobsta> what is the purpose of a doslike machine?
[00:00:06] <zzing> Most of this stuff is either really small (atmega), or really large
[00:00:30] <zzing> Roklobsta: Mainly to do it. I am interested in research of applications of C++11 to smaller hardware
[00:00:54] <Roklobsta> oh you want to be able to load and run code on it without burning to flash neccesarily?
[00:00:59] <zzing> yes
[00:01:18] <zzing> Think load off of SD card is a perfect example
[00:01:23] <zzing> But have the main OS in flash perhaps
[00:01:36] <Roklobsta> freescale have an rtos for their arm and coldfire chips which comes with a shell
[00:01:42] <Roklobsta> it's free
[00:02:02] <Roklobsta> it couyld probably load code off sd cards and run them in ram
[00:02:23] <CMiYC> zzing: why not just find an old 6502. that's c54 class hardware
[00:02:31] <CMiYC> c64 even
[00:03:02] <zzing> Because GCC wouldn't support it
[00:03:31] <CMiYC> http://www.cc65.org/
[00:03:56] <zzing> I am not programming in C :P
[00:04:27] <CMiYC> uh?
[00:04:33] <CMiYC> zzing: Because GCC wouldn't support it
[00:04:39] <CMiYC> GCC is a C complier
[00:05:00] <zzing> GCC is a compiler collection that includes a C++ compiler.
[00:05:27] <CMiYC> i'm failing to see your point
[00:06:07] <zzing> cc65 is a C compiler, g++ is a C++ compiler. I am programming in C++. 6502 isn't a g++ target.
[00:06:25] <CMiYC> why?
[00:06:51] <CMiYC> zzing: My basic idea is to have a machine that can implement something akin to MS-DOS - so think C64 class hardware
[00:06:56] <CMiYC> You don't need C++ for that
[00:07:13] <zzing> CMiYC: No you don't. But it can be helpful.
[00:08:04] <CMiYC> ok
[00:08:54] <zzing> And MS-DOS is only an example, Xenix might be a better one :P
[00:10:24] <CMiYC> I might understand better if you use examples that existed AFTER C++
[00:11:28] <zzing> Let me see if I can explain, I need to know how much you know about C++
[00:12:08] <CMiYC> well, I know that DOS, C64, and Xenix all pre-date C++
[00:12:40] <zzing> The reason why I want to use C++ is based in the language itself, not the dating of things.
[00:13:26] <CMiYC> i said you don't need C++, you said Xenix is a better example
[00:13:33] <CMiYC> I'm not sure how that matters
[00:14:03] <zzing> Essentially it is this: C++ has language features that blow away anything that C could possibly dream of. I am delving deeper into C++ in electrical engineering, and want to be able to use those features. Things such as template metaprogramming.
[00:14:15] <zzing> All of this can be done as efficiently as in C, and sometimes more so.
[00:16:44] <Essobi> You realize you're saying this to an audience that is primarily asm programmers, right? :D
[00:17:17] <zzing> Essobi: Certainly. Truth is truth though :P
[00:17:48] <zzing> If go ahead an make a class in a C++ program for an attiny, I might question the sanity.
[00:17:54] <CMiYC> he's gone from "I want to program arduino"
[00:17:58] <CMiYC> to "I want to program AVRs"
[00:18:10] <CMiYC> to "I want to write an operating system for micro controllers in C++"
[00:18:16] <CMiYC> I'm intrigued on the next step
[00:19:01] <Roklobsta> i don't do c++ but I can't say I have seen it used much in embedded systems.
[00:19:31] <zzing> Roklobsta: That might be a problem with understanding where it can be useful.
[00:19:46] <Roklobsta> and partly due to a lack of compiler support for embedded cpus
[00:19:53] <Essobi> CMiYC: PROFIT!!!!!!11!!!!ONE!!!!
[00:19:54] <zzing> CMiYC: My idea has moved with the realities of the hardware available. What I want to do ultimately has no changed.
[00:20:10] <Roklobsta> go with something armish then.
[00:20:38] <zzing> Roklobsta: That would be the biggest obstacle. AVR*, ARM, etc. have great gcc support, so somebody could do stuff with those if they so chose.
[00:20:47] <CMiYC> All that crazy shit happened in the span of 4 hours?
[00:20:48] <Essobi> ARM 32bit...
[00:21:00] <Roklobsta> its called evolution
[00:21:01] <CMiYC> You must be on a different plan of thinking than me
[00:21:14] <Essobi> CMiYC: It's called Adderall.
[00:21:32] <Roklobsta> i don't know if you'
[00:21:43] <Essobi> :D I kid, I kid.
[00:21:50] <Roklobsta> you'll find an embdeeded cpu with a a stack big enough to support your c++ dream
[00:22:04] <CMiYC> Essobi: I don't think you're far off
[00:22:09] <Essobi> Blackfin DSPs are pretty neat...
[00:22:24] <Roklobsta> why are they neater than a cortexm4?
[00:22:27] <Essobi> I've played with those, and ETRAX, and ARM920Ts
[00:23:47] <Roklobsta> what do you think c++ will do for you in an embeddec context?
[00:23:55] <Roklobsta> that c won't?
[00:23:58] <Essobi> Roklobsta: wasn't there some sickly cheap m4 board out? wifi/ethernet?
[00:24:09] <Roklobsta> probably
[00:24:14] <Roklobsta> the one i linked is $15
[00:24:40] <rue_bed> how about a turring processor core? :)
[00:24:52] <rue_bed> write an os in BF
[00:24:55] <rue_bed> :)
[00:25:49] <rue_bed> stupid close button
[00:26:02] * rue_bed tries to resize his window again
[00:27:04] <rue_bed> hmm, I think I want to make a hardware turring machine..
[00:55:49] <pingec> Is the author of avrbeginners.net known?
[01:01:50] <Roklobsta> what, could it be Alejandro Weinstein, Julius Volz or <gasp> Christoph Redecker?
[01:08:59] <Casper> I'ld say....
[01:09:24] <CMiYC> 42
[01:09:59] <Casper> Christoph Redecker Sophienstrasse 13 D-21465 Reinbek Germany +49 4029894500 donbuffi@t-online.de
[01:47:09] <pingec> In general... when executing an ISR I have to push the SREG to stack, right? So that I don't mess up the results of any operations that might have been interrupted?
[01:51:23] <nevdull> yeah, location broken out of for the ISR might be using the status register for a conditional branch or other flag. just pair it with 'out SREG, <register> before you call RETI
[01:52:10] <impulze> how's this with the ISR stuff of avr-libc?
[01:52:28] <impulze> does it do the function prologue/epilogue on it's own?
[01:53:27] <ziph> GCC emits it when your routine is marked as in ISR.
[01:53:36] <impulze> good :)
[01:53:44] <nevdull> if you use avr-libc to call your ISR it is supposed to include a prolog/epilog although you can disable it
[01:56:25] <pingec> ok, next question:
[01:56:28] <pingec> http://shrani.si/f/1Z/bV/31qplOsJ/capture.png
[01:56:50] <pingec> why does that code save only the r16 and not SREG?
[01:57:01] <pingec> doesnt the marked instruction mess up the SREG?
[01:58:08] <pingec> (I didn't know how to produce a direct link to the avrbeginner site)
[01:59:56] <RikusW> It seems it does mess up sreg
[02:00:19] <RikusW> in r16,SREG push r16
[02:00:29] <RikusW> after pop r16 out SREG,r16
[02:00:34] <pingec> ok thanks
[02:00:53] <pingec> I just couldnt undersand why it's saving sreg at that point in code
[02:01:29] <RikusW> seems buggy to me ;)
[02:01:49] <pingec> I hope it'll work :(
[02:03:14] <RikusW> the avrbeginners example that does cpi before saving sreg that is..
[02:05:36] <pingec> If I hypothetically get debugwire to work, will I be able to breakpoint while doing uart? How will that work?
[02:05:44] <RikusW> http://www.avrbeginners.net/architecture/uart/uart_buffer.html
[02:05:52] <RikusW> here is that link ;)
[02:06:03] <pingec> how did you get to it?
[02:06:21] <RikusW> right click on the tree and -> copy link
[02:06:22] <ziph> pingec: Yes, it can break in an ISR.
[02:06:29] <pingec> ahh thanks
[02:06:40] <ziph> pingec: The debugging silicon is wrapped around the core.
[02:07:29] <pingec> so it will break for example on first received byte
[02:07:41] <ziph> You'd set a breakpoint in the receive ISR.
[02:07:42] <pingec> and the others will be unreceived
[02:08:12] <pingec> well ok thx, thats cool enough
[02:08:26] <ziph> Yeah, if you let it sit there it will be like you've done a clear interrupt enable followed by a while (true) { // do nothing }
[02:08:35] <pingec> aha
[02:09:09] <pingec> I'm a bit scared to connect stuff
[02:09:11] <pingec> and try it out
[02:09:13] <pingec> lol :>
[02:09:13] <ziph> The peripherals like the UART will keep running and behave as if your code is doing nothing with the interrupts off.
[02:10:31] <ziph> It's rarely an issue though, you just need to set your breakpoints in strategic places.
[02:11:17] <ziph> I can't remember if AVR Studio supports data sensitive breakpoints but you can also do an if statement in your code specifically for the purpose of having a break point be hit when some condition is true.
[02:12:03] <pingec> cool trick
[02:12:06] <pingec> thanks
[02:12:22] <pingec> I want to communicate with a gsm modem
[02:12:25] <pingec> via usart
[02:13:00] <pingec> I need to enable software flow control on the modem?
[02:13:07] <ziph> Make sure you have a way for the AVR to reset the GSM modem if you're trying to set up some unattended system.
[02:13:25] <ziph> They're as buggy as all hell and will need automatic resets usually.
[02:13:32] <inflex> lo folks
[02:13:32] <ziph> Hardware flow control is better.
[02:13:41] <ziph> lo 'flex
[02:13:50] <pingec> does the avr support it?
[02:13:56] <pingec> I dont really know what they are
[02:14:01] <pingec> need to google some more
[02:14:47] <ziph> pingec: Some UARTS have built in support (usually the ones with large FIFO's of 16 or more characters).
[02:14:55] <ziph> pingec: But if you don't have that you just do it with GPIO lines.
[02:15:23] <ziph> I don't think any of the AVR UART's have hardware suppot.
[02:15:27] <ziph> support rather.
[02:15:27] <pingec> I think I'll need to find an example
[02:15:50] <pingec> But if I use software fc
[02:15:54] <pingec> will it hurt?
[02:16:18] <pingec> I have spare pins but I don't want to overcomplicate things
[02:16:28] <ziph> No, but it means you no longer have an 8-bit clear channel.
[02:17:25] <pingec> Hmm, what does that mean?
[02:17:36] <pingec> That I need to skip 1 bit every 8 bits?
[02:17:56] <ziph> No, it means there will be characters you can no longer use (because they are tied up doing flow control).
[02:18:47] <pingec> Hm
[02:19:01] <ziph> You couldn't then do PPP/TCP/IP over it or even do things like send a binary encoded SMS.
[02:19:58] <pingec> Ok I think I get it
[02:20:09] <pingec> But since I'm doing AT protocol
[02:20:15] <ziph> What are you doing?
[02:20:17] <pingec> and only need ASCII values?
[02:20:26] <pingec> I want to send SMS
[02:20:29] <pingec> and receive
[02:20:32] <pingec> and parse them
[02:20:39] <ziph> You probably don't even need flow control.
[02:20:57] <ziph> Just run it at a reasonable baud rate.
[02:21:07] <pingec> Oh so that's an optional thing?
[02:21:10] <pingec> Ahh :)
[02:21:13] <ziph> Yeah.
[02:21:29] <RikusW> ziph: m32u2 does have hw rts/cts
[02:21:56] <pingec> So I should disable flow control on the modem?
[02:22:32] <sabesto> i just soldered 2 of the same board with an atmega128 on each, none responds on the SPI interface, is there any traps with it?
[02:22:47] <sabesto> internal osc. should be default, right?
[02:22:55] <RikusW> sabesto: ISP on the m128 isn't connected to spi...
[02:23:01] <ziph> pingec: It might work even if you don't.
[02:23:06] <RikusW> try the UART0 pins
[02:23:21] <pingec> ziph ok
[02:23:24] <sabesto> RikusW: i meant ISP, sorry
[02:23:27] <RikusW> sabesto: have a close look in the m128 ds for the ISP pinout in the memory programming section
[02:23:29] <pingec> I will try and see
[02:23:37] <ziph> pingec: You'll just ignore the modems request to stop sending, and the input to the modem may already be tied to what it needs to be tied to.
[02:23:49] <ziph> RikusW: For the 1 byte buffered UART?
[02:24:20] <RikusW> ziph: I think its 2 byte buffer + the UDR register, so 3
[02:24:29] <ziph> RikusW: Ahh, ok.
[02:24:34] <ziph> RikusW: Sounds reasonable then.
[02:27:09] <sabesto> fuck me
[02:27:37] <sabesto> i refuse to etch this again, i etched 4 boards mirrored
[02:27:46] <sabesto> prior to this
[02:27:50] <RikusW> so you discovered the weird m128 ISP connection ?
[02:27:58] <sabesto> ...
[02:28:31] <inflex> sabesto: heh, hence why I just get them done via a 3rd party now
[02:28:35] <inflex> sabesto: I let them botch it up :p
[02:28:36] <RikusW> and jtag isn't connected to a pinheader either ?
[02:28:45] <sabesto> no
[04:51:17] <lovre> hi all
[04:51:34] <lovre> is there a cable length limitation for GPIO pins?
[04:56:06] <karlp> depends what you want to do with them.
[04:57:45] <ziph> lovre: They're just digital gates, that's a bit like asking what the cable length limit is for a 5V analog signal.
[05:00:17] <lovre> ziph: well, the question remains, just the same. Do i just need to consider the voltage drop per meter, making sure i still get enough voltage to supply whatever is on the end of that cable, or is there some other consideration i need to know about? Sorry if i was vague with my question.
[05:01:21] <ziph> lovre: What is the signal you'll be putting out?
[05:01:29] <lovre> accidently quit the channel :)
[05:01:44] <lovre> erm, its just a digital signal to turn on a relay
[05:02:17] <lovre> lets say i want to turn on the light in the house, but have one controller, can i just use lots of long cables to do this?
[05:02:38] <ziph> Yeah, for that you'll only be worried about line R.
[05:03:30] <ziph> And that each GPIO output can drive the required current and that the total current from all GPIO's doesn't exceed the limits.
[05:03:45] <lovre> ziph: i see. And another thing i was thinking about is induction from other appliances, would it maybe induce enough voltage in the cable to false-positive the relay? Could i possibly use a twisted pair with one cable being grounded to avoid this?
[05:05:09] <ziph> lovre: The relay will only be affected if the current through it drops below the hold current rating for long enough.
[05:05:54] <lovre> ziph: hmm, i was imagining a NO relay, not sure why i would use NC?
[05:06:36] <ziph> lovre: It's the same issue both ways.
[05:07:47] <lovre> ziph: so i should not worry about this then? What about the case when using mosfet instead of relay? it would trigger on a small duration of voltage?
[05:08:14] <lovre> ziph: sorry to spam with questions, i just need to consider all this to clarify with myself :D
[05:08:19] <ziph> lovre: If you use a MOSFET then terminate the line in a fairly low resistance and it will act similarly to the relay.
[05:08:58] <ziph> e.g. the current you'd have to induce would be large to raise the mosfet gate voltage high enough.
[05:10:08] <lovre> ziph: i see. this would then require more current from the controller itself, if im not mistaken? So in any way relays sound like a better solution.. Specially considering the fact they have a lower ON treshold.
[05:10:15] <lovre> so i can use longer cables also
[05:10:48] <ziph> lovre: No, the relay would probably use more power than doing it with the mosfet and having a termination.
[05:11:02] <lovre> ziph: oh :)
[05:11:46] <ziph> You could also use real transmission line.
[05:11:54] <lovre> ziph: what about the twisted pair proposal? Would that help avoiding the terminator?
[05:12:02] <ziph> RG58 is cheap and is probably more robust than what you're thinking of using.
[05:12:26] <karlp> how far are you actually talking about?
[05:12:30] <karlp> 10m or 1000?
[05:12:42] <lovre> karlp: < 50 m
[05:12:54] <ziph> lovre: Twisted pair is usually used with differential receivers with a good common mode rejection.
[05:13:33] <karlp> if you don't want to put a smart device at the far end, perhaps current loop stuff?
[05:14:30] <ziph> The relay makes a fairly good current loop. :)
[05:16:08] <ziph> lovre: How would you power the stuff at the other end?
[05:16:38] <lovre> ziph: what do you mean? The stuff on the other end is a 220V swith for light, or a water heater, or whatever
[05:16:42] <Xeli> hello, I'm building this device: http://www.ladyada.net/make/usbtinyisp/parts.html however I still need the bufferchip is it possible to replace the 74ahc125 with 74hct125? (http://goo.gl/AHIbb) ?
[05:17:12] <ziph> lovre: If I was doing it I would be tempted to use RS485 with a bunch of cheap little AVR's on the ends to do switching.
[05:17:27] <ziph> lovre: Then you can run it in a bus or a few busses instead of having a star network.
[05:17:33] <lovre> ziph: but why, that doesnt sound much cost-effective
[05:17:52] <lovre> ziph: but does sound like a better solution tho
[05:18:09] <lovre> hmm, the bus thing sure is a nice feature
[05:18:14] <lovre> i could do it with attiny
[05:19:11] <ziph> lovre: Cable and connectivity is often more expensive than PCB's and cheap IC's, it wouldn't surprise me if RS485 was cheaper for a reasonable number of devices.
[05:19:38] <lovre> ziph: i suppose so
[05:19:52] <lovre> for RS485 i would use coax, or?
[05:20:04] <ziph> lovre: 100/110/120 ohm twisted pair.
[05:20:21] <ziph> lovre: It's differential signaling too, but with no requirement for charge pumps like RS232.
[05:20:38] <RikusW> how about lightning induced transients in the cable ?
[05:20:55] <RikusW> it would be a problem around where I live...
[05:21:15] <lovre> RikusW: RS485 suppresses the noise afaik
[05:21:16] <ziph> RS485 transducers are about the most robust interface IC's you'll see around, especially if you go for the fancy ones. :)
[05:21:46] <RikusW> I'm not concerned about the noise so much, rather burnt avr...
[05:22:10] <ziph> They're 25kV ESD at minimum usually.
[05:22:15] <ziph> And you can get isolated ones.
[05:22:19] <RikusW> ah
[05:22:24] <lovre> RikusW: optocouplers?
[05:22:35] <RikusW> but direct avr io pin would be a problem...
[05:22:49] <amee2k> you could also clamp the signal lines with MOVs or diodes to shunt away lightning induced spikes, no?
[05:23:16] <amee2k> that would corrupt the data, but prevent damage to the transcievers
[05:23:21] <ziph> Your board level ESD should protect from it until it gets unreasonably close.
[05:23:50] * RikusW have seen sparks fly out of in house telephone wiring....
[05:24:03] <RikusW> big noisy ones..
[05:24:16] <lovre> do optocouplers have any use in all this?
[05:24:18] * RikusW cut the phone wire at the pole...
[05:24:30] <amee2k> yeah, i'd say even induced spikes are higher energy events than casual esd
[05:24:42] <RikusW> the telco don't maintain anything anymore... not even the gas arrestors
[05:26:08] <amee2k> well, kind of. a floating bus transciever will prevent ground loops from picking up spikes and prevent current from the power circuit from leaking through the bus ground connection
[05:26:55] <amee2k> it does make the whole thing slightly more complicated though since you need to power the isolated transciever somehow
[05:27:09] <amee2k> i.e. just a single twisted pair isn't going to cut it anymore
[05:27:30] <karlp> ask jacekowski about the right ways of doing this.
[05:27:39] <amee2k> either run bus power connections or needs an isolated aux supply
[05:28:03] <amee2k> mmh he is good with bus transcievers?
[05:28:05] <karlp> if you want to use 485, you have the two wires, plus an grounded (at one end only) shield
[05:28:12] <karlp> he's mr rs485 around here
[05:28:24] <karlp> I use it too, but not on anything long
[05:28:34] <lovre> nice
[05:28:35] <amee2k> (i don't, just replying here. but i'm working on a project that uses i2c style signalling + isolated floating transciever section)
[05:28:37] <karlp> I just use it for multi drop on a ~3-5m long cable.
[05:29:33] <karlp> alternatively, 50m, with 5V, or 12V, you would probably just work :)
[05:30:22] <karlp> especially if you switched a fet locally with the GPIO to get lots of current for the long drive.
[05:30:26] <amee2k> i'm using it as a semi-internal bus to connect independent modules. maybe slightly higher max range, say up to 10m
[05:31:20] <amee2k> mainly using the isolation thing to prevent a faulty connection on the power circuit from sending 5 amps through the bus ground
[05:32:27] <amee2k> but also with mains powered modules in mind that use a non-isolating auxiliary supply
[05:33:00] <Bushman> ave
[05:33:23] <amee2k> digi has some pretty cool i2c isolators in their catalog
[05:33:31] <amee2k> hey there :)
[05:34:54] <amee2k> karlp: i want to do more than just on-off. the modules have monitoring circuitry and can do PWM on their own
[05:35:20] <amee2k> also, i've got a relatively high level addressing model in mind that supports group control
[05:36:08] <amee2k> i want to make some changes to the protocol draft to get more in line with i2c 3.0 and possibly smbus
[05:38:56] <amee2k> i tend to prefer i2c over 485 because it is entirely sufficient speed-wise and has a neat bitwise arbitration mechanism that i can exploit
[05:43:18] <karlp> i2c is nice for that yes.
[05:43:33] <karlp> I was directing my "it would probabl jsut work" back to lovre, not to your use case :)
[05:43:49] <amee2k> i wonder if i2c could be ported to use a differential physical layer
[05:44:33] <amee2k> ah, i see. sometimes people on irc have a way of replying to each other so i wasn't sure :)
[08:00:17] <Xeli> Hello, I'm using the USBtinyISP to program my atmega8 but when using avrdude I get this output: http://pastebin.com/eMkAeaQg im 'pretty' sure the wiring is good
[08:00:22] <Xeli> any tips on how to troubleshoot it?
[08:01:04] <Xeli> if I disconnect the cable from the amega8 I get the same output btw..
[08:04:04] <nevdull> are you programming from your parallel port?
[08:04:25] <Xeli> nevdull: no I am using http://www.ladyada.net/make/usbtinyisp/index.html
[08:04:36] <nevdull> include -P /path/to/your/usb
[08:04:51] <nevdull> or -P COM# etc on windows
[08:05:22] <Xeli> nevdull: when I remove the usb cable I do get the message that it can't find the USBtiny device
[08:05:35] <Xeli> that should indicate the /dev is correct right?
[08:05:49] <nevdull> are you on linux?
[08:05:57] <Xeli> yeah
[08:06:13] <Xeli> I've tried using /dev/usbmon1 gives me the same result
[08:06:14] <nevdull> try running usb-devices after you plug in
[08:06:53] <Xeli> I see an entry for USBtiny
[08:07:12] <Xeli> http://pastebin.com/wSnLSvmi to be more precisew
[08:08:13] <nevdull> then try -P /dev/bus/usb/001/001
[08:09:23] <nevdull> you may have to run avrdude as root or sudo
[08:09:27] <Xeli> nevdull: same thing, I've got the feeling the connection from my desktop to the programmer is oke
[08:09:43] <Xeli> but the connection to the atmega8 isn't working
[08:09:51] <Xeli> Yeah I'm running with sudo
[08:09:57] <nevdull> do yo have a green light on the usbtiny?
[08:10:01] <Xeli> I do
[08:10:12] <Xeli> and a red flash each time I run avrdude
[08:10:13] <nevdull> are you powering from the usbtiny or usb or outlet?
[08:10:22] <Xeli> from the usbtiny
[08:10:39] <nevdull> do you have the jumper setting across both pins or just one?
[08:10:47] <karlp> you don't use -P with usbtiny.
[08:10:53] <karlp> just -c usbtiny
[08:11:12] <karlp> (I'm going out ona limb and assuming you don't have multiples)
[08:11:19] <Xeli> nevdull: I've jumpered R4 and R7
[08:11:31] <Xeli> karlp: I dont ;)
[08:11:36] <nevdull> i mean the jumper on the usbtiny to indicate you want power from the usbtiny
[08:11:36] <karlp> try -B 1000000
[08:11:46] <Xeli> nevdull: oh I have yes
[08:11:50] <Xeli> on both*
[08:11:53] <karlp> the default rate might be too fast if you are still on the 1Mhz clkdiv8
[08:12:29] <Xeli> karlp: still the same
[08:13:17] <Xeli> I have added some jumpers to replace the buffer chip (it is broken..) according to some post of adafruit I just needed to jumper the input to the outputs
[08:13:22] <Xeli> might this be the issue?
[08:14:35] <karlp> maybe.
[08:14:41] <karlp> you're the only who'd know that.
[08:14:47] <karlp> how was it broken?
[08:15:00] <karlp> maybe the same "broken" is still affecting you, because it wasn't the buffer
[08:15:13] <Xeli> I soldered it on wrong so I put the pins and ordered a new one
[08:15:22] <Xeli> and in the meanwhile jumpered it
[08:15:25] <Xeli> I cut the pins*
[08:15:51] <nevdull> i think you voided your warranty by soldering it in backwards ;)
[08:16:29] <Xeli> aye :P that's why a new one with another warranty should arrive sometime next week :P
[08:16:41] <nevdull> hehe, its hard to wait tho i know
[08:20:19] <Xeli> yes :) especially because of something as silly as soldering it on wrong.. ;o
[08:21:40] <Xeli> I've jumpered 1A to 1Y, 2A to 2Y, 3A 3Y, 4A,4Y that would be oke shouldn't it? http://www.xelification.com/tmp/pinout.png
[08:25:43] <nevdull> if you have the IC in backwards the pins wouldn't map that way i don't think. for example, vcc would be where GND is and vice versa. 1A would be at pin 9, if i'm understanding how you soldered it.
[08:26:39] <Xeli> nevdull: no, I've removed the IC completly
[08:27:36] <Xeli> http://forums.adafruit.com/viewtopic.php?f=20&t=14774
[08:27:51] <nevdull> ah gotcha. then yes, jumpering as you indicated should short those paths
[08:29:05] <Xeli> perhaps I did get the wiring wrong from the programmer to the atmega8.. *checks again.. * ;)
[08:37:57] <OndraSter> huh
[08:38:00] <OndraSter> why does Eagle keep doing this
[08:38:00] <OndraSter> http://clip2net.com/s/1viVw
[08:38:00] <OndraSter> ?
[08:38:02] <OndraSter> I mean
[08:38:07] <OndraSter> why it doesn't go ALL over the SMD pad
[08:38:12] <OndraSter> rather just one small 0.016 wire
[08:44:05] <OndraSter> I am re-doing the board so that there is one global GND and two separate voltages
[08:44:10] <OndraSter> 5V for logic, 3.3V for LEDs
[08:49:32] <amee2k> hmm i just had an idea for a voltage regulator for the LED rail there... something like an lm317 with a led in the ground connection so it always provides led drop plus so-much
[08:49:41] <amee2k> independently of the partcular led type
[08:50:55] <amee2k> OndraSter: hmm i think lots of layouting software handles pads internally as a point, not a polygon
[08:51:10] <OndraSter> well it works on different place
[08:51:26] <amee2k> so if you want it connected across the whole width you'd have to add a small ground plane instead of just a trace
[08:51:41] <OndraSter> amee2k, I prefer some 3.3V or so power supply + LED drivers :)
[09:12:39] <amee2k> OndraSter: is the driver linear?
[09:12:47] <OndraSter> you set the max current
[09:13:19] <OndraSter> via resistor
[09:13:22] <OndraSter> global for all ports
[09:13:29] <OndraSter> it is 8bit SIPO register
[09:13:37] <amee2k> well, yeah. but does the driver regulate like a linear reg, or switching?
[09:13:42] <OndraSter> linear
[09:13:54] <amee2k> hmm i see
[09:13:59] <OndraSter> I know
[09:14:01] <OndraSter> not the best idea
[09:14:05] <OndraSter> that's why I have two separate power supplies :)
[09:14:35] <amee2k> well, switching isn't really a practical solution if you want to independently control lots of leds
[09:15:48] <amee2k> a few weeks ago i did some experimenting with hybrid drivers that have a switching back-end to provide the bulk of the step-down
[09:15:58] <amee2k> and a linear front-end for clean output
[09:16:22] <amee2k> with the switcher set to hit just high enough for the linear current sink to run stable
[09:17:03] <amee2k> turns out linear drivers are unexpectedly efficient if you can match the input voltage to the LED drop
[09:17:19] <karlp> OndraSter: there's a setting for how to make poly connections,
[09:17:35] <karlp> you often don't want the fully connection in from the plane, it can make it very hard to solder
[09:17:43] <amee2k> i also drew up a design for a linear driver that switches in more LEDs for higher input voltage and it reached 80% plus efficiency from 9 to almost 15V input
[09:17:51] <OndraSter> oh karlp
[09:17:53] <OndraSter> where? :)
[09:18:09] <karlp> in your comment about the trace into the pad not being full thickness of the pad
[09:18:17] <karlp> or, where's the setting?
[09:18:24] <karlp> can't remember :) saw it somewhere :)
[09:18:32] <OndraSter> oh
[09:18:33] <OndraSter> thanks
[09:18:34] <OndraSter> will search
[09:18:35] <amee2k> probably backlog :P
[09:18:48] <amee2k> err lol
[09:18:57] <amee2k> i just read it wrong the same way you did >_>
[09:19:00] <OndraSter> oh
[09:19:03] <OndraSter> uncheck "thermal"
[09:19:04] <OndraSter> and woot
[09:19:10] <karlp> there you go :)
[09:19:35] <karlp> just remember what you've done though, automated assemblers will hate you...
[09:19:52] <amee2k> how so?
[09:19:53] <OndraSter> automated assemblers?
[09:19:59] <OndraSter> wish I had one!
[09:20:00] <OndraSter> lol
[09:20:04] <amee2k> i mean, a reflow oven doesn't really care
[09:20:16] <karlp> you sure? :)
[09:20:26] <amee2k> i mean, it heats the whole board anyway
[09:20:43] <amee2k> i can see how it could get nasty for manual soldering though
[09:20:48] <karlp> sure, but you've got a radiator dumping heat out as much as it can,
[09:21:10] <karlp> if you have a hot air oven sure
[09:21:15] <karlp> but a hotplate will be a different matter
[09:21:21] <karlp> depends how it's done
[09:21:24] <amee2k> i've changed caps on a mainboard once... double sided ground planes around the regulator and plated-thru holes
[09:21:26] <karlp> anyway, glad you got it worked out :)
[09:22:05] <amee2k> after 20 minutes i was about to throw the board out of the window lol
[09:22:36] <amee2k> anyway, gotta run now
[09:22:49] <OndraSter> bb
[09:24:08] <OndraSter> http://clip2net.com/s/1vjxD
[09:24:29] <OndraSter> tops about constant 5A current through those thick planes
[09:26:59] <karlp> how big is that?
[09:27:13] <karlp> is that grid a bunch of those matrix led things?
[09:27:38] <OndraSter> ye
[09:27:40] <OndraSter> it is still me lol
[09:27:52] <OndraSter> about 20cm wide and ... 20cm? high
[09:27:56] <karlp> fancy
[09:28:08] <OndraSter> the prices for PCB boards this size is not cheap though
[09:28:14] <karlp> no :)
[09:28:50] <karlp> I think people often try to get a pcb connected for a main board, and then make something easily assembled on single sided plate for the big sections.
[09:29:29] <OndraSter> I don't understand that :o)
[09:30:50] <karlp> oh, instead of making a giant double sided board,
[09:31:22] <karlp> you make a harness that's small, and connect to a big single sided slab that could possibly be made up with wiring rather than a full pcb
[09:31:29] <OndraSter> oh
[09:31:33] <karlp> doesn't always work out of course :)
[09:31:40] <karlp> but two pcbs can be cheaper than one
[09:31:45] <OndraSter> not here lol
[09:32:26] <OndraSter> but I am pissed on myself... I ordered from farnell week ago
[09:32:31] <OndraSter> and now I need ONE SINGLE part
[09:32:32] <OndraSter> small inductor
[09:32:35] <OndraSter> http://cz.farnell.com/bourns/srn8040-2r2/inductor-power-2-2uh-semi-shielded/dp/2061663
[09:32:36] <OndraSter> darn
[09:32:42] <OndraSter> http://uk.farnell.com/bourns/srn8040-2r2/inductor-power-2-2uh-semi-shielded/dp/2061663
[09:32:54] <OndraSter> and shipping is 5 times the price of this inductor lol
[09:33:09] <karlp> such is life :)
[09:33:17] <karlp> wait another week, you might find something else you need :)
[09:33:20] <OndraSter> yah
[10:18:46] <HKCMD> How is the year output from DS1307 ?
[11:11:10] <OndraSter> ZOMG
[11:11:15] <OndraSter> I somehow mis-deleted many lines
[11:11:22] <OndraSter> "undo" doesn't go that far
[11:11:26] <OndraSter> and older save has already this removed
[11:11:35] <OndraSter> oh well, at least I will route it better than that autorouter
[12:36:36] <OndraSter> http://clip2net.com/s/1vmbB
[12:36:38] <OndraSter> time for optimalizations
[12:37:02] <OndraSter> I did some radical changes
[12:37:07] <OndraSter> moved some parts to the other side of the board
[12:37:11] <OndraSter> like caps for buttons :P
[12:39:37] <OndraSter> http://www.youtube.com/watch?v=eAoC818Mxy4
[12:39:40] <OndraSter> I am gonna buy this
[12:39:44] <OndraSter> probably the 1.35" or smth
[12:39:45] <OndraSter> with 96x9
[12:39:46] <OndraSter> 96x96
[12:39:49] <OndraSter> 6uW...
[12:39:57] <OndraSter> power consumption (while not changing picture)
[12:41:55] <Steffanx> That tiny lcd is neat OndraSter
[12:42:06] <OndraSter> yeah
[12:42:09] <OndraSter> few uA!
[12:42:11] <OndraSter> @ 3V
[12:42:16] <OndraSter> I <3 it
[12:42:51] <Steffanx> The next one is ok too
[12:43:15] <OndraSter> what's cool, there is no electronic boar
[12:43:16] <OndraSter> d
[12:43:22] <OndraSter> all the transistors are directly on the glass :P
[12:46:41] <Steffanx> The black of that screen is pretty dark
[12:48:38] <OndraSter> I wish there were bigger AMOLED displays for reasonable prices with reasonable drivers...
[12:48:44] <OndraSter> and digitizers on it
[12:48:49] <OndraSter> or just OLED
[13:01:31] <pingec> I'm looking at this ATmega168A datasheet and cant figure out what capacitors I need for the 18.432 crystal to work well?
[13:01:45] <pingec> Does the capacitance matter?
[13:01:55] <Tom_itx> yes
[13:02:01] <Tom_itx> and it depends on the crystal itself
[13:02:05] <Tom_itx> check the data sheet for it
[13:02:15] <Tom_itx> generally around 18 to 22 pf
[13:03:46] <pingec> yes says 0.4-20MHZ -> 12 - 22 pF
[13:03:59] <pingec> I have 2 x 18pF and 2 x 8pF available
[13:05:51] <OndraSter> what about 1F cap
[13:05:53] <OndraSter> http://cz.farnell.com/avx/bz125a105zlb/capacitor-bestcap-1f-5-5v/dp/1302051
[13:05:54] <OndraSter> lol
[13:05:58] <OndraSter> http://uk.farnell.com/avx/bz125a105zlb/capacitor-bestcap-1f-5-5v/dp/1302051
[13:06:24] <OndraSter> 22pf Should be all'rite
[13:07:42] <pingec> What about 18pF
[13:07:43] <pingec> :/
[13:08:04] <OndraSter> could work too... I think you are gonna have to try it
[13:08:23] <OndraSter> there is capacitance of everything on the board, so it might be in reality a bit more than 18pF
[13:09:59] <pingec> How do I know if it's ok or not?
[13:10:22] <OndraSter> it will run :P
[13:11:30] <pingec> oh thats easy
[13:13:22] <OndraSter> you should probably grab some scope or smth to see if the clock is constant
[13:13:25] <OndraSter> and doesn't fall behind
[13:15:06] <Casper> pingec: atmel say 13-22pF
[13:16:22] <Tom_itx> Casper it would depend on the individual crystal specs
[13:16:42] <Tom_itx> for specified accuracy anyway
[13:17:23] <Casper> yeah
[13:17:41] <Tom_itx> which also should fall within the chip drive circuitry specs
[13:19:09] <pingec> Now I am looking at this "Start-up Times for the Full Swing Crystal Oscillator Clock Selection" table and trying to figure out how to program this CKSEL0 and SUT0...1 bits
[13:19:23] <pingec> Any advice? I have no clue
[13:20:00] <pingec> Does it even make a difference?
[13:20:06] <Tom_itx> sometimes
[13:20:33] <Tom_itx> i generally go for max startup time until i need less
[13:20:40] <Tom_itx> 64clocks
[13:20:41] <Tom_itx> iirc
[13:21:00] <Tom_itx> what chip is it?
[13:21:04] <pingec> atmega168a
[13:21:33] <pingec> so the slowly rising power option
[13:21:47] <pingec> When does this matter?
[13:21:59] <Tom_itx> http://www.engbedded.com/fusecalc/
[13:22:23] <Tom_itx> it just makes sure everything is settled and you have a stable clock
[13:22:45] <pingec> wow looks like a very smart calc
[13:22:54] <pingec> will study it now
[13:23:03] <asteve> engbedded…what the deuce?
[13:23:07] <Tom_itx> pick the bottom one on the crystal selection
[13:23:37] <Tom_itx> cksel 1111 and sut 11
[13:23:46] <pingec> ok
[13:25:15] <pingec> thanks for the link
[13:25:24] <Tom_itx> once you make your choices, it will give you the hex values to use at the bottom
[13:25:34] <Tom_itx> you may only need to change one
[13:25:43] <Tom_itx> LF or HF
[13:26:03] <Casper> pingec: a crystal oscillator is not an on/off device, the initial frequency at "power on" can be way off, it take some time to be precise
[13:26:09] <Casper> the strart up delay
[13:26:26] <Casper> the start up delay is delaying the avr execution for x time
[13:26:50] <Casper> which give time to the oscillator to become stable and in specs
[13:27:11] <pingec> Oh so thats how long the avr will do nothing?
[13:27:16] <pingec> On startup?
[13:27:28] <Tom_itx> yup
[13:27:40] <pingec> Ok I get it now
[13:28:00] <pingec> I have time...
[13:28:01] <pingec> lol
[13:28:27] <Casper> full swing oscillator... if not enabled the voltage is lower on the crystal, which make it consume less power, but can cause instability at high speed
[13:29:08] <Tom_itx> the other fuse that might get you is ckdiv 8. if you put a 16Mhz crystal on it and that is set, the timers will be fed 2Mhz
[13:29:08] <Casper> so for more than 8MHz it's good to have the full swing
[13:29:29] <Casper> yeah clock divide by 8.... a big gotcha....
[13:30:01] <pingec> Casper if what is not enabled?
[13:30:27] <Tom_itx> the full swing oscillator option on your clock settings
[13:30:35] <Tom_itx> cksel and sut
[13:30:59] <Tom_itx> he's suggesting CKSEL 0111 and SUT 11
[13:31:51] <pingec> Ah I see
[13:31:56] <Tom_itx> instead of what i gave you as CKSEL 1111 and SUT 11
[13:32:16] <pingec> full swing then
[13:33:03] <Tom_itx> either should work ok
[13:33:55] <Casper> I got issue with no full swing on some older parts
[13:34:53] <pingec> btw
[13:35:02] <pingec> what is the purpose of ckdiv8 ?
[13:35:13] <pingec> Why would I want to have a /8 clock?
[13:38:49] <sabesto> use less power
[13:41:15] <Casper> and allow to use an external clock source that is too fast
[13:45:44] <OndraSter> how high can be external clock if I'd make use of builtin divider?
[13:45:48] <OndraSter> how much can it handle on input :P
[13:48:03] <Casper> I'm not sure, but I think that as long as the main io clock stauy within limit it's ok
[14:42:30] <OndraSter> why is Eagle complaining in DRC about drill size?
[14:42:36] <OndraSter> I thought it is set automatically with the via I pick
[14:42:38] <OndraSter> appearantly not
[14:42:46] <OndraSter> and I hope there is global "set drill width"
[14:42:50] <OndraSter> because there is 550 vias
[14:42:52] <OndraSter> on the board
[15:02:51] <OndraSter> http://dl.dropbox.com/u/3936936/all_brd2.png
[15:02:52] <OndraSter> ugh
[15:02:56] <OndraSter> ton of hours spent
[15:02:59] <OndraSter> I should probably backup it
[15:04:54] <pc_magas> OMG WTF is this t\thing?
[15:05:06] <pc_magas> is seems as a huge circuit....
[15:05:11] <pc_magas> to me
[15:05:37] <asteve> pc_magas: don't look at a synthesis report of an fpga then
[15:05:55] <pc_magas> WOW
[15:06:15] <pc_magas> all VHDl stuff is this cicruit....
[15:06:45] <OndraSter> hehe there is no VHDL
[15:06:47] <OndraSter> I can assure you
[15:07:33] <pc_magas> VHDL is in your computer.....
[15:07:56] <OndraSter> u sure there is some fpga/cpld/we in my PC?
[15:08:07] <OndraSter> the only place I can think of would be SSD in my tablet
[15:08:09] <asteve> vhdl is in your mind, wreaking havoc on your neuroreceptors
[15:08:14] <pc_magas> But God Dammit in Univercity we did MAx PlusII and i do not know how to test a cirrvcuit whithout waveform editor
[15:08:33] <asteve> OndraSter: maybe in your graphics chips as well
[15:08:46] <asteve> they be all up in the circuits, changing things as things change
[15:08:51] <OndraSter> huh, I doubt that GPUs use VHDL
[15:09:19] <pc_magas> Like all Modern hardware development suites
[15:09:27] <asteve> gpu's themselves don't but the bridge and transmit layers might
[15:09:32] <asteve> some switches even used fpgas
[15:09:33] <OndraSter> hmm
[15:09:34] <OndraSter> PCIe link?
[15:09:40] <OndraSter> or is that built into the GPU core itself
[15:10:08] * RikusW wonders if AVR use verilog or vhdl...
[15:11:02] <RikusW> since asics can now be made from it..
[15:14:49] <mog> given how old they are neither
[15:15:05] <mog> you can recreate an avr with either though
[15:41:30] <OndraSter> OMG who says "let's put there 0.1uF filtering capacitor there"
[15:41:39] <OndraSter> everybody says "let's put there 100nF capacitor there"
[15:41:47] <OndraSter> I tried searching for 0.1uF on local shop
[15:41:55] <OndraSter> took me minute to realize that it is 100nF
[16:05:53] <Casper> OndraSter: :D
[16:06:11] <Casper> and need to be ceramic btw
[16:06:21] <OndraSter> what else, elyt?
[16:06:24] <OndraSter> hell no
[16:06:29] <OndraSter> elyts for filtering... errr
[16:06:42] <asteve> OndraSter: i say it all the time
[16:07:07] <asteve> i don't like dealing with 100+ unless we're talking above F
[16:10:24] <Casper> paper? :D
[17:25:43] * Landon must have impressed the folks at Maxim
[17:25:50] <Landon> got called in for an onsite interview :D
[18:10:51] <amee2k> hmm i wonder if there is a way to make traces on a piece of aluminium at home
[18:11:08] <amee2k> like the aluminium core PCBs
[18:11:27] <amee2k> to mount some power LEDs i don't need a whole lot of precision
[18:13:14] <amee2k> i've got a neat heatsink from a pentium 2 cartridge that would look pretty cool as a desk lamp
[18:28:54] <tomatto_> have someone done dc/dc converter controlled by avr?
[18:29:22] <Casper> amee2k: paint, then use conductive ink?
[18:29:40] <Casper> tomatto_: some tiny have a build in regulator
[18:30:50] <tomatto_> Casper: build in regulator? i didn't heard/read about it in datasheet. where can i find out informations about?
[18:32:02] <amee2k> Casper: hmm interresting idea, but not sure how that works out thermally
[18:33:03] <amee2k> tomatto_: an SMP controller basically is a PID style controller that takes an analog input signal and produces PWM output
[18:34:14] <amee2k> the problem is that most MCUs that would be anywhere near cost effective for that are too small to yield decent performance by modern standards
[18:34:31] <tomatto_> amee2k: i know, but i looking for some example or something done especially
[18:35:24] <amee2k> so you're usually better off using a purpose made SMP IC for the actual converter and finding a way to control it digitally
[18:36:52] <amee2k> i don't know any project websites about that. if you want to get into control theory, a digital thermostat is probably a more common example
[18:37:49] <tomatto_> amee2k: i know, but it's not too much cost and space effective solution. avr could handle it, right? do you know about something done with avr?
[18:38:25] <tomatto_> Casper: can you be more specific?
[18:38:59] <amee2k> is this for an educational project? or for solving a specific problem or task?
[18:39:18] <Casper> I do not remember which tiny it was
[18:39:23] <Casper> but it's one with a pll
[18:39:42] <amee2k> the one that runs at under a volt?
[18:40:00] <amee2k> because it can boost the input to 1.8V or something
[18:42:18] <tomatto_> educational for driving high power leds with constant current by avr
[18:42:27] <tomatto_> Casper: attiny25/45/85 ?
[18:42:46] <amee2k> in that case the built in reg won't cut it
[18:42:49] <Casper> I will not answer for a third time what I already answered
[18:43:57] <amee2k> i could see a LED driver working using the analog comparator and a pseudo-resonant design
[18:44:16] <tomatto_> Casper: sorry
[18:44:18] <amee2k> there are lots of LED driver ICs with PWM input pin though
[18:44:33] <tomatto_> too much cost
[18:45:41] <tomatto_> amee2k: tell me more about led driver which using analog comparator and a pseudo-resonant design please
[18:46:43] <amee2k> hmm check out the datasheet for the LM3404 on how it works... the theory is you set it up like a buck converter with all leds in series and a low-side shunt
[18:47:25] <amee2k> the controller keeps producing fixed-width pulses while the signal from the shunt is less than the reference, like a non-retriggerable multivibrator
[18:47:58] <tomatto_> which shunt?
[18:48:31] <amee2k> after power-on the duty cycle will stay high until current has reached the threshold, then it'll stop and wait until the current drops below the threshold and give it another pulse
[18:48:48] <amee2k> you're using the shunt value and reference voltage to set the desired LED current
[18:49:37] <amee2k> the datasheet for that IC has a lot of theory on that kind of regulation strategy
[18:53:52] <tomatto_> oh, external IC...
[18:54:55] <amee2k> i could see that mechanism implemented reasonably effectively in an MCU with a built in comparator
[18:56:20] <amee2k> but it'll take up a lot of resources to do in software and have timing critical code so you can't do much else
[18:57:57] <amee2k> if budget has priority over performance you could ghetto up a LED driver with an MC34063
[18:58:15] <amee2k> that IC is 50 cent (and 15 cent in bulk) iirc
[18:59:00] <amee2k> high reference voltage means relatively high shunt losses unless you're clever
[19:01:51] <amee2k> speaking of 34063, another strategy that could work is regulation by "cycle skipping". by enabling and disabling a timer that could be more efficient to implement in software than valley regulation
[19:02:00] <tomatto_> mc34063 is not good choise i think...but lm3404 cost 5$
[19:02:30] <amee2k> mc34063 is like 10-15 years old or something, but you won't get much better performance if you do it in software either
[19:02:53] <amee2k> fortunately for driving LEDs you don't need clean DC at all so you can get away with pretty much anything there
[19:03:59] <tomatto_> but i need constant current for these LEDs
[19:04:26] <amee2k> the predominant failure mechanism is thermal, so as long as you keep with the average rating, a LED can handle huge pulse currents. depending on the exact type easily 3x..5x the average rating
[19:05:37] <amee2k> and for anything higher than a few hundred herz, the human eye is a very good integrator. if the switching frequency is say >1kHz (which is very low as far as SMPs are concerned) noone is going to see it flicker
[19:05:49] <keenerd> Side note, high pulse current does not hold true for laser diodes. This was very dissapointing.
[19:05:59] <amee2k> hehe
[19:06:09] <eadthem> it all depends on how high
[19:07:39] <eadthem> for leds dont expect to get more than the rated wattage out of it in power by using high current pulses ie you cant exeed 1W if its a 1W led even if you do it all in 1.1000th of a second
[19:07:49] <amee2k> from memory and an appnote, something like 20-50% ripple is quite normal for LED drivers
[19:08:05] <eadthem> ya easaly
[19:08:14] <tomatto_> amee2k: when i have 10W led with 10V and 1A and i have 24V power supply, can i drive led by this idea?
[19:08:33] <eadthem> if you waste 14 watts as heat
[19:08:46] <eadthem> or use a SMPS to step it down
[19:09:34] <amee2k> sure. led drivers really look much like any other SMP. the basic topologies are pretty much the same (namely buck, boost and inverting buck-boost)
[19:09:53] <keenerd> You might even need a SMPS. Just 40% PWM.
[19:10:02] <keenerd> *not even
[19:10:11] <amee2k> well, if the input voltage is stable :)
[19:10:39] <amee2k> the only major differences are that firstly the feedback isn't implemented as a voltage divider across the output but a shunt resistor to sense the current
[19:11:50] <amee2k> and secondly that the voltage references are much lower, something like 200-500mV (compared 1.25V or 2.5V for many SMP ICs), to limit shunt losses (which are linear with the reference voltage provided current is constant)
[19:13:52] <amee2k> since you can get away with a huge amount of ripple and the load is pretty much constant, you don't need a full PID controller either
[19:14:31] <amee2k> if you skip all the output filtering that a "normal" psu would have, you can cleverly abuse the feedback signal
[19:14:38] <amee2k> like that LM3404 does
[19:16:43] <amee2k> http://ompldr.org/vYmxqNw/led-wallwart-2.pdf << funny mod i made with the circuit board from an old 12V wall wart. black parts is what was on the board, red is my additions
[19:18:19] <OndraSter> yo, my original plan was to use 5V power supply for LEDs
[19:18:27] <OndraSter> but that would have like 12W heat loss on ICs
[19:18:31] <OndraSter> 1W per chip or so
[19:18:34] <OndraSter> so I said hell no
[19:18:39] <OndraSter> and went for small SMPS :)
[19:18:39] <amee2k> hehe
[19:19:02] <amee2k> hmm what IC did you use for that?
[19:19:06] <OndraSter> TPS54527
[19:19:14] <OndraSter> doesn't require almost anything
[19:19:18] <OndraSter> upto 5A output :)
[19:19:23] <OndraSter> should be enough
[19:19:45] <amee2k> ooh, nice. SOIC packages
[19:19:48] * amee2k <3
[19:20:38] <Sgt_Lemming> later all, back on when I get to the church probably
[19:20:38] <OndraSter> yeah
[19:20:47] <OndraSter> amee2k, free samples
[19:20:52] <OndraSter> :)
[19:20:53] <OndraSter> 5 pieces
[19:21:01] <OndraSter> 36 hours from the sample order it took
[19:21:07] <OndraSter> to arrive it here
[19:21:24] <amee2k> every time i look at national's simple switcher line-up i think like mmh, pretty cool. gotta get some to play around with sometime
[19:21:26] <OndraSter> to the other side of the world :o)
[19:21:26] <OndraSter> <3 FedEx
[19:21:30] <amee2k> until i see their package selection >_<
[19:21:55] <OndraSter> hm?
[19:22:19] <amee2k> QFN, BGA, whatever
[19:22:40] <amee2k> least antisocial one they have is SOT i think
[19:23:15] <OndraSter> oh
[19:23:19] <amee2k> i only did QFN at home once. i ended up super-glueing the IC down upside-down, then soldering jumper wires from the pads to the board
[19:23:24] <OndraSter> lol
[19:23:29] <amee2k> then pot it all in a large drop of hot glue
[19:23:44] <amee2k> ghetto epoxy blob
[19:24:25] <amee2k> besides that noone wants it anymore, what is wrong with SOIC >_<
[19:24:46] * amee2k discretely points out that above question was purely academic
[19:26:10] <tomatto_> OndraSter: are you controlling this step-down converter by microprocessor?
[19:27:07] <amee2k> got my hands full this weekend... if i feel bored enough next week i might just try making an AVR LED driver next week >_>
[19:27:22] * amee2k has an unnatural fixation for led drivers lately
[19:28:44] <tomatto_> amee2k: fixation? why do you think?
[19:29:13] <amee2k> nothing :)
[19:29:23] <amee2k> well, nothing kinky anyway
[19:29:39] <OndraSter> no tomatto_
[19:29:46] <tomatto_> i am out
[19:30:33] <amee2k> i've been wanting to get some power LEDs to play around with since last winter or so... didn't get around to until december
[19:31:16] <amee2k> ever since i've been trying to abuse all kinds of stuff to run LEDs... 34063, that wall wart, LM340, various kinds of linear or hybrid designs
[19:31:53] <tomatto_> amee2k: do you remember some cheaper variant of lm3404?
[19:32:18] <amee2k> the 34063 worked fine for me. only the shunt got pretty hot
[19:32:53] <amee2k> buffering the shunt signal with a PNP emitter follower should help though. takes a diode drop off the shunt voltage
[19:33:39] <amee2k> maybe check out digikey or farnell's websites what they have in their LED driver section
[19:33:56] <OndraSter> I want that Sharp Memory LCD
[19:33:56] <OndraSter> but nothing on farnell :(
[19:33:59] <amee2k> (farnell has it under "power management", i don't remember for digi)
[19:34:13] <amee2k> thats how i found the 3404 one too
[19:34:25] <OndraSter> btw, has anyone here requested "custom" PIDs for FTDI FT232RL?
[19:35:27] <amee2k> from what i remember farnell had a huge range of 1A-ish drivers
[19:35:55] <amee2k> i went with the 3404 specifically because of its wide input voltage range
[19:37:00] <amee2k> back then i was still targeting something like 15-36V, which has shrunk to 18-28V and i'm considering changing it to 24V +/-10%
[19:37:09] <tomatto_> amee2k: do you have some scheme of your 34063 and controll for it?
[19:37:56] <amee2k> i didn't draw a schem back then, but if you give me a minute i can make a sketch off the top of my head
[19:38:16] <tomatto_> amee2k: ok
[19:38:18] <OndraSter> I bought some PCMCIA USB port hub
[19:38:30] <OndraSter> well, PCMCIA is 3.3V, USB has power lines at 5V
[19:38:33] <OndraSter> so there was small stepup
[19:38:48] <OndraSter> the problem was... once you connected something, it started squeaking and wasn't giving enough power
[19:38:59] <OndraSter> so I took one apart after manufacturer allowed
[19:39:03] <OndraSter> MC34063 inside
[19:39:14] <OndraSter> they chose probably wrong RC
[19:42:46] <amee2k> http://ompldr.org/vY2Qybw/led-driver.png << this is what it looked like... component values were like this... R2 0.22R, R1 150R, L1 220uH, C1 1470uF, C2 1.2nF, R3 (1.25V/If), LED are 500mA white xlamp series
[19:43:03] <amee2k> err, C1 470uF*
[19:43:35] <amee2k> i think i used a 3.3R wirewound for R3 that i had in my junk box
[19:44:12] <tomatto_> amee2k: so, no external control for this leds?
[19:44:45] <amee2k> it is pretty much the same circuit as the step-down example from the datasheet and it works the same too, only that i changed the feedback connection
[19:44:48] <amee2k> nope
[19:45:38] <amee2k> i just wanted to see how well it'd work. i also think it is a neat exmaple of how to trick a generic voltage regulator into becoming a current regulator :)
[19:46:14] <amee2k> oh, the diode was 1A shottky type
[19:47:00] <amee2k> it worked pretty well for supply voltages >20V or so
[19:47:28] <tomatto_> R3 is pretty hot, isn't it?
[19:47:54] <amee2k> err... i think i didn't have R1 as i drew it. connect DRC and SWC together so it is just a darlington power switch
[19:48:01] <amee2k> tomatto_: yeah, pretty much
[19:48:20] <amee2k> thats why i said for a production model you'd have to get clever about the shunt dissipation
[19:48:52] <tomatto_> did you tkink about some level shifter or how name it
[19:48:55] <tomatto_> ?
[19:49:18] <amee2k> amplifier?
[19:49:55] <amee2k> yeah, but that would kinda ruin the simplicity advantage of it imo
[19:50:32] <amee2k> http://ompldr.org/vY2QycQ/led-driver2.png << a pnp emitter follower like this would reduce the voltage across the shunt by a diode drop, i.e. almost cut it in half
[19:50:38] <amee2k> but i never tried that
[19:50:48] <tomatto_> you're right, but more power safe
[19:51:30] <amee2k> any generic small signal pnp type should work, and maybe 1k..10k for the pull-up
[19:51:54] <tomatto_> amee2k: pnp transistor?
[19:52:05] <amee2k> yeah
[19:52:57] <amee2k> you could probably do it with just a diode i suppose. the bias current from the pull-up is kinda neglegible compared to the main drive current
[19:54:47] <tomatto_> so that pnp keeping on rezistor 0.7V loss, right?
[20:03:57] <amee2k> yeah
[20:04:26] <amee2k> the Cinv input floats a BE drop higher than the shunt voltage
[20:04:46] <amee2k> getting late here though, i'm off to bed now
[20:05:10] <OndraSter> it is late here too lol
[20:08:39] <tomatto_> yeah