#avr | Logs for 2012-02-23

Back
[04:24:29] <amee2k> http://omploader.org/vY3Yzcw/2012-02-23-111351.jpg << mildly out of focus, but does this thing (marked "PV" on the silkscreen) look like a MOV ?
[04:25:35] <amee2k> it only reads as 10 ohms with a DMM, and if that was supposed to be a 90V MOV that is defective it would explain the circuit malfuction
[04:25:42] <amee2k> well, to a degree anyway
[04:28:37] <theBear> usually they read somewhere in the 10-20ohm range as i recall, unless that was the ptcs next to them
[04:29:10] <amee2k> it has a PTC on it too
[04:29:32] <theBear> yeah, they usually come in pairs, one 'triggers' the other
[04:29:37] <theBear> as i recall
[04:29:41] <amee2k> but this one says "PV" on the silkscreen
[04:29:55] <theBear> yeah, they always try to confuse you in ways like that :)
[04:30:02] <theBear> oh picture...
[04:30:06] <amee2k> http://omploader.org/vY3Ywbw/fluo-ballast.png << this is the schematic... obscure "PV" part is on the lower right
[04:30:20] <theBear> looks a lot like a mov ...
[04:30:28] <amee2k> yeah
[04:31:01] <amee2k> it would make sense as a MOV too... when the tube strikes the voltage across it drops. the MOV stops conducting and cuts the filament heating current
[04:32:28] <theBear> hmmm... more like a reverse mov
[04:32:40] <theBear> oh, hmm.. yeah
[04:32:57] <amee2k> the issue with the device is that it is going through filaments like other people go through cigarettes
[04:32:59] <theBear> but the series ptc with the cap looks a lot like a 'cheap' timer
[04:33:04] <theBear> as in filiament timer
[04:33:14] <theBear> do they glow while the lamp is lit ?
[04:33:20] <theBear> probly hard to see on a compact
[04:34:25] <amee2k> mmh, how do i tell if the filaments are glowing while the lamp is running?
[04:34:43] <amee2k> the light from the main discharge would wash out the filament glow
[04:35:53] <amee2k> the distance between the PTC and the PV is maybe 10-12 millimeters or half an inch
[04:36:15] <amee2k> well, just under half anyway
[04:36:46] <amee2k> definitely doesn't look like thermal contact between the two was intended
[04:37:52] <amee2k> http://omploader.org/vY3Yzcw/2012-02-23-111351.jpg << actually, you can see the PTC on the pic... it is the dark grey thing right above the wire in the top left corner of the image
[04:38:02] <amee2k> right above and behind*
[04:50:36] <theBear> on a fullsize fluro it's obvious, big red glow.... not so sure on a compact
[04:51:00] <theBear> thhey are often placed near to each other so you can fine tune by moving them closer together
[04:51:11] <amee2k> i didn't notice anything, but the tubes blacken visibly around the ends after a short time (maybe few hundred hours)
[04:51:45] <theBear> mmm... i'm not a huge fluro expert, but it does sound like filiaments staying on so far
[04:51:52] <amee2k> i think that would be consistent with filament heating not turning off properly as well
[04:51:53] <theBear> i suppose you could measure across the mov
[04:52:32] <amee2k> the suspected MOV reads 10 ohms cold on a DMM. (ohmic, not diode-like drop)
[04:52:49] <theBear> yeah, i'm pretty sure that's 'normal'
[04:52:55] <amee2k> ???
[04:52:56] <theBear> not that it doesn't prove it's not dead
[04:53:11] <theBear> is that normal for ptcs then ? definately one of those 2 it's normal for
[04:53:36] <amee2k> the one marked PTC reads under 1 ohm
[04:54:02] <amee2k> if that is a MOV then it should read open because my DMM definitely doesn't have the test voltage to force it into breakdown
[04:54:02] <theBear> hmm...it hurts my head
[04:54:10] <theBear> filiaments can't possibly want that kinda voltgage
[04:54:33] <amee2k> the still-good filament reads ~130 ohms cold
[04:55:37] <amee2k> imo the whole filament thing is really all current controlled... the filaments are in parallel to the tube and that together has an inductor and a cap in series
[04:56:18] <amee2k> the first idea i had for a ghetto fix was putting 150R resistors across the filaments... this way it'd just keep running striking the tube cold or with only one filament
[04:56:36] <amee2k> and it would divert some current away from the filaments to keep them happy
[04:58:33] <amee2k> theBear: hmm well, either way i can't find any datasheet for this thing. i can't even tell who makes them yet
[04:58:46] <amee2k> having a datasheet would definitely clear up a lot i think
[04:59:33] <theBear> wouldn't hurt
[04:59:47] <amee2k> what won't hurt?
[05:00:01] <theBear> having a datasheet
[05:00:04] <amee2k> yeah :P
[05:00:10] <theBear> pfft :)
[05:00:27] <amee2k> my google fu is hitting dead ends again. where are the resident datasheet gurus here
[05:00:51] <amee2k> (probably asleep :/)
[05:01:36] <amee2k> the only thing that keeps coming up is a 250W metal halide lamp that goes by the same type number >_<
[05:01:45] <Steffann> D:
[05:02:04] <amee2k> http://homegardenoutdoors.com/product/34729_Philips-274845-MH250-U-250-watt-Metal-Halide-Light-Bulb-.html
[05:08:06] <theBear> yeah, it's a tricky one
[06:06:21] <norbi> would adxl345 resist at 5 volts VCC?
[06:13:47] <pingec> nise lamp
[06:13:50] <pingec> *nice
[06:15:30] <norbi> pingec?
[06:18:49] <amee2k> mine?
[06:19:00] <amee2k> or what lamp?
[06:33:50] <JanneP> hi
[06:34:06] <JanneP> anyone here using code::blocks for their AVR projects?
[06:34:31] <JanneP> having trouble setting up the auto-complete function
[06:44:03] <norbi> this spi init generates 50Mhz clock on atmega64
[06:44:06] <norbi> is that correct?
[06:44:07] <norbi> http://pastebin.com/AGPaj3LW
[06:44:14] <norbi> ah
[06:44:22] <norbi> 50Hz not Mhz
[06:56:01] <pingec> amee2k the MH lamp yes :)))
[06:59:53] <amee2k> oh :(
[06:59:58] <amee2k> only that
[07:01:32] <JanneP> nevermind that guestion regards c::b , just needed to add some folders to the c parser's folder list
[07:01:47] <JanneP> now programming happily with c::b =)
[07:03:56] <norbi> guys, im having some dificulties init spi, it looks like or the board has smth or i hardly miss something from datasheet
[07:04:03] <norbi> can you help?
[07:04:10] <jadew`> hey, how do you get rid of the ground noise from the crystal oscillator?
[07:04:42] <ziph> Bypassing and good layout?
[07:05:52] <jadew`> bypassing what?
[07:06:01] <JanneP> jadew` : goto http://www.hottconsultants.com/, read and understand what's said in there about grounding and then redesign =)
[07:06:09] <ziph> jadew` The oscillator module.
[07:06:23] <ziph> jadew`: They should by bypassed with a chip capacitor.
[07:06:23] <jadew`> ziph, wouldn't that prevent it from oscillating then?
[07:06:46] <jadew`> thanks JanneP
[07:06:49] <ziph> jadew`: Are you talking about an oscillator module or just a crystal?
[07:06:55] <jadew`> a crystal
[07:07:01] <ziph> Oh, right.
[07:07:53] <jadew`> there's a lot of noise in the ground because of it, like 50mV
[07:08:00] <ziph> How far from your uC is it?
[07:08:07] <jadew`> about 2mm
[07:08:22] <ziph> You can tell that because with everything sleeping in the chip other than the oscillator the noise is there?
[07:08:34] <JanneP> as a fix for your current board i think placing different values of bypassing capacitors near it will fix the problem
[07:08:42] <jadew`> ziph, yeah
[07:08:45] <JanneP> near the oscillator block
[07:09:10] <JanneP> like ziph suggested
[07:09:11] <ziph> Are your VCC's (mostly) separately bypassed?
[07:09:22] <jadew`> yes
[07:09:49] <jadew`> I'm using a 5v regulator with bypassing on the output
[07:10:08] <jadew`> when I tested it alone, the output was fairly clean
[07:11:11] <ziph> You mean when you run it with the internal oscillator?
[07:11:25] <jadew`> no, when I tested the vcc
[07:11:45] <jadew`> just did another test, shorted the crystal, so basically the MCU stopped working
[07:11:58] <jadew`> and the noise was gone, so it's not generated by the other components
[07:12:15] <jadew`> (I also have an opamp in there, which is where the noise gets problematic)
[07:13:02] <jadew`> ziph, you think the noise would still be there with the internal osc?
[07:13:23] <ziph> jadew`: Not sure, it would be a good test though.
[07:13:37] <jadew`> gonna give it a shot
[07:14:12] <ziph> If you can put the layout up you might get more suggestions.
[07:14:40] <jadew`> sure
[07:14:54] <jadew`> give me a moment, I don't have much time left for this tho, have to start work
[07:16:51] <jadew`> yep, the noise is still there
[07:20:47] <ziph> You don't happen to have a network analyser do you? ;)
[07:21:08] <jadew`> heh, no
[07:22:36] <ziph> Does the internal oscillator drive XTAL2?
[07:22:48] <jadew`> it looked like it
[07:23:03] <ziph> Oh, you might want to try it with the crystal removed then.
[07:23:16] <ziph> (Internal oscillator plus no crystal)
[07:23:22] <jadew`> I shorted out the crystal
[07:23:41] <ziph> At the pins?
[07:23:44] <jadew`> yeah
[07:23:49] <jadew`> but it didn't do any good
[07:23:54] <ziph> Yeap.
[07:27:50] <jadew`> this is the layout: http://imagebin.org/200379
[07:28:32] <jadew`> u1 = op amp, u2 = lm78l05, u3 = mega8
[07:28:56] <ziph> It's single layer?
[07:29:00] <jadew`> yeah
[07:30:18] <jadew`> c14, 17 = decoupling for avcc and vcc
[07:30:33] <jadew`> c15 = bypass for AREF
[07:30:58] <jadew`> 11, 12, 13 are there for debouncing the rotary encoders
[07:32:17] <ziph> What kind of caps are the bypass'?
[07:32:34] <jadew`> ceramic 1uF
[07:32:37] <jadew`> wait
[07:32:41] <jadew`> 100nF
[07:37:23] <ziph> The ground that C14 and C17 bypass into is fairly thin around the rotary encoder.
[07:37:40] <ziph> It didn't etch away there did it?
[07:37:55] <jadew`> hmm, well spotted
[07:37:58] <jadew`> let me check
[07:38:20] <ziph> And even if it didn't it's quite a thin long patch of ground.
[07:38:34] <jadew`> it didn't etch,
[07:38:44] <jadew`> and it looks quite wide in reality really
[07:38:52] <jadew`> it's as wide as the other traces around it
[07:39:12] <ziph> The AVR ground looks isolated.
[07:39:20] <ziph> Along with C15
[07:39:39] <jadew`> it's not, I have 2 wires on the other side
[07:39:54] <jadew`> the little blue thingies next to the crystal
[07:40:09] <ziph> Yeap.
[07:40:42] <jadew`> I suppose the ground trace going between the pins of the lcd header is quite slim tho
[07:40:53] <ziph> All of the HF components of any signals running in our out of the chip are running through those though.
[07:41:50] <jadew`> you think that's the problem?
[07:42:43] <ziph> Could be.
[07:46:56] <ziph> C14 and C17 would probably be more use bypassing to the pin 8 GND, which only has a thin path through the LCD header.
[07:47:19] <ziph> Can you go to two layers? If you took this board and made the bottom or top a solid ground it'd probably work well.
[07:48:14] <jadew`> I don't have 2 layer pcb's
[07:49:10] <ziph> Yeah, you'd have to use laen or some other service, since you'd need through hole plating too.
[07:49:48] <jadew`> so no way I could manufacture it myself
[07:50:36] <jadew`> you think that if I'd add more wires to connect the grounds, things would improve?
[07:50:55] <jadew`> I'd hate to redo the entire board
[07:51:27] <ziph> Yeah, that's why a two layer would be good, you'd just make the other layer a ground pour and leave this one as it. ;)
[07:51:34] <ziph> Yeah, you could try that.
[07:51:47] <jadew`> cool, thanks
[07:52:10] <jadew`> so a thing to watch for in the future is to make sure I have think grounds
[07:52:13] <ziph> C14 and C17 should have a good path to the pin 8 gnd, maybe tie the two AVR grounds together.
[07:52:24] <ziph> And run a ground from the AVR to the opamp.
[07:52:40] <jadew`> gonna give it a try, thanks a lot
[07:54:54] <ziph> The AVR generates a high frequency noise voltage between the VCC and ground pins. The bypass caps are meant to short that out.
[07:56:57] <ziph> If you have a huge trace (inductance) between the bypass cap and the GND though that goes open circuit at those frequencies.
[08:03:59] <jadew`> woot, adding a wire between pin 8 and the decoupling caps reduced the noise a lot
[08:04:31] <ziph> Sounds like it was ground bounce then.
[08:04:46] <jadew`> actually I think the only noise I have left is from the environment
[08:04:55] <jadew`> yep
[08:05:07] <jadew`> thanks so much
[08:05:12] <ziph> np :)
[08:09:03] <jadew`> ah, there's still a bit of noise when running it off of the crystal, but it's very low
[08:12:20] <jadew`> I get about 20mV of noise from the output of the opamp, I think that's acceptable
[08:12:46] <jadew`> cuz I get the same even when the circuit is not powered
[08:12:58] <jadew`> so it might be just environmental noise
[08:13:14] <ziph> How are you powering the board?
[08:13:32] <jadew`> from an adaptor
[08:13:45] <jadew`> outputs about 10v DC
[08:14:36] <jadew`> I didn't check how clean its output is, but it can't be too clean
[08:15:14] <ziph> Linear regulators are good at cleaning that up.
[08:15:35] <ziph> A linear regulator will reject the LF noise and a passive filter can get rid of the HF noise.
[08:16:01] <jadew`> yeah, but I'm not powering the opamp from a regulator tho
[08:16:10] <ziph> Yeah, I noticed that.
[08:16:12] <jadew`> I just have a few caps trying to do that
[08:17:46] <ziph> They may not help much if the impedance of the noise source is low (as it would be if it is ripple). But the opamp will have some amount of PSRR too.
[08:18:33] <ziph> What signals are you putting through the opamp?
[08:18:45] <jadew`> pwm
[08:19:14] <ziph> You're using it as a comparator?
[08:19:22] <jadew`> nope, amplification
[08:19:37] <ziph> Is it outputting PWM?
[08:20:12] <jadew`> no, it's theoretically outputting a constant voltage
[08:20:26] <jadew`> but I noticed the pwm signal is not perfectly linear
[08:20:32] <jadew`> altho it was when I tested it separately
[08:20:52] <ziph> Oh, the opamp is an active filter? Or it's just for voltage gain?
[08:21:13] <jadew`> voltage gain
[08:21:28] <jadew`> the whole thing is a power source
[08:22:07] <jadew`> 0-10v, 0-1A
[08:22:26] <ziph> Anyhow, the opamp will reject power supply variations very well (>100dB) up to low/mid audio frequencies.
[08:22:38] <jadew`> I see
[08:23:32] <ziph> I derived the PWM ripple formula in here for someone a while back (for PWM into an RC filter). I think he was doing what you're doing now too.
[08:24:57] <jadew`> I made the filter by trial and error on a breadboard
[08:25:08] <ziph> Is it just an RC filter?
[08:25:22] <jadew`> yeah, 2 in series for each pwm output
[08:29:37] <ziph> It's.. Tanh[c/(2 * C * R)]
[08:29:52] <ziph> I probably should've noted down what c meant.
[08:30:18] <jadew`> the speed of light?
[08:30:20] <jadew`> :)
[08:30:31] <ziph> :)
[08:30:58] <ziph> I think it's 1/(2 * f) where f is frequency
[08:32:07] <ziph> What PWM frequency are you using?
[08:32:39] <jadew`> about 11khz I think
[08:32:46] <jadew`> let me check
[08:34:40] <jadew`> it gets out at 15.6 khz
[08:34:43] <ziph> With 11kHz, 1uF and 1000 Ohm I get 22mV ripple.
[08:35:14] <ziph> 15.6 kHz gives 16mV ripple.
[08:35:31] <ziph> This is at 50% output which is worst case.
[08:36:11] <jadew`> I'm using 10k resistors
[08:36:40] <ziph> What capacitance?
[08:37:43] <jadew`> 1u
[08:38:10] <jadew`> and I get a 20mV oscillation after the second filter
[08:39:30] <jadew`> about 30 after the first one
[08:39:37] <jadew`> and 20 after the second one
[08:39:54] <ziph> Oh, this will be for 1V output.
[08:40:03] <ziph> What voltage input is it?
[08:40:07] <jadew`> 5v
[08:40:34] <ziph> I get 8mV with that.
[08:40:51] <jadew`> after the first filter?
[08:41:14] <ziph> With only the first filter.
[08:41:21] <jadew`> hmm
[08:41:29] <jadew`> maybe there's another ground problem :)
[08:41:34] <ziph> Having two RC filters like that isn't a common thing.
[08:41:56] <ziph> The noise should look like slightly exponential sawtooths.
[08:42:38] <norbi> guys, can you see what im writing?
[08:42:43] <jadew`> it looks more like a triangle wave
[08:42:51] <jadew`> a bit bent at the bottom
[08:43:06] <ziph> Is it hitting the rails?
[08:43:34] <jadew`> don't think so, it's only 20mV wide
[08:44:28] <ziph> The slope of the decreasing part of the ripple will only be the same as the increasing part at 2.5V output.
[08:44:35] <jadew`> well, 30-40 (after the first filter)
[08:44:45] <jadew`> after the second one is 20mV and looks like a sine wave
[08:45:46] <jadew`> can't believe you can actually follow this hehe
[08:46:04] <ziph> Both caps and resistors are the same?
[08:46:08] <jadew`> yep
[08:46:13] <jadew`> 10k & 1uF
[08:48:27] <jadew`> eh, I think I'll live with it for now and cuz the output noise is acceptable
[08:49:38] <jadew`> I'll fiddle with it when I have a better understanding of how noise works
[08:49:55] <jadew`> cuz I get noise no matter what on the output
[08:50:05] <jadew`> thanks a lot for your help
[08:50:28] <ziph> No problem, have fun with it.
[08:50:38] <jadew`> thanks
[08:57:11] <ziph> jadew`: The 3dB point of that filter is 0.048/(C R) by the way.
[08:57:51] <ziph> 10dB is 0.29/(C R)
[09:00:26] <ziph> Or 1/(1 + 6 C \[Pi] R f + 4 C^2 \[Pi]^2 R^2 f^2) if you want to plot it. ;)
[09:05:30] <rue_house> whats the pwm freq?
[09:05:38] <ziph> 15kHz
[09:05:56] <rue_house> and what do you want your peak output freq to be?
[09:06:24] <ziph> DC
[09:06:26] <rue_house> is it audio?
[09:06:27] <ziph> As high as DC.
[09:06:28] <rue_house> ah
[09:06:30] <ziph> Lower is fine. ;)
[09:06:35] <rue_house> k
[09:07:21] <rue_house> use a 470 ohm resistor, a 470uF cap to ground, a 1K resistor, and a 1uF cap to ground
[09:07:31] <rue_house> nothing will get thru that
[09:08:15] <ziph> Any reason for putting the poles of that in two different places?
[09:08:37] <rue_house> no
[09:08:39] <ziph> I also presume he wants to change the DC level with a reasonable settling time.
[09:08:46] <jadew`> wouldn't that make the conversion from pwm frequency to voltage a bit slow?
[09:08:49] <rue_house> unless the plate resistance of the 470 is really bad
[09:08:59] <rue_house> he said 0Hz
[09:09:25] <ziph> jadew`: The lower your frequency cutoff is the longer it will take to settle on a new DC output value.
[09:09:28] <rue_house> if it takes 4 mins for the output to change, its still way above 0Hz
[09:09:35] <jadew`> ziph, I know
[09:10:13] <jadew`> rue_house, yeah, that's too slow, I want the dc output change to be pretty fast
[09:10:23] <jadew`> >20hz
[09:10:43] <jadew`> the faster the better
[09:10:49] * rue_house crumples up the engineering papers, "MAYBE IF YOU WOULD GIVE ME SOME PROPER SPECS I COULD DESIGN IT!"
[09:11:04] <rue_house> <ziph> As high as DC.
[09:11:08] <rue_house> jadew`> >20hz
[09:11:17] <rue_house> MAKE UP YOUR DAMNED MIND!
[09:11:23] <ziph> O
[09:11:28] <rue_house> <jadew`> the faster the better
[09:11:32] <ziph> I'm not the one doing it, why were you listening tome? :)
[09:11:33] <rue_house> !???!?!?!?!?!#$^%@$@$%^
[09:11:44] <rue_house> :)
[09:11:51] <jadew`> heh, it's a power source, when I turn the knob I want the voltage to change :)
[09:12:10] <rue_house> whats the peak output voltage
[09:12:15] <jadew`> 5v
[09:12:20] <rue_house> 5!?
[09:12:24] <rue_house> just 5V!?
[09:12:31] <jadew`> it goes into an opamp
[09:12:37] <jadew`> gets doubled
[09:12:40] <rue_house> 0 to 5V!?
[09:12:51] <jadew`> the pwm goes from 0 to 5 tho
[09:13:01] <rue_house> thats really not much of a power supply
[09:13:19] <rue_house> is the output 1A?
[09:13:22] <jadew`> 0 to 1
[09:13:33] <jadew`> controlled by a similar pwm
[09:13:36] <rue_house> so its a 1A 0-5V power supply?
[09:13:49] <jadew`> 0-1A 0-10v
[09:13:51] <rue_house> I suppose its good for practise...
[09:13:56] <rue_house> aaaah 10V ok
[09:13:59] <rue_house> thats better
[09:14:22] <jadew`> yeah, should be enough for my needs
[09:14:25] <rue_house> ok, how long will you accept it to take to get from 0 to 10V
[09:14:26] <jadew`> I don't power motors and stuff
[09:14:36] <jadew`> long
[09:14:37] <rue_house> maybe .25 seconds?
[09:14:50] <jadew`> what I want to take less is the incrementations
[09:14:56] <jadew`> which are in 10mV steps
[09:15:19] <jadew`> so when I turn the knob I want the voltage to change from 2.11 to 2.12 pretty fast
[09:15:23] <rue_house> no no, 0 to 10V crank the knob, how long
[09:15:48] <rue_house> 250ms?
[09:15:50] <jadew`> that should be fine
[09:15:53] <rue_house> ok
[09:16:15] <rue_house> so, the pwm filter needs to do 5V/250ms
[09:16:23] <rue_house> which is 10V/500ms
[09:16:27] <rue_house> which is 20V/s
[09:16:35] <rue_house> thats your slope
[09:16:57] <rue_house> lets say we pull 5mA from the avr
[09:17:24] <rue_house> its not constant current, but we can pretend
[09:17:54] <rue_house> 20V/5mA = 4k?
[09:18:11] <rue_house> 5k
[09:18:17] <rue_house> I was close :)
[09:18:26] <rue_house> oops
[09:18:38] <jadew`> no, it's 4k
[09:18:38] <ziph> jadew`: Your current filter takes 0.064 seconds to do 90% of a step function.
[09:18:39] <rue_house> 5ma is .005 not .004
[09:19:35] <rue_house> ziph, I'm kinda trying to make this up cause I cant remember how to work out RC slope
[09:20:03] <rue_house> but its 5V I went the wrong way
[09:20:14] <ziph> He isn't using a simple RC filter, he's got something with two poles like you mentioned.
[09:20:16] <rue_house> so use a 1k resistor
[09:20:50] <rue_house> now, at 5mA, what capacitor takes 250ms to charge to 20V
[09:21:00] <rue_house> I = Q/t
[09:21:02] <rue_house> or *t
[09:21:05] <rue_house> ...
[09:21:14] <rue_house> q/t
[09:21:17] <rue_house> so
[09:21:26] <rue_house> q = I*t
[09:21:35] <ziph> Don't you want I = dv/dt?
[09:21:36] * rue_house squints
[09:21:47] * specing is currently designing a SMPS and failing!
[09:21:48] <rue_house> trying to calc C
[09:22:05] <rue_house> specing, are you also known as robotgrrl?
[09:22:13] <specing> Nope
[09:22:27] <ziph> rue_house: V = Integral C I(t) dt
[09:22:34] <rue_house> anyhow, q = It where I = 5ma and t = 250ms
[09:23:01] <rue_house> hmm
[09:23:09] <ziph> rue_house: Which gives V = C I t for constant I
[09:23:16] <rue_house> yay
[09:23:22] <rue_house> isolate for C
[09:23:29] <rue_house> C = V/(It)
[09:23:46] <rue_house> V = 20 I = 5ma t = 250ms
[09:23:49] <rue_house> whats C
[09:23:54] <ziph> Capacitance
[09:24:00] <ziph> Oh
[09:24:01] <rue_house> no I mean value!
[09:24:01] <ziph> Hah
[09:24:05] <rue_house> duh...
[09:24:08] <ziph> Sorry. :)
[09:24:13] * rue_house shakes head
[09:24:23] <CapnKernel> Sgt_Lemming: You around?
[09:24:31] <rue_house> I have a math library partly assembled for tobbor
[09:24:35] <CapnKernel> (I mean, unlikely as it is, since it's 2am+ where you are)
[09:25:05] <rue_house> bingo
[09:25:13] <rue_house> you need a 16000F capacitor
[09:25:28] <rue_house> ... kinda sounds high....
[09:26:01] <jadew`> heh
[09:26:06] <CapnKernel> Sounds kinda dangerous
[09:26:28] <rue_house> I'm gonna say
[09:26:46] <rue_house> 6.25e-5
[09:27:11] <rue_house> 0000000000000000000000000000006.25...
[09:27:22] <rue_house> 0.0000625
[09:27:25] <rue_house> F
[09:27:33] <rue_house> .0625mF
[09:27:41] <rue_house> 62.5uF
[09:27:59] <ziph> You don't have e-6==uF memorised?
[09:28:21] <rue_house> ok, so, 1k resistor and a 64uF cap
[09:28:39] <rue_house> ziph, I'm not in school ya know, I do this stuff every day
[09:28:43] <rue_house> ok every week
[09:28:53] <rue_house> ok maybe every month or so
[09:28:58] <jadew`> afk 10
[09:29:01] <ziph> :)
[09:29:04] <rue_house> ok ok, maybe a few times a year
[09:29:16] <specing> meybe never
[09:29:28] <rue_house> whats 1k and 64uF get you?
[09:29:41] <CapnKernel> If Sgt_Lemming was here, I could tell him his boards have arrived from the fab house, and they look gorgeous.
[09:29:58] <rue_house> the calculation is wrong cause when the cap is at 2.5V 5V wont charge it at 5mA
[09:30:08] <rue_house> but give it a shot
[09:30:14] <specing> CapnKernel: he is here
[09:31:14] <rue_house> oops I'm late for work, I'll look for the answer this evening
[09:31:32] <CapnKernel> specing: Must be some meaning of "here" I hadn't previously encountered :-)
[09:31:59] <specing> CapnKernel: Well he is in /names....
[09:32:25] * rue_house tosses out a wigi board
[09:32:36] <CapnKernel> His IRC client is registered, but it doesn't mean he's around.
[09:32:50] * CapnKernel has the feeling he's being trolled.
[09:34:07] <ziph> rue_house: You could just use V(t) = 1-e^(-t/RC)
[09:34:13] <rue_house> msg Sgt_Lemming if you can hear us Sgt_Lemming #avr calls you
[09:34:32] <rue_house> ziph, work out C for 20V/sec
[09:34:54] <ziph> What current?
[09:34:54] <rue_house> R too
[09:35:08] <rue_house> dont pull more than 10mA from the avr
[09:35:45] <ziph> Well, the derivative at t = 0 is 1/Tau
[09:35:50] <ziph> e.g. 1/R C
[09:36:41] <ziph> So you could just solve 1/Tau == 20
[09:36:53] <specing> How do I switch mosfets faster with my AVR?
[09:37:17] <ziph> Get a mosfet driver.
[09:37:24] <specing> As was established yesterday, my MOSFET is overheating due to switching duration
[09:37:41] <Kevin`> specing: um, it looked more like it was overheating because you weren't able to turn it on with only 5v
[09:38:14] <specing> Kevin`: 5V is all I've got in my design
[09:38:45] <ziph> specing: There's loads of nice MOSFET drivers around.
[09:38:51] <specing> Such as?
[09:38:54] <Kevin`> specing: grab a mosfet from an old motherboard or something that's designed for low voltage
[09:39:31] <specing> Hmm
[09:39:31] <rue_house> http://eds.dyndns.org/~ircjunk/circuits/fetdrive.gif
[09:40:21] <specing> rue_house: Don't have 12 V
[09:40:27] <ziph> specing: It depends on what you're doing, just do a few searches. Most of them have things like external sense and current limiting.
[09:41:16] <Kevin`> specing: you could also use a charge pump to generate a negative voltage, but that seems kind of silly
[09:41:33] <rue_house> http://eds.dyndns.org/~ircjunk/circuits/chargepump.png
[09:47:18] <Guest7223> i cant figure out how my spi works, it acts interesting
[09:50:39] <learningc> what type of protocol is the most appropriate to use to communicate between 2 microcontrollers?
[09:51:03] <Guest7223> learningc: spi?
[09:51:51] <specing> learningc: that depends on what both support, how fast you want them to communicate, how many lines you have available between them, etc...
[09:52:25] <learningc> specing: let's say I need it fast..
[09:52:56] <learningc> what do people use the most?
[09:54:30] <Kevin`> learningc: why don't you look at all the hardware interfaces your microcontrollers have and decide?
[09:54:38] <Kevin`> spi is probably a good choice though
[09:54:51] <Kevin`> unless you have something with a hardware buffer
[09:55:28] <wollw> Atmel's SPI application note starts out with MCU <-> MCU communication as an example
[09:55:42] <wollw> http://www.atmel.com/Images/doc2585.pdf
[09:56:32] <learningc> Kevin`: I think I'll try spi first since it uses few lines
[09:57:02] <learningc> what about i2c?
[09:57:17] <learningc> even less lines
[09:58:25] <Kevin`> learningc: i2c is slower, your requirement was "fast". i2c is also rather complicated, although you can make it tolerate variable load on the slave side where spi requires strict timing
[10:01:15] <learningc> ok thanks
[10:01:41] <learningc> what's the use of ferrite bead in smps?
[10:02:06] <Kevin`> it's an inductor, blocks out high frequencies
[10:03:27] <learningc> where should I put it? (I'm trying to design my own dc/dc smps)
[10:04:32] <keenerd> One wire is even less lines and even slower still :-)
[10:14:45] <OndraSter> SPI is the way to go... can go as high as 4Mbit with 16MHz CPU
[10:14:52] <OndraSter> the thing is, there is not enough CPU clock to decode it :P
[10:15:06] <OndraSter> (8Mbit too, but not as receiver, only as master... ergo 4Mbit only)
[10:15:15] <OndraSter> no wait
[10:15:17] <OndraSter> I lied.
[10:15:20] <OndraSter> nvm
[10:15:23] <OndraSter> ignore me
[10:15:24] <OndraSter> I am off again
[10:15:25] <OndraSter> bb
[10:18:06] <learningc> how fast can I run SPI? 100MHz?
[10:18:33] <theBear> sure, why not
[10:18:44] <theBear> probly won't work great with an avr tho
[10:19:04] <Steffanx> Clock / 2 is the max iirc
[10:35:05] <Kevin`> clock/4 max on the slave
[10:44:01] <learningc> why would putting a series resistor in the line help against ESD?
[10:44:51] <abcminiuser> MannImMond, around?
[10:47:49] <keenerd> learningc: Where did you read that?
[10:48:39] <keenerd> Diodes help with ESD...
[10:55:24] <learningc> keenerd: well in apps notes they suggest to put a series resistor for ESD
[10:55:54] <learningc> like for input lines of the microcontroller
[10:56:09] <learningc> but I'm not sure how it works
[10:57:13] <keenerd> I've seen the suggestion for series resistors so you can still do ISP.
[11:05:10] <ziph> learningc: Ferrite beads are designed to act as frequency specific resistors.
[11:05:20] <ziph> learningc: They'll dissipate rather than store energy.
[11:07:19] <learningc> ah ok
[11:07:40] <ziph> learningc: And putting a series resistor before a diode or capacitor in ESD protected inputs is so that the resistor acts as the lower half of a voltage divider with the ESD source resistance.
[11:07:42] <learningc> so do I put them at the input of the smps or at the output?
[11:07:51] <ziph> learningc: Both sometimes.
[11:08:12] <learningc> ziph: it's a boost converter
[11:08:27] <learningc> so input and output are connected I guess
[11:08:35] <ziph> They're to stop switching noise get through, so it isn't usually topology specific.
[11:08:58] <ziph> getting through.
[11:09:38] <learningc> ziph: but isn't wire inductors used for the output instead?
[11:09:49] <ziph> WIth the ESD thing, you still need a short to ground--either a diode that starts conducting at voltages above the expected voltage or a cap that shorts the HF part of the ESD pulse.
[11:10:05] <ziph> learningc: Yeah, LC filters are used for the output too.
[11:10:39] <ziph> learningc: It depends on your ripple and switching noise requirements.
[11:10:40] <learningc> ziph: so your recemmendation, ferrite bead or inductor at the output?
[11:10:51] <learningc> recommendation*
[11:11:14] <learningc> swtiching frequency will be 1MHz
[11:11:25] <learningc> dc/dc converter will be used
[11:11:32] <ziph> The ferrite bead will just kill HF switching noise, the LC filter will reduce output ripple.
[11:11:51] <ziph> So it depends on how much output ripple your DC/DC generates in the first place and how much ripple you can tolerate.
[11:11:56] <learningc> ah, so ferrite beads are for higher frequencies?
[11:12:02] <ziph> Yes.
[11:12:15] <ziph> They resistances they're quoted for are usually 20-200MHz.
[11:12:49] <learningc> the output will be supplying a microcontroller...
[11:13:03] <ziph> If you're putting power through ferrite beads you also need to make sure you don't put them anywhere near saturation, otherwise they fail to filter to spec.
[11:13:48] <ziph> learningc: Doing purely digital things?
[11:13:49] <learningc> saturation as the in frequency limit?
[11:14:02] <ziph> Saturation is in the flux limit due to the DC current.
[11:14:03] <learningc> ziph: yes, digital
[11:14:45] <ziph> If you're running just under saturation with your DC current any AC on top of it will fail to magnetise the ferrite and it'll just see a short.
[11:15:23] <learningc> ah I see
[11:15:30] <ziph> learningc: Then find out how much power supply ripple the uC can deal with and just make sure you're under that.
[11:16:10] <learningc> ziph: is that indicated in the datasheet of the microcontroller?
[11:16:22] <ziph> Yeap.
[11:16:35] <learningc> ok, I'll check that out. Thanks
[11:17:15] <ziph> Linear regulators are a good way to kill ripple, but not so much at 1MHz switching.
[11:17:34] <ziph> They work really well with 100kHz SMPS's though.
[11:21:14] <learningc> I see, thanks
[11:22:11] <learningc> any recommendation/tips on 1MHz smps design to attenuate EMI/noise into the circuit?
[11:23:11] <ziph> If you need it really slow, slew limiting the switching.
[11:23:25] <ziph> But then you kill the efficiency.
[11:24:19] <ziph> I did one recently that has no spurs above the noise floor of my Spec An above 1MHz, but it's only 80% efficient.
[11:24:47] <ziph> A pi filter on the output will help a lot.
[11:25:18] <ziph> And a fairly large inductor on the input.
[11:27:07] <ziph> If you need low noise you're better to start with a SMPS controller designed for it.
[11:28:14] <ziph> abcminiuser: Hey there.
[11:28:31] <pc_magas> hello abcminiuser
[11:46:40] <Fleck> http://www.ebay.com/itm/USB-2-0-to-9-pin-RS232-COM-Port-Serial-Adapter-Cable-/300660833603?pt=AU_Components&hash=item4600c83d43#ht_3256wt_907 << have this cable, works great, have atmega168, have ISP programmer
[11:47:25] <Fleck> using ISP i upload arduino bootloader to atmega168, and connect pins from com port usb cable - pins 2,3 and GND, right?
[11:47:51] <Fleck> to D0, D1 and GND of atmega168
[11:47:52] <specing> Not unless you want to dry the mega168
[11:47:58] <specing> fry*
[11:48:12] <Fleck> hmm
[11:48:20] <Fleck> whats the correct way then?
[11:48:31] <specing> MAX232
[11:48:58] <Fleck> serial port to max232 then to atmega?
[11:49:21] <Fleck> and why?
[11:50:49] <specing> because mega doesen't run on 13V, silly
[11:51:12] <Fleck> com port is 13V?
[11:51:19] <specing> Sherlock.
[11:51:31] <Fleck> ?
[11:51:51] <specing> As in Sherlock Holmes.
[11:52:11] <Fleck> ??
[11:52:38] <norbi> anyone, can help me please with interfacing adxl345 with atmega64, my spi is configured, adxl is wired, i have usart to verify data from adxl, but still cant get feedback from the acc
[11:53:32] <norbi> im continuously getting Power is: 0 from the mcu, telling that it cant get back a register
[11:53:51] <norbi> spi is on 250k clock
[11:54:45] <norbi> mosi is on sda and miso is on sdo
[11:56:57] <dirty_d> hmm
[11:57:14] <dirty_d> i gotta find a 60A esc run by an avr
[11:57:34] <dirty_d> stock ones likely wont work for me
[11:58:10] <Kevin`> dirty_d: lots of those use avr
[11:58:39] <Kevin`> dirty_d: also, I have a few designs for e-feeback escs floating around, since i'm doing the same project
[11:58:43] <Kevin`> including firmware :D
[11:59:18] <Kevin`> atmel also has an appnote on the theory
[11:59:22] <dirty_d> esc are super cheap so im not even gonna bother making my own
[11:59:38] <dirty_d> theres no way i can make one myself for $16
[11:59:49] <Kevin`> 60a brushless esc is super cheap? since when
[12:00:02] <dirty_d> not the quality brand ones
[12:00:06] <dirty_d> like hobbyking etc
[12:00:41] <Kevin`> remember you need one that can respond rather fast to a request to change rpm, preferably ingelligently rather than just controlling power
[12:01:40] <dirty_d> Kevin`, id need to reprogram it
[12:01:49] <learningc> when I design a PCB board for manufacture, can I design for a 3 layers, or should the number of layers be an even number?
[12:01:56] <dirty_d> they all have a built in impulse response filter that filters quick changes in throttle input
[12:02:14] <dirty_d> thats why i want one with an avr in it
[12:02:23] <ziph> learningc: You can just leave a layer with no copper, but I wouldn't waste a good layer like that.
[12:02:30] <dirty_d> stock firmware will work, but not as well as it could
[12:02:58] <ziph> learningc: The weirder your requirements are the more likely they'll make mistakes, too. ;)
[12:03:02] <Kevin`> learningc: 3 layers should be possible, no? normal pcb +1 layer on one of the sides
[12:04:00] <ziph> They'll just etch one layer away completely.
[12:04:38] <Kevin`> the layer is more about the insulating part than the copper part, no?
[12:04:44] <Kevin`> as far as manufacturing.
[12:05:12] <ziph> Layers refers to copper layers.
[12:05:39] <ziph> Not the core or prepreg.
[12:05:40] <Kevin`> of course, but they aren't manufactured by adding layers of copper
[12:05:58] <amee2k> mmh... i've got another prayer to the resident gods of the datasheets \o/
[12:06:03] <learningc> won't they just use a single-sided bare pcb + a double sided bar pcb to make a 3 layers?
[12:07:14] <amee2k> http://omploader.org/vY3Yzcw/2012-02-23-111351.jpg << this thing is marked "PV" on the silkscreen and has no other writing on it than the shown markings, not even a brand decal. it reads almost short on the DMM and i suspect it is a dead MOV. anyone seen that before and/or have a datasheet for it?
[12:08:20] <Steffanx> I think PV means polyvuse amee2k :P
[12:09:26] <amee2k> hm... sounds plausible, but not sure if that makes much sense in the circuit
[12:10:01] <amee2k> it is in series with another part marked PTC, so that would be two PTCs in series
[12:10:36] <RikusW> isn't PTC for current limiting ?
[12:10:51] <amee2k> Steffanx: do you recognize the part, or any idea how the figures could indicate a generic part or a rating?
[12:10:53] <RikusW> like in smps to prevent the caps charging too fast
[12:11:14] <Steffanx> pass, amee2k
[12:11:19] <amee2k> inrush limiting is NTC... go low impedance after the inrush surge
[12:11:34] <amee2k> NTCs/PTCs are really really slow
[12:11:50] * RikusW got it mixed up then ;)
[12:12:11] <amee2k> http://omploader.org/vY3YwbQ/fluo-ballast.png << it is on the lower right on here, between the two filaments
[12:12:34] <amee2k> i want to figure out why this thing keeps burning up filaments in no time
[12:12:47] <RikusW> its probably for the starter
[12:12:53] <RikusW> heats up after starting
[12:13:27] <amee2k> yeah... filament timer... but if it is, then it is either defective or sized incorrectly
[12:14:20] <RikusW> it might be a cap ?
[12:14:30] <amee2k> the tubes blacken quickly on the ends (after maybe a few hundred hours) and don't last very long (6-8 months at maybe 6 hours average per day)
[12:15:13] <Steffanx> amee2k Service Temporarily Unavailable :(
[12:15:16] <RikusW> probably too much current through the heaters while running
[12:15:29] <amee2k> crap. hang on, i'll re-up it
[12:16:23] <amee2k> http://ve504.cugnet.net/~amee2k/sandbox/fluo-ballast.png
[12:16:26] <amee2k> http://ve504.cugnet.net/~amee2k/sandbox/2012-02-23-111351.jpg
[12:16:45] <ziph> learningc: They don't use more than one core in 4 layer boards.
[12:16:58] <ziph> learningc: The outer two layers are foil sitting on prepreg
[12:17:18] <amee2k> RikusW: yeah, so for some reason the filament timer thing isn't working right. thats why i want a datasheet on that part
[12:17:44] <ziph> learningc: In standard set ups, anyhow.
[12:17:59] <RikusW> maybe put a switch in series and turn it off when its lit up
[12:18:11] <ziph> learningc: Why wouldn't you use 4 layers? I doubt it would be any cheaper to have a special 3 layer stack up, especially since you'd then be ordering panels.
[12:18:13] <amee2k> RikusW: it reads 10 ohms on the DMM, and the only values that it could have from the markings are 9pF, 25pF, 90pF and 250pF. that doesn't make any sense IMO
[12:19:33] <amee2k> well, when assuming it is a cap
[12:20:25] <amee2k> it also appears like the ballast blew a transistor together with the last tube. i got a new one this afternoon and it doesn't start
[12:20:35] <amee2k> these wildcat tubes are shit expensive >_<
[12:22:01] <RikusW> that transformer is probably a resonant oscillator
[12:22:46] <amee2k> yeah... the oscillator part of it is kinda generic, with the little toroid as feedback transformer
[12:23:17] <amee2k> i've got a dead CFL, i'll just swap the transistors
[12:25:10] <RikusW> have you seen the old mechanical starters ?
[12:25:36] <RikusW> PV might be some kind of automatic switch
[12:25:49] <amee2k> with the neon bulb like switch thingy and the cap?
[12:25:53] <amee2k> yeah
[12:26:07] <RikusW> DB3 is a diac afaik
[12:26:29] <amee2k> yeah, but i didn't have the symbol for it handy when i drew it
[12:26:35] <RikusW> exactly
[12:26:52] <RikusW> neon + bimetallic switch
[12:26:55] <amee2k> the only thing that i can't identify is that "PV" thing >-<
[12:26:57] <amee2k> >_<
[12:27:34] <RikusW> if you don't mind manual starting add a switch ?
[12:27:51] <amee2k> well, i don't but my flatmate uses it too :/
[12:29:15] <RikusW> and he might forget the switch on....
[12:29:40] <amee2k> i'm more worried he'll switch it on without the start switch
[12:29:51] <amee2k> and it sits there with an unstruck tube and cooks off the transistors or something
[12:30:20] <dirty_d> Kevin`, you said youre making your own ESCs?
[12:31:19] <Kevin`> dirty_d: possibly, i'd prefer to buy them though
[12:31:46] <Kevin`> making a single board with all 12 channels on it might be efficient though
[12:31:58] <Kevin`> as far as cost. boards aren't THAT expensive
[12:32:00] <dirty_d> meh, theyre small enough anyway
[12:32:16] <Kevin`> heh, even making normal boards isn't that bad, you get 10 from ideat
[12:32:19] <Kevin`> itead*
[12:32:41] <dirty_d> i dont think the software for bldc control should be that bad
[12:32:47] <dirty_d> i made a sensored controller and it wasnt
[12:33:01] <dirty_d> i believe they use the analog comparator for the phase switching
[12:33:33] <dirty_d> startup might be tricky, im not sure how they do that
[12:34:09] <dirty_d> i think they just guess on a random phase and hope it rotates in the right direction and check bemf
[12:35:15] <norbi> guys, jtag is on spi?
[12:35:24] <dirty_d> the commutation frequency also approaches the pwm freq
[12:35:29] <Kevin`> you could watch one with a scope. what I would do is supply a power-limited rotation ramp to it for a while until it's fast enough to sense
[12:35:36] <dirty_d> not sure if they handle that specially
[12:35:50] <ziph> norbi: JTAG and SPI have little to do with each other if that's what you mean.
[12:35:54] <dirty_d> or just and the commutation with the pwm
[12:35:58] <Kevin`> also, avoid 0rm. shouldn't be a problem with this type of design, just one startup per use
[12:36:16] <Kevin`> 0rpm*
[12:36:23] <dirty_d> Kevin`, cany really do that though unless you know how fast the motor thats hooked up accelerates
[12:36:33] <dirty_d> you wont know when to commutate
[12:36:36] <Kevin`> dirty_d: what else can you do
[12:36:37] <dirty_d> without the bemf
[12:36:45] <dirty_d> it doesnt have to go that fast to get bemf
[12:37:17] <Kevin`> you can treat it like a stepper motor, but it's not efficient
[12:38:16] <dirty_d> i dont think you can even do that
[12:39:11] <dirty_d> theres no way to tell which direction it actually rotated until you can sense the bemf
[12:39:50] <dirty_d> so it could have gone the wrong way, then your next step its activating the wrong coils
[12:40:48] <RikusW> norbi: jtag and spi is seperate
[12:41:02] <amee2k> WTF??
[12:41:14] <RikusW> jtag is almost like spi but there is a TMS signal too
[12:41:26] <norbi> RikusW: i suspect that spi is not working on my atmega, because i cant connect to it with ISP and neither spi device
[12:41:27] <amee2k> i just replaced the transistors and powered it up with the good tube, and one of the resistors started throwing sparks all across my table
[12:41:51] <Tom_itx> you got a problem then
[12:41:56] <norbi> RikusW: im using an oscope, and there is clock on spi, and ss and mosi
[12:42:08] <RikusW> ISP needs a clock to work and some fuses can disable it
[12:42:09] <norbi> not sure what happening
[12:42:19] <norbi> what fuse can disable it/
[12:42:21] <norbi> ?
[12:42:23] <amee2k> one of the base resistors blew out
[12:42:29] <Kevin`> dirty_d: stepper motor you hold in position by keeping the magnetic field static
[12:42:41] <Tom_itx> base resistor???
[12:43:12] <Kevin`> dirty_d: after you've done a cycle of that in your chosen direction, the motor should be following it
[12:43:12] <amee2k> Tom_itx: http://ve504.cugnet.net/~amee2k/sandbox/fluo-ballast.png << base resistor of the upper transistor is blown
[12:43:33] <RikusW> on the physical level anyways
[12:43:35] <amee2k> tiny little 1/4W sucker threw sparks over almost a meter... i could see them bounce off the wall
[12:44:00] <amee2k> one side of it now has a crater shaped piece missing :P
[12:44:14] <RikusW> norbi: RSTDSBL DWEN SPIEN
[12:44:15] <Tom_itx> glue it back on
[12:44:52] <dirty_d> Kevin`, i guess they start by activating two phases at the same time to get the rotor to a know position between two poles
[12:44:56] <amee2k> i don't have any 400V transistors that would work as replacement so i'm considering that ballast there finished :/
[12:45:00] <dirty_d> known*
[12:45:05] <dirty_d> then step from there
[12:45:48] <amee2k> something else must have failed when the last tube blew
[12:46:36] <dirty_d> Tom_itx, how long does the dorkbox order usually take to arrive?
[12:46:56] <norbi> RikusW: i cant find those fuses
[12:47:03] <Tom_itx> apparently not long, he seems to be doing one every 4 days or so
[12:47:08] <RikusW> read the datasheet
[12:47:12] <Tom_itx> delivery probably about a week i'd guess
[12:47:34] <Tom_itx> or two
[12:47:42] <Tom_itx> i haven't ordered from him recently
[12:48:10] <dirty_d> its a pretty damn good deal
[12:48:21] <RikusW> norbi: in the "memory programming" section
[12:48:30] <norbi> RikusW: i meant i cant find those in the programmer interface
[12:48:48] <dirty_d> my boards came to like $5 each, thats what i would spend to buy a presensitized board anyway
[12:49:16] <Tom_itx> yeah and you don't spray yours purple either
[12:49:27] <RikusW> norbi: on what avr ?
[12:50:30] <amee2k> and i have a fucking burn mark on my bench now lol
[12:50:56] <norbi> RikusW: the problem is that im using jtag now, because isp is not working, and that uses another software not the avr studio provided one
[12:51:32] <RikusW> what jtag programmer are you using ?
[12:51:45] <dirty_d> this thing is going to be scary when its built
[12:52:21] <dirty_d> im going to have to make some rig just to safely test it
[12:52:53] <norbi> RikusW: im using one from digilent
[12:53:16] <norbi> parallel port to jtag from digilent, and using avr programmer software for it
[12:53:21] <RikusW> norbi: check the fuses then, RSTDSBL or SPIEN
[12:53:55] <norbi> RikusW: how can i access them?
[12:54:17] <RikusW> what programming software are you using ?
[12:54:23] <RikusW> avrdude ?
[12:54:27] <norbi> RikusW: the sofware doesnt gives me the option to change
[12:54:40] <norbi> no, avr programmer - adept from digilent
[12:54:57] <RikusW> there should be a way...
[12:54:58] <norbi> its theyir own, the jtag wont work with other softwares
[12:55:09] <norbi> the fuse signature is 0xFF 0xC9 0xEE
[12:55:29] <RikusW> on what avr is that ?
[12:56:02] <Tom_itx> http://www.engbedded.com/fusecalc/
[12:56:04] <norbi> atmega64
[12:56:43] <RikusW> norbi: SPIEN is fine then
[12:57:17] <RikusW> what crystal is connected ?
[12:57:36] <norbi> its own external crystal
[12:57:52] <RikusW> speed ?
[12:57:56] <RikusW> and spi clock speed ?
[12:58:07] <norbi> i mean, the board that im using camed with an external crystal of 8mhz
[12:58:28] <norbi> spi clock speed now is 250khz or fosc/32
[13:00:27] <dirty_d> why the hell am i seeing body armor and riot face masks when i log into ebay? lol
[13:00:37] <pthomas> 13260 = ( -32 * -48) / 10
[13:03:02] <pthomas> I'm trying to go through the assembly that got that result, http://pastebin.com/F70TB7LW
[13:03:31] <pthomas> I think it's the casting + negative numbers that's causing the problem
[13:09:03] <RikusW> norbi: you could try lfuse = FF for a longer startup time
[13:12:47] <norbi> RikusW: why is that good?
[13:12:56] <norbi> and how can i do that?
[13:13:22] * RikusW don't know your software...
[13:15:19] <RikusW> norbi: gives more time for the clock to stabilize on poweron
[13:30:04] <norbi> RikusW: what the hack is happening, ive put an 7.2kohm resistor on the reset pin of the isp, because it doesnt had, but still nothing, it cant connect to it
[13:30:32] <RikusW> mosi -> mosi ? miso -> miso ?
[13:30:43] <norbi> RikusW: the isp is on usb, and the board is powered from another pc'spower source
[13:31:11] <norbi> RikusW: im using the original cable, and the board has its pins preconfigured for ISP, so yea
[13:31:15] <RikusW> not good
[13:31:28] <RikusW> ground loop maybe ?
[13:31:33] <norbi> by yea i mean it is probably fine
[13:31:52] <norbi> RikusW: dunnoo...
[13:32:05] <norbi> RikusW: what is ground loop exactly?
[13:32:38] <RikusW> different ground voltages
[13:34:46] <RikusW> causing current to flow in the ground wire
[13:39:23] <norbi> RikusW: now they are powered from same usb
[13:39:31] <norbi> but still the same thing happens
[13:40:01] <norbi> ISP power led is green, and status led is red
[13:40:44] <RikusW> and can it read the signature ?
[13:40:49] <norbi> no
[13:42:13] <RikusW> try lowering ISP clock
[13:44:51] <norbi> RikusW: i did
[13:45:03] <norbi> RikusW: but nothing, i think it may be wireing problem
[13:45:15] <RikusW> might be
[13:45:18] <norbi> i mean the wire is cut off
[13:45:27] <RikusW> mega 64 you say ?
[13:45:41] <RikusW> try tx0 rx0 instead of mosi miso....
[13:45:41] <norbi> i have another question, what do you think how long can an adxl345 resist under 5V?
[13:46:03] <RikusW> the m64 and m128 isp connected weirdly...
[13:46:15] <RikusW> no clue
[13:46:24] <RikusW> use level translators
[13:46:34] <norbi> RikusW: i will try to repair first the cable, as im checking it it looks there is no conectivity on one pin
[13:47:15] <norbi> RikusW: the problem is that i forgot it is on 3v6 max, and powered it with 5 for 2 minutes
[13:47:50] <RikusW> norbi: mosi PE0 miso PE1 sck PB1
[13:48:04] <RikusW> it might survive
[13:48:24] <norbi> RikusW: yea, ive seen sbdy using it on 5V constantly
[13:48:25] <norbi> but
[13:48:31] <norbi> i think mine didnt survived
[13:48:35] <RikusW> norbi: that is somewhat annoying about the m64/128...
[13:48:39] <norbi> i cant comunicate with it on spi
[13:48:51] <norbi> RikusW: yea, it is
[13:49:47] <RikusW> is mosi connected to PE0 ?
[13:50:05] <RikusW> or PB2 which is WRONG...
[13:50:08] <norbi> im checking it
[13:50:24] <norbi> mosi is pb3
[13:50:31] <norbi> and miso is pb2
[13:50:35] <RikusW> connect to PE0
[13:50:37] <norbi> aahh
[13:50:38] <norbi> sry
[13:50:39] <RikusW> and miso to PE1
[13:50:41] <norbi> mosi pb2
[13:50:43] <norbi> miso pb3
[13:50:46] <RikusW> that should help a lot
[13:50:56] <RikusW> there is your problem
[13:51:16] <norbi> isp is connected to pe1
[13:51:23] <norbi> and pe0
[13:51:28] <norbi> so its fine i think
[13:51:48] <norbi> im looking at the boards schematic, its not made by me
[13:51:58] <norbi> the board name is berebot II
[13:52:02] <norbi> cerebot II
[13:53:50] <RikusW> never heard of it
[13:53:59] <RikusW> PE0 is close to pin 1
[13:54:08] <RikusW> pin 2 and 3 actually
[13:54:54] <norbi> RikusW: ISP side pin order is different from target side pin order?
[13:55:25] <RikusW> mosi -> mosi
[13:56:54] <norbi> so that means yes?
[13:57:11] <norbi> i have 6 pins on isp, and 6 on board
[13:57:21] <norbi> the isp cable is broken
[13:57:25] <RikusW> it should be the same
[13:57:34] <RikusW> just check pin 1
[13:57:42] <RikusW> to pin 1 on the header
[13:57:46] <abcminiuser> Tacos: I ate all of them.
[14:00:14] <Tom_itx> :/
[14:03:48] <norbi> RikusW: oh man, yea, it was the cable
[14:03:51] <norbi> the stupid cable
[14:04:35] <norbi> i managed here to work with another cable, and now it works, it looks like that the original isp cable has quit the game
[14:04:52] <Tom_itx> spark gap programming?
[14:06:25] <norbi> Tom_itx: ? are you talking to me?:D
[14:07:34] <RikusW> air gap programming rather :-D
[14:08:10] <norbi> guys, how can i make sure if my adxl345 survived at 5v or not, without having another one?
[14:08:25] <Tom_itx> it didn't
[14:08:30] <Tom_itx> it's a 3v part
[14:08:45] <Tom_itx> do you get any adc data from it?
[14:08:53] <Tom_itx> or is it a spi one?
[14:08:53] <norbi> Tom_itx: no :(
[14:08:58] <norbi> it spi
[14:09:05] <norbi> digital acc
[14:11:02] <Tom_itx> one sign it may be bad is if it glows red for a brief period then blows it's stack
[14:11:34] <norbi> Tom_itx: no, it is not doing anything like that
[14:11:35] <norbi> :D
[14:11:49] <norbi> should i connect it on 5V now to see :D if it does:D
[14:11:51] <norbi> sparks
[14:11:51] <norbi> :D
[14:12:34] <Tom_itx> naw, let the poor little thing die in pease
[14:12:41] <Tom_itx> peace*
[14:14:03] <norbi> http://www.sparkfun.com/datasheets/Sensors/Accelerometer/ADXL345-BreakoutBoard-v13.pdf
[14:14:05] <norbi> this is it
[14:20:05] <norbi> why doesnt sparkfun put there a 3V regulator on the breakout booard?
[14:20:09] <norbi> it is too hard?
[14:26:29] <norbi> somebody says here : http://forum.bildr.org/viewtopic.php?f=29&t=349&sid=9405e8af4d62f59e1ba9ebdbb4cf186d that it will be not damaged at 5V
[14:27:24] <RikusW> 5V tolerant IO or on vcc ?
[14:31:46] <norbi> RikusW: dunno, i think it may be at IO
[14:32:10] <norbi> but i think it is clearly shocked
[14:32:28] <norbi> and there is no funny way to find out...
[14:33:05] <norbi> im not standing that well with money now to order another one..
[14:33:38] <norbi> Romanian citizens are poor people:P
[14:33:41] <norbi> :D
[16:48:26] <norbi> guys, english lesson question: For this prototype course, the fee for a credential will be waived. - so what is this exactly mean?:P
[16:50:11] <OndraSter> 6002x is free :P
[16:51:56] <specing> norbi: enrolling in MITs course?
[16:52:03] <specing> norbi: wish I had the time :S
[16:57:27] * Kre10s__ gets his pretzel sticks ready.
[17:06:04] <OndraSter> I signed up
[17:06:07] <OndraSter> gonna see if I have the time
[17:06:19] <OndraSter> because my final exam on middle school is in the same time :(
[17:06:53] <OndraSter> gn
[17:17:53] <specing> Yeah, same issue here :(
[17:22:26] <need2know> Anyone around? I have a question regarding the avr dragon
[17:27:10] <Kre10s__> anyone know what __attribute__((noreturn)) will do? how does it change the code generated in the case of gcc?
[17:27:16] <Casper> just ask your question, way more efficient than asking if someone is here, which often result in: bahh
[17:28:10] <keenerd> Kre10s__: http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
[17:28:12] <specing> Kre10s__: There should be no ret instruction at the end
[17:33:04] <Kre10s__> if the function does not reference global variables will the entire sram be available to the function? since it does not return, there will be no one else needing ram.
[17:33:45] <specing> Kre10s__: There are no ghosts residing in AVRs to haunt you
[17:34:42] <Kre10s__> how am i to interpret that statement?
[17:36:57] <specing> Well >_>
[17:37:24] <specing> There is nothing else but your code running there...
[17:38:01] <specing> And you are free to do whatever you want with all the SRAM
[17:38:04] <specing> and FLASH
[17:38:07] <specing> and EEPROM
[17:38:12] <specing> and everything else
[17:38:42] <Casper> remember that the stack is also in the sram
[17:47:11] <Tom_itx> Casper, it was just on a need2know basis and he didn't
[18:19:55] <Valen> http://www.sabi.co.uk/Notes/linuxHelpAsk.html
[20:29:04] <k-man> i seem to recall seeing a few projects around the place where they power the AVR chip from the IO pins
[20:29:15] <k-man> is that really possible?
[20:29:46] <keenerd> Sure. http://scanlime.org/2008/09/using-an-avr-as-an-rfid-tag/
[20:30:02] <Casper> k-man: each io pins have protection diodes
[20:30:09] <Casper> that is why it's possible
[20:30:20] <Casper> and that rfid tag is really hackish!
[20:30:36] <Casper> probably can't abuse more of the avr than that
[20:31:07] <k-man> right
[20:31:57] <Casper> a 2 parts project... avr and inductor... that's it
[20:32:40] <k-man> Casper, so, lets say i wanted to build an avr IR remote (i know its crazy) and I planned to do matrix scanning of the keys to determine which one was pressed, could i somehow get the pressed key to supply the avr with its power at that moment too, so the avr is only powered up when a key is pressed
[20:33:01] <Casper> I wouln't do it
[20:33:14] <k-man> not a good approach?
[20:33:22] <Casper> those diodes can only supply a few mA max
[20:33:33] <Casper> not enought to safelly power the avr
[20:33:41] <k-man> ah, i see
[20:33:45] <Casper> but
[20:33:56] <Casper> there is some avr that can be wake up from sleep via some interrupts
[20:34:06] <keenerd> That is plenty to power the AVR, at very low frequencies.
[20:34:54] <keenerd> At 1Mhz you only need 0.2mA.
[20:36:27] <keenerd> However, waiting for an interrupt is only 0.1uA.
[20:37:35] <keenerd> And at 0.1uA, you could run for +100 years from a lithium coin cell.
[20:38:00] <k-man> yeah
[20:38:55] <keenerd> Who needs idle speculation when we have datasheets? :-)
[20:41:16] <keenerd> Powering through the switches is not a good idea because of reliability, mainly.
[20:41:27] <k-man> right
[20:42:00] <k-man> so what do TV IR remotes do?
[20:42:12] <k-man> power only when a key is pressed or some kind if interrupt system
[20:42:18] <keenerd> Dunno. I imagine they use interrupts.
[20:43:15] <Landon> so I've wondered this
[20:43:29] <keenerd> When the battery dies of aging 10x faster than the parasitic power, why make things more complicated?
[20:43:37] <Landon> what's the ratio of UC:IR power in a remote?
[20:44:06] <Landon> and why can't they use sane low power UCs instead of requiring 4xAAA :(
[20:44:34] <Landon> s/power/voltage
[20:44:57] <keenerd> LED output needs voltage? I dunno.
[20:45:09] <keenerd> I've never seen any remotes that need four batteries.
[20:45:26] <keenerd> ... except for an ultrasonic remote from the 1960's. That was beasty.
[20:45:30] <Landon> not all of mine do, but I have one or two
[21:06:50] <k-man> yeah i've seen some that needed 4 batteries, but i think thats on older equipment
[21:11:36] <Valen> mine does
[21:11:40] <Valen> but then its a keyboard ;->
[21:11:56] <Valen> i am thinking of sticking a 10Ah lipoly in the thing
[21:12:19] <Valen> whats the "flat" voltage for an alkaline cell
[21:13:48] <Valen> hmm ~1 volt or so it seems
[21:14:04] <Valen> dang, looks like the "battery flat LED" might kick in at that point
[21:26:30] <RokLobsta> may harmony 525 needs 4
[21:26:59] <CapnKernel> Valen: 10Ah should give you a few years' worth...
[21:27:11] <CapnKernel> Not 10mAh?
[21:30:19] <Valen> 5Ah cells are a few $
[21:30:30] <Valen> it runs a full keyboard with mouse
[21:30:47] <Valen> it goes through a a set of 4 alkalines in about 6 months or so i guess
[21:34:36] <keenerd> Stop buying alkalines. NiMH is better :-)
[21:35:08] <Valen> eh then you need to charge them
[21:35:26] <keenerd> And you don't charge lipoly?
[21:35:35] <Valen> put a USB charge IC in it
[21:35:40] <Valen> easy peasy
[21:35:44] <keenerd> And then it catches fire.
[21:35:53] <Valen> hasn't yet
[21:36:00] <keenerd> (I've really come to loathe making li-ion chargers.)
[21:36:08] <Valen> my phone has regularly not caught fire
[21:36:15] <Valen> single cell is easy
[21:37:18] <Valen> just make sure the charge current is > the standby current
[21:44:35] <RokLobsta> keenerd: interesting, what have you experienced with LiOn?
[21:53:50] <keenerd> Just that it is a pain.
[21:53:53] <RokLobsta> keenerd: have they blown up on you?
[21:54:08] <keenerd> Almost, got a few cells up to 90C before.
[21:54:18] <RokLobsta> i am working with a new LiOn charger design for the market and the designer is now worry about the legal implications.
[21:54:35] <RokLobsta> what, even with NTC temp feedback?
[21:55:13] <RokLobsta> we are using a controller that has NTC feedback.
[21:55:36] <RokLobsta> i suggested provision be made to use NiCd or lead acid but LiOn it is.
[22:42:48] <SianaGearz> i have seen a remote which need 6 batteries, but that one had an RF transmitter besides IR one, and you could buy RF->IR units.
[23:01:04] <Casper> 6 batts is a sign of faulty design
[23:01:28] <Casper> there is no reason to make such an heavy remote
[23:01:57] <theBear> traditionally rc remotes have LOTS of batteries, maybe 8 or 10 1.5v cells... then again dc-dc weren't so common and cheap back in the day
[23:02:57] <Casper> but rc remote is different... they do need lots of power and weight is actually a good thing for some
[23:05:00] <Casper> RokLobsta: I'ld also be worried about the legal implication of a lithium charger
[23:05:18] <Casper> if for some reason the charger go faulty, the cell can blow up and burn down the house
[23:20:00] <RokLobsta> casper: exactly. nimh has never blown up has it? There's probably too much lust for LiOn. NiMH is OK as is lead acid/gel mat for bigger systems.
[23:39:07] <Casper> we need another battery chemistry
[23:39:20] <Casper> one that is not a ticking bomb, yet have high efficiency
[23:39:24] <Casper> and last long...
[23:39:30] <Casper> who care about the weight....
[23:41:39] <nevyn> ME!
[23:42:50] <nevyn> but then rocketry electronics is something of a corner case I'll admit
[23:47:42] <Casper> like for ups, I'ld be happy with a battery that last more than 3 years and have more than 65% efficiency
[23:47:50] <Casper> I do not care about the weight
[23:49:25] <nevyn> right.
[23:49:43] * nevyn has had to install ups's
[23:50:01] <Sgt_Lemming> back, went and inspected the new site with some people
[23:50:53] <nevyn> I care somewhat about the weight.
[23:51:44] <nevyn> and in ridiculous news.. australian oh&s care about the weight.
[23:54:40] <RokLobsta> yeah, phone batteries can't weight more than 20kg
[23:54:47] <RokLobsta> otherwise they need 2 people.