#avr | Logs for 2014-08-09

Back
[05:02:17] <Fleck> how do you compensate op-amps INPUT offset in code? As I understand - I need to know gain, but, how do I know gain if I don't have "super duper" accurate resistance metter?
[05:12:08] <Thrashbarg> Input offset, as in when both inputs are 0V the output is 0V?
[05:25:34] <Fleck> Thrashbarg: yes, for ideal opamp... :)
[05:25:48] <Thrashbarg> yea
[05:26:10] <Thrashbarg> what's the feedback network? Resistive?
[05:26:31] <Fleck> I have 10uV INPUT offset op-amp... and 0R005 shunt, feedback ir resistive. yes!
[05:27:31] <Fleck> and at idle I read 0.02A :/
[05:27:37] <Thrashbarg> ok...
[05:28:23] <Fleck> http://cds.linear.com/docs/en/datasheet/lt1152.pdf
[05:28:31] <Thrashbarg> well if you had a DAC or even just a potentiometer of some description, you could inject a voltage through a resistor into the summing node to set an offset bias
[05:28:47] <Thrashbarg> using a high value resistor
[05:28:48] <Fleck> i have 10bit DAC
[05:28:54] <Thrashbarg> good
[05:29:05] <Fleck> and maybe error is in DAC, no clue :)
[05:29:14] <Thrashbarg> heh
[05:29:17] <Fleck> cause DACs have input op-amps also afaik
[05:29:25] <Fleck> and errors...
[05:29:53] <Thrashbarg> if you use the DAC to adjust the offset so your reading is zero, all errors will cancel
[05:30:13] <Thrashbarg> that is, it reads zero when there's zero voltage across the shunt
[05:30:29] <Fleck> ok, how do I do that the right way?
[05:31:00] <Fleck> ohh, no I have 12-bit DAC
[05:31:01] <Fleck> http://ww1.microchip.com/downloads/en/DeviceDoc/21290D.pdf
[05:31:03] <Thrashbarg> ok
[05:31:24] <Thrashbarg> well what value feedback resistor is it?
[05:32:28] <Fleck> it's adjustable, so that I can adjust readings :D I can measure with my cheap multimeter
[05:34:29] <Thrashbarg> I see well that makes things a littl harder :)
[05:35:02] <Thrashbarg> if the gain is fixed, you can inject a known amount of current into the summing node to give an output offset
[05:35:25] <Thrashbarg> I think you can also inject current into a compensation pin
[05:43:15] <Thrashbarg> Fleck: "The self-nulling circuit constantly
[05:43:15] <Thrashbarg> corrects the input offset voltage, keeping it typically below
[05:43:15] <Thrashbarg> ±1µV over the entire input common-mode range."
[05:43:17] <Thrashbarg> gah
[05:43:19] <Thrashbarg> fine...
[05:45:25] <Fleck> sorry? In datasheet?
[05:45:30] <Thrashbarg> yep
[05:45:35] <Fleck> for OP-AMP or DAC?
[05:45:39] <Thrashbarg> the op-amp
[05:46:13] <Fleck> so OP-AMP is ok
[05:46:16] <Fleck> ?
[05:46:20] <Thrashbarg> yes I believe so
[05:46:22] <Fleck> problem is DAC?
[05:46:31] <Thrashbarg> DAC or ADC
[05:46:35] <Thrashbarg> ?
[05:46:46] <Fleck> yeah ADC
[05:47:16] <Fleck> so, how do I fix ADC? :D
[05:47:31] <Thrashbarg> I figure the shunt resistor goes from your load to ground, and the op-amp amplifies it to the ADC can read it?
[05:48:27] <Fleck> yes, LOW side current sensing
[05:48:32] <Thrashbarg> good
[05:49:21] <Thrashbarg> hmm also does the shunt go into the inverting or non-inverting side of the op-amp
[05:49:36] <Thrashbarg> *does the output of the shunt
[05:50:43] <Fleck> output - aka "loads GND" is inverting side, noninverting is circuits/psu GND
[05:51:30] <Thrashbarg> right so the signal gets inverted... btw do you have a schematic :P
[05:51:50] <Fleck> can I PM you?
[05:51:54] <Thrashbarg> sure
[05:52:01] * Thrashbarg studied analog electronics btw
[05:52:03] <kosc> Fleck: package manager?
[05:52:18] <Thrashbarg> private message
[05:52:22] <Fleck> lol
[05:52:25] <kosc> Oh, yea.
[05:52:34] <Fleck> kosc: you rock! :D
[05:52:51] <kosc> Fleck: I'm bad with English, sorry.
[05:53:09] <Fleck> yeah, same here! No problem! :p
[07:01:56] <hackvana> Jartza: Hi!
[07:04:24] <hackvana> N1njaneer: aandrew: Hi as well!
[07:04:34] <hackvana> aandrew: Thanks for the mention :-)
[07:08:46] <Roklobsta> hackvana: how's the china thing going?
[07:10:07] <hackvana> Roklobsta: I've lived in Melbourne for a year.
[07:10:15] <hackvana> But my PCB and stencil business is doing nicely.
[07:10:19] <Roklobsta> it's been a while since i asked
[07:10:26] <hackvana> :-)
[07:10:27] <Roklobsta> great
[07:32:04] <Lambda_Aurigae> morning all.
[07:32:15] <Lambda_Aurigae> hackvana, have you seen any competition from dirtcheap pcbs?
[07:32:27] <Lambda_Aurigae> or, dirty cheap pcbs...or whatever they are called.
[07:32:47] <Lambda_Aurigae> dirt cheap dirty boards.
[07:33:07] <hackvana> I don't fully understand the question.
[07:33:22] <Lambda_Aurigae> are you seeing any competition from them?
[07:33:28] <Lambda_Aurigae> they affecting your business any?
[07:33:33] <hackvana> Ian's boards are a bit cheaper than mine, but I offer a good deal more. There's room for both.
[07:33:58] <Lambda_Aurigae> aahh..ok.
[07:34:13] <hackvana> I've never had someone say "sorry guys I'm changing over to them"
[07:34:35] <hackvana> People like what they get for the little extra, so about 85% of my business is repeat business.
[07:35:05] <Lambda_Aurigae> that's good.
[07:36:01] <hackvana> I'm not unhappy.
[07:40:25] <twnqx> hm, i wanted to meat Ian next time i'm in shenzhen
[07:40:31] <twnqx> meet* :P
[07:41:23] <Lambda_Aurigae> I would love to make a trip to shenzhen but no way can I afford that.
[07:41:58] <twnqx> for me the company pays as we have a customer there
[07:43:35] <Lambda_Aurigae> I fix copiers for a living, so, even though Xerox probably has a presence there, no way my boss is paying for me to go fix a copier ther.e
[07:49:23] <kastein> hackvana: which board company do you run?
[08:04:56] <hackvana> kastein: "hackvana" :-)
[08:05:14] <hackvana> http://www.hackvana.com/guide
[08:06:08] <hackvana> Many people in here are also in the #hackvana channel
[08:07:35] <kastein> ahh
[08:07:48] <kastein> i am in too many channels already, thanks though lol
[08:10:42] <hackvana> No probs :-)
[08:12:04] * kastein eyes window number 90 and realizes irssi is probably not amused by his shenanigans
[08:25:32] <twnqx> the worst with irssi is running out of hotkeys :(
[08:31:12] <Lambda_Aurigae> hehe.
[08:31:15] <Lambda_Aurigae> xchat here.
[08:41:12] <Tom_itx> sorry guys i'm changing....
[08:49:39] <twnqx> i use irssi + hexchat + psybnc + sbnc for chatting :P
[08:49:46] <twnqx> (+pidgin + skype)
[09:27:51] <Jan-> hihi :)
[09:28:39] <Jan-> does anyone here have any experience building switching power supplies that can be controlled by an AVR, or even building one that's entirely implemented on an AVR?
[09:37:46] <rue_house> Jan-, funny you should ask
[09:38:04] <rue_house> Jan-, you dont wna tto completely do a power supply on an avr
[09:38:12] <rue_house> even an avr can lock up
[09:38:27] <rue_house> I"m building a bench supply thats avr controlled
[09:38:38] <Jan-> I don't really want to do it at all, I just need a way to dim a high power LED without using PWM
[09:38:47] <rue_house> looks like I'm gonna use a 3842 for the actual control
[09:39:31] <rue_house> Jan-, without pwm?
[09:39:41] <Jan-> yeah, needs to be safe on movie cameras, even at high frame rates
[09:40:06] <Jan-> also it's battery powered so I can't just smooth the PWM and drive a fet
[09:40:12] <Jan-> it'd dissipate more than the LED :/
[09:40:57] <rue_house> you can do pwm without strobing the led
[09:41:04] <Jan-> you can?
[09:41:23] <rue_house> proper buck supply
[09:41:24] <specing> Jan-: yes, say hello to 75V spikes :/
[09:41:25] <Jan-> plan B is to just use normal LED drivers from ebay, and retrofit them with a digipot. Primitive, I guess.
[09:41:37] <Jan-> 75 volt spikes?! how?!
[09:41:41] <rue_house> instead of voltage feedback, you do current feedback tho'
[09:41:48] <specing> Jan-: I have no idea
[09:41:50] <rue_house> LC filter
[09:42:10] <rue_house> a buck supply is just pwm into a lc filter
[09:42:26] <Jan-> we try to avoid anything with inductors involved
[09:42:34] <Jan-> it immediately gets tricky and difficult
[09:42:38] <rue_house> pff
[09:43:15] <rue_house> those normal led drivers from ebay will either strobe or be a whole smps anyhow
[09:43:28] <Jan-> fine as long as we don't have to design and buils it
[09:43:33] <rue_house> ah
[09:43:49] <Jan-> those chinese smps manufacturers have the special magic people who know about inductors
[09:44:47] <Jan-> unfortunately none of them seem to be digitally controllable
[09:46:02] <Jan-> weirdly, this appears to be very hard.
[09:54:31] <specing> Jan-: I was told the best way to go about it was to use a comparator feed to drive the PWM
[09:54:46] <specing> s/was told/think/
[09:55:13] <specing> I made a SMPS using an ADC to drive the PWM
[09:55:20] <specing> AVR ADC
[09:56:17] <Jan-> I really want to avoid having to try and, you know, *make* a switching power supply, they're so finicky
[09:56:27] <Jan-> if there's some way we could piggy-back digital control onto an existing one, I'd do that
[09:57:46] <twnqx> if you want it digitally controllable
[09:58:00] <rue_house> Jan-, how you generate the pwm isn't as important for you as how you filter it
[09:58:09] <twnqx> is there more than adding an opamp and an d/a to the feeeeedback pin?
[09:58:34] <rue_house> buck supplies really aren't that fussy
[09:58:37] <Jan-> the only way I could think of doing it was to put a digipot on it somehow
[09:58:41] <Jan-> to replace the manual pot
[09:58:49] <rue_house> you can throw an oversized inductor and cap at it and it'll be ok
[09:59:08] <Jan-> we're really not gonna get into building smps
[09:59:13] <rue_house> Jan-, when I looked at that route, I ran into two problems
[09:59:27] <rue_house> a) the digital pots can only take up to 5V on the pot
[09:59:37] <rue_house> b) damn, those things are expensive
[09:59:43] <Jan-> yeah.
[10:00:03] <Jan-> also we really wanted 10 bit control
[10:00:07] <Jan-> which is going to enhance (b)
[10:00:26] <rue_house> yea, I'm using 16 bit dac's
[10:00:29] <Jan-> *sighness*
[10:00:32] <Jan-> why is this so hard :(
[10:01:00] <rue_house> if its an led, you might be ok with avr pwm control
[10:01:10] <Jan-> It needs to be camera safe.
[10:01:14] <Jan-> Can't have the LED flickering
[10:01:17] <rue_house> yea
[10:01:34] <rue_house> put an oversized LC filter on it, I can draw it out for yo
[10:01:50] <Jan-> how would that control current
[10:02:04] <rue_house> you know the filters used for car stereos to get rid of alternator whine?
[10:02:22] <Jan-> you'd (we'd) have to implement feedback using the ADC and an external amplifier
[10:02:23] <rue_house> you have a current sense resistor that goes back to the adc
[10:02:30] <rue_house> no external amp
[10:02:31] <Jan-> which basically comes back to "build an SMPS" so no
[10:02:40] <rue_house> the adc at internal 2.5V ref is
[10:03:01] <rue_house> .0012V
[10:03:04] <rue_house> resolution
[10:03:14] <rue_house> whats the max current rating of the led?
[10:03:18] <rue_house> 3A?
[10:03:21] <twnqx> if you lay the chip to sleep in order to measure
[10:03:22] <Jan-> they'll be RGB ones, 3w each
[10:03:24] <Jan-> so like an amp
[10:03:31] <rue_house> only 1A?
[10:03:33] <rue_house> k
[10:03:47] <Jan-> well, something like that for the blue
[10:03:51] <Jan-> more for the red and green I guess
[10:03:56] <Jan-> since less volts
[10:04:07] <rue_house> so a .1R resistor gives you a resolution of
[10:04:37] <rue_house> damn I'm not awake
[10:05:07] <rue_house> whats .1V/A with a resoltion of .00122V?
[10:05:18] <rue_house> in amps
[10:05:26] <Jan-> wha?
[10:05:37] <rue_house> ok, I'm getting out of bed
[10:06:50] * Jan- hauls lazy_rue out of bed by the foot
[10:06:52] <rue_house> you get 82 steps from 0 to 1A with a .1R resistor
[10:06:59] <rue_house> (I think)
[10:07:00] <Jan-> that's not many
[10:07:05] <Jan-> we wanted 10 bit resolution :/
[10:07:38] <rue_mohr2> pretty sure you cant see those steps , but
[10:07:54] <rue_mohr2> Jan-, is this like the 'i need an iphone' video on youtube?
[10:08:13] <rue_mohr2> a .01R
[10:08:27] <rue_mohr2> wrong way idiot
[10:08:35] <rue_mohr2> I want 1.25V at 1A
[10:08:38] <Jan-> where the hell are we supposed to get an 0.01 ohm resistor
[10:08:39] <rue_mohr2> so, 1R
[10:08:49] <rue_mohr2> but that means 1W dissipation at 1A
[10:08:58] <rue_mohr2> Jan-, anywhere?
[10:09:07] <rue_mohr2> they are standard ya know
[10:09:10] <Jan-> if I was happy to dissipate a lot, I'd just smooth PWM out of the avr, and run a fet
[10:09:22] <rue_mohr2> ok 1W is ok?
[10:09:30] <Jan-> it's not *great*
[10:09:41] <rue_mohr2> why do you need 1024 light levels?
[10:09:45] <Jan-> but in any case, this is basically "build a buck converter" by some other name
[10:11:35] <Jan-> the need for high precision is linearity
[10:11:57] <rue_mohr2> http://www.youtube.com/watch?v=VGnYUtU_tWw
[10:12:02] <Jan-> there are lots of sources of non linearity in a system like this so we need extra precision to work that out mathematically
[10:12:21] <Jan-> if we can end up with 8 bit resolution after it all, that's fine, but then it needs to be at least a 10 bit system
[10:12:49] <rue_mohr2> then you need a 1.25 ohm resistor
[10:12:51] <rue_mohr2> er wait
[10:12:59] <rue_mohr2> whats the internal adc ref on an avr?
[10:13:04] <rue_mohr2> 2.5 or 1.25?
[10:13:09] <Jan-> I uhoh.
[10:13:19] <Jan-> the only time I ever used it we supplied external reference
[10:13:45] <rue_mohr2> tell ya what, pull up a attiny85 datasheet and take a look, I'm gonna go have a shower
[10:13:58] <Jan-> I'm not sure what difference it would make
[10:14:38] <rue_mohr2> you cant to keep the sense voltage low
[10:14:46] <rue_mohr2> but at 1A you need full scale on the ADC
[10:15:04] <rue_mohr2> so if you havea 1.25V ref on the adc you need a 1.25 ohm resistor (see ohms law)
[10:16:46] <RikusW> Hi Jan- RE: District 9, my name is pronounced nearly the same
[10:16:58] <Jan-> sorry, you lost me back at "funny you should ask"
[10:17:01] <RikusW> except in the movie its Wikus not Rikus
[10:17:07] <Jan-> oh hi rikus
[10:17:09] <Jan-> ...right.
[10:17:12] <Jan-> dutch pronunciation.
[10:17:27] <RikusW> Afrikaans ;)
[10:17:40] * twnqx just pronounces him german, mentally
[10:18:23] <Jan-> RikusW: Sharlto Copley is a brilliant actor.
[10:18:30] <RikusW> South Africans accent is quite distinct
[10:18:35] * Jan- waves little south african flag
[10:20:20] <RikusW> Another movie with some Afrikaans is Elysium
[10:20:44] <Jan-> that's when I realised what a great actor he is
[10:20:53] <Jan-> such a totally different role, and yet he owns it totally
[10:22:28] <RikusW> seems he plays in Elysium too
[10:23:18] <Jan-> exactly
[10:24:12] <Jan-> he's so great
[10:26:24] <Jan-> http://youtu.be/mdk3uMit5k0?t=2m51s
[10:26:28] <Jan-> sharlto interview!
[10:27:21] <Jan-> he does have a lovely speaking voice
[10:31:57] <Jan-> oh screw this power supply thing
[10:32:12] <Jan-> I need to go back to school and do electronic engineering for four years
[10:39:06] <rue_mohr2> er no
[10:39:29] <rue_mohr2> can you get an audio filter for a car stereo?
[10:39:36] <Jan-> I uhoh.
[10:40:11] <Jan-> but if I went back to school, I could go join Skull and Bones and Inductors, and learn all the secret runes.
[10:40:15] <rue_mohr2> Jan-, your gonna get the compitence test soon at this rate
[10:40:32] <rue_mohr2> do not research inductors
[10:40:53] <Jan-> I tried once
[10:40:55] <rue_mohr2> find a car audio filter
[10:41:00] <rue_mohr2> I made a good book
[10:41:05] <Jan-> any given inductor has about 400,000 data points associated with it
[10:41:06] <rue_mohr2> its mostly based on
[10:41:18] <Jan-> and weirdly enough, in smps, "inductance" is one of the least relevant.
[10:41:34] <rue_mohr2> http://info.ee.surrey.ac.uk/Workshop/advice/coils/
[10:41:47] <rue_mohr2> ^^ that is by far the most accurate, completel info I found
[10:42:31] * Jan- gets two thirds of the way through the first sentence?
[10:42:37] <Jan-> Wind my ow.
[10:42:38] <Jan-> Okay.
[10:43:30] <Jan-> how about a big fat nope?
[10:45:37] <rue_mohr2> whatever
[10:45:46] <rue_mohr2> I said to find a car stereo noise filter
[10:46:40] <Jan-> won't they be kinda bulky?
[10:46:40] <rue_mohr2> the curoff freq will be way under the 78Khz the pwm runs at
[10:46:54] <Jan-> the ones I can find are for 12 or 20 amp loads and are inches across
[10:47:10] <rue_mohr2> there are smaller ones
[10:47:16] <rue_mohr2> for sub 1000W amps
[10:48:34] <Jan-> how will this help?
[10:56:56] <rue_mohr2> I give up
[10:58:21] <rue_mohr2> |-> avr -> fet driver -> buck filter made with shottkey diode and car amp filter -> current feedback resistor -V
[10:58:33] <rue_mohr2> ^------------------------------------------------------------------------------------------------------------------
[10:58:46] <Jan-> yes I can list the requirements too rue :/
[10:59:13] <rue_mohr2> except I could go have it built in an hour
[10:59:41] <rue_mohr2> hah I fogot the fet!
[10:59:49] <rue_mohr2> at 1A you barely need it to
[11:00:30] <Jan-> we have some irf-iz24n fets
[11:00:35] <Jan-> they're pretty big
[11:00:49] <Jan-> (they were bought to build another smps... guess what... couldn't get it to work)
[11:00:52] <rue_mohr2> those are standard size
[11:01:05] <rue_mohr2> what couldn't you get to work?
[11:01:20] <Jan-> Who knows. It's a switching power supply, all the parts are dependent on all the others
[11:01:29] <Jan-> you switch it on, the chip dies, that's it.
[11:01:29] <rue_mohr2> like how didn't it work?
[11:01:34] <Jan-> the chip smoked
[11:01:38] <rue_mohr2> did it blow up? did it not output voltage?
[11:01:45] <rue_mohr2> what chip was it?
[11:01:49] <Jan-> Let me see
[11:01:53] <rue_mohr2> one of the 5 pin ones?
[11:02:00] <rue_mohr2> LM----
[11:02:22] <rue_mohr2> er, they have like 7 pins
[11:02:25] <Jan-> lm3421
[11:03:21] <rue_mohr2> oh its for leds
[11:03:24] <Jan-> it was based on a design put together by the national semiconductor auto design software, and those never work
[11:03:39] <rue_mohr2> your inductor saturated
[11:03:53] <rue_mohr2> I'm guessing
[11:03:55] <Jan-> it wanted like an 0.000000047 sense resistor or something stupid
[11:04:15] <Jan-> well that's sort of why smps are really hard
[11:04:19] <rue_mohr2> thats why your inductor saturated, you didn't get your current sense right
[11:04:23] <rue_mohr2> no
[11:04:33] <Jan-> if there's any sort of fault, all the semiconductors instantly die and you have no chance to fix it.
[11:04:41] <Jan-> you have to get it 100% perfect first time or you're just screwed.
[11:04:53] <Jan-> and those LM controllers aren't cheap.
[11:04:55] <rue_mohr2> well, there is the picasos brush factor, but they are easy
[11:05:23] <rue_mohr2> ANYTIME you put a smps togethro for the first time, put an undersized fuse on it and dont load it
[11:05:36] <Jan-> well duh.
[11:05:40] <rue_mohr2> the chip shouldnt have blown unless you applied the power backwards
[11:05:46] <Jan-> everyone says that
[11:05:57] <rue_mohr2> if the fet popped, thats cause the inductor saturated
[11:06:14] <Jan-> I don't know exactly how it was done but I know that the bench power supply current limit minimum is 200 ma
[11:06:19] <Jan-> which is obviously enough to fry a tiny IC
[11:06:33] <rue_mohr2> it would ba if reverse polarity
[11:06:41] <Jan-> I don't think Phil is that stupid.
[11:06:52] <rue_mohr2> even I'v made that mistake
[11:06:55] <Jan-> I assume it's because it was built on a bit of veroboard.
[11:07:02] <Jan-> Or because we didn't have the right inductors.
[11:07:11] <Jan-> Or the right capacitors.
[11:07:13] <rue_mohr2> PICs will take 12V for a while, but nothing will take reverse current at all
[11:07:15] <Jan-> You can never tell.
[11:07:26] <rue_mohr2> I'd be intrested t
[11:07:32] <rue_mohr2> did you know thats a boost supply?
[11:07:40] <Jan-> I have no idea what it is.
[11:07:42] <rue_mohr2> your using it on one led aren't you?
[11:07:47] <Jan-> that was for an array
[11:07:50] <Jan-> it was years ago
[11:08:05] <Jan-> since then we tried I think twice more to make switching power supplies with essentially the same results.
[11:08:16] <rue_mohr2> k, cause thats what its for, when your supply votlage is less than what you need for hte array
[11:08:20] <Jan-> one was just a simple 12 to 7.4v converter, even that didn't work.
[11:08:27] <rue_mohr2> well you should make one or two with me
[11:09:04] <Jan-> The thing you have to realise is that inductors and capacitors (and other things) have LOTS of measurable characteristics.
[11:09:23] <Jan-> most switching power supply designs are reliant on those things being EXACTLY right.
[11:09:33] <Jan-> And capacitors for instance have enormous tolerances.
[11:10:12] <rue_mohr2> yea and you dont have to know squat if you know soem general rules of thumb
[11:10:23] <Jan-> I know when we did the 7.4v down converter we tried to get every single part exactly as it had been on the application note.
[11:10:35] <Jan-> Same part numbers, same case style, the whole thing.
[11:10:40] <Jan-> Used their PCB foil layout.
[11:11:08] <Jan-> Still no joy. And why? Because the application note described a 12 volt to 5 volt converter. Not 12 to 7.4.
[11:11:21] <Jan-> switching power converters are STUPIDLY twitchy.
[11:11:27] <rue_mohr2> no they aren't
[11:11:41] <rue_mohr2> but I can see why you feel that way
[11:12:20] <Jan-> also I think the main inductor had a different colour varnish on it to the one in the datasheet. I do remember that. Now obviously that shouldn't make a difference, but obviously it was made in a different factory or at a different time, or whatever.
[11:12:52] <rue_mohr2> if you want, makea linear controller for the leds
[11:12:55] <Jan-> Something was different enough to screw it up. It only has to be that the copper wire was fractionally thinner within its tolerance, or the resistor factory was having an off day, or whatever.
[11:13:12] <rue_mohr2> 1A? 3W? so its 3V
[11:13:27] <Jan-> very roughly
[11:13:28] <Jan-> for the blue ones
[11:13:41] <rue_mohr2> ohms law...
[11:14:09] <Jan-> what about it
[11:14:14] <rue_mohr2> zippo:/files/programming/c/resistor# ohm -p 1 -i 1
[11:14:14] <rue_mohr2> Wattage is: 1.000000
[11:14:14] <rue_mohr2> Current is: 1.000000
[11:14:14] <rue_mohr2> Voltage is: 1.000000
[11:14:14] <rue_mohr2> Resistance is : 1.000000
[11:14:20] <rue_mohr2> er
[11:14:30] <rue_mohr2> zippo:/files/programming/c/resistor# ohm -p 3 -i 1
[11:14:30] <rue_mohr2> Wattage is: 3.000000
[11:14:30] <rue_mohr2> Current is: 1.000000
[11:14:30] <rue_mohr2> Voltage is: 3.000000
[11:14:30] <rue_mohr2> Resistance is : 3.000000
[11:14:55] <rue_mohr2> if you have a 3W led, and it peaks at 1A, then its gonna take up to 3V
[11:15:22] <Jan-> something like that
[11:15:29] <rue_mohr2> na, exactly that!
[11:15:56] <rue_mohr2> I have a 100W led, it takes 3.33333A, and the votlage is, you guess it! 33.33333!
[11:16:21] <Jan-> the other thing about switching power supplies is the whole frequency issue
[11:16:27] <Jan-> I think this may be where a lot of the problems come from
[11:16:44] <rue_mohr2> I bought an led flashlight yesterday, I thought it had a good led in it, turns out its just 1x 5mm led :(
[11:16:48] <Jan-> some online calculators don't change their numbers if you alter the operating frequency, whereas in reality the inductor and capacitor are going to have to change enormously.
[11:17:02] <rue_mohr2> you tried to be too precise
[11:17:06] <Jan-> and then you're also into PCB design
[11:17:13] <Jan-> which is basically just witchcraft above a few khz
[11:17:25] <rue_mohr2> you oversize the inductor and capacitor, you will never manage to hit resonance
[11:17:48] <rue_mohr2> esp if you use a moderatly high pwm freq, waaaaay over the 3db of the LC filter
[11:18:05] <Jan-> course that's the other point
[11:18:11] <rue_mohr2> you want the filter to be about 3 octives higher than the filter
[11:18:17] <Jan-> every time I talk to someone about this stuff, I find yet another measurable characteristic I didn't know about
[11:18:20] <rue_mohr2> er, pwm
[11:18:30] <Jan-> what's a 3db of the LC filter?
[11:18:35] <Jan-> octaves?! that's music!
[11:18:46] <rue_mohr2> you were calculating the frequency of an lc filter right?
[11:19:04] <Jan-> er, what, yesterday?
[11:19:08] <rue_mohr2> I thought you said that
[11:19:18] <Jan-> RC filters
[11:19:20] <Jan-> not LC
[11:19:23] <Jan-> try to avoid inductors
[11:19:25] <rue_mohr2> same difference
[11:19:37] <rue_mohr2> the freq you were calculting is the -3db freq
[11:20:02] <rue_mohr2> thats the freq that the filter will attenuate the signal to half at
[11:20:29] <rue_mohr2> if you have 1Vp-p at 60hz into a 60Hz filter, you will get 0.5V p-p out
[11:20:43] <Jan-> what's that got to do with power supplies
[11:21:06] <rue_mohr2> it starts to say where you went wrong if you were doing those calcs
[11:21:17] <rue_mohr2> hey ! I have to get ready for robotics class
[11:21:21] <rue_mohr2> shop is a mess
[11:21:51] <Jan-> oh well have fun
[11:23:04] <rue_mohr2> can i build a circuit with you?
[11:23:59] <Tom_itx> can you?
[11:24:02] <Tom_itx> you may...
[11:24:12] <rue_mohr2> I cnt if she wont
[11:24:26] <Tom_itx> build me one then
[11:24:38] <rue_mohr2> oiuaouaoaueoaueoeuueuioeauaouiaeoiaeuyaouoaueouaeoiaeuioaeuoaeiyouaoaouieoiuaeoiaeu <-- spare vowels
[11:25:02] <Tom_itx> a 90v dc motor control with reverse
[11:25:13] <Tom_itx> 10A
[11:29:40] <rue_shop2> but did you filter the pwm?
[11:34:35] <Tom_itx> with a coffee strainer
[11:35:55] <Jan-> hey tom
[11:36:08] <Jan-> I'm afraid we don't use the avr programmer you sold us much anymore :/
[11:36:12] <Jan-> it's easier to just use an arduino :(
[11:40:17] <rue_shop2> you will prolly use it one day when you need to do one of the other formats
[11:40:37] <Jan-> I wish someone would make a board with the USB connectivity like an arduino, but without the arduino libraries.
[11:41:18] <specing> Jan-: arduino libraries aren't set in stone
[11:41:28] <rue_shop2> yea its whatever you upload
[11:41:39] <Jan-> I'm never sure quite how much of it gets used
[11:41:46] <Jan-> it's not something I really have any control over
[11:42:21] <rue_shop2> I been buying arduino kockoffs for $2.50, its cheaper than I can get the raw avrs for
[11:43:17] <Jan-> that too
[11:44:31] <Jan-> I made one of them do software PWM at a lot higher rate than the arduino code could manage.
[11:44:37] <Jan-> digitalwrite is super slow
[11:45:15] <rue_shop2> yea the arduio uses software pwm
[11:45:31] <rue_shop2> which ties up all the timers
[11:46:00] <Jan-> also I needed 6 channels of 10 bit
[11:46:02] <Jan-> so well.
[11:46:03] <Jan-> eh :)
[11:46:52] <rue_shop2> iirc the 324 has 6
[11:47:22] <Lambda_Aurigae> just get an arduino board and use plain jane avr-gcc and compile your code and upload it...you can even use the arduino bootloader or put your own bootloader on it.
[11:47:48] <rue_shop2> hmm, dont have a pencil charpner
[11:47:51] <rue_shop2> oh
[11:47:54] * rue_shop2 looks at lathe
[11:47:57] <Lambda_Aurigae> hehe.
[11:48:02] <Lambda_Aurigae> I just use a pocketknife.
[11:48:21] <Lambda_Aurigae> or the stand belt sander.
[11:51:58] <rue_shop2> ooo thats what I should get
[11:52:47] <Lambda_Aurigae> what, pocketknife?
[11:53:41] <Jan-> I'm not quite sure how you're supposed to upload code to an arduino other than using the arduino software
[11:54:07] <Lambda_Aurigae> put a different bootloader on it.
[11:54:16] <Lambda_Aurigae> and I think there is a command line interface to the arduino bootloader.
[11:59:02] <rue_shop2> I got rid of the bootloader
[11:59:08] <Lambda_Aurigae> that works too.
[11:59:19] <rue_shop2> use toms programmer to reset the fuses and take over the whole flash
[11:59:43] <Lambda_Aurigae> I have one ardweeny board here. mostly I make my own boards and stuff.
[12:00:06] <rue_shop2> wow, in the process of building this robot, I spread 3 sets of tools all over the shop
[12:02:57] <rue_shop2> http://www.ebay.com/itm/121267662255
[12:03:07] <rue_shop2> those ones are nice cause they have the 6 pin isp header on them
[12:03:43] <Lambda_Aurigae> I like my atmega1284p chips.
[12:04:04] <Lambda_Aurigae> but nice price for what you get there.
[12:05:04] <rue_shop2> yea, its not perfect for everything, but its cheap for what you can use it for
[12:05:30] <rue_shop2> who was building the quadroped? they used a nifty trick for breaking it out to servos
[12:07:34] <Jan-> err
[12:07:37] <Jan-> what's a bootloader?
[12:07:43] <Jan-> I thought that was a linux thing
[12:07:49] <Lambda_Aurigae> nope
[12:07:58] <Lambda_Aurigae> bootloader is a program that resides high in the microcontroller memory
[12:08:16] <Lambda_Aurigae> allows the microcontroller to upload code to itself...often via usb, serial, i2c, or spi.
[12:08:25] <Lambda_Aurigae> most often serial really.
[12:08:35] <Jan-> hence the ftdi chip on an arduino?
[12:08:45] <Lambda_Aurigae> the ftdi just plays usb to serial adapter.
[12:08:54] <Lambda_Aurigae> the standard arduino bootloader is serial.
[12:09:55] <Jan-> that's what I meant
[12:10:33] <Lambda_Aurigae> I think there is a modded arduino bootloader for usb-avr chips.
[12:10:41] <Lambda_Aurigae> where the avr itself includes the usb hardware.
[12:10:45] <Jan-> I have some of those
[12:10:49] <Jan-> the atmega328u
[12:10:58] <Lambda_Aurigae> I've mostly avoided the whole ardweeny thing.
[12:11:12] <Lambda_Aurigae> but, i started with microcontrollers long before arduino hit the scene.
[12:11:13] <Jan-> it's just an easy way to get an AVR dev board
[12:11:19] <Jan-> also the serial output thing is useful
[12:11:27] <Jan-> you could I guess make that available on a raw AVR if you knew how, but I don't
[12:11:57] <Lambda_Aurigae> I've done many serial interfaced AVRs..mostly using a max232 or max233 interface chip.
[12:12:04] <Lambda_Aurigae> but, I still have computers with serial ports too.
[12:12:41] <Jan-> serial is a pain
[12:12:49] <Jan-> it's so hard these days to find something that's really legal rs232
[12:12:49] <Lambda_Aurigae> works fine for me.
[12:13:05] <Lambda_Aurigae> my motherboard I bought less than 6 months ago...has serial and parallel ports built in.
[12:13:20] <Jan-> we have one here, it's a supermicro mini-itx board for embedded use
[12:13:23] <Lambda_Aurigae> full 12V serial too.
[12:13:25] <Jan-> they often have rs232
[12:13:28] <Lambda_Aurigae> this is a gigabyte board.
[12:13:41] <Lambda_Aurigae> quad core amd.
[12:13:51] <Lambda_Aurigae> regular atx board.
[12:14:13] <Tom_itx> Lambda_Aurigae what was your first µC?
[12:14:26] <Lambda_Aurigae> pic18f4550
[12:14:42] <Tom_itx> i never did the bigger pics
[12:14:43] <Lambda_Aurigae> played with pic for about 3 months then I discovered AVR.
[12:14:52] <Jan-> I heard about pic
[12:15:01] <Jan-> came here, Tom_itx told me pic sucked and I should use AVR. Probably.
[12:15:07] <Tom_itx> had a stamp 2 and almost never used it
[12:15:09] <Lambda_Aurigae> now I play with pic, avr, 8052, msp430, and have started playing with some arm chips.
[12:15:12] <Jan-> then I bought an atmega168p, some capacitors and a crystal.
[12:15:13] <Tom_itx> went to 6811 for a while
[12:15:16] <Jan-> And that chip is still in use :D
[12:15:16] <Tom_itx> then 68332
[12:15:24] <Tom_itx> and pic at the same time
[12:15:30] <Tom_itx> then avr
[12:15:41] <Tom_itx> now not much of anything
[12:15:52] <Lambda_Aurigae> technically my first microcontroller was a 68hc11 I suppose...the one in my first gen lego mindstorms.
[12:16:06] <Tom_itx> yeah i had one of those too
[12:16:11] <Lambda_Aurigae> I had 4 of them..hehe
[12:16:23] <Jan-> I watched a video today about a guy who made an led dot matrix display about ten years ago
[12:16:28] <Jan-> with a z80
[12:16:31] <Lambda_Aurigae> got one early on then when they were coming out with the NXT arm based ones I got 3 more on sale.
[12:16:33] <Jan-> oh no, it was mid 90s, 20 years ago
[12:16:37] <Jan-> how do you even do that?!
[12:16:44] <Lambda_Aurigae> do what?
[12:16:49] <Lambda_Aurigae> build a computer from a z80?
[12:16:57] <Lambda_Aurigae> not difficult...it's really easy to interface.
[12:17:05] <Lambda_Aurigae> easier than the 6502 really.
[12:17:35] <Jan-> it had a z80, an eprom, some memory, and address decoding logic.
[12:17:47] <Jan-> and then some things connecting it all together... somehow...
[12:17:55] <Lambda_Aurigae> yeah.
[12:18:05] <Lambda_Aurigae> very simple bus setup on the z80.
[12:18:17] <Jan-> if it was simple, I'd understand it.
[12:18:32] <Lambda_Aurigae> you have to understand data and address busses.
[12:18:47] <Lambda_Aurigae> all that is handled inside the avr for you.
[12:19:28] <Lambda_Aurigae> the atmega8515 has a similar external memory bus.
[12:19:43] <Lambda_Aurigae> you can do memory mapped peripherals and external data memory and stuff.
[12:20:11] <Jan-> Now you're just making noises
[12:21:55] <Lambda_Aurigae> memory mapped peripherals...like, you can put some LEDs in there mapped to a memory location(hardware mapped) and access them like you would write to sram location.
[12:30:42] <Jartza> hmmh
[12:32:58] <Jan-> mmmh?
[12:40:20] <Jartza> checked the temperature of my laminator
[12:40:32] <Jartza> lowered it a bit and now it's even better
[12:41:04] <Jartza> it was around 190°-195°C and lowered it to 175-180°C
[12:42:36] <Jan-> laminator? like for plastic pouches?
[12:48:41] <Lambda_Aurigae> they work great for toner transfer PCB making.
[12:49:21] <Jan-> we tried that lots of times
[12:49:30] <Jan-> it's very dependent on the kind of paper and toner you have
[12:49:37] <Lambda_Aurigae> well, yeah.
[12:49:50] <Jan-> you pretty much have to own a laser printer, it's not as if you can go get it output at a coffee shop
[12:49:54] <Lambda_Aurigae> I use press-n-peel blue sheets
[12:50:06] <Lambda_Aurigae> and I own half a dozen laser printers.
[12:50:15] <Jan-> oh those yes
[12:50:15] <Lambda_Aurigae> people keep giving them to me.
[12:50:32] <Jan-> old ones can be hard to get refills
[12:50:33] <Jan-> we had that at work
[12:50:49] <Lambda_Aurigae> disposable printers!
[12:50:50] <Lambda_Aurigae> hehe
[12:50:59] <Lambda_Aurigae> just tossed one in the recycle bin at work yesterday in fact.
[12:51:38] <Jan-> WEEE!
[12:51:46] <Jan-> Sorry that won't mean anything unless you're from the UK
[12:51:48] <Lambda_Aurigae> I fix copiers and printers for a living.
[12:51:57] <Jan-> oh
[12:51:59] * Jan- sniffs
[12:52:03] <Jan-> thought you smelled of ozone :)
[12:52:37] <Jartza> Jan-: oh, I use pulsar toner transfer paper
[12:52:41] <Jartza> seems to work niely
[12:52:43] <Jartza> nicely
[12:53:03] <Lambda_Aurigae> old magazines work well too
[12:53:23] <Jan-> I am depress :(
[12:54:13] <Lambda_Aurigae> oh?
[12:54:20] <Lambda_Aurigae> I don't do depression...it's too depressing.
[12:54:20] <Jan-> I have 10 projects I want to do
[12:54:24] <Jan-> all of which are far too hard for me :(
[12:54:52] <Lambda_Aurigae> nothing is too hard..you just haven't figured out how to do it yet.
[12:54:52] <Jartza> and on top of that their toner reactive foil
[12:55:17] <Jartza> Jan-: nothing is too hard. sometimes slow, when it takes some learning. but not hard, once you learn ;)
[12:55:42] <Jartza> just start doing, make some mistakes, make more mistakes, burn few chips and learn. then make it once more and suddenly it works.
[12:56:00] <Jan-> on most of them we've done that and just figured out it isn't doable with our level of knowledge.
[12:56:08] <Lambda_Aurigae> then keep learning.
[12:56:18] <Jan-> I'm too stupid.
[12:56:26] <Jartza> Jan-: the knowledge increases all the time when doing, even if doing mistakes
[12:56:33] <Jartza> you shouldn't be afraid of making mistakes
[12:56:37] <Jan-> not with switching power supplies.
[12:56:45] <Jan-> with those, you turn it on, and it just instantly kills the controller IC
[12:56:49] <Jan-> so you can't ever really learn from those
[12:56:51] <Lambda_Aurigae> you are using windows 7...you can't be that stupid.
[12:57:28] <Lambda_Aurigae> switch mode power supplies are black magic...you have to sacrifice a rubber chicken on a full moon at summer solstice to really understand them.
[12:57:29] <Jartza> Jan-: why not? you already have learned, that the controller IC is killed instantly :) that's learning :)
[12:57:49] <Lambda_Aurigae> anyhoo, I have to go build a deck.
[12:58:18] <Lambda_Aurigae> which, I've never done before, but I have lots of wood, lots of screws, 4 saws, 3 screw guns, a level, and a square....
[12:58:31] <Jartza> I should be tiling the bathroom, but I have a bronchitis
[12:58:37] <Jartza> so I rather just draw some pcbs
[12:58:40] <Lambda_Aurigae> I have lazyitis.
[12:58:52] <Lambda_Aurigae> but, wifey is gonna hit me if I don't get going, so, laters.
[12:58:59] <Jartza> laters
[12:59:46] <Jan-> have fun
[14:02:47] <Jartza> wow. with new laminator temp I'm not gonna even waste the toner reactive foil
[14:03:02] <Jartza> looks good enough to etch right away
[17:38:00] <wondiws> when I set the JTD bit, JTAG should be enabled, right?
[17:38:13] <wondiws> but I can't detect it yet with the urjtag tool
[18:26:41] <rue_mohr2> hmm I need to think about the vacuum former
[18:27:02] <rue_mohr2> if I make it out of steel I can spot weld it
[18:27:10] <rue_mohr2> with my tig welder
[19:28:34] * Tom_itx ties OndraSter to a chair
[19:32:18] <OndraSter> why are you tying me!
[19:32:24] <OndraSter> when I am asleep
[23:22:22] <jadew> any ideas on how to program an atsam chip with out a standard programmer?
[23:32:03] <Lambda_Aurigae> make a non standard one?