#avr | Logs for 2014-07-30

Back
[01:24:56] <N1njaneer> Hooray, first successful G-code post to the new mill -- https://www.dropbox.com/s/zzh4dzc5s9zebcw/post.jpg Gotta do this in copper tomorrow, but for now zzzz's!
[01:25:32] <Thrashbarg> neat
[01:26:43] <N1njaneer> ATMEGA328 nonetheless :D
[01:26:52] <Thrashbarg> hehe
[03:40:37] <JustinN> Lambda_Aurigae, abcminiuser - thanks for your help yesterday with my ATMega8 - it was in fact, as you suggested a number of times, the wrong pinout. I had wired it up in mirror format, so obviously it did not work! Sat down again from scratch, this time using different coloured jumper rather than just black ones and it worked first time. Thanks again for the help
[03:40:57] <abcminiuser> No worries
[03:41:06] <abcminiuser> Sometimes all it takes is a simple sanity check
[08:11:18] <Jartza> cool
[08:11:23] <Jartza> my second pcb ever also works
[08:11:32] <Jartza> https://www.dropbox.com/s/sg70jc38ej0ul1k/20140730_001.jpg
[08:11:37] <Jartza> https://www.dropbox.com/s/7uvxzy62f2ly32a/20140730_002.jpg
[08:11:43] <Jartza> https://www.dropbox.com/s/fx9mn4kuc330ds6/20140730_004.jpg
[08:11:58] <Jartza> I'm still waiting for the postman to bring my solder paste, this one I did with traditional solder
[08:12:21] <Jartza> but it seems sot23-5 is still possible to do with soldering iron :)
[08:12:50] <specing> you made a pcb for THAT?
[08:13:21] <specing> guess boredom went off the scale
[08:19:23] <twnqx> sot23-5 is trivial
[08:19:43] <twnqx> i think you can do everything but BGA and bottom pad with an iron
[08:20:40] <twnqx> and the use of tantals is pretty much overkill
[08:23:52] <Thrashbarg> I soldered a 28 pin DFN to a home etched board with an iron once
[08:24:08] <Thrashbarg> it was like filleting a fish with a blunt axe
[08:31:19] <twnqx> Jartza: http://imgur.com/exuPva9 :)
[08:32:08] <twnqx> irons work easy enough.
[08:51:13] <Jartza> specing: yes I did
[08:51:25] <Jartza> I'm learning electronics, quite noobie still
[08:51:37] <Jartza> so why not
[08:51:53] <specing> Have you made an avr programmer board?
[08:51:57] <Jartza> twnqx: I know using tantals is overkill, but those were free samples ;)
[08:52:02] <Jartza> specing: yes
[08:52:14] <specing> cool. me too
[08:52:16] <Jartza> :)
[08:52:24] <twnqx> me not \o/
[08:52:26] <specing> with a TQFP-32 atmega8u2
[08:52:35] <Jartza> this power booster actually also powers some attiny85s
[08:52:54] <Jartza> I do have hot air soldering station, but no solder paste yet
[08:53:19] <twnqx> hm
[08:53:34] <twnqx> i do have hot air too, AND solder paste
[08:53:46] <twnqx> just never had anything to try it with :(
[08:53:56] <Jartza> yeah, I ordered some paste online, but it hasn't arrived yet
[08:54:53] <Jartza> I got two sample folders full of kemet tantal smd capacitors
[08:55:14] <twnqx> heh
[08:55:24] <twnqx> i still wouldn't waste them like this :P
[08:55:58] <Jartza> well, I didn't have any other smd capacitors :D
[08:56:05] <Jartza> and didn't want to order some and wait
[08:56:26] <Jartza> it gets easier when the vacation is over, then I can always grab some from work
[08:59:50] <Jartza> well
[08:59:51] <Jartza> https://www.dropbox.com/s/dx1xj4wtikuagdm/pic_5_2.gif
[09:00:08] <Jartza> output looks like that with some load (attiny + rgb led)
[09:00:20] <Jartza> I guess decent enough
[09:03:57] <twnqx> that's an LDO...
[09:05:09] <Jartza> ?
[09:05:13] <twnqx> shouldn't need as much capacitors as a switchmode one :)
[09:05:20] <twnqx> capacitance*
[09:05:48] <Jartza> well that schematic is straight from datasheet
[09:05:49] <twnqx> and with a battery input i wouldn't even bother to put a capacitor on the input :P
[09:08:28] <Jartza> well, all that I care is that it works and the components didn't cost me more than around 10 cents
[09:15:56] <myself> as long as the battery wires are nice and short...
[09:38:37] <NooM> hm
[09:41:22] <twnqx> hm?
[09:41:25] <Jartza> to me using any component is not a waste, it's learning experience :)
[09:41:36] <Jartza> even if it's wrong component ;)
[09:41:53] <NooM> i like trying lots of components too
[09:42:10] <twnqx> i prefer to get it right the first time :P
[09:42:25] <Jartza> sure, I prefer that too
[09:42:33] <Jartza> but one can learn by making mistakes
[09:42:33] <twnqx> and you managed!
[09:42:35] <NooM> guess i didnt got the whole conversation
[09:42:56] <Jartza> NooM: yeah :)
[09:43:15] <Jartza> we were discussing about this:
[09:43:15] <Jartza> 15:52 < Jartza> my second pcb ever also works
[09:43:15] <Jartza> 15:53 < Jartza> https://www.dropbox.com/s/sg70jc38ej0ul1k/20140730_001.jpg
[09:43:15] <Jartza> 15:53 < Jartza> https://www.dropbox.com/s/7uvxzy62f2ly32a/20140730_002.jpg
[09:43:15] <Jartza> 15:53 < Jartza> https://www.dropbox.com/s/fx9mn4kuc330ds6/20140730_004.jpg
[09:43:34] <Jartza> and this:
[09:43:35] <Jartza> 16:02 < twnqx> and the use of tantals is pretty much overkill
[09:43:35] <Jartza> :D
[09:43:38] <NooM> dropbox is so slow
[09:43:44] <NooM> takes a while to open :D
[09:43:49] <Jartza> I have no prob with dropbox :o
[09:43:57] <Jartza> and btw. that's the ncp1402
[09:44:05] <NooM> ahh i remember
[09:44:14] <NooM> nice
[09:44:56] <Jartza> that was though just a testing pcb to see if it works at all
[09:45:12] <NooM> i got tons of parts yesterday, but the pcb's are still on their way :(
[09:45:12] <Jartza> I'll incorporate it as a part of other schematic later, but just wanted to be sure
[09:45:23] <Jartza> yesh, I made the pcb myself
[09:45:30] <NooM> yeah
[09:45:36] <NooM> i dont :D
[09:45:37] <Jartza> that was quite quick to make even
[09:45:46] <Thrashbarg> photo or toner?
[09:46:26] <Jartza> toner
[09:46:31] <edmont> hi
[09:46:46] <Jartza> toner + ttp + laminator
[09:46:49] <NooM> hi
[09:47:05] <Jartza> and sodium persulfate :)
[09:47:08] <edmont> what's the typedef for GPIO registers?
[09:47:11] <NooM> why you put so much solder on the traces? :D
[09:47:21] <Jartza> I just wanted to tin them
[09:47:40] <NooM> o not corrode?
[09:47:44] <Jartza> yes
[09:47:46] <Thrashbarg> Jartza: solder flakes and flux :P
[09:47:47] <NooM> i see
[09:47:51] <Jartza> I don't have the chemicals yet to do that
[09:48:00] <Jartza> Thrashbarg: yep
[09:48:18] <NooM> edmont typedef for gpio registers?
[09:48:23] <Jartza> didn't clean the board yet
[09:48:55] <Thrashbarg> edmont: check the .h files in your include/avr directory
[09:49:06] <NooM> its DDRA DDRB and so on
[09:49:18] <Thrashbarg> NooM: yes, but what sort of variable are they in C
[09:49:35] <NooM> what?
[09:49:38] <NooM> its 8 bit
[09:49:43] <edmont> i mean, i'd like to do smth like:
[09:49:43] <edmont> SomeTypeDef * ports[PORTS_NR] = {DDRB, DDRD, DDRE};
[09:49:43] <edmont> ports[1] |= 0x03;
[09:50:14] <Thrashbarg> edmont: hum. Might need a pointer to the port
[09:50:22] <Thrashbarg> sounds tricky
[09:50:36] <NooM> i know a easy way to set the registers, gimme a sec
[09:50:48] <edmont> #define DDRB _SFR_IO8(0x04)
[09:50:59] <edmont> that's in the .h
[09:51:06] <Thrashbarg> grep "_SFR_IO8" *.h
[09:51:07] <Thrashbarg> :P
[09:51:22] <woodyj21> NooM: and there are 3 registers for each of the 3 ports on a 328
[09:51:25] <Thrashbarg> edmont: #include <avr/sfr_defs.h>
[09:51:44] <woodyj21> data direction, pin value, and data value... not sure what the proper names are tho
[09:52:58] <NooM> http://pastebin.com/jLMvDcWF
[09:53:16] <NooM> i know thats not what you asked for, but its an easy way to access them
[09:53:32] <NooM> (the code is not from me)
[09:55:20] <edmont> so maybe i can try:
[09:55:20] <edmont> volatile uint8_t * ports[PORTS_NR] = {&DDRB, &DDRD, &DDRE};
[09:55:38] <NooM> i guess that will work
[09:55:54] <edmont> ok, thanks, lets try...
[09:56:07] <Thrashbarg> I'd be checking the sanity of the disassembly too
[09:56:15] <NooM> :D
[09:56:36] <Thrashbarg> make sure it's not wearing a large hat and yelling "CHANGE PLACES"
[09:57:04] <Jartza> is the "liquid tin" any good?
[09:57:17] <Jartza> the one from mg chemicals
[09:58:09] <Jartza> I found some discussions from the net that "it turns dark and hard to solder when aging" and all kind of complaints, then others said they never saw anything like that
[09:58:14] <NooM> https://www.dropbox.com/s/2bqzaigvij1gmum/Bild166.jpg yay my ftdi :D
[09:59:09] <Jartza> (y)
[09:59:37] <NooM> it only works half the time tho.. rev 2.. and still fail.. forgot to connect the reset pin :(
[09:59:44] <Thrashbarg> drag
[09:59:47] <Jartza> :(
[09:59:55] <Jartza> ohh
[10:00:05] <Jartza> the solder paste actually has arrived to local post office
[10:00:10] <Thrashbarg> https://static.hackaday.io/images/5733551396080036189.jpg <-- here's the board I'm working on :)
[10:00:20] <NooM> i hate solderpaste :(
[10:00:24] <Jartza> just went to check the mail and there was a notice that it's here
[10:00:32] <Jartza> NooM: why?
[10:00:44] <NooM> not fun w/o solder stencil
[10:00:54] <Thrashbarg> syringe
[10:01:03] <NooM> Thrashbarg whats that? some kind of i/o expander?
[10:01:12] <Thrashbarg> NooM: a Z80 computer :P
[10:01:15] <NooM> yeah syringe doesent work well
[10:01:20] <NooM> ahhhhh ok
[10:01:33] <Jartza> I ordered this kind of "pistol dispenser" together with the paste
[10:01:48] <Jartza> no idea how well it works
[10:01:53] <NooM> dunno
[10:01:58] <NooM> wanna see how i do it? :D
[10:02:02] <twnqx> i guess z80 is the last of that generation that is still available, with all its IO chips even
[10:02:20] <Thrashbarg> twnqx: I used the Z80 because of CP/M and the mountains of software for it
[10:02:39] <twnqx> ... i used CP/M on my commodore 128's Z80
[10:02:44] <Thrashbarg> hehe :D
[10:03:57] <NooM> https://www.youtube.com/watch?v=N4ffqmsmG84
[10:04:20] <NooM> -.-
[10:04:37] <NooM> quite ineffective, but the results are awsome
[10:05:18] <NooM> https://www.dropbox.com/s/v4p57vkr4netgmr/Bild117.jpg
[10:06:06] <Thrashbarg> NooM: that video is the 'correct' way. I do it the "meh that'll work" way
[10:06:21] <NooM> :D
[10:06:42] <NooM> nah normally youd just drag solder this.. or use paste.. but i didnt get good results with paste
[10:06:43] <Thrashbarg> soldering iron + solder wire + heat and bash it on the table to remove excess
[10:06:45] <NooM> dunno why
[10:07:24] <NooM> i pre-tin the pads, than reflow the parts :D
[10:07:28] <Thrashbarg> yup
[10:08:18] <Thrashbarg> I should take a better photo of the board in the synth I made
[10:08:33] <Thrashbarg> it's surface mount, etched myself, soldered with an iron and wire solder
[10:08:45] <Thrashbarg> *I don't know how it worked*
[10:08:49] <NooM> mhm
[10:08:54] <NooM> haha
[10:09:28] <NooM> well i only do very simple stuff
[10:09:37] <Thrashbarg> especially because the DAC's I got for the MIDI to CV interface were smaller than the resistors I used
[10:09:46] <NooM> haha :D
[10:10:12] <NooM> https://www.dropbox.com/s/uvcr01mhtwk3fla/Bild148.jpg thats the most complicated design i ever made (after datasheet reference)
[10:10:17] <NooM> enc28j60 :D
[10:10:32] <Thrashbarg> I see you follow the "KISS" principle
[10:10:38] <NooM> kiss ?
[10:10:45] <NooM> ahhh
[10:10:46] <Thrashbarg> Keep It Simple, Stupid!
[10:10:51] <NooM> yeah :D
[10:11:48] <twnqx> i want to make a design with that soonish, too :)
[10:11:56] <twnqx> i just first have to verify a few things :D
[10:11:56] <NooM> the enc?
[10:11:59] <twnqx> yes
[10:12:02] <Thrashbarg> http://kaputl.homeunix.org/~thrashbarg/synth_layout1.jpg <-- was testing the layout here
[10:12:12] <Thrashbarg> gah
[10:12:17] <NooM> link doesent work Thrashbarg
[10:12:18] <twnqx> and like always... the power supply will be more complex than the other parts
[10:12:19] <Thrashbarg> http://kaput.homeunix.org/~thrashbarg/synth_layout1.jpg
[10:12:56] <NooM> nice
[10:13:16] <NooM> twnqx its uite ok to make, i made it after the datasheet, like the chinese ones
[10:13:27] <NooM> i did it cos the china ones are not for breadboards :D
[10:13:33] <Thrashbarg> http://kaput.homeunix.org/~thrashbarg/synth_board1.jpg <-- Not sure why I took that shot with a video camera and capture card :/
[10:13:35] <NooM> and i liked the smaller chip
[10:13:48] <twnqx> i'm yet undecided
[10:13:57] <twnqx> and i first have to check if the idea can work at all :P
[10:14:08] <NooM> Thrashbarg let itead studio make your pcb's
[10:14:53] <Thrashbarg> I wanted to make them myself at the time because it was a one off
[10:14:59] <NooM> ahh
[10:15:16] <Jartza> this looks cool: http://www.sparkyswidgets.com/portfolio-item/diy-solder-paste-dispenser/
[10:15:17] <NooM> twnqx what idea?
[10:15:19] <Jartza> :D
[10:15:23] <NooM> tell me ill steal it :P
[10:15:29] <twnqx> not telling, it's too ridiculous :P
[10:15:45] <NooM> sure tell
[10:15:49] <twnqx> nah
[10:15:55] <NooM> Jartza ahh i know that
[10:16:00] <twnqx> also faaar more problems than i originally expected :(
[10:17:14] <NooM> mimimimi
[10:17:17] <NooM> :D
[10:17:26] <NooM> https://www.dropbox.com/s/4cykj17dgtyqj6a/Bild110.jpg
[10:17:38] <NooM> thats my webserver, and the dog protects it from hackerz :D
[10:17:47] <twnqx> lol
[10:17:54] <twnqx> but heh, nice
[10:18:05] * twnqx has something like that on his todo list, too
[10:18:08] <Getty> lol
[10:18:11] <twnqx> and instead of working on my projects
[10:18:12] <NooM> :D
[10:18:20] <twnqx> i spend my time in china at work
[10:18:21] <twnqx> sigh
[10:18:30] <NooM> in china?
[10:18:49] <twnqx> yes
[10:18:53] <NooM> nice
[10:18:57] <twnqx> i live in germany btw, so... hotel
[10:19:03] <twnqx> hourlong commute to customer
[10:19:06] <twnqx> etc
[10:20:10] <NooM> afk
[10:32:42] <NooM> puh, just got my tools to cut pcb'S
[10:32:54] <NooM> tom orrow iam gonna build my nrf24l01+ :D
[10:33:02] <NooM> (sparkfun design i think)
[10:33:41] <NooM> https://www.dropbox.com/s/wnvc338dwpl9r5v/order6.png bottom left :D
[10:41:24] <NooM> hm
[10:41:38] <Thrashbarg> hm
[10:42:05] <NooM> i wanna build it today but iam tired allready :(
[10:42:58] <Thrashbarg> I hate that
[10:43:04] <Thrashbarg> I want to work on things, not sleep dammit
[10:43:14] <NooM> mhm
[10:43:33] <NooM> but if i start now, iam not focused enought
[10:43:38] <Thrashbarg> yea
[10:43:41] <NooM> and that will take me at least 2 hours
[10:43:48] <NooM> with all that tiny parts
[10:45:04] <NooM> everytime i tell myself: go 0806 .. but its so much easier to fit 0603 into designs :(
[10:47:49] <kastein> 0805*
[10:47:50] <NooM> https://www.dropbox.com/s/px5firyafyrdb6z/Bild158.jpg fail :D
[10:47:50] <kastein> :P
[10:47:59] <NooM> right 0805
[10:48:01] <kastein> I typically go 0402 unless I have a good reason not to.
[10:48:05] <NooM> see iam allready tired :D
[10:48:39] <NooM> i tried 0402 once
[10:48:47] <NooM> but i get a lot of tombstones
[10:48:50] <twnqx> Oo
[10:48:58] <NooM> and its hard for me to place em right
[10:49:06] <NooM> wount do that again
[10:49:15] <twnqx> tin one end, shift par tint, solder other ed, done?
[10:49:24] <twnqx> shift part in*
[10:49:40] <NooM> yeah that doesent work well with that tiny stuff
[10:49:45] <NooM> also it doesent look good
[10:49:50] <twnqx> uh
[10:49:54] <twnqx> it works perfectly
[10:50:04] <kastein> I typically just dab flux pen, get a tiny bit of solder on the iron, push the part into position with my fingernail, hold it down, dab solder on one end
[10:50:12] <kastein> solder other end nicely, clean up first tack solder
[10:50:13] <kastein> done
[10:50:19] <twnqx> it is difficult with 01005
[10:50:26] <kastein> that's an understatement
[10:50:26] <twnqx> which i tried just for fun
[10:50:40] <twnqx> but it's easy even with 0201
[10:51:04] <NooM> https://www.dropbox.com/s/h5a4ve3o7sbx90j/Bild132.jpg
[10:51:10] <NooM> does it look that good?
[10:51:21] <twnqx> just need to switch to ceramic pincers or the pieces stick on the pincer :X
[10:51:49] <NooM> also iam shaking to much for that tiny stuff to solder by hand :D
[10:52:15] <kastein> I have to actually use magnification if I go under 0402 lol
[10:52:19] <twnqx> did you open the pic i posted earlier?
[10:52:46] <NooM> i sure did, but cant remember, post again
[10:52:59] <twnqx> http://imgur.com/exuPva9
[10:53:15] <NooM> nope havent seen that before
[10:53:44] <NooM> looks good
[10:54:16] <twnqx> that ic5 was also an experiment, with larger alternative pad sets if it didn't work out :P
[10:54:23] <N1njaneer> Mmm, I just had to use one of those funky pin arrangement QFNs recently :)
[10:54:39] <NooM> :D
[10:54:54] <twnqx> that whole design ended up in the bin :(
[10:54:58] <twnqx> NONE of it was right
[10:54:58] <N1njaneer> Awww
[10:55:10] <kastein> mis-routed the board or what?
[10:55:21] <twnqx> the level shifter was not suitable for jtag
[10:55:23] <NooM> https://www.dropbox.com/s/z3wf6c5aw7igah1/Bild153.jpg
[10:55:32] <N1njaneer> Last-night's adventure here, shortly to be in copper instead of acrylic -- https://www.dropbox.com/s/zzh4dzc5s9zebcw/post.jpg
[10:55:36] <twnqx> and the oher ports needed level shifters, but didn't have nay
[10:56:41] <NooM> :(
[10:57:39] <NooM> heh i made a lot of fail designs too :D
[10:58:08] <twnqx> most of my fail designs are fixable
[10:58:11] <twnqx> that one wasn't
[10:58:13] <N1njaneer> Best way to learn :)
[10:59:00] <NooM> https://www.dropbox.com/s/px5firyafyrdb6z/Bild158.jpg
[10:59:03] <NooM> thats was the worst
[10:59:11] <NooM> when i soldered it i was like: wtf -.-
[11:00:01] * N1njaneer reccomends a nice bottle of liquid flux with a dispensing needle when doing by-hand assembly/rework/cleanup.
[11:00:29] <NooM> yeah
[11:00:35] <NooM> i use flux paste
[11:01:00] <twnqx> oh wel, bedtime
[11:01:04] <twnqx> not even 7h left :S
[11:01:05] <NooM> night
[11:01:11] <N1njaneer> G'night twnqx!
[11:02:44] <Jartza> argh
[11:02:46] <NooM> https://www.dropbox.com/s/kvnnc1h05nc4du2/Bild167.jpg
[11:02:53] <NooM> my new display :D (5 digit)
[11:02:55] <Jartza> thunderstom came out of the blue
[11:02:59] <NooM> its biiiiiig
[11:03:00] <Jartza> goodbye adsl-modem :(
[11:03:14] <Jartza> that was 9th adsl-modem that burned during thunder
[11:03:20] <NooM> for my version of dave jones uCurrent :D
[11:03:22] <Jartza> killed by lightning :(
[11:03:28] <NooM> wow
[11:03:33] <NooM> that never happened to me
[11:03:39] <NooM> use an protection adapter
[11:04:13] <Jartza> I do
[11:04:15] <Jartza> doesn't help
[11:04:18] <NooM> hmmmmm
[11:04:26] <NooM> sue them -.-
[11:04:30] <NooM> :D
[11:04:32] <Jartza> who? :D
[11:04:42] <NooM> the company that made the adapters
[11:04:51] <Jartza> no oversurge protector company promises it protects from lightning :)
[11:05:09] <Jartza> we have 2km of aircable and we're at the end of the line
[11:05:28] <Jartza> I guess there should be some kind of more advanced protection
[11:05:32] <Jartza> like... umm.. grounding? :D
[11:05:47] <NooM> sure there are some
[11:05:52] <NooM> to protect from lightning
[11:06:02] <woodyj21> run off generator, put in faraday cage
[11:06:07] <NooM> lol
[11:06:25] <Jartza> I actually have generator because of the aircables
[11:06:39] <Jartza> 2 years ago we had winterstorm, electricity-cut lasted 11 days
[11:07:13] <Jartza> 22 km of cables was ripped of by falling trees
[11:07:23] <NooM> ow
[11:07:26] <woodyj21> back in 2000 in Arkansas/Oklahoma, had winter ice storm laid 2 inches of ice across a few hundred sq miles. elec down for 21 days :)
[11:07:36] <Jartza> I just don't understand why they didn't dig them underground while they were fixing them
[11:07:49] <NooM> mhm
[11:07:49] <N1njaneer> Too expensive.
[11:08:02] <woodyj21> and burried cables bring a whole new set of issues
[11:08:07] <Jartza> I'm not so sure :)
[11:08:11] <NooM> i never had a power/inet outage for more than 2 or 3 hours
[11:08:15] <NooM> and iam in no big city
[11:08:24] <woodyj21> maybe that's why, LoL
[11:08:31] <NooM> id freak out w/o i-net
[11:08:35] <Jartza> it wasn't cheap to clean and cut those trees and build new poles and cables either
[11:08:58] <Jartza> the internet worked with backup 3G connection for 2 days
[11:09:01] <woodyj21> very true. we also, sadly, had some human lives lost. chainsaws and ice and trees and High Volts
[11:09:04] <Jartza> then I guess the base station ran out of battery
[11:09:26] <Jartza> strangely we didn't lose lives
[11:09:40] <Jartza> although lot of people had to be evacuated from home, because of no heating and no water
[11:09:55] <Jartza> schools and churches were filled with people
[11:10:39] <NooM> that reminds me.. a few years ago we had some kind of storm here.. i was in the woods with my dog.. and a few hundret meters away the trees broke.. i was like "hmm, youd better not be here ..."
[11:10:40] <NooM> :D
[11:11:58] <NooM> it was weird, they broke at around 1/3 of their height
[11:14:08] <Thrashbarg> weakest point evidently
[11:14:20] <NooM> mhm
[11:15:18] <Hfuy> Hello.
[11:15:23] <NooM> hi
[11:15:38] <Hfuy> I need to smooth out some values, just for the sake of visual prettiness. Is there anything faster than just a box filter?
[11:15:55] <Hfuy> I'm rather running low on MCU resources as it is.
[11:17:01] <woodyj21> NooM: intresting.... i've never really thought about how they would break
[11:17:49] <NooM> guess wind was not strong enought to rip em out, it just shake them till they break
[11:20:06] <Hfuy> Noobie question, but - x >> 4 == x/16, right?
[11:20:11] <NooM> wow look whos here, A124 .. you still live in your moms basement and have less to eat than my dog? :D
[11:21:04] <N1njaneer> Hfuy: Correct.
[11:21:24] <Hfuy> Right. Didn't think I was going THAT crazy.
[11:22:25] <Hfuy> I figured I could do a 16-value box filter with that, and it'd be faster than an n-tap filter and dividing by n. Unless the compiler is smart enough to work out to do a shift when n is base-2.
[11:22:33] <N1njaneer> Unfortunatly it's generally faster to do multiplies rather than LEFT shifts on the AVR since it had no barrel-shifter :(
[11:23:07] <Hfuy> I do notice the size of my binary ballooning rather when I do floating point mathematics.
[11:23:17] <Hfuy> The floating point library appears to weigh in at about one aircraft carrier.
[11:24:02] <Hfuy> Again, sorry for the basic question, but can I have multidimensional arrays? Or would that be silly?
[11:24:58] <N1njaneer> Hfuy: Yes, code-bloat due to pulling in the floating-point libs since there is no FPU in the AVR architecture :)
[11:25:17] <N1njaneer> Hfuy: And yes, multidimensional arrays are fine. Just don't eat up all of your memory. :)
[11:27:11] <ambro718> My very fast float to int rounding code: https://github.com/ambrop72/aprinter/blob/master/aprinter/avr-asm-ops/fpround.h
[11:27:45] <Hfuy> I'm writing the world's most overengineered candle-flicker simulator.
[11:27:54] <Hfuy> I have it ramping up and down to produce quite a nice flicker
[11:27:57] <ambro718> I have an even faster version using ijmp to jump to the right place in a sequence of shifts, but I think it'll break if gcc puts it beyond 128K flash
[11:28:14] <Hfuy> but it's a bit mechanical - it's doing, basically, an irregular sawtooth. I want it to be curvier, so I was thinking of just box filtering the brightness value.
[11:28:51] <Hfuy> It's being slightly recalcitrant.
[11:33:50] <N1njaneer> Hfuy: Throw in some pseudo-randomness to controlling the parameters.
[11:33:55] <Hfuy> I have.
[11:33:58] <Hfuy> That all works fine.
[11:34:06] <Hfuy> The irregular sawtooth is irregular due to the random factor.
[11:34:20] <Hfuy> I just want it to be an irregular wiggly line, not a series of triangles.
[11:35:27] <N1njaneer> Try averaging or adding two different waveforms going at the same time. :)
[11:36:30] <Hfuy> I'm just box filtering it. But I'm not used to quite such a brutally on-the-metal software engineering environment.
[11:36:34] <N1njaneer> Just keep tweaking until it looks how you want it. I've had to do the fire/flame thing on AVR quite a number of times, but generally does require some iterations to see what works and what doesn't.
[11:36:59] <jhn> I assume the comercial candles are bullt on a 4004 successor and thus cheap and lame. With an atmega 128 your oiptions are endless though - or overengineered as you stated :-)
[11:37:37] <Hfuy> It's not entirely straightforward.
[11:37:55] <Hfuy> To produce decent results, the brightness needs to be somewhat gamma corrected, which means I need >8-bit PWM.
[11:38:01] <Hfuy> And I need to drive six channels.#
[11:38:35] <Hfuy> This means software PWM, so I've had to be cautious about timing.
[11:38:55] <N1njaneer> Hfuy: Do it in software if you have a fast enough chip. You can also do Bit Angle Modulation if you just need a bunch of brightness steps but don't need super-super-awesome continuity and butter-smooth ramping.
[11:39:07] <Hfuy> It needs to be visually smooth.
[11:39:18] <Hfuy> Hence the need to gamma correct it, hence the need for high bit depth (ten seems about enough)
[11:40:05] <N1njaneer> Far more efficient on timing than straight PWM. If you can run it fast enough it still looks quite smooth, and you have the easy ability to adjust the bit-depths and resolution slightly more.
[11:40:40] <N1njaneer> Or use a nice off-board LED driver such as a TI part which will handle the fast PWM as well as constant-current for you automatically :)
[11:40:43] <Hfuy> It's a mega328. Actually it's an arduino, but I'm writing straight AVR code.
[11:40:55] <N1njaneer> Easy to do 16-bit with some of those.
[11:40:56] <Hfuy> The arduino libraries were hopelessly too slow.
[11:41:05] <N1njaneer> Yes, Arduino is good like that :)
[11:41:31] <Hfuy> I've got no major objection to it. Slipping into normal AVR C seems to work fine, and I retain the USB programmability.
[11:42:31] <Hfuy> And the easy Serial.print() for debug.
[11:42:33] <Hfuy> It's quite nice.
[11:44:28] <Hfuy> Dammit, this box filter is causing wrappage.
[11:44:38] <Hfuy> Things that should be 0 end up being 65000 and change.
[11:51:00] <jhn> While we are on PWM: I need to create 3 400 Hz amplitude modulated sinus waves. The waveform is less critical than the amplitude. How would you approach this?
[11:51:57] <Hfuy> Lookup table, if the frequency is high enough to make that practical.
[11:52:44] <Hfuy> Are you driving some sort of aircraft-related synchro device?
[11:53:37] <jhn> MCU is at90can128, I considered using atmega64M1, but am put off by the heavy pin mux.
[11:53:54] <jhn> Hfuy, affirmative.
[11:54:17] <Hfuy> You'll need something with a decent DAC, that's for sure.
[11:54:20] <N1njaneer> Yes, lookup table works well. Power of 2 look-up tables are generall most efficient since you can easily modulo them for range :)
[11:54:36] <jhn> Have you seen any code to that end?
[11:54:47] <Hfuy> You will still need quite decent CPU performance, as you'll need to scale the waveforms at high bit depth.
[11:55:04] <N1njaneer> Set the theta increment based on what kind of resolution range you need per-step, as well as your lowest and highest frequencies.
[11:55:20] <Hfuy> Frequency is likely to be fixed in this application - right?
[11:55:41] <jhn> Rock solid 400 Hz.
[11:55:51] <Hfuy> Building a simulator?
[11:56:09] <jhn> But I wanted to spit the output onto a half bridge no more.
[11:56:18] <Hfuy> Hmm.
[11:56:26] <myself> Sounds like a supply for aircraft/shipboard electronics, at least. ;)
[11:56:42] <myself> Oh, hey, there's scrollback.
[11:56:58] <Hfuy> Three phase 400Hz, with precision variable amplitude? Yes, that'll be a synchro-resolver, or a device designed to listen to one.
[11:57:22] <myself> Hopefully with some brickwall LC filter to knock out the high-frequency ringing, too.
[11:57:24] <Hfuy> Retrofits of more modern tech onto old military jets often hit this.
[11:57:45] <Hfuy> The concern I'd have is the analog side. Developing something with the right capabilities to drive such an inductive load could be a bit of a bind.
[11:58:30] <myself> I've got a rackmount Elgar synthesizer that basically replaces a variac, makes AC power at a configurable voltage and frequency, 47-440 or thereabouts. It's single-phase but can be ganged up with a few of its buddies to do 3w.
[11:58:49] <jhn> I _naively_ thought the synchro coils would take care of the filtering themselves.Of course to fight EMC I am willing to put in any LC conmbo required.
[11:59:24] <Hfuy> jhn: are you expecting the load to draw significant current?
[11:59:29] <myself> If it's a real mechanical synchro/selsyn, you're probably fine. If you're reading a resolver with electronics, you'll want to filter first. Would be my intuition.
[11:59:32] <Hfuy> Are you actually trying to move a nontrivally-massive object?
[11:59:56] <Hfuy> If it's a big-jobs synchro moving a big load, the amps will be nontrivial.
[12:00:08] <Hfuy> It's worse than driving CRT deflection coils :/
[12:00:25] <jhn> myself, that wouldn’t help, as the amplitude needs to shift according to angle displayedd.
[12:00:30] <myself> And non-sinusoidal, IIRC. Something about phase angle squared or something.. heh.
[12:00:39] <Hfuy> jhn: Is it just a cockpit instrument?
[12:00:46] <Hfuy> If so the load is likely to be smallish.
[12:01:19] <jhn> All of the above. Simple pointer up to servoed instruments.
[12:01:31] <jhn> For the latter I need to read back the values as well.
[12:01:33] <Hfuy> Sounds doable.
[12:01:51] <Hfuy> Reading I guess is just an edge trigger and some timing.
[12:02:39] <myself> There's a good chance it'll work fine at less than 400Hz, too, just with less efficiency. You could take the motor drive signals off a 10krpm hard drive...
[12:03:06] <jhn> On three channels at once? Or would you read in channel by channel? With the 128 @ 16 MHz, the change of the 400 Hz seems ever so slow...
[12:03:27] <Hfuy> To read, you could also LPF the 400hz and read levels
[12:03:43] <Hfuy> Depends on your requirements for performance
[12:05:01] <jhn> Of course ye god ole Clifton wouldn’t complain at 385,4 Hz either… :-)
[12:05:49] <jhn> Forgot to mention: I need 4 400 Hz channels for some instruments.
[12:05:57] <Hfuy> What voltage do you need to bump it up to?
[12:06:05] <jhn> As the rotor needs a 400 Hz as well.
[12:06:13] <Hfuy> Often it's 28v for instrumentation or something like 110 for power devices.
[12:07:38] <jhn> Does anyone know how the 2 phase motors work? In some instruments like horizon, you have a motor excitateted by 2 windings.
[12:08:12] <Hfuy> Hmm, not sure about that.
[12:08:20] <Hfuy> Is it an x/y offset thing?
[12:08:25] <Jartza> nice
[12:09:14] <Jartza> the filter capacitors just after the adsl-line connector have blown their case open
[12:09:22] <Hfuy> Whoops
[12:09:32] <myself> hey look, fuses!
[12:10:29] <Hfuy> Sigh. Why is my box filter outputting negative numbers from only positive input?
[12:10:37] <Thrashbarg_> "In a transistor circuit protected by a fuse, the transistor will blow to protect the fuse"
[12:10:56] <Jartza> https://db.tt/9lHSEzrM
[12:11:09] <Thrashbarg_> nice
[12:11:41] <jhn> One coil is connected to a “permanent” 26 VAC source, the other to some amplifier.
[12:12:39] <Jartza> not sure what else is broken
[12:13:04] <jhn> I assume the amplifier will deliver 0 V when stable/synchronized, or a positive/negative amplitude depending on the direction of error.
[12:13:11] <Jartza> but that's the visible damage
[12:14:04] <jhn> Logic and physics dictate it has to be a phase offset, but just how much? 90 or 120 degrees?
[12:14:18] <Jartza> probably something else too
[12:15:28] <Duality> wouldn't it be easier if all the data was on one side of the chip and data out on the other ?
[12:15:39] <Duality> talking about 74hc377
[12:15:53] <Duality> cause that thing is unroutable or atleast verry verry hard to do
[12:15:54] <Duality> :S
[12:20:55] <Jartza> hmm, even power-side is broken
[12:21:14] <Jartza> so, new nodem again
[12:21:33] <Jartza> I have to live today with this 3G
[12:31:23] <ambro718> has anyone managed to implement faster float multiply than avr-libc?
[12:31:59] <ambro718> I have a feeling avr-libc math functions are not optimized for speed
[12:32:30] <Tom_itx> doing float on any avr is painful
[12:32:44] <ambro718> not really
[12:43:08] <N1njaneer> ambro718: Yes, used fixed-point math instead. Done. :)
[13:11:32] <Jartza> I'm hoping they'll get the LTE here soon
[13:11:46] <Jartza> then I would get rid of the ADSL
[13:11:53] <Jartza> that would be less prone to lightning-attachs
[13:11:57] <Jartza> attacks, even
[14:47:56] <insaneinside> ...so, about the purported support for fixed-point math in avr-gcc (https://gcc.gnu.org/wiki/avr-gcc#Fixed-Point_Support): has anybody actually *used* it?
[14:50:10] <wondiws> hi there, I have an Arduino Mega and a Arduino Leonardo-like board, both of them have JTAG, is JTAG by default enabled on AVR chips?
[14:51:06] <Casper> wondiws: yes and no
[14:51:21] <Casper> from the factory jtag is enabled
[14:51:29] <insaneinside> re: fixed-point math in avr-gcc v. 4.8.1, attempting to use _Accum gives me <http://pastebin.com/z1v6vADA>
[14:51:30] <Casper> but the board maker disable it
[14:51:52] <wondiws> oh, I have to set fuse bits?
[14:51:57] <insaneinside> So do I have to use some undocumented option to enable fixed-point support?
[14:52:02] <Casper> jtag use 4 of the 8 ADC pins, hence why they disable it when they flash the bootloader
[14:52:22] <Jartza> heh
[14:52:33] <Jartza> friend of mine told me to make a lightning protector
[14:52:42] <Jartza> take a metal sheet, put 2 spark plugs to it
[14:53:04] <Jartza> then wire the telephone via the spark plugs to adsl
[14:53:16] <Jartza> and ground the metal sheet somewhere :D
[14:53:43] <insaneinside> Jartza: the engine block would work nicely. :P
[14:53:55] <Casper> wondiws: yes, need to set the fuse bits, but you most likelly have to do a chip erase first and lose the bootloader (jtag may allow to read the protected/locked code)
[14:54:18] <Jartza> insaneinside: yeah, some old 2 cylinder engine from junk yard
[14:55:10] <Jartza> and some fingerwidth copper cable to iron bar that's buried to ground
[14:55:48] <insaneinside> Hmm, but... how are you going to drive with it in the ground?
[14:56:34] <Jartza> why should I drive with lightning protector ;)
[14:57:09] <insaneinside> Well, you've already got the spark plugs, right? ...might as well add the rest of the car.
[15:01:20] <Jartza> I also have 3 cars already
[15:01:26] <Jartza> oh, make that 4
[15:01:29] <Jartza> one is broken, though
[15:02:08] <vsync_> mitä jari egoot
[15:02:15] <vsync_> onko pieni molo :o
[15:25:24] <Jartza> kolmella alle tonnin autolla egoon? :D
[15:25:27] <Jartza> osta elämä :D
[15:26:40] <brabo> rue_bed: i'm still having weirdness, are you around?
[15:29:21] <wondiws> I can't seem to read my flash back to hdd :S
[15:29:24] <wondiws> with avrdude
[15:29:38] <wondiws> it does seem to read, but then I get a file with 0 bytes :S
[15:31:57] <windsurf_> i'm using amtel studio and can compile but can't upload. error is, avrdude.exe: stk500_getsync(): not in sync: resp=0x00
[15:32:18] <windsurf_> I believe I have my settings correct except I'm unsure about the baud rate for atmega2560.
[15:32:49] <windsurf_> I am able to upload with Arduino IDE on same port (COM5), FYI
[15:32:59] <windsurf_> (Arduino Mega 2560)
[15:33:17] <windsurf_> avrdude arguments are
[15:33:17] <windsurf_> -C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -v -v -pm2560 -carduino -PCOM5 -b57600 -D -Uflash:w:"$(ProjectDir)Debug\$(ItemFileName).hex":i
[15:33:59] <wondiws> do you need to set baudrate at all?
[15:34:36] <wondiws> @windsurf that was :)
[15:35:27] <windsurf_> wondiws: from what I can tell, yes but I just found it should be 115200 according to Arduino IDE's boards.txt
[15:35:31] <windsurf_> which I've tried.
[15:35:31] <windsurf_> I
[15:35:37] <windsurf_> I'll try without baud though
[15:37:06] <windsurf_> wondiws: left it out, now I don't get the "overriding baud" message but same error.
[15:37:26] <windsurf_> i bet you're right I don't need it but wish I knew how to get the upload to work.
[15:38:11] <wondiws> I just tried myself using linux commandline and I can't upload either :S
[15:38:35] <wondiws> usually I use my ISP, but I just uploaded the bootloader, so I decided to try the arduino interface myself
[15:42:09] <wondiws> windsurf_, I got it working now
[15:42:24] <wondiws> "-c wiring" instead of "-c arduino"
[15:43:20] <windsurf_> wondiws: trying, thanks
[15:44:53] <windsurf_> wondiws: f### yeah! works!
[15:44:58] <windsurf_> thanks
[15:45:07] <wondiws> no problem ;)
[15:45:08] <windsurf_> can you explain that change to me please so I may learn from it?
[15:45:59] <wondiws> I just looked up what the Arduino IDE did, I don't know exactly how it works, but I guess the protocol is different from the Arduino Uno, which does use "-c arduino"
[15:46:56] <windsurf_> wondiws: I see that now yah
[15:47:00] <windsurf_> thanks man
[19:30:02] <brabo> rue_bed: i think i may have discovered that if you only have 1024 ram (atmega8) it is not a good thing to assign too much/big vars
[19:31:02] <Casper> hehe
[19:31:08] <Casper> yeah it's easy to run out of ram
[19:31:24] <Casper> and contrary to PC, you have to be carefull...
[19:31:28] <brabo> had several char arrays of 255 chars and some other vars lying around
[19:31:47] <Casper> ... which is why apps nowadays use so much ram... and cpu and all... it's easier to waste ressources....
[19:32:10] <Casper> btw, for constant, there is way to keep them in flash
[19:32:10] <brabo> i was going crazy for two days trying to figure out if i changed 1 char to one char array that wasnt even used, it messed up my other variables..
[19:33:13] <brabo> streaming json and parsing it on atmega is hard :p
[19:33:23] <brabo> on a atmega8 at least
[19:33:29] <brabo> more ram would be nice
[19:43:19] <rue_bed> brabo, yea, its not a PC
[19:44:07] <rue_bed> brabo, are you sure your system design is reasonable, maybe you should be doing that stuff somewhere different
[19:45:00] <rue_bed> brabo, you have to remember that, when programming in C, lots of that ram is needed for stack space
[19:45:10] <rue_bed> ESPECIALLY if your trying to code it in c++
[19:49:17] <brabo> it's in c
[19:49:20] <brabo> :)
[19:49:36] <brabo> but ye, it seems that was my ghost in the shell
[19:50:45] <insaneinside> rue_bed: C++ isn't *inherently* less space-efficient than C; it is in the general case, however, unless you're very very clever about it. ;)
[20:36:55] <Duality> are these the same for every avr ?
[20:37:05] <Duality> https://sourceware.org/binutils/docs/as/AVR-Opcodes.html
[20:39:17] <N1njaneer> Yes, the opcodes are across the entire AVR chipset range
[20:40:23] <N1njaneer> Only main differences are the capacities on the device, the peripheral register addresses, and the interrupt vectors. MOST peripherals are forward-compatible in that they are in the same location between similar parts. Occasionally they will move around, but Atmel tried hard to minimize this.
[20:42:20] <Casper> Duality: not all opcodes are available on all avr
[20:47:19] <N1njaneer> True, but the core of them are the same for all devices, at least that support them. :)
[20:47:39] <N1njaneer> Not gonna have any long jumps or loads on an ATTINY, etc
[20:54:35] <Duality> Casper: that i know :) just wondering if the list is a complete one for all avr's
[20:56:04] <N1njaneer> Duality: Just grab the most recent version of Atmel's website.
[20:56:16] <N1njaneer> There's a PDF that breaks down the entire opcode set.
[20:58:08] <twnqx> Duality: out of my curiosity... why the curiosity? :>
[21:00:59] <Duality> twnqx: want to build a disassembler, and then after that a assembler, and also just really interested in the avr internal workings :)
[21:01:25] <twnqx> mh
[21:01:47] <twnqx> i should make you interested in writing a tricore cpu emulator :>
[21:01:54] <Duality> nope
[21:01:56] <twnqx> compared to that beast AVR i sboring :P
[21:02:33] <twnqx> i keep running into new problems writing the emulator. now i apparently need 128bit integer types which are pretty rare...
[21:02:35] <Duality> i see, sounds interesting.
[21:03:09] <Duality> twnqx: why ?
[21:03:19] <twnqx> overflow detection in 64bit addition
[21:04:19] <Duality> ah i see :D
[21:04:36] <twnqx> that is what is temporarily keeping me after "implemented 453/785 opcodes." from the expander perl script
[21:05:01] <Duality> what language is this emulator written in ?
[21:05:07] <twnqx> mainly C
[21:05:15] <twnqx> with some code generators in perl
[21:05:15] <Duality> got sources ?
[21:05:22] <twnqx> on my laptop :P
[21:05:27] <Duality> git?
[21:05:35] <twnqx> yes, but not pulic :>
[21:05:37] <N1njaneer> twnqx: I'm in the middle of doing one for some ARM stuff right now! I feel your pain. :)
[21:05:39] <twnqx> public*
[21:05:59] <N1njaneer> But nice to know others are fascinated by the innerworkings as well!
[21:06:59] <Duality> i am also on my way of building a computer in discrete logic :)
[21:08:32] <twnqx> :)
[21:08:44] <twnqx> discrete logic is boring though, go transistor :3
[21:09:07] <Duality> i don't know why, but this stuff facinates me soo much
[21:09:09] <twnqx> i once started a 6502 in DTL logic
[21:09:31] <twnqx> but i dropped it after i managed to barely fit a 2bit adder on a full size Euro board (160x100mm)
[21:09:32] <Duality> twnqx: i'll do you one better, i have plans for a calculator build with tubes
[21:09:48] <Duality> twnqx: nice :D
[21:10:35] <twnqx> spice simulation clearly showed a direct speed/power consumption trade
[21:10:45] <N1njaneer> FPGAs, guys, FPGAs! All the fun of writing all the discreet gate logic, but it runs at super-speeds and no soldering iron!
[21:10:54] <twnqx> pfff
[21:10:56] <twnqx> too easy
[21:11:37] <twnqx> unless http://blog.notdot.net/2012/10/Build-your-own-FPGA
[21:12:36] <N1njaneer> LOL that's fantastic
[21:12:45] <Duality> i saw that one
[21:13:16] <Duality> it was on hackaday :)
[21:15:57] <Duality> the opcode map on this page is nice
[21:15:59] <Duality> http://www.cs.nmsu.edu/~jcook/arduino/index.php?n=Ref.HomePage
[21:17:55] <Duality> anyway i am going off to sleep
[21:17:56] <Duality> gn
[21:18:46] <twnqx> nn