#avr Logs

Jun 21 2017

#avr Calendar

12:25 AM mark4: does anyone know what ISO std avr-gcc supports?
12:41 AM enhering: mark4: Supports a lot
12:41 AM mark4: is it c99 or later?
12:42 AM enhering: I use c99, oop, etc
12:48 AM mark4: the point is does it suport ISOC.11 ?
03:38 AM remkooo1 is now known as remkooo
05:22 AM tpw-rules is now known as tpw_rules
05:22 AM Emil: Hot damn
05:23 AM Emil: these 0,8mm, 2Oz boards from Oshpark are fiiiiiineeeee
05:29 AM Emil: https://elepaja.fi/telegram/media/AgADBAADC6kxG-FfWVJzeBWvHULaOMr-aBkABGNp1cYxUGJy_dcAAgI.jpg
05:29 AM polprog: yay, my parcle with ti drivers, hex encoders an violet leds is coming today!
05:30 AM Emil: Nice
05:30 AM Emil: Also purple is wizard colour
05:30 AM Emil: Hmmmm
05:30 AM Emil: purple leds with purple pcbs
05:30 AM Emil: But yeah, I might order only these 20z 0,8mm boards from now on
05:30 AM polprog: thats a big ass inductor .. i should try my hand at dcdc converters
05:31 AM polprog: better read the book before
05:31 AM polprog: im still in basic opamps
05:32 AM polprog: :v
05:33 AM twnqx: where are big inductors?
05:35 AM Emil: polprog: overspecced like always :D
05:35 AM twnqx: i still am kind of scared to put my big inductors to play
05:36 AM twnqx: they belong to a bag labeled "12V 40A power supply"
06:09 AM Emil: FfWVKtln14orv8yuYRqRkABG5y4lVIJx0BDKMCAAEC.jpg
06:09 AM Emil: wtf google
06:10 AM Emil: https://elepaja.fi/telegram/media/AgADBAADGakxG-FfWVKtln14orv8yuYRqRkABG5y4lVIJx0BDKMCAAEC.jpg
06:42 AM Lambda_Aurigae: enhering, I hate those things! that being said, if you can make it work they are fun.
06:43 AM Lambda_Aurigae: enhering, calculator displays used to use similar for connection..they would almost never go back the way they came apart.
08:30 AM Emil: Okay
08:30 AM Emil: I can confirm that for the esp-12s, the big pad is connected to ground
09:32 AM polprog: what do you think? https://puu.sh/wqrc9/04b58f2be5.png
09:33 AM rue_house: charlieplexing
09:34 AM polprog: no, it's the TLC5940 messaround ('eval') board
09:34 AM rue_house: ooooh
09:35 AM polprog: https://puu.sh/wqrkn/64cdf15ea4.png
09:35 AM rue_house: so, your gonna pay about $30 for processing and $20 in boards to get more of them than you want?
09:35 AM polprog: no, it's gonna be home etched
09:35 AM polprog: one or two pcs
09:35 AM rue_house: ah, well, perfect then
09:35 AM dunz0r: Or pay 10$ total and get 5 from Seeed
09:36 AM Emil: polprog:
09:36 AM polprog: it's becuase i dont have a protoboard with proper footprint for that thing, it's VSSOP
09:36 AM Emil: if you are home etching
09:36 AM Emil: then ground fill the whole thing
09:36 AM rue_house: and it takes ages to get adapter baords from china
09:36 AM dunz0r: Even less... 5$ for a 50x50mm board
09:36 AM polprog: how do i make kicad fill the whole thing then?
09:37 AM dunz0r: No... they've changed it to 100x100mm
09:37 AM dunz0r: Sweet jebus that's cheap
09:37 AM polprog: wow
09:37 AM polprog: that's really cheap
09:37 AM rue_house: https://www.aliexpress.com/item/BOB-10616-TLC5940-16CH-LED-DRIVER/32663527475.html
09:37 AM rue_house: hahahahaha
09:37 AM dunz0r: https://www.seeedstudio.com/fusion_pcb.html
09:37 AM rue_house: I suppose china isn't always a deal
09:38 AM LeoNerd: seeed's prices are crazycheap :) I'm just working on a board now in fact that I'll probably try out their service with
09:38 AM dunz0r: 6/6 mil spacing and 0.3mm minimum hole sizes though
09:38 AM Emil: Seeed and itead are the same thing btw
09:38 AM dunz0r: Hmm... maybe I should finish that 100x100mm board and order :D
09:38 AM LeoNerd: 6/6 should be fine for almost anything pro-hobbiest grade. What are you doing that needs smaller?
09:38 AM dunz0r: LeoNerd: I don't need smaller :)
09:39 AM dunz0r: And it's not even more expensive with colours other than green
09:39 AM dunz0r: :O
09:39 AM rue_house: home etched should run about 2-5c per square inch
09:39 AM LeoNerd: Yah.. Though it *is* more expensive if you want lead-free HASL
09:39 AM LeoNerd: Like.. over twice
09:39 AM LeoNerd: I don't understand why
09:39 AM dunz0r: LeoNerd: 12.9$ instead
09:40 AM dunz0r: Man... I'm gonna finish my new minisumo-board during my vacation and order me some boards I think!
09:40 AM polprog: Emil: how do you make kicad fill the whole area? add a dummy ground fill?
09:41 AM dunz0r: polprog: You make a zone and fill it, you can fill it without connecting it to a net as well
09:41 AM dunz0r: Can't decide about sensors though, the cheap Sharp IR-sensors are nowhere to be found :(
09:41 AM Emil: polprog: making a video but it's stupid
09:41 AM Emil: polprog: just make a fill and it werks
09:42 AM polprog: ill make a big null fill around
09:42 AM polprog: no net
09:43 AM rue_house: the 5940 is a pain in the ass btw
09:43 AM rue_house: http://paste.debian.net/972585/
09:45 AM LeoNerd: I've used a 5940 before, and yes it's not *that* great
09:45 AM polprog: Emil: https://puu.sh/wqrJ7/24c80a3213.png managed to sort out the fills
09:45 AM rue_house: its like having someone else count and compare for you, but having to do everything else
09:46 AM polprog: rue_house: thanks for the code
09:46 AM polprog: this one i may do in C partially
09:47 AM polprog: probably the serial tx could be done in asm with hardware SPI, as long as it's 8 bit
09:47 AM polprog: damnit its 12 words :/
09:48 AM Emil: https://emil.fi/jako/videot/2017-06-21_17-17-04_DD7Z26na.mp4
09:48 AM Emil: polprog: there you go
09:49 AM Emil: Also
09:49 AM Emil: your clearance is ridiculous compared to your trace clearance
09:49 AM rue_house: polprog, I did one later, I cant find the code, I corrected things, I dont know what
09:50 AM polprog: ill manage
09:50 AM rue_house: ah, it looks like I have ... yea, I used a chip to generate me interrupts when the values on the 5940 need to be updated
09:51 AM rue_house: I think I used a CD4060
09:51 AM polprog: Emil: looks like i did everything like you, it's just my trace topology makes kicad go nuts
09:51 AM rue_house: I'll be back from work in 9 hours if your interested
09:51 AM polprog: rue_house: what interrupts do you mean?
09:51 AM rue_house: because the 5940 dosn't hold its values when it cycles
09:52 AM rue_house: I set up an interrupt to get the avr to rewrite the values to it
09:52 AM Emil: polprog: make your clearance smaller
09:52 AM Emil: for the ground fill
09:53 AM polprog: i did, it's 10 mils now
09:53 AM dunz0r: polprog: You need to run a board check before it redraws the zones, unfortunately
09:53 AM polprog: rue_house: that's not good... i must've missed that
09:53 AM polprog: dunz0r: i know, tahnks
09:53 AM polprog: thanks*
09:54 AM * dunz0r needs to write a patch for KiCad to have a hot-key for running a board check
09:54 AM polprog: good idea!
09:54 AM dunz0r: It would be sooo convenient!
09:55 AM dunz0r: I tried doing it with a macro, but I couldn't get it to work very well
09:55 AM polprog: Emil: i just found a better way, i make an unconnected fill on the whole board area and change the priority
09:55 AM polprog: Emil: GND is prio 1 and not connected is prio 0
09:57 AM polprog: that's better, https://puu.sh/wqsfK/f83305fea1.png
09:58 AM dunz0r: Oh, and the outer one isn't connected to GND at all... clever!
09:59 AM polprog: the outer one is just there to minimize the amount of copper that has to be removed and lowers the risk of traces being over-etched
10:00 AM dunz0r: Yeah, I've home-etched before :)
10:00 AM * dunz0r should draw his amplifier boards now that he has discovered how crazy cheap Seeed has gotten
10:00 AM LeoNerd: Yah :)
10:00 AM LeoNerd: eevblog Dave tweeted yesterday that basically you can consider PCBs as justabout free now
10:00 AM kre10s: Lambda_Aurigae: Sup! Thanks for the tip yesterday.
10:01 AM Emil: dunz0r: matey
10:01 AM dunz0r: LeoNerd: Yeah, 5$ for 100x100mm 2 layer boards is crazy cheap
10:01 AM Emil: you just CTRL+B and B
10:01 AM Emil: to redraw fillz
10:01 AM dunz0r: Emil: !!
10:01 AM Emil: CTLR+B hides
10:01 AM dunz0r: Emil: Thanks mate, I've tried to solve this for a while :D
10:01 AM Emil: and B makes visible
10:01 AM Emil: :D
10:02 AM kre10s: Turns out it is possible to run the 168pb on 16Mhz reliably. but I had a software buffer overflow bug that did god knows what.
10:02 AM Lambda_Aurigae: kre10s, I didn't do it!
10:02 AM dunz0r: Emil: But does it do the recalculation?
10:02 AM Emil: dunz0r: yeah
10:02 AM Emil: that's the whole point of it
10:02 AM dunz0r: God damn it :D
10:02 AM Emil: lolo :D
10:02 AM Emil: polprog: now it looks nice
10:03 AM Emil: I personally prefer to have the pads visible, though
10:03 AM Emil: You have them hidden
10:03 AM Emil: Or in outline mode
10:04 AM Emil: dunz0r: link dat 5 dollarools 100xq100
10:04 AM Emil: kre10s: not reliably
10:04 AM Emil: but most do run
10:04 AM dunz0r: Emil: https://www.seeedstudio.com/fusion_pcb.html
10:04 AM Emil: Nice
10:04 AM Emil: I should try thenm
10:04 AM Emil: what's the shipping time?
10:04 AM Emil: Also polprog
10:05 AM dunz0r: I've tried them a few times when it was 10$ for 50x50mm
10:05 AM dunz0r: Emil: Shippings is like ~2-3 weeks
10:05 AM Emil: You can squeeze your board to a way smaller size :D
10:05 AM dunz0r: But it's free, so one can't expect a lot more
10:06 AM polprog: Emil: they are in outline mode
10:06 AM polprog: i know i can squeeze it but i like it now
10:06 AM polprog: s/now/as it is/
10:07 AM polprog: damnit, an error in the schematic
10:09 AM Emil: heh
10:10 AM Emil: yeah
10:10 AM Emil: no amount of drc will save you
10:10 AM Emil: if you screw up the schematic
10:11 AM Emil: polprog:
10:11 AM Emil: Are those leds or what?
10:11 AM Emil: What is that board?
10:12 AM Emil: Where are the resistors?
10:16 AM polprog: Emil: theese are leds leds, the current is set by a single resistor (on the right of the chip)
10:16 AM Emil: interestin
10:16 AM Emil: Anycase
10:16 AM Emil: make the vcc trace a lot thicker
10:16 AM Emil: No reason to have it that small
10:16 AM polprog: good idea
10:16 AM Emil: And VLED
10:17 AM Emil: You have a jumper there?
10:17 AM Emil: Whatfor
10:19 AM Emil: https://emil.fi/jako/kuvat/2017-06-21_17-47-19_MBGNKK2S.png here you might want to change the trace direction to pad
10:19 AM Emil: I'd set a higher clearance for traces but eh
10:19 AM polprog: jumper so i can separate vled from vcc if i want
10:20 AM polprog: k, so vcc is 0,5 mm
10:21 AM polprog: you think the traces are too tightly sapced?
10:24 AM Lambda_Aurigae: polprog, you are running multiple LEDs on a single resistor?
10:26 AM polprog: lolno, the chip is a constant current driver where you use a single external resistor to set max current for all the channels
10:26 AM Lambda_Aurigae: ok.
10:26 AM polprog: im not that newbish :D
10:26 AM Lambda_Aurigae: hey, it happens.
10:30 AM polprog: turns out pressing b recalculates the fills even if they are visible
10:30 AM polprog: no need to press C-b first
10:33 AM polprog: good to etch i think, i lowered the clearance on the fills to .1mm, tweaked some stuff
10:35 AM Emil: Matey
10:35 AM Emil: matetyyy
10:35 AM Emil: you are diying this, right?
10:35 AM Emil: If you are
10:35 AM Emil: then set clearance to atleast 0.3mm
10:35 AM polprog: ah
10:35 AM Emil: more if you can
10:35 AM polprog: trace clearance and fill clearance?
10:36 AM Emil: 0.25mm is like the smallest you can do
10:36 AM Emil: polprog: yeah
10:36 AM Emil: I recommend 0.5 as both for diy but obviously you can optimise
10:36 AM polprog: cant go higher than .2, its VSSOP
10:37 AM polprog: i tried .3 clearance on the power grid, it wont connect
11:13 AM Emil: hmm
11:13 AM Emil: Try 0.25mm
11:14 AM Emil: But that is small
01:06 PM LeoNerd: Anyone hereabouts much experience with OLED displays? I'm quite the fan of the SSD1306 and SH1106 modules, but lately I'm finding sometimes they're a bit small
01:06 PM LeoNerd: Not necessarily in resolution - I'm quite happy with 128x64 pixels, more *physically* - I'd like something a bit bigger, easier to read on a front panel
01:07 PM LeoNerd: But also sometimes, having more pixels or colours might be nice for some projects
01:07 PM cehteh: sounds you want to go expensive
01:07 PM LeoNerd: Eh; not necessarily. Those modules are about $4 if you look in the right place.. I don't want to go /too/ much above that
01:08 PM cehteh: i mean biggier, more pixels, color
01:08 PM cehteh: and where is this damn color e-ink which was promised since years?
01:09 PM cehteh: https://www.heise.de/newsticker/meldung/EInk-stellt-farbiges-E-Paper-Display-mit-Monitoraufloesung-vor-3217966.html
01:09 PM cehteh: *want*
01:15 PM Lambda_Aurigae: if you have to ask you can't afford it.
01:18 PM Lambda_Aurigae: LeoNerd, where do you find them for 4 dollars?
01:23 PM specing: LeoNerd: you can get a phone screen with 1xxx * 720 for like $20
01:25 PM LeoNerd: Lambda_Aurigae: eBay
01:26 PM LeoNerd: specing: That's a bit the other way :)
01:26 PM LeoNerd: I was thinking maybe 256x128 or somesuch... nothing huuuuuge
01:29 PM polprog: let it be .2 mm
01:30 PM polprog: Emil: apropos trace clearance ^
01:30 PM polprog: LeoNerd: maybe you could try some lens
01:30 PM polprog: also, i'd be happy to mess around with a phone screen, any nice and easy chips?
01:31 PM polprog: not talking about nokia 3310 display, i want color!
01:47 PM Emil: polprog: be prepared to do it a couple of timws
01:47 PM polprog: Emil: to do the board or ?
01:47 PM Emil: or in this case you might want to do away with the ground fill
01:47 PM Emil: yeah
01:48 PM polprog: i cant get this printed now so ill have to do it at least tomorrow
01:48 PM polprog: but thanks, ill prepare two different mosaics then
02:08 PM polprog: if i could get mbi5040 (that texas instruments clone) i'd be happy
02:08 PM polprog: nobody sells it tho
02:12 PM polprog: damnit
02:13 PM polprog: i need to provide an external clock
02:13 PM polprog: :<
02:13 PM polprog: tmier interrupt, and have to tweak the board
02:14 PM polprog: oh, i already broke that out
02:14 PM polprog: :P
03:00 PM mark4_: not a fan of TI uC's
03:00 PM mark4_: well... more specifically their documentation
03:01 PM mark4_: like the msp430 tho but the documentation for their DSPs is fucking scatterbrained
03:21 PM polprog: they could improve their docs. make them more like atmel's or nxp's
04:07 PM toblorone: anyone familiar with cmsis? For some reason my program seems to hang on SCB_CleanInvalidateDCache(). Any idea why that might be?
04:16 PM Emil: Check clocks
04:16 PM Emil: and all the bits
04:16 PM Emil: and generated asm
04:17 PM Emil: Otherwise try the relevant channel
04:18 PM toblorone: Emil: when you say "and all of the bits" you mean verify that the registers are all in the correct state?
04:18 PM Emil: Yeah
04:22 PM toblorone: Yeah, that sounds like it will be pretty tough... and there doesn't seem to be a cmsis / arm channel. But i'll persist :^)
04:24 PM toblorone: Unless my debugger is lying to me, it seems like its crashing at this line, which doesn't seem possbile....
04:24 PM toblorone: SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
04:24 PM toblorone: ((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
04:41 PM hetii: hi :)
04:41 PM NoHitWonder^: hi
04:42 PM Lambda_Aurigae: iH
06:23 PM Rez is now known as LoRez
06:43 PM Lambda_Aurigae: http://dangerousprototypes.com/blog/2017/06/21/how-to-stm32f103c8t6-as-an-usb-device-virtual-serial-port-cdc/
07:35 PM rue_house: ok I'm back
07:37 PM rue_house: polprog,
07:51 PM enhering: Hi. Good night.
07:58 PM toblorone: Hi, I'm not too familiar with CMSIS so please bear with me. I'm trying to invalidate the data cache with SCB_CleanInvalidateDCache() and for some some reason in the process my program seems to crash. I've traced the execution with the debugger and at some point it seems to crash when the number of ways for a given set is reported as zero... anyone have some insight into what my problem might be?
07:58 PM toblorone: https://github.com/ARM-software/CMSIS/blob/master/CMSIS/Include/core_cm7.h#L2285
08:15 PM hetii: Lambda_Aurigae, thx for your link. I have few of them but don`t test them. Till now I play more with avrs, but I catch myself that often simple avrs are not enough for me
08:16 PM hetii: Lambda_Aurigae, moreover I never can estimate right if be able to put all functionality into selected mcu.
08:17 PM hetii: its always some tricky things in to havy interrupts or some luck of hardware peripherals.
08:20 PM hetii: What I really don`t like in modern mcu that they are in really small packages and sometimes is hard to solder them or make pcb at home.
08:21 PM enhering: cehteh: What do you think of this one? https://hobbyking.com/en_us/multistar-elite-5008-330kv-multi-rotor-motor.html
08:22 PM cehteh: for what?
08:22 PM enhering: I'm going for high trust, high stability, slow motion copter.
08:22 PM cehteh: everyday something else
08:22 PM cehteh: build a small cheap test rig first, learn flying
08:22 PM enhering: Yep. Still converging. Sorry.
08:23 PM cehteh: crashing a 5kg copter is dangerous and expensive
08:23 PM enhering: Bringing motors to brazil is slow and expensive.
08:23 PM enhering: Repeating the process is painfull.
08:23 PM hetii: enhering, You can check motors hear, I have around 100m to this shop and can order some of it and send you the package if you cover cost: http://www.modele.sklep.pl/pl/Katalog/SILNIKI-ELEKTRYCZNE/
08:23 PM cehteh: the more reason to have one which is safe
08:24 PM cehteh: safe to crash as well
08:24 PM cehteh: because you *will* crash it
08:24 PM enhering: I'm sure I will.
08:24 PM cehteh: thats not a question about if, only when
08:24 PM cehteh: prolly within the first tries
08:24 PM Lambda_Aurigae: hetii, that's why I use the pic32mx270f256b....28pin dip 32bit with 256K flash and 64K sram running at 50MHz....
08:24 PM enhering: But it is more about teaching the control to fly then about learning to fly.
08:25 PM cehteh: when its damaged then and you have to reoder expensive parts .. well its your problem
08:25 PM enhering: makes sense
08:25 PM cehteh: when you injure someone else its more than just your probelm
08:25 PM Lambda_Aurigae: so don't injure...make sure that fucker is heavy enough to KILL!
08:25 PM enhering: Makes sense too. But it is a controlled environment.
08:26 PM cehteh: even the motors i recommended can cut deep into your fingers on an accident
08:26 PM enhering: I thought slower motors were esier to fly
08:26 PM cehteh: well brazil is far away from here, i am not overly worried :D
08:27 PM cehteh: yes, but one crash is alomst sure some expensive damage on a big copter
08:27 PM cehteh: while a small one usually has no or little damage
08:27 PM enhering: Those motors are nos strong enough to survive a crash?
08:28 PM hetii: Lambda_Aurigae, nice mcu, have even i2s :)
08:28 PM cehteh: you seen the race coper crashes, full speed against a trunk and still flying
08:28 PM cehteh: its the mass of the copter
08:28 PM enhering: You mean smaller motors survive crashes better?
08:28 PM hetii: Lambda_Aurigae, how much you pay for it?
08:28 PM enhering: Ok
08:28 PM cehteh: 5kg copter crashing on a motor .. thats a 5kg hammer full force on the bell
08:29 PM enhering: i agree
08:29 PM cehteh: when you order motors order 1-2 more for spare
08:30 PM enhering: I have planned a loong learning curve, all controled by software, with no higher than 50cm flights
08:30 PM enhering: copter attached to floor
08:30 PM enhering: until it takes off smoothly
08:30 PM Lambda_Aurigae: hetii, nothing..free samples....but they aren't too expensive.
08:31 PM hetii: Lambda_Aurigae, I can order them for 5.5$ from local shop.
08:31 PM hetii: ok guys its very late here... I need to rest, so wish you nice night/day and see U soon :)
08:31 PM Lambda_Aurigae: cheaper than an atmega1284p...
08:31 PM Lambda_Aurigae: fewer i/o but more functionality overall.
08:34 PM enhering: Thanks, cehteh
08:35 PM enhering: Big motors can run on slow speeds, lifting small loads?
08:37 PM cehteh: just waste your money in whatever you like
08:40 PM cehteh: https://www.youtube.com/watch?v=Z4EE7Vv_RdM so far about big and only 50cm height
09:51 PM enhering: Thanks for the video, cehteh. Very impressive
11:46 PM day_ is now known as daey