#avr | Logs for 2013-11-11

Back
[00:24:09] <Casper> ah great....
[00:24:23] <Casper> this 555 PWM don'T go 0-100% duty...
[00:25:17] <Casper> but 11-93%
[00:25:37] <Casper> and it seems like 11% is way too high for the leds to be considered "off" :(
[00:57:55] <megal0maniac_afk> Casper: so avr pwm then. what are you here for? :D
[00:58:26] <Casper> oh I fixed the issue
[00:58:41] <Casper> now I get <5m% and >99%
[01:01:10] <megal0maniac_afk> what did you do? also, i thought you could only have 0-50% or 50-100%, not both
[01:03:47] <Casper> http://www.dprg.org/tutorials/2005-11a/2005-10a-004.gif ← simmilar to that
[01:03:53] <Casper> but with the fet drived off the output
[01:07:55] <megal0maniac_afk> oh wow. never seen a 555 (ab)used like that ;)
[01:08:22] <Casper> 0.294-99.84% mesured
[01:08:44] <Casper> at such low duty, the led is barelly lit
[01:09:14] <Casper> hmmm thinking about it...
[01:10:02] <Casper> if a camera would take a photo at 1/1000 of a second, and you have 1%@1kHz, it mean that you may not even notice the light, but the camera, if perfectly synced, would perfectly expose...
[01:25:32] <megal0maniac_afk> Camera flash is typically in the 1/250 region, but same idea, yeah :)
[01:25:51] <megal0maniac_afk> Although I'd argue that it's definitely noticable if your eyes are open
[01:25:57] <megal0maniac_afk> Or if they're closed
[01:44:15] <megal0maniac_afk> I love openwrt. Most of the popular ad servers now resolve to my server at home, for which the 404 page is a nyan cat gif
[01:49:51] <Casper> :D
[06:00:13] <beaky> hello
[06:00:22] <beaky> how do i improve pwm resolution
[06:34:17] <tzanger> you don't. you have a fixed number of bits you can work with
[06:34:28] <tzanger> if you need more bits you find a better PWM peripheral
[06:34:48] <tzanger> you MAY be using a shitty PWM mode, though, so how about you give us a lot more information so we can help?
[06:35:25] <amee2k> maybe you could re-organize your code to free up a used 16-bit timer
[06:35:41] <beaky> i thought using phase correct effectively doubles resolution
[06:36:02] <tzanger> what do the docs say?
[06:36:27] <amee2k> or if you're using a mode that has a top value of less than 0xFFFF, see if you can use a higher timer clock and higher top value
[06:37:06] <tzanger> amee2k: both of which fall into the "using it rong" category :-)
[06:37:08] <amee2k> iirc phase correct is the same as fast-pwm except that every other PWM pulse is "mirrored" to halve the effective PWM frequency and provide symmetrical pulses
[06:37:27] <amee2k> tzanger: agreed, but it is more specific advice than "don't suck at it" ;)
[06:37:45] <tzanger> it essentially "centres" your transitions
[06:37:49] <tzanger> heh
[06:57:01] <Fornaxian> beaky, you could go with an lpc1114 that has 32bit timers that can do pwm.
[06:57:42] <amee2k> am i the only one wondering what application needs that much resolution? :3
[06:57:58] <Fornaxian> amee2k, no.
[06:57:59] <beaky> driving servos smoooth
[06:58:11] <Fornaxian> what kind of servos?
[06:58:16] <beaky> hobbyist RC servo
[06:58:21] <Fornaxian> umm.
[06:58:43] <amee2k> i've driven PWM controlled servos off 16-bit PWM channels and never had issues with resolution
[06:58:45] <Fornaxian> I don't think a hobby servo is any better than a 16bit timer with pwm can send.
[06:59:25] <Fornaxian> the ones I've messed with are happy enough running from an 8bit timer running pwm.
[06:59:31] <amee2k> the controller in the servo module, as well as tolerances of the attached mechanics, became the limitation way before i ran out of timer resolution
[07:00:04] <amee2k> i'm using the 16 bit channel and fiddling with the values until i get ~50Hz PWM frequency out of it
[07:00:19] <beaky> i love pwm
[07:00:29] <beaky> pwm is why i use avr
[07:00:50] <amee2k> then a linear transformation to get from like 0-255 to some timer value that results in the appropriate pulse lengths
[07:00:51] <beaky> (even though i can do the same with 555)
[07:00:54] <Fornaxian> I generally drive 8 or 16 hobby servos from a single 16bit timer even.
[07:01:18] <amee2k> runs entirely without interrupts for 2 servos <3
[07:01:36] <amee2k> hmm, staggering it with an external demuxer?
[07:01:40] <Fornaxian> hmm...555 and a digital pot for each servo....now there's an idea!
[07:01:55] <Fornaxian> amee2k, no,,internal demuxer,,software wise..
[07:02:06] <amee2k> oh, okay
[07:02:27] <Fornaxian> but,,,i2c bus servo control..
[07:02:49] <Fornaxian> although, probably cheaper and easier to just use an attiny13 for each servo.
[07:02:55] <amee2k> yup :3
[07:03:09] <amee2k> i'd at least try to put 2 or 4 on each tiny13 though
[07:03:31] <Fornaxian> well, I would add some external inputs to the servo controller.
[07:04:13] <Fornaxian> 8pins...vcc, gnd, servo, i2cbus(2), inputs(2), and reset...and could change reset to another input really..
[07:04:36] <Fornaxian> and, for those in the USA, happy veterans day!
[07:04:46] <amee2k> if you want LOTS of servos, i wonder how economic "lots of tiny13s" is versus "a tiny13 + TTL counter + TTL multiplexer that drives 8 or 16 servos"
[07:04:53] <Fornaxian> and for those veterans in all countries,,,,happy veterans day!
[07:05:13] <Fornaxian> amee2k, I'm thinking ease of wiring.
[07:05:25] <amee2k> who cares if it is on a circuit board?
[07:05:41] <Fornaxian> I was thinking of putting attiny13 at the servo...
[07:06:06] <Fornaxian> possibly even incorporating some intelligence into the controller based on inputs...
[07:06:23] <amee2k> hmm prolly depends on your servo arrangement... if you have strong local clustering
[07:06:31] <Fornaxian> was just a thought.
[07:07:20] <amee2k> i've been wondering about making PTZ camera mount controllers with mega8s... three servo channels, two PWM channels, and a bunch of generic digital IOs
[07:07:31] <amee2k> remote controllable via uart or twi
[07:07:59] <Fornaxian> am working on something similar but to turn an old android camera into a pan and tilt camera.
[07:08:11] <Fornaxian> android phone
[07:08:26] <Fornaxian> using the android's usb connection to drive the microcontroller to drive the servos.
[07:08:31] <amee2k> i once made a PT (non-Z) camera mount for my webcam that i could control with a gamepad XD
[07:08:52] <amee2k> we had lots of fun on skype with that
[07:09:39] <amee2k> the low-profile servo i used for the tilt axis was pretty rough and jittery though
[07:10:17] <amee2k> cheap servos make sort of an annoying buzzing noise when they have to hold position against some torque though
[07:10:58] <amee2k> if i wanted to make it as a permanent installation, i'd probably get some DC gear motors, preferably with worm gears
[07:11:47] <amee2k> with a gear ratio that is as high as possible so i don't need to keep the motor energized all the time to hold position
[07:14:22] <Raazeer> hi all
[07:15:15] <Raazeer> question: what's the highest practical frequency the common avr uCs can work at? (not the highest ever-achieved on an exotic chip, just the highest _usual_ freq)
[07:16:01] <amee2k> my atmegas usually run up to 8MHz on the internal oscillator, and either 16 or 20 on an external xtal
[07:16:21] <amee2k> i *think* some series also have 24MHz speed grades though
[07:16:50] <Raazeer> amee2k, I see
[07:17:00] <amee2k> the maximum clock rate depends on the supply voltage though
[07:17:12] <Raazeer> I'm in the market for a signal generator right now, and I wanted something that can keep up with the joneses
[07:17:59] <amee2k> i.e. at 1.8 or 2.7V it usually won't guarantee to run stable at more than 4-8MHz anymore. check the data sheet for the highest guaranteed speeds at each voltage
[07:18:17] <Raazeer> on the other hand if I work with chips that usually stay below the 25Mhz range, it would be a bit of an overkill to buy a 100Mhz generator, wouldn't it?
[07:18:44] <amee2k> signal generators usually have different bandwidth depending on the waveform
[07:18:59] <Raazeer> amee2k, so it's worth it to buy one higher?
[07:19:26] <amee2k> no, it is worth to download the manual and carefully look at the spec sheet :>
[07:19:35] <Raazeer> lol, I see
[07:19:38] <amee2k> i.e. a DDS generator that is rated 100MHz will probably only be rated for that on the sine wave setting
[07:20:25] <amee2k> and the spec sheet should list waveform vs. maximum frequency. and at say square wave it'll be limited to 20MHz or something because it'll look like crap if you could set it higher
[07:20:33] <Raazeer> I was going to buy a rigol, I've got one of their dso's too.
[07:20:40] <Raazeer> what do you think of them?
[07:21:22] <amee2k> i've only got a rigol DSO and never used their function generators... the DSO was decent value for the money for occasional use IMO
[07:22:02] <Raazeer> same here I guess.
[07:22:28] <Raazeer> I've seen one of their smaller function generators at a fair some years back, they looked solid enough.
[07:22:40] <amee2k> it does have a few rough edges though... the firmware isn't as nice and the sampling rate is shared (i.e. turning on the second channel will halve the sampling rate)
[07:22:40] <Raazeer> but I'll take your advice and bug them for spec sheets
[07:23:02] <amee2k> you should be able to get the manuals as PDFs from the website
[07:23:48] <Raazeer> their website is rather rudimentary IIRC... Which one do you have, on my 1022DC the sampling rate doesn't seeem to be halved when I turn on the second channel.
[07:23:59] <beaky> for what apps are avrs ill suited for
[07:24:03] <Raazeer> (that is, it SAYS it isn't)
[07:24:21] <Raazeer> beaky, heart rate monitors, nuclear reactors, space flight...
[07:24:23] <amee2k> glancing over that will also give you an idea of the general workflow and interface features... (look for notes in the text that point out mutually exclusive functions that cannot be combined even if that would be of use)
[07:24:36] <amee2k> DS1102E
[07:25:24] <beaky> Raazeer: so anything mission critical?
[07:25:34] <beaky> but i am using one in a mission critical app
[07:25:43] <beaky> and it works well D:
[07:25:49] <amee2k> it uses a bunch of parallen ADCs with staggered clocks. (iirc 10x 100MHz -> 1GS/s) and if you turn on the second channel it switches them over to 2x 5x100MHz -> 2x 500MS/s
[07:25:49] <Raazeer> amee2k, I see, that's one up and the newer generation from mine
[07:27:03] <Raazeer> beaky, I never said that, but if you look in the atmel spec sheets you will find that they are not certified for life-supporting applications or applications in which a failure can lead to catastrophic effects
[07:27:08] <amee2k> another thing that i usually find helpful is looking for reviews. especially videos that demonstrate the product on a bench
[07:27:21] <Raazeer> so no medical, no nuclear or other power plant, no space or air flight.
[07:27:28] <amee2k> so you can see how the controls work, and sometimes a tear-down to see the build quality and potential pitfalls
[07:27:32] <Raazeer> no life support neither
[07:27:52] <Raazeer> amee2k, that's good advice, I'll be sure to do that.
[07:27:52] <beaky> ah right
[07:28:08] <Raazeer> beaky, what they are patently unsuitable for is GPC
[07:28:10] <beaky> so i cant sue if someone dies because my arduino fails
[07:28:15] <amee2k> i liked that especially for multimeters... shows some .... interesting internal details :>
[07:28:15] <beaky> whats gpc?
[07:28:16] <Raazeer> they simply don't have the moxy to do it.
[07:28:23] <Raazeer> general purpose computing.
[07:28:35] <beaky> ah right theres arm for that
[07:28:42] <beaky> at91sam
[07:28:58] <Raazeer> yeah, what about it?
[07:29:16] <Raazeer> amee2k, what kind of dot dot dot interesting internal details were you talking about?
[07:29:17] <beaky> they are low-cost, high-performance, energy-efficient small arm microcontorllers
[07:29:48] <amee2k> Raazeer: generic 250V fuses on a meter that is supposed to be rated CatIII 1000V / CatIV 600V for example
[07:29:55] <Raazeer> beaky, Ah I see.
[07:30:03] <Raazeer> amee2k, oops...
[07:30:40] <amee2k> or just a shitty PTC on the voltage/resistance/temperature/.... jack and no MOVs, fuses or other protection
[07:30:40] <Raazeer> that reminds me of the shiny new digital scopes we had at school.
[07:31:10] <Raazeer> amazing that they had been there for two years when I got my hands on them.
[07:31:34] <Raazeer> nobody before me ever realized that the current values were badly off
[07:31:50] <Raazeer> I measured them and found a 50 Ohm resistance on the current track.
[07:32:32] <Raazeer> boy, the head electronics teacher was ready to bite chunks out of the furniture...
[07:32:46] <amee2k> lol, nice >_>
[07:33:42] <Raazeer> I remember, he stared at the thing for a few seconds, then he held his hand out to my neighbour saying "gimme your green multimeter"
[07:34:27] <Raazeer> he checked that, found the same (I already had), clapped his hands twice and said "Everybody! the old black multis for current measuremement! Now!
[07:34:46] <Raazeer> then he went to the house phone and called the other teachers in for a council of war
[07:35:16] <amee2k> what was the highest current range available on that jack?
[07:35:34] <Raazeer> on that jack? 500m IIRC
[07:35:40] <amee2k> wow
[07:35:44] <amee2k> thats ridiculous
[07:35:53] <Raazeer> isn't it?
[07:36:37] <amee2k> hmm... or wait, does the resistance change when it changes the range? o.o
[07:37:08] <Raazeer> what I find even more ridiculous though is that nobody ever bothered to check their figures against their calculations
[07:37:26] <Raazeer> nope, the resistance of the shunt stays the same
[07:37:56] <amee2k> if it switches shunts depending on the range, then 50 ohm might be correct
[07:38:01] <amee2k> ah, okay
[07:38:04] <Raazeer> it may be that the resistance of the other jacks was better, but what do I need a 10A jack for in electronics class, anyways?
[07:38:29] <amee2k> yeah.... if you're measuring a couple milliamps it won't show shit on the 10A range
[07:39:06] <Raazeer> well, if we assume it switched shunts electronically when switching ranges, when I measure resistance, it would run on the lowest range, right?
[07:39:28] <amee2k> depends on the test current
[07:39:30] <Raazeer> because to measure resistance I only throw in a few milliamps.
[07:39:56] <amee2k> the lowest range can be like 500uA or lower depending on the meter
[07:40:41] <Raazeer> well, I don't remember the actual test current, but I would if there had been something unexpected about it
[07:41:05] <amee2k> "normal" cheap meters have a relatively high burden voltage by design, like a few hundred mV
[07:41:31] <amee2k> so if you have 300mV burden voltage on the 500uA range that means the shunt is like 600 ohms
[07:42:15] <amee2k> i've been thinking about sampling some hall effect current sensors and making adapter boards with voltage outputs
[07:42:55] <amee2k> it it switched to the 5mA range that'd mean 60 ohm shunt resistance, which would be about the right order of magnitude
[07:43:44] <Raazeer> amee2k, I'm not sure I agree. 50 Ohm shunt resistance has a lot of influence on the measurement
[07:44:03] <amee2k> depends on the application :)
[07:44:48] <Raazeer> wel, if you are measuring current through a track with , say, 150 Ohms resistance proper, you'd have 25% error
[07:45:20] <Raazeer> the black multimeters had an internal resistance of .5 ohms, my own has .3
[07:45:35] <Raazeer> apparently with the right kind of internal design, that is enough
[07:46:13] <amee2k> say i'm measuring a bias current sink on a 75V rail in an audio amplifier... 150 ohms won't matter much
[07:46:52] <amee2k> digital meters internally are voltage-sensitive because the ADCs usually convert voltage
[07:47:16] <amee2k> so if the current is within the selected range, there is usually a more or less constant maximum burden voltage
[07:48:26] <amee2k> its like using a fixed range 500mV voltmeter and swapping the shunt resistor to switch current ranges
[07:49:06] <amee2k> my cheapo 830B clones have ~1kR on the 200uA range and the smallest voltage range incidentially is 200mA
[07:49:40] <amee2k> so the internal ADC on the display probably has a range of 200mV. all the other voltage ranges are created with voltage dividers, and the current ranges with adequate shunt resistors
[07:50:57] <amee2k> and the resistance ranges are really voltage readings with an appropriate bias current
[07:51:08] <amee2k> and the range selector changes the bias current value
[08:02:08] <Raazeer> amee2k, pfff, that I gotta think about first.
[08:02:48] <Raazeer> the way I learned it is that the internal resistance of a measuring device measuring current is supposed to be as low as possible.
[08:03:55] <amee2k> as low as *practical* in the price range of the measuring device :>
[08:04:47] <Raazeer> yes, that's probably it, but since a 1-ohm precision resistor is only one buck, I'd still say there's room for improvement with 50 ohms...
[08:05:09] <amee2k> an 830B is like 3 bucks :>
[08:05:51] <Raazeer> ok, point in case. those multimeters sure as hell WEREN'T 3 bucks though...
[08:06:27] <amee2k> not anymore when they arrive in the EU :3
[08:06:34] <Raazeer> I've got a VC260 I picked up cheap at the local retail
[08:06:45] <Raazeer> cost me 30 euros at 50% discount
[08:07:11] <Raazeer> I must say it really is an improvement over the dime-a-dozen from the hardware outlet
[08:07:43] <amee2k> yup :3
[08:07:48] <Raazeer> I can only recommend it to you, getting a proper multimeter is really an improvement in the toolbox department
[08:07:53] <amee2k> and yay for rebranded uni-ts lol
[08:08:20] <Raazeer> rebranded units? what's it rebranded from then?
[08:08:57] <Raazeer> now that I look at a picture, the 830B looks very similar to the first mulitmeter I ever had
[08:08:58] <amee2k> compare the voltcraft meter design with various uni-trend meters like UT61, 70 and 71 series
[08:09:20] <Raazeer> amee2k, oh, that. Yes, that's right, they just stick their labels on. More power to them.
[08:09:25] <amee2k> i like having those cheap 830s too... not a precision instrument but if i accidentially blow it up then its not a big loss
[08:10:12] <Raazeer> rebranding is ok with me, it's not like anybody in the house had anything to do with producing the house wine either...
[08:13:18] <Raazeer> ok gotta go now, there's work to do, and my chat needs me for hissing-at-me purposes.
[08:13:33] <Raazeer> Nice chatting with you amee2k, and thanks for the advice on the fg.
[08:13:59] <amee2k> you're....
[08:14:01] <amee2k> welcome :3
[08:14:05] * amee2k idly wags tail
[08:18:07] <tzanger> I'm pretty sure a hobby servo can't do better than 9 or maybe 10 bit resolution
[08:18:45] <tzanger> 9 bits is > 1 degree for a full 360 degree swing which a servo usually can't do unless it's been modified
[08:19:12] <tzanger> 10 bits is about a third of a degree
[08:19:36] <tzanger> 9 bits is better than 3/4 of a degree
[08:19:36] <amee2k> at 8 bits, one step would be like 0.7 degrees... how good are the tolerances on the mechanics you're driving with that servo?
[08:20:04] <tzanger> my math shows 1.4 degrees per pwm step at 8 bits (360/256)
[08:20:24] <amee2k> from my exp, RC servos are usually 180 degrees
[08:20:45] <tzanger> right, depends on what specifically you've done to them
[08:20:57] <amee2k> even though you can overdrive some to 250-280 if you send out of spec pulses
[08:22:42] <tzanger> but yeah let's take the more practical case. 8 bits gets you better than 3/4 degree, 9 bits about 1/3 degree and 10 bits is better than 3/16 of a degree
[08:23:29] <amee2k> hence why i'm wondering what application needs that kind of resolution :3
[08:24:06] <amee2k> if i needed that, i'd get a servo motor with encoder and put worm gears on it to step it down like 1:100 or so
[08:24:20] <amee2k> then spring-load it to take up slack in the geartrain
[08:25:08] <amee2k> you can get DC servo motors that have like 2000 pulse outputs used on ebay occasionally
[08:25:45] <amee2k> so each pulse on the encoder is like 6.5 seconds of arc :>
[08:27:55] <tzanger> sure, if you're trying to position a scanning microscope
[08:28:12] <tzanger> you'll put a piezo actuator on the end of that to get you down to the exact location
[08:28:40] <amee2k> i don't remember beaky ever specifying a concrete application
[08:29:39] * amee2k idly brushes GuShH's tail
[08:29:44] <tzanger> if he's moving concrete he might need bigger sevos
[08:29:53] <amee2k> lolz
[08:35:28] <Tom_itx> i think he's still playing in the sandbox
[08:37:06] <amee2k> sand castle building robot! :D
[09:48:51] <megal0maniac_afk> RikusW: Hey
[09:49:12] <RikusW> hi
[09:49:35] <megal0maniac_afk> Done any more testing of the altera fw?
[09:50:35] <RikusW> no, but it seems to be ok
[09:50:45] <megal0maniac_afk> Cool :)
[09:50:58] <RikusW> I even tried at 16MHz, its a bit faster
[09:51:13] <RikusW> just change the prescaler value to 0 instead of 1
[09:51:52] <megal0maniac_afk> Nice
[09:52:13] <RikusW> I even read the jtag id from an avr using it and urjtag :)
[09:52:34] <megal0maniac_afk> I want to try out openocd, just need to get altera drivers :/
[09:52:50] <RikusW> though AVR seems to output FF after the id confusing urjtag a bit
[09:53:10] <RikusW> or get Quartus II web....
[09:53:19] <RikusW> it even works in Linux :)
[09:53:33] <RikusW> and some packages overlap
[09:53:50] <RikusW> so I got 1GB or so extra for Windows too
[09:55:24] <RikusW> in Firefox -> about:buildconfig
[09:57:03] <megal0maniac_afk> In Firefox -> about:robots
[09:57:05] <megal0maniac_afk> :D
[09:57:33] <RikusW> yep :)
[09:57:34] <RikusW> about:memor
[09:57:37] <RikusW> about:memory
[09:57:46] <megal0maniac_afk> I don't have firefox...
[09:57:48] <RikusW> about:support
[10:01:54] <bss36504> http://i.imgur.com/WrekVby.png
[10:02:07] <bss36504> ha. nice site, Atmel
[10:03:15] <bss36504> their asp doesn't know how to manage have the part finder open in multiple tabs. I wanted to look at D20s and xmegas, so I guess mashing them together is kind of correct :P
[10:30:17] <jadew> bss36504, it's probably holding some info in a named session var
[10:30:54] <jadew> noobs... they're everywhere
[10:31:20] <bss36504> granted, it's a better website than I could have made, but I still chuckled a little bit
[10:46:20] <tzanger> wtf, 384kB AVR?
[10:46:28] <bss36504> apparently
[10:46:37] <tzanger> DMA? AVR?
[10:46:40] <tzanger> what an odd combination
[10:46:51] <bss36504> I was just laughing about the D20 picture on the xmega page though
[10:47:20] <tzanger> the fact that it is an AVR and says ARM?
[10:47:34] <bss36504> yeah
[10:48:00] <bss36504> I had two tabs with product choosers open, one searching xmega, one searching d20.
[10:48:14] <bss36504> obviously somebody overlooked a detail when they coded the website
[10:48:47] <tzanger> heh
[11:43:10] <Raazeer> re all
[11:43:33] <Raazeer> what's the accepted wisdom on building a timeout on an avr?
[11:55:34] <bsdfox> timer overflow?
[11:55:36] <bsdfox> wdt?
[12:00:20] <Essobi> WEEEEEE. Monday.
[12:08:55] <Raazeer> bsdfox, doesn't the wdt reset the device?
[12:11:51] <bsdfox> Raazeer, it doesn't have to
[12:11:58] <rue_house> http://www.ebay.ca/itm/161146644354 <-- could someone isn the USA click to calculate shipping on that and tell me if it works?
[12:12:18] <bsdfox> same error rue_house
[12:12:26] <rue_house> damnit they told me it would be fixed
[12:12:48] <rue_house> ok, I'll take the listing down and relist it with fixed shipping
[12:12:52] <rue_house> ugh
[12:13:09] <rue_house> here I thought ebay had a really cool new system for calculating shipping
[12:33:28] <Raazeer> is there anything wrong with jumping to a subroutine from an ISR?
[12:33:48] <bss36504> nope
[12:33:58] <Raazeer> good.
[12:34:03] <Raazeer> that helps me structure this mess some.
[12:36:20] <bsdfox> Raazeer, you don't want to spend much time in an ISR
[12:36:44] <bss36504> well, only less time than it takes to trigger the next event
[12:36:46] <bsdfox> so yes, you can do it but make sure the subroutine isn't going to take many cycles
[12:37:05] <Raazeer> bsdfox, that's what I thought.
[12:37:32] <bsdfox> Raazeer, to get around that people often set flag variables in the ISR then process afterward either in main() or other event-driven functions
[12:37:37] <Raazeer> well, I'll brood over it some more, maybe I can run the stuff in main by way of flag bits.
[12:39:14] <bss36504> right, but if he only has one event, that's triggered by the ISR, then it doesn't matter where the processing happens, a new ISR will still be missed. But we don't really have enough info about the system.
[12:43:37] <Raazeer> nono, you were right, it is theoretically possible that an interrupt could occur during an isr, and besides keeping them short is good practice
[12:45:29] <bss36504> right, definitely good practice, but if you have to do a long process, and no other processes, then it doesnt matter if the event happens in an ISR or in some other place. 6 of 1, half dozen of the other.
[12:45:57] <tzanger> you can also inline the function if it's small and save yourself some call overhead time if it's that critical
[12:46:22] <bss36504> or use assembly :)
[12:46:35] <Raazeer> which I am
[12:46:47] <Raazeer> I should really learn avr-c one of these days ;)
[12:47:39] <bss36504> oh god, wow.
[12:48:07] <bss36504> do you know regular c? It's almost the same thing.
[12:48:52] <bsdfox> you'll understand the processor a lot better with asm
[12:48:57] <Raazeer> oh, I do know ansi C pretty well
[12:49:00] <bsdfox> that's why universities always teach it first
[12:49:12] <Raazeer> bsdfox, my university taught us lisp first
[12:49:19] <bsdfox> then you get C to be productive
[12:49:33] <Raazeer> which arguably gets you a very deep understanding of algorithmic processing
[12:49:49] <Raazeer> bsdfox, that's the first time I've ever heard anyone call C productive...
[12:49:51] <bsdfox> lisp for avr?
[12:49:58] <Raazeer> bsdfox, hellz no.
[12:50:09] <bss36504> Well if you know C, there's no reason you cant do C on the avr. With the exception of some handy compiler flags, it's the same
[12:50:17] <Raazeer> scheme, written, interpreted and execuded inside emacs
[12:50:29] <bsdfox> :)
[12:50:57] <Raazeer> bss36504, yea, probably. except for some isrs. and some registers. and some timers. and some other stuff that I didn't even know existed ;DDD
[12:51:01] <bsdfox> Raazeer, do they have you writing machine code by hand yet?
[12:51:13] <Raazeer> bsdfox, I'm long gone from that place
[12:51:24] <Raazeer> but my teacher had me writing machine code manually.
[12:51:29] <Raazeer> was kinda interesting.
[12:51:44] <Raazeer> gave me an even bigger edge over my co-students than the rest of the curriculum.
[12:52:11] <bss36504> Raazeer: I think you overestimate the difficulties. Any registers you can write to in asm, you can write to in C. An ISR is simply a fancy C macro that creates the ISR code for you. ISR(TIMER0_COMPA_vect)
[12:52:23] <Raazeer> they simply seemed unable to grasp the concept of a number representing an instruction
[12:52:37] <Raazeer> bss36504, I see.
[12:52:58] <Raazeer> but I won't get lazy and start writing avr-C at least until I finish this project.
[12:54:12] <bss36504> Fair enough, but dont be afraid of it. High level languages are for efficiency and readability so that you DONT have to manually manipulate the most registers.
[12:54:17] <bss36504> -the
[12:54:19] <tzanger> bsdfox: not really. There's not much sense in understanding the processor better unless you have a specific need for it
[12:54:50] <Raazeer> bss36504, I'd die of starvation if I was afraid of Level-5+-languages.
[12:54:55] <Raazeer> I'm a coder by profession.
[12:54:59] <tzanger> I can count on one hand the number of times I've had to drop to assembly for embedded system development in the last 10 years
[12:55:31] <Raazeer> tzanger, being a coder i can easily count to 1024 without taking off my shoes...
[12:55:36] <tzanger> and 3 of those times were for bare metal designs where I had to write my own crt0 to get things set up for a call to main(). :-)
[12:56:12] <tzanger> haw haw. :-)
[13:13:01] <Raazeer> I think I can swing it with the flag bits. it's pretty easy when you put your mind to it.
[13:14:01] <Raazeer> when you get right down to it, what you get when you do that is little more than a state machine.
[13:14:22] <megal0maniac_afk> It's all pure logic. You just need to match the logic in your head with the logic of the code :)
[13:19:08] <Raazeer> megal0maniac_afk, what logic in my head?
[14:11:25] <Romualds> hello advanced people :)
[14:12:15] <Romualds> can anyone tell where to get AC DC converter 220V ->5..13V for 100mA max smaller than in cell phone charger?
[14:13:05] <tzanger> Romualds: from any corner store or shopping mall selling cell phones
[14:13:22] <Romualds> tzanger nice to see you again :D
[14:13:43] <Romualds> cell phone charger circuit is too big for me
[14:13:45] <tzanger> if you want it tinier than that, you may want to build your own but it will not be as cheap nor will it be UL/CSA/EU certified
[14:13:51] <tzanger> there are some pretty tiny ones
[14:14:03] <Romualds> don't need isolation
[14:14:21] <Romualds> tzanger can you sugest some?
[14:14:24] <tzanger> nope
[14:14:30] <tzanger> I don't have a list of these things handy
[14:14:44] <tzanger> you can build an offline supply but they're dangerous as hell because they have no isolation
[14:14:51] <Romualds> maybe you can give me codewords of searching in net?
[14:15:01] <Romualds> i don't need isolation
[14:15:09] <Romualds> device will be completely isolated
[14:15:14] <tzanger> transformerless power supply will get you started
[14:15:30] <Romualds> thank you :)
[14:15:47] <tzanger> I'm concerned for your own safety building such a thing. I have personally and on more than one occasion released magic smoke and damn near released my bowels working on these things
[14:16:03] <tzanger> one small slip of a screwdriver or a moment of forgetfulness leads to surprises
[14:16:12] <Romualds> o i like smoke
[14:16:22] <Romualds> and electric schock
[14:16:25] <tzanger> which is exactly why I won't give you more information
[14:16:27] <Romualds> it wakes me up :D
[14:16:31] <Raazeer> tzanger, Romualds I was going to say the same thing... Romualds, do you like the smoke emanating from your own body?
[14:16:40] <Romualds> yes
[14:16:44] <Romualds> i am about that
[14:16:46] <Romualds> :D
[14:16:58] <Romualds> i say as you never have be hiten with 220 :D
[14:17:00] <Raazeer> and Romualds, you'll get plenty of shock if you build a capacitive power supply. Everybody does
[14:17:39] <tzanger> you don't know me. I spent 13 years in industrial power electronics. 220 is nothing
[14:17:45] <Raazeer> I'd recommend staying away from wall-socket voltages unlessy you REALLY know what you're doing
[14:18:11] <Raazeer> tzanger, those voltages in industrial power nodes can really shoot you off...
[14:18:13] <Romualds> normal people solder things when it is disconected from wall socket :D
[14:18:13] <tzanger> ever had a wrench fall across a three phase 600V stack? or ever witnessed a 4160V soft starter in an enclosure explode? I have. :-)
[14:18:31] <Romualds> Raazeer i REALY know what i'm doing :D
[14:18:49] <tzanger> everyone makes mistakes and your comments don't strike me as overly mature so I won't help you kill yourself or set fire to your room
[14:18:54] <Romualds> one time i get 1kV shock :D
[14:18:54] <Raazeer> Romualds, in that case, don't smoke too much, it's bad for your health ;D
[14:19:14] <Romualds> Raazeer thank you :D
[14:19:17] <Raazeer> Romualds, my highest voltage shock was about 160kV
[14:19:30] <Romualds> but current was small
[14:19:31] <tzanger> mine's abotu 44kV but it was from a flyback so next to zero current
[14:19:37] <Romualds> it doesn't case
[14:19:45] <Raazeer> it came from a cigarette lighter, so no current there either
[14:19:48] <Romualds> mine's from tesla coil :D
[14:19:58] <Raazeer> bah, tesla coils are smal fry.
[14:20:08] <Romualds> but one time i get 1kV from big capacitors
[14:20:12] <Romualds> that was cool
[14:20:21] <Romualds> amaizing :D
[14:21:10] <Romualds> there is people with different resistance
[14:21:32] <Raazeer> Romualds, you were one of those who tried to get the zap-a-tron from thinkgeek, right?
[14:21:36] <Romualds> i get shock from 220V so much times that i don't remember :D just get used to it
[14:21:52] <Romualds> Raazeer don't understand
[14:22:25] <Romualds> i just once hit nail to wall wire throught paper
[14:22:28] <tzanger> you'll think it's cool until you get a real bite, then you might gain some respect of what even a few mA can do to end your life
[14:22:32] <Romualds> doesn't see that
[14:23:10] <Romualds> tzanger get cool - normal people first solder and only then plug in wall socket ;)
[14:23:40] <Romualds> i am not so idiot that will solder wires under 220V :D
[14:24:23] <Romualds> ...so i take nile and get dance some time until i fall on ground
[14:24:47] <Romualds> that was my first introduction to 220 some 20 years ago :D
[14:25:12] <Raazeer> Romualds, searching for you...
[14:25:21] <inkjetunito> that tingling 50 Hz :o
[14:26:14] <Romualds> i think much more danger is take one wire in one hand and other wire in other hand - then curent run trought heart
[14:26:20] <Romualds> THAT is danger
[14:26:39] <Raazeer> Romualds, THAT: http://www.thinkgeek.com/stuff/41/lebedev.shtml
[14:26:46] <Romualds> ...but when one hand dances it's not so dangerous
[14:27:18] <Romualds> WTF? :DD
[14:27:31] <Raazeer> Romualds, http://www.thinkgeek.com/stuff/looflirpa/?pfm=Search&t=april%20fool
[14:28:00] <megal0maniac_afk> I saw some seriously disturbing footage of 4 chinese workmen pushing scaffolding and it hit overhead power lines. That was NOT funny
[14:28:40] <Raazeer> megal0maniac_afk, everybody on the net saw that
[14:29:10] <Raazeer> and I say: all deaths in this world can be boiled down to three causes: old age, bad luck and stupidity.
[14:29:44] <megal0maniac_afk> 15 minutes, burning people. No sound. Made me feel sick. That's why I only play with < 5V :)
[14:29:49] <megal0maniac_afk> dc
[14:30:00] <Romualds> can anybody sugest me small transformerless power supply smaller than in cell phones chargers?
[14:30:17] <megal0maniac_afk> Raazeer: I have to agree
[14:30:17] <Raazeer> smaller than cell phone chargers is difficult
[14:30:24] <Raazeer> why so small?
[14:30:35] <Romualds> i have cery small space for device
[14:30:41] <Romualds> very small space
[14:30:47] <megal0maniac_afk> get a smaller phone charger
[14:30:50] <Raazeer> Romualds, there is a limit how small a power supply can safely be made
[14:30:52] <Romualds> nee do power AVR from 220V
[14:31:03] <Raazeer> an external power supply is not an option?
[14:31:04] <Romualds> Raazeer no need for safely
[14:31:08] <Romualds> no
[14:31:25] <Raazeer> Romualds, where do you plan to use it, on an artillery target area?
[14:31:29] <Romualds> device will be completely isolated from environment
[14:31:39] <Romualds> it will be wireless drived
[14:31:53] <Romualds> Raazeer yes.. camera in bullet
[14:32:20] <Raazeer> Romualds, unless you plan to embed it into a block of ferrocrete, it isn't isolated enough to play with electrical and fire hazards
[14:32:23] <Romualds> so it is problem... :/
[14:33:02] <Romualds> Raazeer i will put it in linseed oil if you tell me where to get one :D
[14:33:10] <megal0maniac_afk> Your design is wrong. Try again
[14:33:27] <Raazeer> Romualds, why would you want to put it in linseed oil? that stuff burns too!
[14:33:41] <Romualds> that stuff is perfect isolator
[14:33:52] <Romualds> much more isolating than transformers oil
[14:33:58] <Raazeer> Romualds, I said electrical AND FIRE hazards
[14:34:15] <Romualds> ok i will put it in vacuum if you want it :D
[14:34:15] <Raazeer> making a psu too small generates more heat, which increases the fire hazard
[14:34:27] <Romualds> Raazeer neet 100mA max
[14:34:34] <Romualds> cell phone chargers is for 500mA
[14:34:50] <Raazeer> Romualds, where exactly do you plan to install it?
[14:35:00] <megal0maniac_afk> in a vaccuum
[14:35:03] <Romualds> it is comercial prototype
[14:35:04] <megal0maniac_afk> he said
[14:35:07] <megal0maniac_afk> :)
[14:35:08] <Raazeer> in a vaccuum cleaner?
[14:35:13] <megal0maniac_afk> lol
[14:35:14] <Romualds> i can not said unfortunatelly :/
[14:35:55] <Romualds> megal0maniac_afk did you do your studies for today? :D
[14:35:56] <Raazeer> Romualds, make your prototype bigger.
[14:36:07] <Romualds> then nobody will buy it :D
[14:36:19] <specing> you wont be selling prototypes
[14:36:37] <megal0maniac_afk> nobody will buy it if its on fire either
[14:36:49] <Raazeer> Romualds, I don't believe a word about that prototype nonsense - one does not cut corners on wall-socket psus in industrial designs.
[14:37:09] <Romualds> Raazeer sorry don't understand what you say
[14:38:04] <megal0maniac_afk> Tom_itx: Irc is going mad again
[14:38:07] <Raazeer> Romualds, in industrial designs you can't cut corners with the power supply because then you wouldn't be able to get certified and wouldn't be able to sell
[14:38:25] <Romualds> what mean cut corners?
[14:38:46] <Raazeer> take shortcuts. do things that are not completely safe or by the book
[14:39:00] <Romualds> they would be competely safe
[14:39:02] <Romualds> why not?
[14:39:28] <Raazeer> Romualds, I told you before: there is a limit how small you can safely build a power supply.
[14:40:02] <Romualds> i just need 2 times smaller PSU than in cell phone chargers for 5 times smaaler current
[14:40:26] <Romualds> i don't think it will be more dangerous than cell phone charger
[14:41:34] <Raazeer> Romualds, you can't make it that much smaller and still observe prescribed isolation distances and stuff.
[14:41:46] <Raazeer> give it up, build it with a battery or an external power supply.
[14:41:52] <Romualds> no
[14:41:59] <Raazeer> especially if you really want to sell it some day.
[14:42:09] <Romualds> i don't need 5 times smaller.. i need 2 times smaller only
[14:42:37] <Romualds> that is not serious about isolation distances
[14:43:01] <megal0maniac_afk> this stuff doesnt scale linearly
[14:43:02] <Romualds> distances can be decreased more and more times with apropriated isolation material
[14:43:30] <Romualds> megal0maniac_afk i understand
[14:43:38] <Raazeer> you mean appropriate - appropriated means stolen
[14:43:42] <Romualds> ok there is emty talking write now :(
[14:44:06] <Romualds> so you can't help
[14:44:20] <Romualds> thank you for think changing :)
[14:44:25] <Romualds> sorry for my bad english
[17:19:57] <jadew> Raazeer, did you figure that sensor out?
[17:26:05] <Raazeer> jadew, not completely
[17:26:19] <jadew> what's the issue?
[17:26:32] <Raazeer> it maybe that beyond 150cm it just needs one hell of an area to get an echo
[17:26:52] <Raazeer> also it gets all confused if there is anything at the fringe of its detection cone
[17:26:52] <jadew> ah, so it works, but not up to spec
[17:27:00] <Raazeer> you might put it that way.
[17:27:09] <Raazeer> fortunately, it's good enough for my purposes
[17:27:23] <jadew> cool, then I won't play with it tonight :P
[17:27:27] <Raazeer> now all I have to do is work out the math and assembley for running it
[17:27:39] <jadew> I'm gonna build a lamp
[17:27:51] <Raazeer> oh, you still might play with it a bit, I've seen some strange things that I'd appreciate a second opinion on.
[17:28:14] <jadew> what strange things?
[17:28:28] <Raazeer> e.g. if it gets confused, it seems like it pulls the echo pin up, then down again after some 30ms, but not all the way down but only down to some .4 volts.
[17:28:50] <Raazeer> only after the trigger pin gets pulsed again it comes the rest of the way down.
[17:28:59] <jadew> weird
[17:29:05] <Raazeer> don't I know it.
[17:29:16] <jadew> that's not enough to count as a 1 tho
[17:29:52] <Raazeer> the question is: Why is it pulling the echo pin up at all? if it doesn't get an useable echo, it's supposed to leave it down.
[17:30:15] <jadew> let me clean up my desk a bit and I'll run a test or two
[17:30:29] <Raazeer> that would be very much appreciated.
[17:33:17] <jadew> what chip are you using?
[17:33:30] <Raazeer> I'm using an attiny13
[17:33:39] <Raazeer> If you need some code to pulse it, I can give you one
[17:33:39] <jadew> ok
[17:33:45] <jadew> no, it's fine, thanks
[17:34:02] <Raazeer> ok.
[17:44:46] <Raazeer> interesting fact I found out today about the SR04: it uses a max2323 to create the pulses
[17:44:54] <Raazeer> don't ask me how though
[17:46:02] <bsdfox> it's probably just using it for a charge pump
[17:47:05] <Raazeer> didn't know the max3232 could do that.
[17:47:48] <Raazeer> I'll definitely give that datasheet a once-over
[17:49:06] <jadew> heh, 2 of the chips are shaved
[17:50:03] <Raazeer> jadew, I've only got one shaved chip.
[17:50:13] <jadew> which one?
[17:50:25] <jadew> the middle one and the one on the right are shaved
[17:50:42] <Raazeer> on mine only the middle one is shaved
[17:50:53] <jadew> the left one is a lm324
[17:50:58] <jadew> what are the other two?
[17:51:12] <Raazeer> the right one is the max3232
[17:51:18] <jadew> interresting
[17:51:32] <Raazeer> as for the middle one, I'd guess it's an OTP
[17:51:44] <jadew> OTP?
[17:51:58] <bsdfox> one time programmable
[17:52:16] <Raazeer> exactly. one-time-programmable uC.
[17:52:23] <jadew> ah
[17:52:50] <bsdfox> I can't imagine the logic is very complicated on those
[17:53:41] <jadew> ok.. so it seems the only thing I need to do to get this working is send a 10uS TTL signal every 60ms+
[17:53:43] <Raazeer> bsdfox, I guess the most difficult part is turning the echo into something a uC can process
[17:53:57] <Raazeer> jadew, exactly.
[17:55:35] <bsdfox> Raazeer, I'd guess an op amp into an adc doing some digital filtering then spitting out uart/spi/i2c
[17:56:15] <Raazeer> bsdfox, actually there are four opamps in the lm324
[17:56:33] <bsdfox> so maybe they do the filtering in hardware
[17:57:13] <Raazeer> bsdfox, I guess so, there's a lot of hardware on the receiver side of the pcb
[17:57:34] <Raazeer> they'd need a bandpass at the very least
[18:03:00] <jadew> Raazeer, you're right, it's jumping around a lot
[18:04:19] <Raazeer> ok, so at least we know mine probably isn't broken
[18:04:31] <Raazeer> or else they are constructed broken
[18:04:31] <jadew> http://dumb.ro/screenshot/mQ9XR.png
[18:04:36] <jadew> http://dumb.ro/screenshot/fmqiV.png
[18:05:19] <Raazeer> jadew, yeah, that looks about like what I get.
[18:05:32] <tzanger> alright
[18:05:42] <tzanger> time to test if I can fire this triac like I think I can
[18:05:44] <jadew> Raazeer, this happened when I was pointing it at the lamp
[18:05:58] <jadew> if I point it at a solid object it looks ok
[18:06:01] <tzanger> jadew: what's that?
[18:06:12] <Raazeer> what I don't see in your graphs is a downward spike just before the rising flank
[18:06:21] <jadew> tzanger, an ultrasound sensor
[18:06:25] <jadew> well, distance sensor
[18:06:34] <tzanger> ah
[18:06:39] <jadew> Raazeer, what do you mean?
[18:06:43] <Raazeer> tzanger, an HC-SR04 to be precise
[18:06:45] <jadew> can you post a screenshot?
[18:07:54] <Raazeer> jadew, let me see if I can get it to do that again.
[18:10:04] <Raazeer> jadew, this may take some time, it looks like it isn't working right now...
[18:10:16] <jadew> what's wronng?
[18:10:35] <jadew> also, I seem to get a 10ms pulse for a distance of about 1 and a half meters
[18:10:42] <jadew> I think it can go even further
[18:11:20] <jadew> yeah, I think it just measured up to 3 meters right now
[18:11:32] <jadew> let me see if I can find my ruller
[18:11:57] <Raazeer> don't know yet, the uC seems not to emit any pulses right now
[18:14:58] <jadew> yep, this sensor seems to work fine
[18:19:37] <Raazeer> strange, now i can't reproduce it any more...
[18:22:24] <Raazeer> now where did I put that other probe...
[18:23:34] <jadew> Raazeer, I'm not getting satisfactory results either
[18:24:30] <jadew> the pulse seems to stay high longer than it should
[18:25:53] <jadew> anyway, need me to run any particular test?
[18:26:12] <jadew> I want to put this back in the drawer so I can work on something else
[18:27:55] <Raazeer> jadew, I've got the scope on and all the caps off, but I still can't reproduce that weird downward pulse
[18:28:47] <jadew> strange
[18:28:58] <Raazeer> I guess we'll just say it's a 'less-than-optimum ranging module' and leave it at that.
[18:29:03] <Raazeer> it'll do for my purposes
[18:29:14] <jadew> going out for a smoke, let me know if you think of anything you want me to test
[18:31:29] <Raazeer> jadew, thanks for your help, I guess you've already done enough. At least I know mine (probably) behaves normally if not as advertised.
[18:38:13] <jadew> Raazeer, np
[18:42:46] <tzanger> double-you tee eff
[18:42:55] <tzanger> I just had a reed relay's contacts ice up
[18:43:04] <tzanger> I'm driving milliamps through the contacts
[18:45:11] <Raazeer> tzanger, what do you mean ice up?
[18:48:00] <Raazeer> ok, gotta go, long day tomorrow.
[18:48:05] <Raazeer> thanks again jadew
[19:54:44] <tzanger> balls.
[19:54:50] <tzanger> doesn't work in reality
[19:54:53] <tzanger> sim looks great
[19:55:42] <Tom_itx> things bite that way
[20:02:20] <Tom_itx> tzanger do you need a better relay?
[20:07:08] <tzanger> Tom_itx: shouldn't have
[20:07:14] <tzanger> that's not hte part that's got me upset
[20:07:21] <tzanger> I can't drive these goddamned triacs
[20:07:33] <tzanger> sim says I can but actual hardware says otherwise
[20:07:36] <Tom_itx> why not?
[20:07:43] <Tom_itx> i used an opto for that
[20:07:53] <tzanger> trying to avoid that, this is cost sensitive
[20:08:04] <Tom_itx> zero crossing
[20:08:09] <Tom_itx> takes care of it for ya
[20:09:01] <tzanger> http://mixdown.ca/dump/trigsim.png
[20:09:13] <tzanger> S1/V2 are simulating the AVR IO
[20:11:56] <tzanger> the funny part is if I connect the triac to VCC like hte sim is doing, it does not fire at all
[20:12:06] <tzanger> and that circuit is pretty much bang-on to what I've got
[20:14:24] <Tom_itx> what's it for?
[20:16:38] <tzanger> in floor heating pump control
[20:18:19] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/toaster_oven/control_sch.png
[20:18:25] <Tom_itx> that's what i used
[20:18:57] <Tom_itx> box on the right
[20:19:42] <tzanger> Tom_itx: driving it with an opto isn't an option
[20:19:45] <tzanger> an opto adds significant cost
[20:20:04] <Tom_itx> how many you making?
[20:20:21] <tzanger> hopefully 250/mo once things get going
[20:22:08] <Tom_itx> what's it do irl?
[20:22:16] <Tom_itx> the circuit..
[20:22:21] <tzanger> that's exactly what it does
[20:22:26] <Tom_itx> does it trigger at all
[20:22:31] <tzanger> o
[20:22:31] <tzanger> oh
[20:22:35] <tzanger> sorry I misunderstood
[20:22:41] <tzanger> it only fires on the negative half cycle
[20:22:48] <tzanger> on the positive half cycle the triac doesn't fire
[20:23:15] <tzanger> so basically since I'm "grounding" the gate with respect to MT1 I'm firing in Q2 and Q3
[20:23:21] <tzanger> since I'm sucking current out of the gate
[20:23:22] <Tom_itx> sim says it fires on both?
[20:23:55] <tzanger> well as connected (gate to VCC) it does nothing IRL. with gate "grounded" it fires only on the negative half cycle
[20:24:06] <tzanger> sim says if I connect gate to VCC it fires on both halves
[20:24:14] <tzanger> gate to VCC though is Q1/Q4
[20:24:30] <tzanger> which also should work but there is something different in how the AVR IO pad is connected
[20:24:45] <tzanger> I know the AVR IO pad is a pair of mostfets
[20:24:54] <tzanger> but I don't have enough data on them
[20:24:56] <Tom_itx> more resistance in the avr?
[20:25:05] <tzanger> I was playing with that, doesn't seem to be the issue
[20:25:09] <tzanger> now the interesting part is
[20:25:27] <tzanger> if I can connect the gate to the real "neutral" instead of the ground, it fires beautifully
[20:25:41] <tzanger> so it's a matter of my reference not being strong enough
[20:25:53] <tzanger> I wonder if I experiment with that instead if it will start working
[20:25:59] <tzanger> i.e. give it a stiffer reference
[20:28:03] <Tom_itx> which avr are you using/
[20:28:04] <Tom_itx> ?
[20:28:50] <tzanger> tiny13a
[20:29:34] <Tom_itx> just for the trigger?
[20:29:44] <tzanger> what do you mean?
[20:29:45] <Tom_itx> t10 would do that
[20:30:03] <tzanger> oh I can reduce it in a future spin
[20:30:28] <tzanger> right now I have some LEDs and a pot too that will probably cease to exist in a future re
[20:30:32] <tzanger> rev
[20:31:44] <Tom_itx> the triac is .36 in quantity btw
[20:32:08] <Tom_itx> .30/500
[20:32:47] <Tom_itx> mouser is even cheaper
[20:32:58] <Tom_itx> .308/100
[20:33:01] <Tom_itx> .27/500
[20:33:33] <Tom_itx> worry free
[20:34:03] <tzanger> it's subject to change as well. I was looking for a nice SMT one but couldn't find a SOT23-ish sized one
[20:34:33] <Tom_itx> no
[20:34:37] <Tom_itx> probably not
[20:35:03] <tzanger> I'm only driving these two relays (there are two channels) so a tiny triac is fine
[20:35:18] <tzanger> actually I might try some 'lighter' triacs... lighter gate trigger voltage
[20:35:25] <Tom_itx> what do the relays do?
[20:35:40] <Tom_itx> HE101 drives from logic with builtin diodes
[20:35:49] <Tom_itx> hamlin
[20:35:58] <Tom_itx> dip size
[20:36:03] <tzanger> oh those relays were for the test jig
[20:36:16] <tzanger> they connect either 24vac or the avr dragon to the DUT but not both ever
[20:36:26] <tzanger> except one of them iced up for some unknown reason
[20:36:31] <tzanger> I am certainly not overdriving them
[20:36:47] <tzanger> and it's not that the reed got magnetized, I smacked it around a bit to see if that was the problem
[20:36:51] <tzanger> I'll cut it open later to see
[20:40:48] <tzanger> that's one thing I should try again
[20:40:57] <tzanger> I had a small cap across the gate resistor to "smack" the gate on
[20:41:15] <tzanger> wonder if that'd help... I can't do it in prototype because it interferes with HVSP
[20:54:09] <tzanger> I wonder if I'm better off "building" a triac with a pair of transistors
[20:55:48] <Tom_itx> they seem to do what they're designed for pretty well
[20:56:15] <tzanger> yes, but they're all designed for much higher voltage and current than what I'm after
[20:56:44] <tzanger> my design goal is sensitive gate and very low trigger voltage/current, AND something that's smaller than SOT223 for carrying <25mA
[20:57:15] <tzanger> it'd take four transistors to do one triac's job. I can get really tiny transistors but is it worth it and can I get the sensitivity low enough
[20:57:53] <Tom_itx> or a pack of them
[20:58:04] <tzanger> yeah, they do have tiny duals/quads
[20:58:25] <tzanger> not sure if they're wired up correctly for this, it really is a pervsersion of what they're designed for :-)
[20:58:26] <Tom_itx> the package takes more space than the sand inside
[21:08:06] <tzanger> interesting
[21:08:14] <tzanger> SCRs are common with trigger currents down in the microamp range
[21:08:39] <tzanger> and sot23 too, a pair of them is the size of an to92
[21:23:48] <Essobi> /7/10
[23:40:46] <Enma_Hinobara> http://www.mouser.com/ProductDetail/NXP/LPC810M021FN8FP/?qs=%2fha2pyFaduie1iYV2R95bMUg6vBGcmHH9PLSMvn90Ow%3d
[23:40:46] <Enma_Hinobara> Is that not the cutest little Cortex M0+ microcontroller you've ever seen?
[23:45:39] <theBear> that's kinda cool
[23:47:44] <bsdfox\> those have a serial bootloader too
[23:51:08] <Casper> from factory?
[23:54:05] <jadew> didn't know they make arm in dip packages too
[23:54:10] <jadew> altho M0 is like what... sub 20Mhz?
[23:54:20] <jadew> oh look at that, 30Mhz
[23:54:32] <jadew> neat
[23:55:27] <Enma_Hinobara> 12 MHz with the internal clock, 30 MHz if you allocate one pin to a clock in