#avr Logs

Aug 08 2017

#avr Calendar

04:50 AM hetii: Hi
04:53 AM hetii: :)
04:53 AM hetii: Q: how constant frequency I should get from such oscilator? http://www.kerrywong.com/blog/wp-content/uploads/2010/10/LCMeter_Core.png or http://electronics-diy.com/img/lc_meter_pic16f84a.jpg?
04:53 AM hetii: This are my result https://pastebin.com/rRqH5L7G
04:53 AM hetii: and wonder why it so float
04:53 AM Emil: That's not too bad
04:53 AM hetii: hmm it is cause I need to get it for calcutation and I see that final frequency depend even when I keep my hand
04:54 AM hetii: I build both circuit and both work with similar result
04:55 AM hetii: also I wonder why LM339 oscilate on 0.283634MHz and LM331 on 0.810657MHz
04:56 AM hetii: when use 47uH and 1nF in both devices
05:00 AM hetii: As I calculate LC frequency should be 0.7341270095716733 MHz
05:01 AM Haohmaru: your formula probably misses something ;P~
05:01 AM hetii: Haohmaru, you can test it yourself here: http://www.ham-radio.com/lc.html
05:01 AM Haohmaru: nonono
05:01 AM hetii: 1nF + 47uH
05:02 AM hetii: no?
05:02 AM Haohmaru: well, from first look, this formula is very idealistic
05:03 AM Haohmaru: i'm no expert, but is your inductor 0.0000000 ohms?
05:03 AM hetii: probably not
05:03 AM hetii: 1.7Ohm
05:03 AM Haohmaru: you know you'd get division by zero and thus infinite current ;P~
05:05 AM daey: the resistance shouldnt matter all that much in the grand scheme (for AC above a certain frequency)
05:06 AM hetii: ok but still i`m confused with one frequency I should get for final calculation of my LxCx. Should I do something like 10 probes and then take average result from it?
05:08 AM hetii: or shield my OP amp and try to minimize this drift?
06:19 AM Lambda_Aurigae: did you use the same parts in both?
06:19 AM Lambda_Aurigae: are you using high precision parts?
06:19 AM Lambda_Aurigae: have you measured the parts to make sure they are exactly the values you expect them to be?
06:21 AM Lambda_Aurigae: does your circuit board have a nice ground plane?
06:34 AM hetii: Lambda_Aurigae, well in smd version I don`t check resitors just inductor and this capacitor.
06:35 AM hetii: Lambda_Aurigae, now I create a new oscilator with shield case created from PCB
06:35 AM hetii: I found also such circuit: https://electronics.stackexchange.com/questions/61858/whats-the-best-easiest-way-to-measure-an-unkown-inductance-without-an-rlc-meter
06:35 AM hetii: and wonder why there is a R5 parallel with R18 and outout set to Vcc
06:35 AM hetii: odd
06:38 AM Haohmaru: hetii, throw it into a simulator and remove the reisistor to see what happens then
07:48 AM Thrashbarg_ is now known as Thrashbarg
09:46 AM remkooo1 is now known as remkooo
10:07 AM MrFahrenheit: well this is weird, I have this i2c temperature sensor (nxp lm75, 11 bits), and when I connect it to my avr it gives consistently lower readings compared to when it's connected to my arduino
10:07 AM MrFahrenheit: it has its own supply, the grounds are connected, the i2c looks alright, but I get about 3C lower temperature every time
10:08 AM MrFahrenheit: captured the i2c conversation and it all looks the same to me, except the reply https://i.imgur.com/u09Y92o.png
10:08 AM MrFahrenheit: top one is arduino and it reads 31.75C, bottom one is my device 28.875C, taken just seconds apart after swapping the sda and scl lines
10:09 AM MrFahrenheit: any ideas?
10:13 AM MrFahrenheit: the only thing I can think of is that it could be a lack of bypass caps, although I have a bunch on there, but it's a breadboard so...
10:14 AM MrFahrenheit: *decoupling caps I mean
10:14 AM remkooo1 is now known as remkooo
10:15 AM tpw_rules: what does your code look like
10:16 AM tpw_rules: also does it change its reading across reboots?
10:16 AM MrFahrenheit: it does not
10:16 AM MrFahrenheit: the code uses the usi module to do i2c (attiny)
10:17 AM tpw_rules: are those traces at the same timescale?
10:17 AM tpw_rules: can you show the full code?
10:18 AM MrFahrenheit: no, there's a lot of it
10:18 AM tpw_rules: what about just the i2c related parts?
10:18 AM tpw_rules: or perhaps create a small demo which just reads the temp sensor and prints it
10:19 AM tpw_rules: for each device
10:19 AM MrFahrenheit: but the code isn't the issue, I can decode the i2c by hand and the problem is still there
10:19 AM tpw_rules: perhaps you're initializing the i2c engine somewhat incorrectly, or your clock rates are different and the device is confused
10:20 AM tpw_rules: also what lm75? is it A?
10:20 AM MrFahrenheit: I was using a much faster rate, but I slowed it down to be identical, so the timescales are the same on the screenshot
10:20 AM MrFahrenheit: http://www.nxp.com/docs/en/data-sheet/LM75A.pdf
10:21 AM MrFahrenheit: there's no configuration for it, except for the OS pin, it should just read the temperature on power-on
10:21 AM tpw_rules: i mean the USI module
10:22 AM tpw_rules: the datasheet shows the 0.1uf decoupling cap
10:23 AM MrFahrenheit: I put 6 caps in, but as I said they're in bad places since it's a breadboard
10:23 AM tpw_rules: are you swapping power? what if you power it from the arduino but connect i2c to the avr
10:24 AM tpw_rules: and have both running
10:24 AM MrFahrenheit: gonna go try that now
10:33 AM MrFahrenheit: yeah, that looks to be it, the avr is causing coupling issues
10:33 AM MrFahrenheit: once both devices are active, they both read low
10:33 AM MrFahrenheit: and I placed 6 caps on the breadboard
11:01 AM MrFahrenheit: can't get it to decouple though, could it be EMI too?
12:51 PM Lambda_Aurigae: so it seems to be a voltage problem powering the sensor?
12:51 PM Lambda_Aurigae: nevermind..hours ago.
12:51 PM Lambda_Aurigae: hehe
03:11 PM MrFahrenheit: no, it was definitely interference, if the avr was plugged in and working (even just running a while loop), the sensor was reading the wrong info
03:12 PM MrFahrenheit: putting the avr to sleep immediately removed the problem
03:12 PM polprog: 1bloody hell
03:12 PM polprog: a chip i _need_ absolutely is out of stock just everywhere.
03:13 PM polprog: mouser and all the rest are gonna stock it in two months' time
03:15 PM antto: nasty
03:15 PM antto: which chip?
03:16 PM polprog: adt7320
03:17 PM antto: so it wozn't me then
03:18 PM polprog: lol
03:18 PM polprog: what did you clear outta stock?
03:19 PM antto: nothing ;P~
03:19 PM antto: we bought a few things at work for our stuff
03:19 PM polprog: oh, c'mon
03:19 PM polprog: i wont tell anyone :P
03:19 PM antto: some xmegas, some pic12s, some wiznet modules
03:20 PM antto: maybe some opamps and regulators too
03:53 PM bss36504: polprog: Sure looks that way http://www.findchips.com/search/adt7320
04:07 PM polprog: bss36504: not sureif you agree or you see some other fugures than a couple evals here and there and youre just sarcastic :P
04:10 PM Stm32Newbie: Hello all
04:10 PM polprog: hello again
04:10 PM Stm32Newbie: (@Lambda Aurigae: guess I was removed from the other server)
04:10 PM Stm32Newbie: hello polprog
04:11 PM Stm32Newbie: Is there someone who can help me out with a little help on how to start with getting my STM32 ?
04:12 PM Stm32Newbie: I mean with getting a program uploaded (and working) to my STM32(F103C8T6 eval board)
04:18 PM Lambda_Aurigae: you might try ##stm32 for that.
04:18 PM Lambda_Aurigae: just type /join ##stm32
04:19 PM Stm32Newbie: Thanks!
04:19 PM Lambda_Aurigae: welcome
04:19 PM Stm32Newbie: :-)
04:34 PM bss36504: polprog: nope just confirming :)
08:31 PM Emil_ is now known as Guest34871
11:29 PM goga: Hi all. Need help about sources for stm32 framework/runtime(?). Problem: got libs for stm32 (GLCD, v2.0 from 2011-3-29) for HY32D display with 16-bit parallel interface. Trying to convert libs to lua for esp32s. Line GLCD.c:153 " value = GPIO_ReadInputData(GPIOE);" - where I can find definition of used function?
11:33 PM Tom_L: so join ##stm32 and ask there
11:35 PM goga: Ty
11:48 PM day_ is now known as daey