#avr Logs

Dec 19 2017

#avr Calendar

12:04 AM day__ is now known as daey
03:02 AM dan3wik is now known as absynth
03:37 AM absynth is now known as dan2wik
05:16 AM MrFahrenheit: anyone here have one of those chinese usb oscilloscopes?
05:17 AM _ami_: are those better than LAs?
05:17 AM MrFahrenheit: well one just caught my attention because it has a built in dds generator, and it's $80
05:17 AM MrFahrenheit: so I was wondering if it could do bode plots
05:18 AM MrFahrenheit: see here https://www.banggood.com/ISDS205B-5-in-1-Multifunctional-PC-Based-USB-Digital-Oscilloscop-p-1103053.html
05:18 AM MrFahrenheit: there's also a version with a logic analyser that's $108, but I think it just uses the standard cypress usb chip method for that
05:47 AM nohitzwork: buy that openscope
05:47 AM nohitzwork: http://store.digilentinc.com/openscope-mz-open-source-all-in-one-instrumentation/
05:47 AM nohitzwork: https://www.kickstarter.com/projects/342199468/openscope-instrumentation-for-everyone
05:49 AM MrFahrenheit: I have two scopes, but I want something that can do bode plots :D
05:49 AM MrFahrenheit: cause right now, I can only do fft+max hold
05:50 AM MrFahrenheit: oh, this actually has that, on first look it looked like a dso nano scope, but that was just a phone
05:54 AM MrFahrenheit: well this doesn't look that great https://i.imgur.com/fG9O1zZ.png
06:00 AM MrFahrenheit: shipping is a bit steep - via fedex for $50
06:01 AM polprog: yay, clock pcbs came
06:01 AM nux_ is now known as nuxil
06:01 AM MrFahrenheit: what kind of clock
06:01 AM nuxil: 50 bucks for shipping ?
06:02 AM polprog: https://puu.sh/yjM8M/dd67d3d920.png
06:02 AM polprog: my mini desk clock
06:02 AM MrFahrenheit: nuxil, not unusual, I've seen it go much higher
06:02 AM MrFahrenheit: mmm, tasty software you have there
06:03 AM nuxil: polprog, how it goig with that project ? did you get the sizes correct now ?
06:03 AM MrFahrenheit: except... is that acrobat?
06:03 AM nuxil: *going
06:03 AM polprog: nuxil: yeah. that pcb on the render is the old one
06:03 AM polprog: new one has correct size vias and thicker tracks
06:03 AM polprog: MrFahrenheit: that's the icon for Evince pdf viewer iirc
06:07 AM nuxil: polprog, hmm you driving the "led segments directly from the mcu, can it handle the current?
06:08 AM nuxil: nm
06:08 AM polprog: there are 5k resisotrs, so it's <5mA / seg, multiplexed, so that's 40mA per port peak totat
06:08 AM polprog: total*
06:08 AM polprog: 1k resistors*
06:10 AM polprog: https://puu.sh/yJETZ/140bdd132b.jpg
06:10 AM nuxil: nice
06:10 AM MrFahrenheit: they look phallic
06:11 AM polprog: goes to the drawer for now. ill write some code on the weekend
06:12 AM polprog: MrFahrenheit: lol, oops. originally the mcu was meant to be behind the display but m8 in qfn turned out to be too big... so there's m8 in tqfp on that tab outside. also tqfp is easier to route
06:13 AM nuxil: MrFahrenheit, phallic? as in looks like a penis ?
06:13 AM MrFahrenheit: ye
06:13 AM nuxil: rofl :D
06:13 AM polprog: let it be a symbol of fertility then as well. Applied arts!
06:14 AM MrFahrenheit: hah
06:14 AM polprog: the idead was that the pcb hides behind the displays
06:15 AM polprog: if not that atmega size... it would fit
06:15 AM polprog: now that i think about it, m8 in DIP would.
06:15 AM polprog: now i know what to correct in the 2nd rev
06:16 AM nuxil: dont go dip
06:17 AM polprog: why
06:17 AM nuxil: dip is great for prototyping. but since your board is 99% smd. stay smd
06:18 AM nuxil: and dip is ugly
06:18 AM nuxil: and fat
06:18 AM nuxil: :p
06:18 AM polprog: good point. stilll.... if i used taller displays i could fit everything (with drivers) behind them
06:18 AM polprog: also https://puu.sh/ys5wE/bd30591805.png
06:20 AM MrFahrenheit: the chinese scope can also do bode plots, https://i.imgur.com/VrxHTgC.jpg
06:21 AM polprog: id say it's the softwares job
06:21 AM nuxil: just get a usb scope that dosent have buffering. that does streaming drectly to the pc. then just make a logger on the pc :)
06:21 AM polprog: i think if i took the waveform data off my riglol, and did some python/octave voodoo i would get a better FFT as well
06:22 AM polprog: since the onscreen FFT on riglols is cumbersome
06:22 AM MrFahrenheit: a bode plot needs a tracking generator, or you get a lot of noise
06:22 AM Haohmaru: rig<lol> >:)
06:22 AM MrFahrenheit: but yes, if you recorded both channels, and swept a generator on one channel, captured the output on the other channel, you could generate a bode plot
06:22 AM MrFahrenheit: but... effort
06:23 AM nuxil: yup
06:23 AM polprog: yeah, but if you buy the cheapest proffesional grade scope you cant expect stuff to be easy :P
06:23 AM nuxil: better to pay 50buck and have someone else already done it :p
06:23 AM polprog: nah, that takes the fun out of it
06:24 AM nuxil: not everything is fun
06:24 AM nuxil: :)
06:24 AM polprog: define fun;
06:24 AM polprog: ;)
06:25 AM Haohmaru: fun: if atmel bought microchip
06:25 AM MrFahrenheit: also, if your function gen has a sweep trigger output, you can just use the time domain to get an amplitude bode plot, but you still probably have to use a pc to make it log
06:25 AM polprog: using a real computer for this level of data processing seems the only right way to me
06:26 AM polprog: even for the screen size
06:26 AM MrFahrenheit: well you can also buy a spectrum analyser with a tracking gen for $3k+
06:26 AM polprog: next thing on the wishlist is a bench frequency gen
06:26 AM polprog: yeah, saw one at work
06:26 AM polprog: cool stuff
06:27 AM MrFahrenheit: they don't do phase though, I think you need a vector network analyser for that
06:27 AM nuxil: polprog, make your own freq gen/func gen using atmega with a 16bit timer
06:27 AM polprog: i was thinking about it nuxil
06:27 AM nuxil: you do want a 16bit timer. not 8 bit.
06:27 AM MrFahrenheit: no, get a dds chip
06:27 AM nuxil: 16bit or more
06:27 AM polprog: i was thinking about getting some precise digital pots and building analog generators
06:28 AM nuxil: MrFahrenheit, meh.. we just make direct digital synth with atmegas :p
06:28 AM * polprog just got an idea to conenct two 16 bit tcnts so one is a timer and another one is incrementes in overflow ISR == 32bit timer
06:29 AM MrFahrenheit: nuxil, I have a generator like that, goes up to 1 meg, but once you press "run", you can't interact with it till you press "stop"
06:30 AM nuxil: MrFahrenheit, i made a func gen using atiny85. but it was bad. big gaps in frequencys.
06:30 AM polprog: hah, actually i have the code... i did some tests with the crystal gen. got a blinking led put together on the breadboard
06:30 AM polprog: adding multiplexing should be straightforward
06:35 AM nuxil: which segments are you using ?
06:35 AM nuxil: got a link to them ?
06:40 AM polprog: some odd green 2x7 ones. pinout is similar to kingbright
06:40 AM polprog: mine have no markings unfortunately
06:40 AM polprog: ive been working their pinout out with a coin cell too many times
06:40 AM polprog: since no datasheet
09:00 AM rue_mohr: most 7 segments use a standard pinout
09:01 AM rue_mohr: there are 2 missing pins in a dip14 layout that tell you which way is which
09:01 AM rue_mohr: for the most part, reversing the connector causes the right segments to come on for it being upside down
09:03 AM rue_mohr: so plugging in the display upside down will cause a flip of A/D F/C B/E
09:03 AM rue_mohr: usually G dissapears when upside down
09:03 AM rue_mohr: (and dp)
09:14 AM polprog: not on mine. ill try to find a datasheet that matches pinout with mine
09:14 AM polprog: i dont even know myself....
09:15 AM rue_mohr: is it upright or sideways on a breadboad?
09:15 AM polprog: like any other DIP chip
09:15 AM polprog: brb, dinner
09:15 AM rue_mohr: brb 8.5 hours of work
09:26 AM polprog: haha
09:45 AM tpw_rules is now known as tpwae_rules
09:45 AM tpwae_rules is now known as tpw_rules
09:45 AM tpw_rules is now known as daecool
09:46 AM daecool is now known as tpw_rules
09:51 AM daey is now known as day
09:51 AM mmfood: if a 7 segment display has a maximum peak of 150 mA @1/10 duty cycle and 0.1 ms pulse width. How much current is safe for a 1/4 duty cycle (4 digits)?
09:51 AM mmfood: is it just as simple as 150/4
10:33 AM mmfood: is the average current all that matters?
11:04 AM nuxil: Even tho the average will be 10% of full duty over time. each puls/peak will be 5V or whatever you use. and at that time the current is high. check your datasheet for max peek current the segment can handle.
11:12 AM nuxil: some datasheets will tell you how long it can handle the current peek.
11:14 AM nohit_: polprog can i see a chematic for your project?
11:14 AM nohit_: *schematic
12:07 PM mmfood: nuxil: yes, I have checked the ds. But it is giving a peak value at 1ms with 1/10 duty cycle. So I am wondering, what does that mean if I use for instance 1ms with a 1/4 duty cycle is it simply Ipk = 155mA * 4/10 ?
12:11 PM Emil: mmfood: pulse width matters in that there's a maximum to how long you can average
12:12 PM Emil: so 150mA at 10% means 150mA for 10% of the time and 0mA for 90% of the time
12:12 PM mmfood: yep
12:12 PM Emil: but
12:12 PM mmfood: Emil: but what about 40%?
12:12 PM Emil: it depends on the pulse width, too
12:12 PM mmfood: or actually 25%
12:13 PM Emil: if you pulse faster it's safer
12:13 PM mmfood: since I am using 4 digits each of them will be on 1/4 of the time.
12:14 PM Emil: but if we are talking about average currents then the average current is 150*0.1 and to match that with 1/4 you get 150*0.1/0.4=37.5
12:14 PM Emil: gah
12:14 PM Emil: can't into numbers
12:15 PM Emil: 150*0.1=0.25*a=150*0.1/0.25=60
12:15 PM mmfood: So should I use a pulse witdth shorter than 1ms (regardless of the duty cycle) and a current less than 155mA and I am fine or how should one go about it?
12:15 PM Emil: 0.1 ms pulse width
12:15 PM mmfood: yes, sry
12:16 PM Emil: I take it that 0.1ms pulse width means the frequency of operation
12:17 PM Emil: so 10kHz with max duty of 1/10
12:17 PM mmfood: well, it means that in a period of 1 ms it is on 0.1 ms and off 0.9 ms since it is a 1/10 duty cycle I think
12:17 PM mmfood: exactlu
12:17 PM Emil: no those are different
12:17 PM Emil: by a factor of 10
12:18 PM Emil: but in retrospect your interpretation is more plausible
12:18 PM mmfood: haha, right ><
12:19 PM Emil: anycase
12:19 PM Emil: you want to match the average power and since voltage is the same you want to match the average current
12:20 PM nuxil: wait.. youre using 1khz pwm freq? . if 0.1 ms is 10% then 100% is 1ms. and 1/0,001 is 1khz. which seems verry low.
12:20 PM Emil: duty*current=15mA on averaga
12:20 PM Emil: nuxil: 1kHz is okay for most things
12:20 PM mmfood: ok, so 15m A = 0.4 x Imax
12:21 PM Emil: mmfood: you want 2/5 duty cycle?
12:21 PM Emil: or where does that 0.4 come from
12:21 PM mmfood: god damnit where's my head at
12:21 PM mmfood: 0.25
12:22 PM Emil: which is 60mA
12:22 PM mmfood: so 60 mA
12:22 PM nuxil: dude. multiplex
12:22 PM Emil: like i alrady said above
12:22 PM mmfood: great :)
12:23 PM mmfood: nuxil: that's what this discussion is about
12:24 PM nuxil: then you only need to know what 1 segment uses. since only 1 will be on at the time.
12:26 PM mmfood: nuxil: yes, but I don't want it to have 20mA for 25% of the time since that would make it more dim than it have to be.
12:54 PM nuxil: Emil, yea. for leds/segments that is fine. actually you want to go lower in frequence. since a led | diode is a mix of resitive load and capacitive load. but is more important for lcd's
12:55 PM * nuxil been watching David Jones lcd tutorials
01:03 PM nuxil: mmfood, the world is not perfect. you need tradeoffs with brightness / powerusage. find whats best for you. if you want it bright. you gonna use some mA's
01:05 PM polprog: nohit_: https://puu.sh/yjKti/5c18c3f026.pdf
01:05 PM polprog: you know what would be absurd enough?
01:06 PM polprog: every digit is a separate card with a separate CPU connected via a backplane
01:06 PM polprog: :PP
01:06 PM MrFahrenheit: polprog, what makes your clock precise?
01:07 PM nuxil: polprog, wheres tha caps on the crystal :p
01:07 PM polprog: the 32khz crystal? more precise than an RC osc
01:07 PM polprog: nuxil: timer in that avr has the caps builtin for that crystal, crystal is picked so it has the same capacitance
01:07 PM MrFahrenheit: but most clocks have that, I thought maybe yours was exceptionally precise
01:08 PM nuxil: polprog, oh. didnt know.
01:08 PM polprog: maybe one will have a bodged on BNC to be connected to a freq generator ;)
01:09 PM polprog: nuxil: i was surprised when i found that out ;)
01:12 PM nuxil: polprog, if you have plans on doing a upgrade of that and use lcd. you need to watch David Jones's video on lcd so you dont "Fall in the trap for young players" :p
01:12 PM nuxil: https://www.youtube.com/watch?v=ZP0KxZl5N2o&t=8m28s
01:13 PM nuxil: that
01:13 PM nuxil: #method2
01:16 PM MrFahrenheit: I made an random salvaged lcd work like that recently, thank you atmel http://www.atmel.com/Images/doc2569.pdf
01:20 PM nuxil: nice
01:44 PM polprog: nuxil: i waatched the 1st part
01:45 PM polprog: what a bobby dazzler
01:47 PM Emil: polprog: what's with the jumper on rst?
01:47 PM Emil: polprog: it has absolutely zero uses
01:52 PM polprog: Emil: J1?
01:52 PM polprog: didnt want to add a button
01:53 PM polprog: so it's just two pads to be shorted with something
01:54 PM Emil: whatcha need reset for?
01:57 PM MrFahrenheit: probably just in case
03:02 PM polprog: yeah, just in case
03:02 PM polprog: very useful during development process
03:02 PM polprog: :P
08:27 PM nux_ is now known as nuxil