#avr Logs

Feb 16 2017

#avr Calendar

12:28 AM daey_ is now known as daey
02:20 AM Jartza: morning
02:21 AM _ami_: Jartza: good morning.
02:21 AM _ami_: whats up
02:30 AM Jartza: not much
02:30 AM Jartza: work
02:30 AM Jartza: some IoT stuff and Android coding
02:52 AM malinus: Coding for stm :)
02:52 AM malinus: don't kick
03:05 AM _ami_: malinus: howz coding on stm? good?
03:05 AM _ami_: i do need to setup stm32 dev environment.,
03:05 AM Jartza: coding for stm is fine
04:10 AM malinus: _ami_: yes, you need stm32 dev enviroment: text editor + arm-none-eabi-gcc
04:10 AM malinus: :)
04:14 AM _ami_: arm-none-eabi-gcc => yeah, need to setup.
04:15 AM _ami_: sabor did setup this and pointed out a guide abt it. need to start.
04:15 AM * _ami_ very busy these days in production
04:31 AM skz81: <Jartza> coding for stm is fine >> depends. I had to code on some Linux SetTopBox with a STm SH4 inside, it was a pain in the ass.
04:32 AM skz81: Interesting project though, but not thanks to SH4 architecture :/
05:22 AM Jartza: okay, should've said stm32 ;)
05:39 AM _ami_: Jartza: stm8 is stone age now :)
05:39 AM _ami_: we all knew you meant stm32 :D
05:49 AM specing: stm8 is SH4?
06:22 AM skz81: ST Microelectronics doesn't produce only stm8/32
06:23 AM specing: they all produce everything
06:23 AM specing: well, nearly
06:24 AM specing: but I like how competition in the cortex-m world is driving prices waaaaayyyy down
06:25 AM skz81: yup, it was just a "funny word". You can get back on your normal daily activities :) ;p
06:25 AM Haohmaru: specing i've been watching you, you're biased ;P~
06:25 AM skz81: or nightly, depending on your location
06:26 AM specing: Haohmaru: biased?
06:27 AM specing: right now, STM is the only company throwing a ton of cheap devkits around
06:27 AM Haohmaru: how cheap
06:28 AM * Haohmaru measures specing
06:28 AM specing: $7 for a devkit with two cortex-m* where one is acting as a programmer and debugger (usb)
06:28 AM specing: and the board can be split in half (cut here marks)
06:28 AM Haohmaru: you're like +8.5V biased
06:28 AM specing: How much does such an AVR devkit cost exactly?
06:29 AM specing: $50 for dragon?
06:29 AM specing: and idkhowmuch for an avr board
06:30 AM Haohmaru: why do you need a "dragon" ?
06:30 AM specing: to debug
06:30 AM Haohmaru: i've never had that luxury
06:31 AM specing: because it is expensive and has to be purchased separately
06:31 AM specing: come to stm32 and you'll see how cheap and easy it is
06:31 AM specing: plus the smallest mcu is way faster than any AVR
06:31 AM Haohmaru: what can i do with it?
06:32 AM Lambda_Aurigae: and the simplest stm32 is still more complicated than the most complex avr
06:32 AM Haohmaru: i already have atmegas in the few devices i have
06:32 AM specing: Lambda_Aurigae: such is life
06:33 AM Haohmaru: what i *would* like to have (which won't work on atmega or anything 8bit) is audio processing
06:33 AM Haohmaru: but that would require floating point, and audio
06:34 AM specing: you can get stm32 devkit with hardware floats and DMA to PWM for $10
06:34 AM Haohmaru: do you mean PWM for the audio?
06:35 AM specing: I think some even have a built-in DAC
06:36 AM LeoNerd: I'm still surprised that none of the ATmegas have a DAC
06:36 AM Haohmaru: when i said "audio" i didn't mean xmas jingle-bells toy
06:36 AM LeoNerd: Quite a lot of PICs have one
06:36 AM Haohmaru: doesn't xmega have DACs?
06:36 AM Haohmaru: specing 8bit is more practical for a whole bunch of tasks
06:37 AM LeoNerd: Some xmegas do have a DAC yes, but no ATmega to my knowledge
06:38 AM * Haohmaru yells at LeoNerd USE XMEGA then!!1
06:38 AM * Haohmaru is biased too
06:38 AM specing: Haohmaru: STM32F072KB has 2 DAC
06:39 AM Haohmaru: do you have to clock each sample at the right moment?
06:40 AM specing: no, it has DMA
06:40 AM specing: Haohmaru: http://www.st.com/en/microcontrollers/stm32-32-bit-arm-cortex-mcus.html?querycriteria=productId=SC1169
06:47 AM Haohmaru: 12bit?
06:49 AM specing: ?
06:49 AM Haohmaru: my point was, there's one kind of thing i would want to do that involves ARM, but i don't have the skills to make it
06:50 AM Haohmaru: for everything else, it's 8bit
06:50 AM Lambda_Aurigae: Haohmaru, audio processing is doable on multiple platforms...hell, we did it on 8bit platforms in the 80s.
06:50 AM Jartza: attiny817 has 8-bit dac
06:50 AM Lambda_Aurigae: but today, arm or dspic is better for that.
06:51 AM Haohmaru: i'll repeat, i mean serious audio processing, not xmas jingle bells melodies
06:51 AM Jartza: serious audio processing? get a dsp then
06:51 AM Lambda_Aurigae: dspic
06:51 AM Lambda_Aurigae: build for it.
06:51 AM Haohmaru: i think an ARM cortex with FPU should be sufficient
06:52 AM Haohmaru: for the "processing" part at least
09:03 AM hetii: Hello :)
09:04 AM hetii: Is there any way to keep port state in atmega8 even after reset and reprogram ??
09:07 AM cehteh: no
09:08 AM cehteh: external buffer maybe
09:08 AM specing: don't reset if you don't want things to reset
09:08 AM cehteh: but do you really need that, for all ports?
09:09 AM cehteh: some external pullup/pulldowns for a defined state might be enough?
09:10 AM cehteh: or add some 2nd controller, some attiny or so which never gets reset and only takes care for the ports
09:11 AM hetii: well my atmega8 control ATX ps_on pin and odroid xu4 +5v line, the point is that I want to use that odroid to be able to reflash sometime my atmega.
09:11 AM hetii: so cannot now reprogram it cause atmega will off my PSU and odroid while reset
09:11 AM cehteh: so you only need one port?
09:11 AM cehteh: one pin
09:11 AM hetii: two
09:12 AM cehteh: add some latched buffer, sounds easy
09:12 AM bss36504: Seems then the easiest solution is some external circuitry
09:12 AM cehteh: yes
09:12 AM hetii: hmm
09:14 AM hetii: I read somedays that is possible to keep variable after reset so thats ask if its possible to do that same regarding registers
09:15 AM cehteh: nope
09:15 AM cehteh: sram is not erased by reset, thats true, but the mpu state is
09:15 AM hetii: ok thx
09:23 AM hetii: so probably will use some additional line of odroid board to keep states after frimware update
09:37 AM hetii: I`m never sure when set port to high in avr is it mean that is just high by pullup resitor or by some transistor inside?
09:38 AM hetii: I saw few avr that control leds connected to ground so by high state, but the pullup is around 50k or so so the leds should never light.
09:40 AM Haohmaru: how about a shift register ;P~
10:05 AM hetii: Hmm I have such circuit: https://snag.gy/Tuc1to.jpg
10:05 AM hetii: and my odroid refuse to boot :(
10:56 AM cehteh: that page doesnt load in my brower
10:56 AM cehteh: too much blocked
10:57 AM cehteh: and avr pins can be in 4 states: high-z, pullup, or driven up or down
10:58 AM cehteh: its up to you to configure them properly
12:35 PM Lambda_Aurigae: avr pins default to the high-z state which is also input...so you could use an external pullup or pulldown resistor to make that power pin default to on unless the avr pulls it to the off state.
12:37 PM Lambda_Aurigae: you could also use a couple of nand gates from a 7400 to make a flipflop that would retain its setting when the avr resets so long as the 7400 still has power.
12:40 PM _ami_: ls
12:40 PM _ami_: oops!
12:40 PM Lambda_Aurigae: .
12:40 PM Lambda_Aurigae: ..
12:40 PM Lambda_Aurigae: files
12:40 PM Lambda_Aurigae: pron
12:41 PM PolishProgrammer: hehe
12:41 PM specing: trump_golden_shower_xxx_fhd
12:41 PM PolishProgrammer: o/ by the way ;)
12:41 PM PolishProgrammer: two quick questions
12:41 PM _ami_: rofl!
12:42 PM PolishProgrammer: 1. is using colophony (rarely, only when soldering wire's flux vapors out) on smd a bad thing?
12:43 PM PolishProgrammer: 2. any do's and don'ts on soldering in a reflow oven
12:45 PM Lambda_Aurigae: if by colophony, you mean resin,,,
12:45 PM PolishProgrammer: yeah
12:46 PM Lambda_Aurigae: depends on how you are soldering it....soldering paste meant for smt work usually has its own resin in it.
12:49 PM PolishProgrammer: thanks ;)
12:49 PM Lambda_Aurigae: when I'm hand soldering tqfp64 chips and the like, I usually resin the heck out of everything just to make the solder stick.
12:50 PM PolishProgrammer: ill be building a reflow oven
12:51 PM PolishProgrammer: so there are two challenges here
12:51 PM PolishProgrammer: first i have to build it with temp control
12:51 PM PolishProgrammer: and second, learn how to reflow
12:52 PM PolishProgrammer: still have to read on opamps
12:55 PM specing: got a paint removal hot air gun instead
12:55 PM specing: get*
12:55 PM PolishProgrammer: you say?
12:55 PM PolishProgrammer: wouldnt it blow the components off?
12:56 PM specing: no
12:57 PM specing: its not a hot air high pressure cleaner
12:57 PM PolishProgrammer: i already have a tiny electric oven, i think i need around 230 centigrade
12:58 PM Lambda_Aurigae: working on getting the wifey to let me buy a hot air rework station.
12:58 PM PolishProgrammer: my current lab funds are around 0$
12:59 PM Lambda_Aurigae: mine too.
12:59 PM PolishProgrammer: $0 *
12:59 PM Lambda_Aurigae: hence, working on the wifey to get funds released.
12:59 PM PolishProgrammer: i fortunately found an old electric grill in grandmother basement
01:00 PM PolishProgrammer: so i just need a thermocouple, an opamp an avr and a relay to make it temp controlled
01:00 PM PolishProgrammer: also mike got a couple of tips on his site
01:01 PM Lambda_Aurigae: sparkfun.com has some nice reflow oven controller info.
01:03 PM Lambda_Aurigae: well, they used to.
01:03 PM PolishProgrammer: their $60 oven is way newer and fancy
01:03 PM Lambda_Aurigae: they also did a reflow frying pan once there.
01:03 PM PolishProgrammer: mine has just a heater and a mains cord :P
01:03 PM PolishProgrammer: reflow frying pan?
01:04 PM Lambda_Aurigae: https://www.sparkfun.com/tutorials/59
01:05 PM Lambda_Aurigae: electric skillet
01:05 PM Lambda_Aurigae: just under halfway down the page.
01:05 PM PolishProgrammer: from the intersting stuff i also have a lavo 3 multimeter to fix
01:05 PM PolishProgrammer: i found that page as soon as you told me its on sparkfun
01:05 PM PolishProgrammer: :)
01:07 PM Lambda_Aurigae: I used to order a lot of things from sparkfun
01:07 PM Lambda_Aurigae: but they went way too commercialized and fancy for me.
01:07 PM Lambda_Aurigae: got pricy too.
01:08 PM PolishProgrammer: they are using some old IC for the k thermocouple
01:08 PM Lambda_Aurigae: yup.
01:08 PM Lambda_Aurigae: there are newer ones out there.
01:09 PM PolishProgrammer: i think that i could acheve a similar thing with a simple op amp amplifier
01:09 PM PolishProgrammer: correct me if im wrong
01:09 PM PolishProgrammer: i found the chart for a k thermocouple
01:09 PM Lambda_Aurigae: just watch your voltage levels on the opamp...you are working at very low voltages with that K.
01:10 PM PolishProgrammer: it says 20mV at 500C
01:10 PM PolishProgrammer: so yeah
01:10 PM PolishProgrammer: decoupling??
01:10 PM PolishProgrammer: i barely finished the FET chapter in the art of electronics
01:11 PM PolishProgrammer: i have a vague picture of opamps
01:14 PM antto: i have a good one: http://i.imgur.com/m3hkq.jpg
01:16 PM PolishProgrammer: ;)
01:16 PM antto: and iirc this was a JFET: http://i.imgur.com/EU1MD.jpg
01:17 PM bss36504: PolishProgrammer: You're probably better off with a dedicated thermocouple amp
01:17 PM antto: opamps being naughty: http://i.imgur.com/Lvr6L.jpg
01:17 PM PolishProgrammer: bss36504, ill se what i can get
01:18 PM PolishProgrammer: the one i found, from maxim was discontinued
01:18 PM bss36504: It's not that you couldn't do your own with an op amp, but it's probably not worth the effort
01:18 PM bss36504: there are tons of em
01:18 PM bss36504: MAX31855 is what I use in my reflow oven
01:21 PM PolishProgrammer: SPI, nice
01:22 PM bss36504: Yeah, they're simple and accurate and don't take up much space on my board. Can't ask for more
01:23 PM PolishProgrammer: they look awesome but damn, thats expensive
01:23 PM PolishProgrammer: well, i think i will get them
01:24 PM PolishProgrammer: thanks :)
01:57 PM PolishProgrammer: wow, that max31855 has a very simple protocol
01:58 PM PolishProgrammer: i wonder if i should use soft spi or the peripheral
02:08 PM bss36504: In my opinion the peripheral is the cooler route.
02:08 PM bss36504: I think I saw single quantity MAX31855 on digikey for $3.50
02:13 PM PolishProgrammer: ill crack the peripheral
02:13 PM PolishProgrammer: :)
02:18 PM bss36504: If you've never used SPI at all, I would think the peripheral route is easier. That's one of the first peripherals I learned when I started tinkering with micros (after GPIOs, obviously). Just go through the datasheet chapter on the SPI module, learn what it can do and then follow the register description to set it up
02:47 PM PolishProgrammer: thank you ;)
02:47 PM PolishProgrammer: looks simple for now
02:59 PM PolishProgrammer: so, the mcu has to be set to master, i have to write whatever to SPDR and transmit it out (the maxim ic doesnt care, this is just to start the spi clock) and then read 8 bits from the max, then repeat that to read another 8 bits and done, i have the temp. right?
03:03 PM bss36504: Pretty much
03:08 PM PolishProgrammer: yay :D
03:16 PM cehteh: how much noise are in the readings? i usually do some rolling average as low pass filter to improve sensor reads
03:18 PM PolishProgrammer: they advise to stick caps between vcc and gnd and between thr thermocouple leads
03:20 PM cehteh: yes thats certainly a good idea
03:21 PM cehteh: you may consider a dedicated voltage source (small low noise linear vreg) for the analog parts too
03:22 PM PolishProgrammer: 0u1 and a 10n respectively
03:22 PM PolishProgrammer: cehteh: thats a good idea
03:23 PM PolishProgrammer: i suppose 7805 is not low noise
03:23 PM bss36504: No it's awful
03:23 PM bss36504: literally one of the worst for noise haha
03:24 PM bss36504: 5% load regulation
03:24 PM PolishProgrammer: i will probably have to build a 5V psu if i want the wholde thing to run on one cable
03:24 PM PolishProgrammer: worse than an emitter follower and a zener?
03:24 PM PolishProgrammer: :D
03:24 PM bss36504: I saw a Linear Technology LDO the other day that had 0.15% load regulation
03:24 PM bss36504: If you want low noise you really need something with active feedback control.
03:24 PM PolishProgrammer: whats that load regulation?
03:25 PM bss36504: load regulation is basically the amount of ripple on the load side of the regulator
03:25 PM bss36504: so 5% load regulation means you could have up to 5% ripple
03:25 PM PolishProgrammer: bear in mind i started a year ago with avr tutorial, and only a month ago with the art of electronics
03:26 PM PolishProgrammer: oh, thats simple then
03:26 PM PolishProgrammer: could you recommend me a good regulator?
03:27 PM bss36504: One of my favorite 3.3V regulators, TPS73133, is 0.0005%/mA. Since that MAX31855 only draws about a mA of current, you'll have very low noise
03:28 PM Lambda_Aurigae: hehe..you should see the load regulation on some USB ports...or the lack thereof...
03:28 PM bss36504: But, if your input is noisy too, then some of that will shoot through the regulator. The spec on that is called "Line regulation". The TPS73133 is spec'd at 0.01%/V of input ripple
03:28 PM bss36504: oh yeah USB ports are the worst. Most times it's just the cheapest regulator possible.
03:28 PM Lambda_Aurigae: yup.
03:29 PM Lambda_Aurigae: I've seen them floating at 5.5V and put a couple hundred mA load on and watch em drop to 4.2V
03:29 PM PolishProgrammer: i found lt1761 as a low noise 5v linear reg
03:29 PM PolishProgrammer: load testing is not a problem, i've just built a mosfet adjustable dummy load
03:29 PM PolishProgrammer: :)
03:30 PM bss36504: PolishProgrammer: Then, if you're really noise conscious, you can look at the Power Supply Rejection Ratio (PSRR) which is basically how many dbs of attenuation you get to power supply noise. The TPS73133 is spec'd at 58db at 100Hz
03:30 PM cehteh: there are small to92 vregs with modern design, much better than 78xx
03:30 PM cehteh: or surface mount stuff
03:31 PM cehteh: the analog parts dont need much current, you only need a tiny regulator
03:31 PM bss36504: The LT1761 actually has worse load regulation than the TPS73133 (at least at the current you are talking about, ~1mA
03:31 PM bss36504: )
03:32 PM cehteh: well . .how exact do you need it?
03:32 PM cehteh: you could decouble the input with a LC filter
03:32 PM PolishProgrammer: i gotta go. thanks again for all the tips and see you later!
03:32 PM bss36504: Probably not very. We're just explaining that it might be good to have a dedicated low noise regulator for the thermocouple amp
03:32 PM bss36504: later
03:33 PM cehteh: yeah .. and 78xx is a nogpo
03:33 PM cehteh: nogo
03:33 PM PolishProgrammer: or ill stay
03:34 PM bss36504: 7805 would make an acceptable pre-regulator, but it's not very good
03:34 PM bss36504: It's just old, we have better stuff now for the same price.
03:35 PM Lambda_Aurigae: including switching regulators in the same footprint.
03:36 PM bss36504: ^this
03:36 PM PolishProgrammer: i think i will go with what i can find (except 7805) and some caps, its not just for temperature regulation in a homemade reflow
03:37 PM PolishProgrammer: ill fire up the pc and check what i can get
03:38 PM bss36504: Yeah, I mean in the age of the internet, you can get just about anything. Though, maybe not in your locale. I'm fortunate enough to live in the US where everything is available at good prices
03:40 PM PolishProgrammer: well, for me mouser and tme (maybe farnell) is available
03:40 PM PolishProgrammer: shipping from digikey is expensive
03:48 PM bss36504: II found digikey to have cheaper parts and comparable shipping to mouserat least concerning Fedex/UPS ground. Are you outside the US?
03:49 PM PolishProgrammer: kindof :D
03:49 PM PolishProgrammer: Poland
03:50 PM bss36504: I figured
04:30 PM PolishProgrammer: o/
06:18 PM hetii: Hi :)
06:19 PM Lambda_Aurigae: lo
06:26 PM hetii: Lambda_Aurigae, maybe you will know whats going on: https://snag.gy/Tuc1to.jpg
06:27 PM hetii: I have such circuit. on pin 3 have 5v instead 12v
06:28 PM hetii: even when disconnect pin3 5v is on resitor side as well as on odroid side
06:28 PM hetii: but the odroid itself don`t start, seams that it has not enough current
06:29 PM Lambda_Aurigae: ummmm.
06:29 PM Lambda_Aurigae: I would need to test it myself...probe and stuff.
06:29 PM hetii: when led and 560ohm instead this 100 ohm and put it to ground on pin3 I have 9v
06:30 PM hetii: *when I use led..
06:30 PM hetii: I replace pc817 with the same result and wonder if my design is wrong or what..
06:33 PM hetii: btw when I short this transistor (pin3 and 4) then have true 5v with enough current to boot odroid.
07:03 PM hetii: Lambda_Aurigae, now it works, I replace FET and seams that this one have no leaking in gate
09:09 PM enhering: good night
11:34 PM JanC is now known as Guest78573
11:34 PM JanC_ is now known as JanC