#avr Logs

Dec 21 2018

#avr Calendar

01:56 AM nohit: rue: OS doesnt really have anything to do with wasting resources. you either need it or you dont, some features require it. and if you do, you select a device that has enough program memory and ram. we have like 1MB of flash and 0.5MB of ram so its plenty
02:28 AM rue_mohr: mhm
02:32 AM nohit: like a bluetooth file transfer service that needs to run on the background, as in its own thread
02:35 AM rue_mohr: on an avr
02:35 AM rue_mohr: cause, yea
02:35 AM nohit: of course not
02:35 AM nohit: stm32 cortex-m4
02:36 AM rue_mohr: I need to play with my stm32s more
02:36 AM rue_mohr: tho, that said, I'v not done any microcontroller anything right recently
02:37 AM rue_mohr: the last thing was the firmware for my bench freq gen
02:37 AM nohit: they are cheap as hell so for commercial products they are great
02:37 AM rue_mohr: back in sep
02:38 AM nohit: damn i dropped ash in my coke
02:38 AM rue_mohr: yes, till aliepxress added $10/item shipping, they were by far the best bang/buck
02:38 AM rue_mohr: nohit, you need to get your addictions under control
02:39 AM nohit: i know
02:39 AM rue_mohr: cut it in and restart I suppose
02:39 AM rue_mohr: its like half crap anyhow
02:41 AM nohit: there was this AVR killer released
02:41 AM nohit: stm32g03
02:41 AM nohit: 78cents and its better than all the atmegas
02:42 AM rue_mohr: well
02:42 AM rue_mohr: its not about the cost of the processor for me
02:42 AM rue_mohr: its about the availablity of a protoboard with all the support hardware
02:42 AM rue_mohr: thats easy to program
02:42 AM nohit: i get that
02:42 AM rue_mohr: thats most of the attraction to the pro-mini
02:43 AM rue_mohr: I can use the bootloader with avrdude
02:43 AM rue_mohr: the stm32 also needs a lot more initialization code
02:43 AM rue_mohr: documentation is a bit thicker
02:43 AM rue_mohr: but I was gradually building libraries
02:44 AM rue_mohr: so the bluepill has been nice
02:44 AM rue_mohr: but 3.3V :/
02:44 AM rue_mohr: so, I'm kinda on the fence still
02:45 AM rue_mohr: the stm32 is cheaper, runs at 72Mhz, and ...
02:45 AM rue_mohr: but for simple things, the pro mini is just *bam*
02:46 AM rue_mohr: china uses some pretty obscure looking stuff for things like their uber cheap voltage meters and stuff
02:47 AM rue_mohr: most of the time I just need glue logic tho
02:47 AM rue_mohr: like, right now, I need a half hour timer for my rice maker
02:47 AM rue_mohr: push button, turns on rice maker for half hour
02:48 AM rue_mohr: stm32 is stupid overkill
02:48 AM nohit: i was wondering that some day, on a payday, i should spend like 100-200$ for all kind of electronics from aliexpress
02:49 AM nohit: all kinds of sensors and shit
02:49 AM nohit: dev boards
02:49 AM nohit: i havent ever ordered anything from there
02:51 AM nohit: servos
02:53 AM rue_mohr: too late
02:53 AM rue_mohr: you missed it
02:54 AM rue_mohr: everything used to be stupid-cheap with free shipping
02:56 AM rue_mohr: I got all my bluepills for less than $2.50 cad
02:56 AM rue_mohr: an arduino is like $3
02:56 AM rue_mohr: but now its $10 shipping
02:57 AM rue_mohr: so I could go back to ordering atmega32 from digikey for $8 ea
02:59 AM rue_mohr: https://leeselectronic.com/en/product/16790.html
02:59 AM rue_mohr: heh, almost get a better deal from the local seller
02:59 AM rue_mohr: er, thats not shipped tho
03:00 AM rue_mohr: mm $8.16 from china
03:00 AM rue_mohr: shipped
03:03 AM rue_mohr: $50 for 10pcs
03:04 AM rue_mohr: ouch
03:05 AM rue_mohr: but I knew it was comming
03:05 AM rue_mohr: I'd stocked up
03:06 AM rue_mohr: maybe in 6mo, china will retalliate and the prices will come back down
03:27 AM nohit: i prefer nucleos
03:27 AM nohit: i get them for free from work
03:27 AM nohit: and from ST's workshops, we sometimes visit them
03:28 AM nohit: i nice, you get a free nucleo and free food all day long
03:28 AM nohit: *it's
03:29 AM nohit: and nucleos have stlink/v2 built in
03:31 AM nohit: like this https://www.st.com/content/st_com/en/about/events/events.html/stm32-ecosystem-emea.html
06:27 AM vmt: rue_mohr: stm32s have 5v tolerant pins for your 1980s logic chips, and 3v3 regs are not exactly expensive if your rail is 5v
06:29 AM vmt: but obviously for something like a 30 min timer you really don't need an mcu to begin with
06:37 AM LeoNerd: 30 minutes is long enough you wouldn't want to trust it to *just* an RC delay
06:41 AM vmt: well sure, but the application isn't exactly critical
08:32 AM polprog: could be a cool glue logic project
08:32 AM * polprog tosses the bag-o-7400 at LeoNerd
08:35 AM LeoNerd: Wha?
08:35 AM vmt: could be a cool cortex-a project
08:35 AM LeoNerd: Ohright; yes usually you'd put maybe a divider chain after an oscillator and count that
08:36 AM vmt: get a loonix on it, add some sensors, call it SmartTimer(tm)
08:36 AM LeoNerd: But really by that point you're at more chips / bigger / more expensive than just using an MCU
08:36 AM vmt: add a shit ton of python scripts, drop them on github, buy a cool .io domain
08:37 AM vmt: actually don't call it smart timer, you have to pick some really irrelevant name which just spells out cool
08:38 AM polprog: tymer: redefining cooking
08:38 AM polprog: tym.er
08:38 AM polprog: public api (full of holes) so you can remotely set or reset your 30 minute timer
08:39 AM polprog: (say that its only able to count down 30 min intervals - its a revolutionary feature)
08:39 AM polprog: and you can change the led colors
08:39 AM polprog: it shall come in brushed aluminum silver or gold chassis
08:39 AM polprog: and have rounded corners
08:39 AM polprog: starting from $699
08:58 AM skz81: <vmt> >>> get a loonix on it, add some WiFi and NTP
09:00 AM rue_mohr: my point exactly
09:03 AM vmt: tymer.io
09:03 AM vmt: it will notify you via twitter foursquare facebook instagram and pinterest
09:04 AM vmt: and obviously it will have a smartphone app, app app app
09:05 AM vmt: also it should broadcast top/htop statistics to the network so you can monitor your loonix
09:06 AM vmt: and an ssh server is a must, too
09:08 AM vmt: i remember kidding around with bss around here about the idea of a smart toilet, with similar capabilities...
09:08 AM vmt: and i just saw an ad the other day of a finnish company pushing an actual smart toilet to the market
03:44 PM M4sy: Hi, I have a question. Is there any way how to measure Vcc on ATtiny10? I found a library for ATtiny84/85/45 ( https://github.com/cano64/ArduinoSystemStatus ) but not for ATtiny10.
03:47 PM timemage: M4sy, you know that's the a reduced core part yeah?
03:48 PM M4sy: timemage What? Sorry, I never programing ATtiny...
03:49 PM timemage: M4sy, attiny10 part... particularly tiny. they have half the regulator general purpose registers. dozens of bytes of ram. you won't find much in the way of libraries for them at all.
03:49 PM polprog: dont worry, i think this library is overcomplicating
03:49 PM polprog: you should be able to measure VCC easily with some external parts
03:51 PM M4sy: timemage Yes, I know it's really low power MCU... I try to find a code where is measuring.
03:51 PM M4sy: polprog I want to do it without external parts
03:52 PM polprog: i am not sure if its possible
03:52 PM timemage: M4sy, i dunno that any c compiler generates code for them, you're pretty much working in assembly. i don't think you can without external parts.
03:52 PM polprog: what i mean is that im not sure if its possible to internally connect vcc to any adc channel
03:53 PM timemage: there doesn't appear to be an internal voltage reference.
03:53 PM polprog: the easiest way for you is to connect VCC through a voltage divider, set the adc reference to the internal one (if attiny10 has one) and measure the divider output
03:53 PM timemage: so whatever you measure on an analog pin is relative to vcc. so if you're going to measure vcc, you're going to at least need a reference.
03:54 PM polprog: you can make a precision reference with a zener diode
03:54 PM timemage: M4sy, also you need a tpi programmer. it's not really a good choice for first avr.
03:55 PM polprog: i would go with atmega328, atmega16 or attiny4313
03:55 PM polprog: sorry, atmega328p. the 328 is a difderent beast in all aspects
03:56 PM M4sy: Atmel studio can compiler a code for them. And I can write it in assembler, that's not a problem.
03:56 PM polprog: M4sy: you need a TPI programmer to put the code on the chip
03:56 PM timemage: M4sy, assembly yes. i doubt it compiles c or c++ for them.
03:57 PM polprog: i dont even think you can compile sensible C for tiny10, how much ram does it have
03:57 PM M4sy: I have some experiences with ATmega MCU. But now I need MCU with low consumption. I can make programmer from Arduino, isn't it?
04:04 PM HighInBC: you can program a lot of stuff using an atmega
04:05 PM HighInBC: with supporting circuitry sometimes
04:06 PM timemage: M4sy, the t85 shows 300uA active, <0.1uA powerdown, at 1.8v. 200uA active for the attiny10, all else stated the same. it's possibble the extra registers will help you get out of active quicker on the t85. it has the internal an reference. it's not crazy to program in c.
04:10 PM M4sy: I need to make a PCB to disconnect Li-pol battery when the voltage drops below a certain limit. So I don't want to discharge the battery with this stuff...
04:10 PM M4sy: I think I'll use t85. It's better...
04:12 PM HighInBC: off the shelf battery protection circuits may be worth considering
04:14 PM M4sy: I tried to find something but I didn't found anything useful...
04:15 PM HighInBC: how much current are we talking about?
04:16 PM HighInBC: there are these things: https://www.ebay.ca/itm/382182147070
04:16 PM HighInBC: they come in a wide variety of current limit and compactness
04:16 PM HighInBC: they also support series arrangements
04:16 PM HighInBC: not that one but others
04:19 PM M4sy: I need something about 2A max.
04:19 PM HighInBC: like this https://www.ebay.ca/itm/283306107349
04:20 PM HighInBC: it is essentially a dedicated chip for the purpose and a transistor
04:20 PM HighInBC: you can easily incorporate it into your own board
04:21 PM M4sy: That's good. Thx :D
04:21 PM HighInBC: no prob
04:22 PM HighInBC: also protects against over charge and over current
10:24 PM nabil_ is now known as nabil
11:26 PM day__ is now known as day