#avr Logs

Apr 13 2017

#avr Calendar

12:04 AM JanC is now known as Guest86694
12:07 AM JanC_ is now known as JanC
12:16 AM daey_ is now known as daey
12:19 AM vishwin60 is now known as vishwin
02:15 AM Emil: Jan- why do you want to overflow 10 byte buffer?
04:08 AM noHitW_work: julius any luck with stm32 + usb host?
04:20 AM _ami_: noHitW_work: Is julius working on stm32 stuffs these days? using libopencm3?
04:21 AM _ami_: Emil: you were absolutely right abt F_CPU/4 speed for SPI- SLAVE
04:21 AM noHitW_work: he asked help for using usb thumb drives with stm32 yesterday
04:23 AM _ami_: aha, ok
04:25 AM _ami_: noHitW_work: there is one project named unicore-mx which is a fork of libopencm3 and have better USB support. https://github.com/insane-adding-machines/unicore-mx
04:25 AM _ami_: although its still in beta. it supports OTG too.
04:26 AM noHitW_work: ok
04:26 AM _ami_: but it seems usbd stack for stm32f1 is broken atm.
04:26 AM _ami_: https://github.com/insane-adding-machines/unicore-mx/issues/60
04:29 AM Emil: _ami_: I know, it is mentioned in the spi section ;)
04:30 AM Emil: One can stretch the transmit side to F_CPU/2, thiugh
04:30 AM Emil: though*
04:30 AM _ami_: Emil: thanks for enlightening me on that day! :)
04:31 AM _ami_: especially its important for me since i work alone and its a hobby. so sharing and knowing more is always a priority for me.
04:32 AM Emil: Glad you got it working
04:33 AM Emil: Or rather, glad you learned more about the hardware
05:39 AM _ami_: :)
08:15 AM julius: NoHitWonder, not yet...also no time
09:07 AM julius: the moment when you hold a orange pi in your hand, read that the default image does not enable wifi and you dont own a hdmi -> dvi adapter to attach a screen...aaahhhhhh
09:11 AM Emil: julius: use the serial output
09:11 AM Emil: or enable wifi in the config
09:12 AM julius: yeah. lets look up the serial adapter
09:18 AM Emil: julius: the serial port works right out of the box
09:18 AM Emil: Sure it is "stupid"
09:19 AM Emil: in that it's something like 40x80 :D
09:19 AM Emil: but it werks
09:19 AM julius: ok
09:19 AM julius: im pretty sure that orange pi as the rpi uses 3.3v logic
09:20 AM Emil: julius: cp2102 is 3.3v
09:20 AM Emil: And you are afraid just divide down the tx port
09:20 AM julius: and my usb->uart converter (ch340g) got a 3.3v / 5v switch on it...that is all i need, right?
09:21 AM Emil: You can also use an avr with usb as an serial to usb adapter :D
09:21 AM Emil: julius: yeah
09:22 AM julius: because my hc05 modules can be powered by 5v, but signal level is still 3.3v....just some place where i recognized that 5v is not always optimal or documented
09:22 AM Emil: julius: measure the voltage levels?
09:22 AM Emil: you do have a multimeter?
09:22 AM Emil: If you don't, use an avr
09:22 AM Emil: the adc
09:23 AM julius: you mean measure gnd vs tx / rx while the converter board is connected?
09:23 AM julius: oh, theres even a vcc
09:24 AM Emil: julius: just power the usb to serial adapter without connecting anything to it and measure the tx voltage
09:24 AM Emil: it's probably 3.3v
09:25 AM Emil: If it is 5 and you are afraid (the tx on orange pi will probably work just fine with 5v)
09:25 AM Emil: then divide it down
09:25 AM julius: great, vcc outputs 3.3 but gnd -> tx is 5v
09:25 AM Emil: with like 10k and 20k resistors
09:26 AM julius: ive done a voltage divider like that for the hc05
09:26 AM Emil: julius: your orange pi will be just fine with the tx 5v directly
09:26 AM Emil: but if you are afraid just take 10k and 20k resistors and do a divider
09:27 AM julius: well it is cheap...but if it goes wrong...ordering a new one takes ~2weeks
09:27 AM Emil: only 2 weeks lucky you
09:27 AM julius: thats a good case...can be longer
09:29 AM julius: how long is it for you?
09:29 AM Emil: 3-4 weeks
09:30 AM Emil: if not more
09:30 AM julius: uh
09:30 AM julius: where you from?
09:31 AM Emil: /whois Emil
09:31 AM julius: finnland?
09:31 AM Emil: Finland yeah
09:31 AM Emil: you?
09:31 AM julius: germany
09:32 AM julius: but our postal service got a deal with the us army
09:32 AM Emil: Interesting that you have so much shorter shipping times
09:32 AM Emil: Oh that's interesting
09:32 AM julius: we provide the us with a base to control their drones in the middle east (afghanistan) and when they come back they take some of the mail out of the region
09:33 AM julius: the first one is true
09:33 AM julius: the mail part not
09:35 AM julius: i just checked with aliexpress, this time it actually was 3 weeks for the part
10:17 AM NoHitWonder: julius
10:17 AM NoHitWonder: i got it working
10:19 AM NoHitWonder: with stm32f429I-Discovery board
10:19 AM NoHitWonder: what board do you have?
10:20 AM rue_house: heh, sure a lot of people here starting to work with the stm32's
10:21 AM rue_house: julius, I'm hitting up to 150 days for some of my packages
10:21 AM rue_house: canada post is taking up to 130 days to sort packages
10:22 AM Chillum: I got 3 packages from Canada Post this week, from December
10:22 AM rue_house: ditto
10:22 AM rue_house: do yours go thru a vancouver-area sort facility?
10:23 AM rue_house: richmond plant I think is the holdup
10:23 AM Chillum: ya
10:23 AM rue_house: yea
10:23 AM rue_house: me too
10:24 AM Chillum: we used to have our own but they said "Vancouver can do it for us!"
10:24 AM rue_house: they must have a pile of MILLIONS of packages they are sorting thru
10:24 AM rue_house: its the incomming
10:24 AM rue_house: the new 20M$? sorting facility
10:24 AM Chillum: I could have created a backlog using only 17M$
10:24 AM rue_house: ONE person got the ceo to admit to him that the plant is a problem
10:26 AM rue_house: have you had a chance to put in a complaint?
10:26 AM Chillum: I ordered a $25 item in December, it never came. So I got a refund and ordered from another seller. The other seller's item arrives soon after. Months later the original arrives. I don't need two. So I tell the original seller that I got it and I will send it back if they pay return shipping. Now he wants me to pay for it again
10:26 AM rue_house: yea
10:27 AM Chillum: I am like "No, I don't need two, I would not have bought two, I will send it back if you pay return shipping"
10:27 AM rue_house: you dont want to pay for return shipping, its over $150
10:27 AM Chillum: am I out of line?
10:28 AM rue_house: its a mess
10:28 AM Emil: Heh
10:29 AM rue_house: canada post is horrid, its why in canada, you cant make money selling on ebay
10:29 AM Emil: If sellers try to play ball I just quote the shipping prices from Finland to China and I quickly get the refund
10:29 AM Emil: I don't abuse it, though
10:29 AM rue_house: 150 days
10:30 AM rue_house: there are only 365 in a year...
10:30 AM Chillum: ya I had some joker try to pass off a 220V device as a 110V device. An expensive one too. The return shipping would have been $85
10:30 AM Chillum: so I was told to keep it
10:31 AM Chillum: 150 days, pilgrims could migrate in that time
10:31 AM rue_house: most of the 85-270V led lightbulbs do NOT run well on 120V
10:31 AM Chillum: this was a heating element, only does 1/4 the watts at 110V
10:32 AM Chillum: they guy tried to convince me this was okay
10:32 AM Chillum: advertised as 300W 110V, it is only 75W at 110V but 300W at 220V
10:32 AM Chillum: 75W is hardly enough to heat a cup of tea
10:33 AM rue_house: its lots if you have enough insulation
10:33 AM rue_house: R400 coffee mug
10:33 AM rue_house: aerogel man, aerogel
10:41 AM akaWolf1 is now known as akaWolf
10:56 AM NoHitWonder: julius i got working pretty easily with stm32Cube USB host library + Fat Fs
10:56 AM NoHitWonder: so i suggest that you use those
10:57 AM NoHitWonder: i can create a file in the usb drive and write text to it
11:04 AM NoHitWonder: i might do a demo where it lists all the files in the drive to a lcd
11:05 AM nikomo_ is now known as nikomo
11:43 AM julius: would be nice to see your code
11:44 AM julius: rue_house, 150days? jesus thats slow
11:46 AM julius: rue_house, if you want to get something faster send me some money and i can order for you. takes ~3 weeks to me and then i can send it out with DHL...3weeks + 8~13 days
11:47 AM julius: so if your lucky you get stuff in the first month
11:48 AM NoHitWonder__: julius do you have stm32 dev board?
11:48 AM julius: yes, the f103 i think
11:48 AM julius: the bare bones
11:49 AM NoHitWonder__: does it have a usb connector
11:49 AM julius: yes
11:50 AM julius: http://www.rogerclark.net/wp-content/uploads/2014/11/STM32Mini.jpg
11:51 AM julius: rue_house, oh i just read the whole backlog...its your sorting facility
11:58 AM specing: julius: DHL would bypass that
12:01 PM NoHitWonder: julius i can send you the TrueStudio project if you want, its based on the example that comes with the library
12:04 PM NoHitWonder: but you can easily create similar project to your toolchain and board with CubeMX tool
12:06 PM thebird is now known as tmk
12:33 PM julius: NoHitWonder, ok..gonna look into that tomorrow
12:34 PM julius: specing, i see....you read that rue_house
04:11 PM Emil: Hmm
04:11 PM Emil: What should I use for a digitally controllable 0-10V DAC
04:11 PM Emil: output 0-10V
04:11 PM Emil: Current max like 10mA, not even that
04:25 PM LeoNerd: Someone's doing lighting control ;)
04:25 PM LeoNerd: I'd consider a 0-5V output with a 2x multiplier made from an opamp powered at 12V
04:35 PM Casper: PWM with low pass filter
04:35 PM Emil: LeoNerd: no, it's for work
04:36 PM LeoNerd: Do you work in theatrical lighting?
04:36 PM Emil: no
04:36 PM Emil: :D
04:36 PM LeoNerd: Ah. Well, anyway, that would be my suggestion. E.g. any of the cheap MCP43xx DACs are good for an easy 0-5V
04:36 PM LeoNerd: Er.. MCP47xx even; 4725
04:36 PM Emil: Hmm, if I'm going to use an opamp I might as well go with an avr pwm directly
04:37 PM LeoNerd: If you don't need very high update rate, that works too
04:37 PM Emil: Hmm, perhaps a dac and an op amp is the best
04:38 PM Emil: it's the cleanest solution
04:38 PM LeoNerd: Yeh, those MCPs are pretty tiny+cheap
04:38 PM LeoNerd: Getting on for the same size/cost as the R-C filter you'd use on a PWM pin
04:38 PM LeoNerd: Plus it's "free" in IO pins on the MCU, if you're already using I²C
04:39 PM Emil: But daaaaaad, I _HATE_ I2C
04:40 PM Emil: But yeah, a cheap soic-8 dac and an opamp per channel, easy af
04:40 PM Emil: Hmm, I'll need a rail to rail opamp that can source a max of 10mA (probably way less than 1mA really :D)
04:41 PM Emil: Thanks LeoNerd : )
04:44 PM Emil: Hmm, probably should relax that 10mA to more reasonable levels
04:46 PM julius: when i use this: ADMUX |= ADCchannel; and ADCchannel is 0 for channel 0...this wont work...will it?
04:46 PM Emil: http://www.ti.com/lit/ds/symlink/ths4222.pdf are you saying that this works
04:46 PM Emil: damn those specs go wayyyyyy beyond of what I need :D
04:47 PM julius: wait, lets take a look at ADMUX first
04:47 PM Emil: LeoNerd: what opamp do you use?
04:47 PM Emil: Usually
04:48 PM julius: oh wait, it does
04:48 PM julius: it expects a 0 in ADMUX0
04:54 PM LeoNerd: Emil: I'm not sure there's a "usually" to apply here ;)
04:55 PM LeoNerd: If you only needup to 10V out and you have a 12V supply, you probably don't need a rail-to-rail opamp
04:55 PM LeoNerd: Can get by with a down-to-negative rail one
04:59 PM Emil: hmm, true
05:00 PM NoHitWonder: how about this http://www.ti.com/lit/ds/symlink/lm741.pdf
05:02 PM Emil: If it works single supply, goes 0-10v (from lets say 12v), can provide a few mA and goes down to negative supply, why not
05:02 PM xentrac: I am pretty sure there is a "usually" in opamps and it is either the LM324 or the LM741 (as NoHitWonder suggested)
05:03 PM LeoNerd: 741 is fairly jellybean yeah
05:03 PM xentrac: although maybe the MCP6031T is taking over?
05:05 PM xentrac: for slightly higher frequencies there is the rail-to-rail TSV324IPT (1.4MHz) or the LM7321 (20MHz)
05:06 PM LeoNerd: Since this is a DAC follower I doubt high frequency matters
05:06 PM xentrac: none of those are very modern; a modern op-amp like the OPA356 has 200MHz GBW
05:07 PM xentrac: I think we can probably say that "usually" high frequency doesn't matter or you wouldn't have so many people still using the LM741
05:07 PM Emil: xentrac: yeah I noticed :D
05:07 PM Emil: but yeah it's just a dac follower
06:11 PM ryan-c- is now known as ryan-c
06:14 PM NoHitWonder: julius have you considered a hardware solution, like this http://www.ftdichip.com/Products/ICs/VNC2.htm
06:15 PM NoHitWonder: i used vinculum 1 at school, it was pretty easy to use with atmega and UART
08:55 PM rue_house: wow
08:55 PM rue_house: VNC is already used
08:55 PM rue_house: thats crazy