#avr | Logs for 2016-06-07

Back
[00:00:07] <Casper> the sensor itself probably don't take much power, the support circuitry is what does
[00:00:07] <_ami_> Casper: not much power it consumes?
[00:00:18] <_ami_> ah, ok
[00:00:29] <Casper> considering that the circuit must be calibrated, a self calibration feature is present
[00:00:43] <Casper> shutting down the circuit would cause that calibration to be lost
[00:01:06] <_ami_> valid point.
[00:01:07] <_ami_> ok
[00:01:09] <Casper> basically, the way it work, it kinda average the heat of the zone it look at
[00:01:20] <Casper> then look for any slight variation in that average
[00:02:30] <Casper> the lens in front of it make some real magic: instead of checking for the full area, it more like make lines/pattern, so instead of looking at everywhere, it now look at some smaller zone (which is why there is also some dead spot)
[00:04:13] <Casper> now... I need to go in my car...
[00:04:29] <Casper> but I just came out of the bath... grrr... need to half dress up... grrrrr
[00:18:51] <_ami_> Casper: thanks
[00:53:52] <jaggz> anyone want to adapt this to avr code? https://github.com/remy/arduino/blob/master/hardware/tiny/cores/tiny/Tone.cpp
[00:59:19] <rue_shop3> an 8 bit avr?
[00:59:34] <rue_shop3> wel,, come to think of it, I suppose you only need to generate 1 cycle
[01:00:34] <Casper> he want to do tones on tiny85
[01:00:55] <Casper> the timers on the 85 has been butchered...
[01:08:31] <jaggz> They could have fit it in that big chip!
[01:25:38] <_ami_> jaggz: you could use OC1A (PB0) for that?
[01:26:20] <Casper> _ami_: yes and no
[01:26:47] <Casper> the timer on the tiny85 is a true PWM, there is no "top"
[01:26:58] <Casper> so the counter always go from 0 to 255
[01:27:17] <Casper> unlike on the mega where you can tell it to stop at X
[01:28:06] <Casper> I think he may need to go half software half hardware
[01:29:02] <_ami_> Casper: did not know this Top concept. can you please explain a bit more? especially the difference between what i can do in Atmega and what i can do in tiny.
[01:29:25] <Casper> on the mega, you have a few more registers
[01:29:49] <Casper> basically, you have the counter value, when to trigger and when to reset
[01:30:02] <Casper> the trigger of course is for PWM and interrupt
[01:30:18] <Casper> and on the tiny, there is no "when to reset", that is fixed to 255
[01:30:36] <_ami_> no overflow?
[01:30:50] <Casper> so on the mega you can say to reset at 125 and it will go from 0-125 instead of 0-255
[01:31:18] <_ami_> ah, u meant it can not reset to 0 even i set OCR0A = X where X != 255?
[01:31:40] <_ami_> got it.
[01:31:56] <_ami_> hmm
[01:32:19] <Casper> for tone, you want to set the prescaller so 255 = lowest tone... then you change the top to make it reset faster, thru increasing the frequency so the pitch
[01:34:55] <jaggz> tone.cpp doesn't look too complicated.. not that I can make sense of it yet
[01:36:21] <Casper> jaggz: I took a small glance at it, I think it use the interrupt to work around the issue
[01:36:33] <Casper> making a kind of semi-hardware pwm
[01:36:45] <Casper> set timer at 125 with interrupt
[01:37:01] <Casper> at interrupt invert the output, reset the counter
[01:37:31] <_ami_> Casper: compare interrupt would be used here
[01:38:17] <jaggz> ahhh
[01:38:40] <jaggz> it's not the highest of my priorities, btw.
[01:38:47] <jaggz> I can just do a 2 tone thing for now
[01:39:13] <Casper> TONETIMER_COMPA_vect <==== he does use compare
[01:39:59] <_ami_> i think only overload is ISR for compare which runs on CPU. As Casper rightly mentioned semi hw/sw
[01:40:32] <Casper> *tone_timer_pin_register ^= tone_timer_pin_mask;
[01:40:51] <Casper> so yeah, semi hw/sw
[01:41:29] <_ami_> jaggz: do you need a minimal sample for this? i think i wrote it somewhere.
[01:41:48] <_ami_> i wrote it for atmega16a
[01:42:05] <Casper> _ami_: btw, the tiny85 has been seriously butchered
[01:42:16] <Casper> like.. no async serial !
[01:42:54] <jaggz> _ami_ a minimal sample using using interrupts for tone generation?
[01:42:56] <_ami_> jaggz: https://github.com/amitesh-singh/amiduino/blob/master/avr/avr_programmming/timers/timer0/ctc/ctc.c
[01:43:45] <_ami_> jaggz: no, it is for that semi hw/sw
[01:45:30] <jaggz> thanks
[01:45:43] <jaggz> not sure if I'm advanced enough to adapt it, but it's all slowly contributing to my understanding
[01:46:47] <jaggz> this should readily be adaptable no? http://www.technoblogy.com/show?KVO
[01:46:49] <jaggz> (to avr)
[01:47:16] <_ami_> Casper: no Rx, Tx ~~ how devs do debug then?
[01:47:45] <jaggz> hmm.. I'm at a 16mhz clock.. what would
[01:48:19] <jaggz> his TCCR1 = 0x90 | (11-octave); // for 8MHz clock end up being.. hrm
[01:48:23] <Casper> 1 wire debug?
[01:48:59] <Casper> and you can tx with sync serial, but then you need to have a spare pin for that sync that won't be used
[01:49:09] <Casper> or use software serial
[01:50:35] <_ami_> Casper: does PB2 acts like Tx ?
[01:50:50] <_ami_> on Attiny85
[01:50:52] <jaggz> he uses octaves of 4 and 5 only, in his example
[01:50:57] <Casper> dunnot, would have to check DS
[01:51:03] * _ami_ looking at DS
[01:51:16] <_ami_> i don't find rx & tx
[01:51:59] <jaggz> that's weird.. TCCR1 = 0x90 | (8-octave); // for 1MHz clock
[01:53:37] <jaggz> oh wait.. n/m that's cool
[01:54:47] <jaggz> why's he subtracting like that??
[01:55:22] <jaggz> he's working in the CS13-CS10 bits, which are clock select bits
[01:56:05] <jaggz> but those bits set the prescaling source
[01:56:18] <jaggz> (p101 of ds)
[01:56:30] <Xark> _ami_: You are doing UART output on ATTiny85? It uses USI for "assisted" serial...
[01:57:16] <jaggz> what's a "fast peripheral clock (PCK)"?
[02:01:51] <_ami_> Xark: is there any minimal sample for Tx (tiny)-> outside world?
[02:02:43] <_ami_> so PB3 is the Tx
[02:04:27] <Xark> _ami_: Perhaps http://www.technoblogy.com/show?VSX but you don't need Rx part...
[02:05:43] <_ami_> thanks
[02:06:02] <Xark> Hmm, wait...that one is input only I think. :)
[02:07:08] <Xark> Perhaps http://www.ernstc.dk/arduino/tinycom.html
[02:08:21] <Xark> ...which leads to http://nerdralph.blogspot.ca/2013/12/writing-avr-assembler-code-with-arduino.html and http://sites.google.com/site/ralphdoncaster/home/files/BasicSerialv2.zip
[02:09:26] * Xark has only used USI for SPI where it is more helpful (wrong bit order for UART apparently).
[02:30:03] <Mr_Sheesh> Thats a cute nick, really
[03:11:05] <rue_bed> yu CAN just write assembler, compile it, link in the routenes and use avrdude to upload it with the arduino boot loader
[03:27:16] <_abc_> Hello. What does one consider to be a "good" avr sim, for avr, atmega and tiny? The one in Studio is not so nice. Also, are there any tricks to make studio work in wine?
[03:36:01] <_abc_> http://www.dailymail.co.uk/sciencetech/article-3627510/Electric-eels-LEAP-water-Snake-like-fish-jump-directly-attack-threats.html WOW. Evil.
[03:36:05] <_abc_> oops
[03:44:46] <orbiter> the eel is going for the head/brain :>
[03:47:22] <_abc_> Nah it's going for the meal. In ligitimate self-defence, of course. It got the puddle/pool/aquarium 1st.
[03:47:55] <_abc_> I don't know what these guys eat but they may be able to eat anything after zapping it. I read somewhere some can make 600V for a few msec.
[03:49:04] <_abc_> That's about 75mA into a 8kohm human body model, easily 4 times ground protection fault trip current.
[03:51:00] <rue_bed> there are no good simulators
[03:51:06] <rue_bed> just built in in the real world
[03:51:16] <rue_bed> otherwise all you will have are simulator results
[03:51:36] <rue_bed> the results of a simulator are NOT real world results, often they aren't even close
[03:51:53] <rue_bed> if you build it in a simulator it will ONLY work in the simulaotr
[03:58:06] <_abc_> I don't care about real world here, just getting the math right before unleashing it on the world... and the exact timing, which is really hard to get irl without very accurate instrumentation and putting scopes in danger and so on.
[03:59:04] <_abc_> rue_bed: that being said, I basically no longer do circuits without simulating in spice before making the board. The result is, my boards have fewer rework signs and added "barnacles" (this word I owe do Dianora)
[03:59:28] <_abc_> But the sim, when cycle accurate asm timing for bit banging output pins, is a must.
[04:22:00] <Jartza> _abc_: well. as the simulators go, atmel studio simulator is the most accurate.
[04:22:09] <Jartza> I used that to make timings precise on my VGA code
[04:22:29] <Jartza> and VGA needs precise timings, even single clock of skew/jitter will immediately show on screen
[04:26:24] <Jartza> I found both simavr and simulavr being not-exactly-cycle-accurate
[04:26:56] <Jartza> but atmel studio was cycle-accurate
[04:27:45] <_abc_> Jartza: nice to know, thanks.
[04:27:56] <_abc_> Are there any known hacks to make studio4 work in wine?
[04:30:29] <Jartza> no idea, why so old version?
[04:30:33] <Jartza> I used atmel studio 7
[04:38:59] <_abc_> That's what I have installed on my ancient dusty Vista partition now... and I need to sim a tiny 13 which is also ancient.
[04:39:21] <_abc_> I do not use studio at all normally. Have not touched that in like 4 years or so. Hope it still works.
[04:59:47] <Jartza> _abc_: I know nothing about the simulator quality in studio 4, but studio 7 seems to be clock-accurate
[05:00:02] <Jartza> I guess it's not too heavy a task to just download and try it on wine
[05:00:05] <_abc_> I am sure studio4 sim is clock accurate.
[05:00:18] <_abc_> It is too heavy a task. I have other things to do.
[05:00:20] <Jartza> I used virtual machine with windows on it, because Parallels on Mac has this "coherence"-mode
[05:00:33] <_abc_> I am in asking mode to collect other's experiences, not to make my own mistakes ;)
[05:00:36] <Jartza> where the application is running on virtual machine, but drawn on your "normal" desktop
[05:01:17] <Jartza> but yeah, I used attiny85, which is basically "advanced tiny13" :)
[05:01:20] <_abc_> I don't know what the mac glue does, I don't sniff that. I have all sorts of virtual machines, including running the properly installed windows under wine.
[05:02:00] <_abc_> I actually have a wine version so old, that studio4 does not run in it at all.
[05:04:01] <Jartza> I bet linux virtual machines also have some kind of similar mode
[05:04:26] <Jartza> although I also have wine on my mac, maybe I should try the atmel studio with it once I get home
[05:15:39] <Lambda_Aurigae> _abc_, I've never gotten atmel studio or avr studio to run properly in linux. Earlier versions would install and actually run under wine but not stably. Newer versions just don't run at all.
[05:18:34] <_abc_> Lambda_Aurigae: I know. That is one more reason to stick to studio4 and not upgrade. Do you perhaps remember what version last worked?
[05:18:43] <_abc_> "not stabily" or anyhow?
[05:19:20] <_abc_> I know new versions require .net library versions bumped to some insanely recent version, which does not work on my ancient Vista at all.
[05:19:33] <_abc_> Also, for the record, all the horror stories you heard about Vista are true.
[05:21:37] <Jartza> I have installed windows 10 into virtual machine for the sole purpose of running atmel stduio :P
[05:22:07] <_abc_> Jartza: ouch. vbox?
[05:27:11] <Lambda_Aurigae> It has been more than 8 years since I last used it.
[05:27:26] <Lambda_Aurigae> I use virtualbox for vm...works well.
[05:28:11] <Lambda_Aurigae> my work computer even runs linux these days because I hate windows so much and I run win7x64 in virtualbox to get access to my manuals for xerox.
[05:29:09] <Jartza> _abc_: nope, Parallels Desktop
[05:29:14] <Jartza> as I'm on... mac
[05:30:00] <Jartza> fortunately I dont need windows at work
[05:30:59] <Lambda_Aurigae> our manuals are directly integrated into exoploder.
[05:31:03] <Lambda_Aurigae> exploder
[05:31:32] <Lambda_Aurigae> I even tried running explorer under wine but they wouldn't install properly...some kind of security thing.
[05:59:38] <_abc_> Lambda_Aurigae: what format of manuals? xchm exists for .chm . Many manuals can be converted into .chm I think?
[06:03:21] <_abc_> Lambda_Aurigae: are your help files chms?
[06:11:46] <Lambda_Aurigae> these are encrypted html stuff...there is a decryption system that is linked to explorer.
[06:12:02] <Lambda_Aurigae> I have to run the lock program and enter user and password then explorer can display the manuals.
[06:12:09] <Lambda_Aurigae> they are definitely not chm.
[06:13:39] <Lambda_Aurigae> it's a xerox security thing.
[06:13:44] <liwakura> iirc chm has no password protection mechanism
[06:14:05] <Lambda_Aurigae> if I don't keep up my security stuff then I lose access to my manuals.
[06:17:35] <Lambda_Aurigae> a couple of our guys don't pay attention to the security warnings and don't update their passwords on time and then they have to contact corporate and get their accounts reset and get yelled at by the boss because he gets nastygrams from network security guys.
[06:23:09] <_abc_> Sounds like you are trying to fend off China ;)
[06:23:49] <_abc_> I never heard of secured chms but I do see a lot of password requests from legitimate online and freely accessible pdfs lately.
[06:24:18] <_abc_> Which mostly turn out to be bogus and due to my using outdated readers which are confused by later PDF encoding version headers or such.
[06:24:38] <_abc_> This is the price you pay for making your systems run too well, so they do not need updating in 10 years... sigh.
[07:50:19] <_abc_> Personally, I think that any it dept which requires exploder use and allows nothing else is an accident waiting to happen.
[07:50:23] <_abc_> </off topic>
[07:54:46] <Jartza> _abc_: well, at least atmel studio 7 didn't want to install under wine
[07:55:10] <WormFood> use something like vmware/virtualbox
[08:01:29] <Jartza> WormFood: personally I have win10 installed under Parallels Desktop for atmel studio
[08:01:41] <Jartza> although I don't use it that often anyway
[08:01:50] <WormFood> Windows 10? Seriously?
[08:02:09] <WormFood> If you really want your VM to be fast, use XP on it ;)
[08:02:36] <WormFood> I still think Windows 7 is the best currently supported M$ OS.
[08:03:49] <WormFood> With Windows 10, it feels like some weird FrankenOS. They just can't make things uniform. They want to force a tablet view on a desktop user, which is absolutely absurd.
[08:04:16] <WormFood> And then, you get forced updates. What happens when they force down an update that bricks everyone's machines?
[08:04:27] <WormFood> Not that you'd care, with a VM, just sayin'...
[08:04:56] <WormFood> I see Windows 10, as an advertising and revenue generation platform for MicroSlop.
[08:20:23] <Jartza> WormFood: win10 was able to be installed from parallels menu, so that's why :)
[08:20:34] <Jartza> create new VM -> windows 10 -> 2 minutes and done
[08:21:02] <LeoNerd> (OT) Does anyone know of a good "family overview" docmuent about all of the Analog Devices digital isolator chips? They've got like... 400 of them in various kinds. I'd like a summary of what is what
[08:21:05] <Jartza> then I just installed atmel studio 7 to it and I run atmel studio in "coherence" mode, where the atmel studio is just shown as one window on my mac desktop
[08:21:11] <Jartza> so I don't see any "windows desktop" ever
[08:21:40] <Jartza> but mostly I use sublime text on mac, and compile from command-line. only when I need simulator, I use atmel studio
[08:23:22] <WormFood> Jartza, that's called "unity mode" in vmware workstation, and it's really handy. Sadly, they removed that feature from ONLY the linux fuckin' version of vmware desktop. That was one of the best features of vmware, but it seems other players are picking up that slack
[08:24:58] <Jartza> ahh. yea. I've only used virtualbox on linux and parallels on mac
[08:25:06] <Jartza> usually I don't run windows that often :)
[08:25:55] <WormFood> The only reason I need to use vmware is because some asshole company doesn't release info on their hardware, so that software can be written under any os
[08:26:39] <WormFood> I tend to use Windows for hardware specific stuff, because there's no software for it under Linux.
[08:27:19] <WormFood> like programming the flash memory controller in my usb memory stick, I use Windows XP for, because that software frequently doesn't work right in never versions of Windows.
[08:27:57] <Jartza> well yeah, that's basically what I use windows for, too. to those nasty devices, requiring windows. fuckers. :)
[08:33:59] <WormFood> Sometimes you can do that stuff from your VM. I know my G540 IC programmer works from vmware just fine
[08:42:53] <Jartza> on parallels, at least USB devices work nicely
[08:43:13] <Jartza> they can be "attached" to either your host os or to guest os and switched easily on the fly
[08:52:13] <LeoNerd> Hrm.. dilemas, dilemas.. Trying to make a little isolated RS-485 board.
[08:52:29] <Jartza> little isolated? not well-isolated? :)
[08:52:31] <LeoNerd> I can buy simple comodity digital isolator + DC/DC isolator + MAX481 chip.
[08:52:42] <LeoNerd> Or... I could get a fancier isolator that does power as well, and a MAX481 chip
[08:52:55] <LeoNerd> Oooor.. I could get an isolated RS485 transceiver directly, and just add a DC/DC isolator
[08:53:12] <LeoNerd> Oooooooooooooorrrr I could get an isolated RS485 transciever with builtin power coupler
[08:53:41] <LeoNerd> The prices of all these four options are /fairly/ similar.. the allinonechip is just under £9, which is about the same as the sum total of prices of any other option
[08:56:05] <LeoNerd> So if prices are about the same, do I go for the smallest most integrated solution, risking my entire design on the future availaility of that one specialised chip but giving the smallest board area and lowest power consumption.. OR.. do I offset that risk by using more generic and easier second-sourced components, but giving a larger overall result that eats more power?
[09:29:38] <carabia> LeoNerd: well, what volumes are we talking?
[09:32:37] <LeoNerd> Eh.. handfulls..
[09:32:53] <LeoNerd> I'm gonna need about 4 myself, and I might start selling them on tindie. but I doubt I'll shift very many
[09:33:12] <LeoNerd> But who knows.. I didn't think I'd shift any scope current probes and I just shipped my 10th yesterday :)
[09:50:16] <aandrew> LeoNerd: I almost always choose the latter
[09:50:20] <aandrew> been bit too many times
[09:50:35] <LeoNerd> So, three more-common chips?
[09:50:36] <aandrew> LeoNerd: a question about your tindie stuff
[09:50:48] <LeoNerd> It's more soldering time, too
[09:50:51] <aandrew> do you carry much stock? i.e. do you build up a dozen or a hundred at a time?
[09:50:54] <LeoNerd> Which I suppose I should factor in
[09:51:02] <LeoNerd> Hah.. no. Largest overstock I've ever had so far is two
[09:51:08] <LeoNerd> I usually get boards made in 3s from oshpark
[09:51:17] <aandrew> ah so pretty low ovlumes
[09:51:18] <aandrew> volumes
[09:51:26] <LeoNerd> Though currently I have 4 bare boards for the current probe sitting around. Gonna make them up when the sense amp chips arrive
[09:51:32] <LeoNerd> Tha'tll be my largest ever spare
[09:51:46] <LeoNerd> Yah - I've only sold 10 of the current probe so far; I wasn't really expecting to make much on it
[09:52:00] <LeoNerd> I'm only really selling things because I can, because when Iget a board made by oshpark they helpfully send two spares ;)
[09:52:51] <LeoNerd> Since I do so much of my build by hand anyway, there's not a lot of time or cost saving in building them in bulk anyway. Sometimes I order components in strips of 10 or 20, but that's about it
[09:54:09] <carabia> I'd probably go with an integrated solution for such a low-volume item, really
[09:54:34] <LeoNerd> Less debug time,... if it works, it works.
[09:54:38] <carabia> Yeah.
[09:54:39] <LeoNerd> Fewer interconnects
[09:55:02] <LeoNerd> We are into £8.70 vs. £7.60 cost difference; which is.. what.. 12% if that?
[09:55:06] <LeoNerd> Plus board area...
[09:55:18] <LeoNerd> Ohwait, I might end up -saving- more than that difference just by having a smaller board
[09:55:22] <LeoNerd> I forgot to account for that
[09:56:38] <aandrew> any tips for someone thinking about tindieing things that I might not know getting into it new?
[09:56:58] <LeoNerd> Hrm.. can't really think of anything tindie-specific. Just general productising ideas
[09:57:06] <carabia> Worrying about an EOL-chip for a production run of ~dozen tops, is just making a big fuss out of nothing
[09:57:13] <LeoNerd> If the product is -at all- nontrivial, make an instruction leaflet or document of some kind
[09:57:46] <aandrew> right
[09:57:48] <LeoNerd> Especially so for breakout boards - people love to read about the IO pins, what they do, etc...
[09:59:48] <aandrew> what about packaging, do you ship in a little ESD bag and mailer envelope or?
[09:59:56] <LeoNerd> Ido, yes.
[10:00:16] <LeoNerd> I reuse ESD bags that farnell ship me, and I reuse C6 envelopes that I buy randomcrap off eBay in ;)
[10:09:22] <aandrew> :-)
[10:11:33] <napnap> Hi all, on my atmega328 I have a pulled-up mosfet connected to analog pin A1. Unfortunatly I'm not able to control the MOSFET, is always on... i've disconnected the pin from the mosfet to measure voltage, when the pin is HIGH, I've almost 5V, when the pin is DOWN I have around 1.3V....
[10:12:02] <aandrew> got a sketch or screen cap of the subscircuit in question?
[10:12:07] <LeoNerd> What sort of MOSFET? Check the data sheet for threshhold voltages
[10:12:09] <napnap> perhaps the value is too high when the pin is down... but why is not 0V ?
[10:12:24] <LeoNerd> "digital low" can still be hundreds of mV above true ground
[10:12:30] <LeoNerd> That might not be enough to shutdown the FET
[10:13:02] <napnap> yes, but 1.3 V is very high no ?
[10:13:11] <napnap> The FET is an IRF520
[10:13:30] <LeoNerd> The FET channel doesn't care about voltage. It's a current control... the gate voltage sets the resistance of that channel
[10:13:40] <LeoNerd> What voltage appears at the output depends on what the load impedance is
[10:14:07] <LeoNerd> E.g. I have a FET controlling a fan. when it's "off" I still get about 2V across the fan. but since it's a 12V fan that's not enough to start the motor, so all is fine
[10:14:12] <napnap> LeoNerd, the MOSFET si controlled by voltage not current
[10:14:29] <LeoNerd> The FET is _controlled by_ voltage on the gate, but its outgoing effect is to adjust the resistance of its channel
[10:15:00] <LeoNerd> Hangon... back to the question: when you say "the pin" is at 1.3V, which pin is this?
[10:16:14] <napnap> LeoNerd, is the analog pin 24
[10:16:59] <LeoNerd> The pin on the FET
[10:17:07] <LeoNerd> Are we talking gate voltage here?
[10:17:38] <napnap> yes, the pin which control the MOSFET gate is the 24
[10:17:57] <LeoNerd> Ahright.. I misunderstood the statement,I thought you meant the controlled output from the FET channel was still at 1.3V
[10:17:57] <carabia> Is that a p channel fet?
[10:18:09] <napnap> no, a N-channel
[10:18:32] <carabia> gimme the specific part number
[10:18:39] <napnap> IRF520
[10:18:54] <carabia> sec
[10:19:34] <LeoNerd> Wow.. the data sheet's transfer curve graph only -starts- at a V[GS] of 4V
[10:19:42] <napnap> LeoNerd, yes...
[10:20:09] <napnap> (before pull-high the pin, I had pull-down this pin. When I pull-down this pin, I'm able to control the FET. )
[10:20:11] <LeoNerd> So yah we would expect that thing to be very close to off at 1.3V
[10:21:12] <napnap> (when I say pull-high and pull-down I'm not talking about the state of the pin, I talk about the resistor added by me...)
[10:21:23] <carabia> Vgs is specced at min. 2 volts, so that shouldn't be a problem
[10:21:42] <carabia> but however you could try it with a pulldown, or then theres some additional fuckery going on in here
[10:22:19] <LeoNerd> if you're driving the IO pin in both states, a resistor ought nto be required nayway. Though can be handy to put one in for hiZ / startup states
[10:22:33] <napnap> sure, when I had a pull-down resistor it's works. Now I would a pull-up resistor, because I want the MOSFET on at is default state.
[10:22:53] <LeoNerd> Are you sure you're driving the IO pin in both states?
[10:23:27] <carabia> to what voltage are you pulling it *to*?
[10:24:16] <napnap> LeoNerd, sure, I see it in my code, and I made measure (5V whenthe pin is HIGH, 1.3 when the pin is LOW)
[10:24:17] <carabia> and you sure you're not setting it hi-z or some other bs
[10:25:00] <napnap> I connected the pull-up resistor to my 5V rails...
[10:25:23] <LeoNerd> What value?
[10:25:25] <napnap> carabia, I don't understand 'hi-z' and 'bs'
[10:25:31] <napnap> LeoNerd, 1M
[10:25:33] <LeoNerd> "high impedence"
[10:25:50] <LeoNerd> ... there might be a ltter 'a' somewhere in "impedence"; I can never spell that word
[10:26:44] <carabia> impedance, but yeah he gets the point
[10:26:59] <LeoNerd> Hmm.. note to self: it's an imp e dance.
[10:27:15] * LeoNerd pictures a tiny man in a hat hopping about
[10:27:24] <carabia> 1 M?
[10:28:11] <napnap> carabia, yes (it's very high, but not the source of the problem isn't it ?)
[10:28:34] <carabia> waaaait
[10:32:00] <napnap> one more precision : When I try to measure the gate voltage (when the pin is in LOW state) the MOSFET goes down...
[10:33:25] <napnap> oh, perhaps I need to add a resistor between the pin and the gate bigger than resistor inside the atmega ? :-D (or it's a dumb answer :p ?)
[10:33:44] <aandrew> did you paste the schematic bit and I missed it or?
[10:34:02] <napnap> my last sentence is not clear...
[10:34:05] <LeoNerd> You shouldn't need to... FET gate impedance tends to be in the 100s of Mohm range.. adding another gate resistor really makes no difference
[10:34:39] <napnap> aandrew, no sorry I don't posted shematic...
[10:40:42] <napnap> aandrew, but it's just : atmega pin 24 => MOSFET gate=> 1M pull-up resistor => 5V rails. The drain is connected to raspberry pi ground power line, the source to the ground. (I want to control the power state of a raspberry pi)
[10:42:18] <napnap> On my first attempt, I put a pull-down resistor instead of pull-high, but I want to program my atmega with the arduino, and when I do that, the raspberry pi reset the atmega...and when the atmega reset, it cut the power (MOSFET is off)
[10:42:43] <LeoNerd> Ahyes, the bootstrapping problem :)
[10:42:46] <napnap> It is for that I need a default state pulled-high. or perhaps have you another solution ?
[10:43:52] <napnap> (I repeat when I put the pull-down resistor instead of the pull-high, I'm able to drive the FET) :-s
[10:44:34] <napnap> (and when I don't put any of them, as I remember, I'm not able to drive the fet)
[12:12:23] <LeoNerd> Ahah! Just found a way to solve my problem at about half the cost of parts. Ignoring Analog Devices, there's a Maxim chip at a mere £3.65 (below half the previous) that does isolated '485 and has a transformer driver, just not the actual integrated transformer. But that's OK - I can add a coil to that and still be much cheaper than the allinone solutions
[12:12:35] <LeoNerd> I suspect maybe the on-chip transformers are the things that make the single chips so expensive
[12:16:12] <bss36504> Well that's because transformers aren't made on die, it's probably a complicated leadframe or a separately bonded transformer in-package with the die, both of which are stupidly hard to manufacture, compared to typical leadframes
[12:17:02] * LeoNerd nod
[12:17:34] <LeoNerd> The MAX14855, for example... it does everything except the actual transformer, but it's under half the cost of the ADM2682 which has that onchip transformer
[12:17:58] <LeoNerd> Starting to look like my cheapest option, even if I then have to try my luck at learning yet more things
[12:18:03] <LeoNerd> namely: transformer coils
[12:21:25] <bss36504> Is it possible to buy the transformer you need separately? I imagine overall cost would still be lower than the integrated version
[12:21:54] <LeoNerd> Hm? Yes; that's what I'm looking at
[12:22:13] <LeoNerd> The MAX chip has a pushpull driver for the primary winding, and an LDO regulator to take the output of the secondary
[12:23:04] <bss36504> https://datasheets.maximintegrated.com/en/ds/MAX148X2EVKIT.pdf
[12:23:15] <LeoNerd> So you just add the transformer itself along with a couple of diodes as a rectifier, and some caps
[12:23:22] <LeoNerd> Oh.. I suppose the caps also make the on-die version hard
[12:23:35] <bss36504> Mmm, yes they would
[12:23:52] <bss36504> That schematic is from their dev board for the part
[12:24:10] <bss36504> https://www.maximintegrated.com/en/products/interface/transceivers/MAX148X2EVKIT.html
[12:25:06] <bss36504> $7 for that transformer though
[12:25:16] <learath> 2750v of isolation.
[12:25:18] <LeoNerd> Yah I found some sub-£1 ones from Muratu
[12:25:24] <LeoNerd> I likely only need 1kv
[12:25:39] <LeoNerd> It's just in case of some blind idiot cross-wiring the phases of the 3phase stage power
[12:25:45] <LeoNerd> At worst that's 415V
[12:26:15] <bss36504> Ah well that's good.
[12:27:01] <bss36504> Even if you did go for the expensive transformer, it's still a little cheaper
[12:27:08] <bss36504> how many of these are you making?
[12:27:32] <LeoNerd> Not many
[12:27:51] <LeoNerd> I'm quite sure I've wasted more time today in not working than any amount of saving of cost of parts
[12:27:56] <LeoNerd> It's the principle, damnit :P
[12:28:21] <bss36504> Haha sometimes it's worth it, sometimes not. But I hate seeing parts (ICs specifically) that cost >$10
[12:28:59] <LeoNerd> Mm.. FPGAs... fancy ADCs/DACs,...
[12:29:11] <LeoNerd> I saw a 64-way video-speed crossbar matrix switch for >$100
[12:29:33] <bss36504> Linear has a 1.5GHz (i think) DAC for like $320
[12:30:16] <bss36504> Hey, do you even need the transformer if you only want 1KV isolation? Granted I dont know a lot about 485, but that maxim part is good to 2.75kv for 60s
[12:30:32] <LeoNerd> The transformer is for doing the power side of things
[12:30:49] <LeoNerd> The Maxim chip isolates logic to 2.75kV but you have to solve the power yourself
[12:31:19] <learath> heh - I'm sure on chip power side is coming :)
[12:31:26] <learath> probably going to start off god awful expensive.
[12:31:27] <bss36504> oh gotcha. Like I said, i dont know much about 485. Never needed it.
[12:34:02] <bss36504> So I tried out KiCAD last night for the first time. Long time Eagle user. The UI made me so upset haha
[12:34:38] <krphop> it takes a bit to get use to, but i somewhat like the idea of having devices and footprints separate now
[12:34:39] <bss36504> I figured, what the hell, i'll do this reflow controller in KiCAD to learn it. Now I'm already wanting to go back to the safety and security of my Eagle
[12:35:02] <krphop> and you know, not being so limited on board size
[12:35:09] <bss36504> there is that too
[12:35:28] <bss36504> I considered buying a Maker licence of eagle. Its only $169
[12:35:34] <krphop> still limited on board size
[12:35:37] <bss36504> 4"x6" area
[12:35:50] <bss36504> I'm not going too be making boards much larger than that, because they cost a ton
[12:36:19] <krphop> i mostly just etch stuff myself, so my boards end up being a bit larger since i can only do two layers
[12:37:13] <bss36504> I pretty much use OSHPark exclusively, so a 4x6 2L board would be $120, a 4L would be $192, not really what I want to be spending on hobby projects. I dont like that eagle freeware doesnt support 4 layers though
[12:38:37] <bss36504> However, the new autorouting stuff in KiCad looks sweet. I don't really get why you have to switch between perspectives to use different layout tools, but I guess there are plans to port all the old stuff to the new openGL perspective that supports the cool routing.
[13:04:29] <bss36504> Hey LeoNerd I'm thinking about my idea to use the AC and the DAC on an xmega for phase control...one potential problem is how to turn off the trigger signal after some amount of time. If I use a single AC channel, I can just select rising or falling edge triggering to pick which quarter of a wave form I trigger on. However, I need to shut the trigg
[13:04:29] <bss36504> er pulse off before the signal reaches zero again. Is there a tricky way I can do this? I think I might be able to use the event system to route the AC out signal into a timer, which could act as a one shot autonomously.
[13:05:09] <bss36504> I'm intentionally trying to do this without software intervention.
[13:05:20] <LeoNerd> I know nothing about the Xmega event system
[13:05:30] <bss36504> Me neither :P
[13:05:33] <LeoNerd> Or the xmega in general really; not used any before
[13:27:41] <bss36504> Oh boy, well I could use this trick http://hackaday.com/2015/03/24/avr-hardware-timer-tricked-into-one-shot/
[13:28:11] <bss36504> but I'd need to have something like AC -> DMA -> Timer -> timer output -> output pin
[13:28:18] <bss36504> which is so yucky haha
[13:47:18] <_abc_> Just set PWM mode on a pwm timer and use the end interrupt to kill the pwm output
[13:55:27] <bss36504> Wait, I can use an XmegaE and do everything with the event system. The XCL module has a special one shot mode already.
[13:55:38] <bss36504> Only downside is no USB on the E parts, but that's ok.
[14:01:35] <bss36504> Now I just need to decipher the ridiculous amount of configuration registers for the XCL.
[15:25:37] <WormFood> df -h
[15:25:47] <WormFood> d'oh
[15:27:39] <LeoNerd> Total: 0
[15:34:28] <antto> much x, very mega
[15:35:15] <bss36504> wow
[15:39:11] <WormFood> I actually have about 22 terabytes online (actually mounted on my machine, right this instant)...but only about 5tb free ;)
[16:03:02] <Tom_itx> how you gonna back it up?
[16:06:18] <Tom_itx> i'd be impressed if they were all SSD
[16:06:44] <bss36504> WormFood actually lives in a datacenter
[16:07:33] <Tom_itx> oh to own one of google's datacenters
[16:07:52] <bss36504> You couldnt afford the electric bill :P
[16:08:06] <Tom_itx> with their income i could
[16:08:34] <bss36504> Ohhh so you just want to own google, i see
[16:08:47] <Tom_itx> naw, just a piece of it
[16:09:00] <bss36504> Start buying shares
[16:10:55] <Tom_itx> i'll just stick with my 10mb 8088 here
[16:11:38] <Tom_itx> that 10mb cost more than the last ssd i got
[16:18:03] <twnqx> data8/media 27T 19T 7.9T 71% /srv/nfs/Sorted/Media
[16:18:04] <twnqx> :X
[16:18:50] <twnqx> zfs/media 29T 29T 455G 99% /srv/nfs/Sorted/Media
[16:18:52] <twnqx> with backup.
[16:24:23] <WormFood> Tom_itx, I have multiple copies, of all the data that is important to me.
[16:25:20] <WormFood> twnqx, is that for personal use, or that for work?
[16:25:32] <twnqx> personal
[16:25:53] <WormFood> That is one hell of a porn collection :P
[16:26:02] <twnqx> while porn is among it, it's mostly anime
[16:26:21] <WormFood> You're a guy. I'm sure you have porn.
[16:26:45] <bss36504> whynotboth.gif
[16:26:53] <WormFood> I've actually had girls think, I could see their computer, because I told them that I was sure they had porn on their computer.
[16:27:30] <twnqx> like i said, there is porn among it
[16:27:36] <twnqx> and obv not just animated
[16:27:42] <WormFood> I'm sure
[16:27:44] <WormFood> :P
[16:29:01] <WormFood> I have a random collection of stuff. Like over a terabyte of 3D movies, and probably 1.5 terabytes of just children's stuff. It adds up after a while.
[16:30:19] <carabia> So, 3d and child pornography
[16:30:29] <carabia> I'm sure the authorities will be intrigued
[16:30:49] <twnqx> i guess it's more tv shows for his daughter >_>
[16:33:00] <carabia> or "tv shows" of her daughter
[16:33:02] <carabia> his*
[16:33:30] <twnqx> now you're getting into tasteless territory.
[16:33:35] <carabia> i could have been more subtle about that, but who cares
[16:33:56] <carabia> it's all a wasteland i say
[16:59:47] <CasperAtWork> I wonder if the chinese authority would even care
[17:06:55] <CasperAtWork> I wonder if I have received the package from china yet...
[17:07:03] <CasperAtWork> last expected date was today
[17:07:15] <CasperAtWork> if not... paypal claim again...
[17:11:12] <CasperAtWork> WormFood: is there issues with china to ship stuff to canada? or am I just unlucky to have lots of loss packages?
[17:11:54] <Jartza> I've ordered like 50 very small orders from aliexpress in last 3 months, to finland
[17:12:01] <Jartza> all of them have arrived in <2 weeks
[17:12:16] <Jartza> mostly some 2-10€ parts :D
[17:15:41] <WormFood> CasperAtWork, There is nothing that I know of.
[17:16:07] <CasperAtWork> ok
[17:16:14] <CasperAtWork> must have been some bad luck
[17:16:46] <WormFood> indeed
[17:17:16] <CasperAtWork> I just wish the shipping were faster than 5 fucking weeks!
[17:17:24] <WormFood> hahaha.
[17:17:37] <WormFood> You couldn't imagine the shipping problems I've had to deal with.
[17:17:55] <CasperAtWork> you sell on the bay?
[17:17:59] <WormFood> With a specific package from usa
[17:18:02] <WormFood> no. I don't.
[17:18:47] <WormFood> Customs wouldn't let my passport through. It took 2 days to get from usa to China. Then it spent 3 weeks in customs, because the consulate didn't file the proper information with customs.
[17:19:40] <CasperAtWork> lol
[17:20:09] <WormFood> my consulate took my fuckin' passport, and didn't give me anything in return. They sent it back to usa to be destroyed.
[17:20:38] <WormFood> I *finally* got it returned, after about a million phone calls, to my congressman's office, and the state department.
[17:21:32] <CasperAtWork> was it why you stay in china? couln't get out?
[17:21:42] <WormFood> They finally got their shit straightened out, and got my new passport to me, but wouldn't return my old passport. So, I couldn't leave the country.
[17:21:51] <WormFood> I stay here because I choose to. :P
[17:22:16] <CasperAtWork> because electronics is so accessible and so inexpensive? :D
[17:22:24] <WormFood> I actually overstayed my visa, but I was in constant contact with the Chinese authorities, and they said it was ok.
[17:22:52] <WormFood> change "electronics" to "super cute girls", and you'd be more on target :P
[17:23:05] <WormFood> seriously, there isn't one reason why I stay here.
[17:23:18] <WormFood> I just like it better than living in usa.
[17:23:24] <WormFood> Always new things to learn.
[17:23:25] <CasperAtWork> why not move to canada?
[17:23:32] <WormFood> And, I do enjoy learning new things.
[17:23:32] <CasperAtWork> and experience our winters?
[17:23:34] <Tom_itx> or russia
[17:24:13] <WormFood> I'm acclimated to the hot regions. I live in Florida, and Shenzhen. The weather is very similar. Only Shenzhen is a little bit hotter, and maybe slightly more humid.
[17:24:18] <CasperAtWork> nahhh he need to move near me! so I have another crazy mind to build stuff with! so we can take over the world!!!
[17:24:40] <WormFood> If I couldn't live here, I don't know what'd I do.
[17:26:45] <CasperAtWork> just come to canada in january! you'll love the cold! :D
[17:26:50] <CasperAtWork> but time to go home, bbl
[17:28:13] <Jartza> nah
[17:28:19] <Jartza> I've been in canada in january
[17:28:23] <Jartza> didn't even need a jacket
[17:28:29] <Jartza> almost like finnish summer :D
[17:28:32] <WormFood> 再见 CasperAtWork
[18:02:03] <Casper> I'm hoooome!
[18:02:07] <Casper> and I already ate
[18:02:55] <carabia> Oh great
[18:07:04] <Casper> it'S fun to live close to where you work, against the trafic flow too
[18:07:24] <Casper> where there is basically never any trafic, except when there is an accident
[18:07:32] <Casper> or road work...
[18:21:35] <carabia> are you french canadian or something, Casper ?
[19:29:05] <boxfire> so maybe someone can answer me this: why are fixed point numbers disabled in avr-g++ but not avr-gcc
[19:29:42] <boxfire> _Accum and family for those unfamiliar
[20:20:41] <Emil> Can I just fucking rant how awful the esp8266 is
[20:20:56] <Emil> Seriously, I don't know if all my modules are fucked or if the chip is just that fucking bad
[20:31:15] <carabia> what is this aforementioned esp8266?
[20:32:04] <Casper> cata
[20:32:10] <Casper> carabia: yes, why?
[20:33:59] <carabia> Casper: i thought so, nevermind
[20:37:39] <carabia> Emil: oh, rf-chip. I've just fiddled with nordic's ones. Once you get the hang of their "services"-ideology and the configuration tool (creates configuration data, which you load into the rf-chip during boot, or for production runs you can make the configuration permanent), they're really nice to use. They've got good documentation and quite good support too
[20:41:51] <Emil> carabia: for linux?
[20:43:39] <carabia> What do you mean, for linux?
[20:44:01] <Emil> carabia: yes, is there support for linux?
[20:45:32] <carabia> Well, the arm-module they produce has support for linux toolchain
[20:47:28] <carabia> But I am not quite sure if they have a module with a chip that does wi-fi
[20:51:59] <carabia> At least not straight. So I guess that rules them out :(
[21:17:46] <Emil> carabia: : /
[23:35:26] <antto> Emil i also hate the esp8266
[23:35:55] <antto> i understand your pain
[23:36:22] <antto> i had two ESP-01 modules and both did not work.. at all.. not even once
[23:37:02] <antto> then i got two modules from adafruit.. they worked at least
[23:37:42] <antto> "huzzah" or whatever they were called