#robotics Logs

Jun 03 2017

#robotics Calendar

05:00 AM baddabigboom: worrying about dying will kill you quicker than not
07:39 AM SpeedEvil: If popular music has taught me anything, so will too much love.
07:42 AM rue_house: ok, I have an stm32 to figure out One Pulse Mode on, which is something apparently nobody has ever done
07:48 AM deshipu: who wants to live forever
07:48 AM rue_house: not me
07:48 AM rue_house: I just want about 8000-10000 years
07:49 AM deshipu: is that in dog years?
07:49 AM deshipu: or squirrel?
07:50 AM SpeedEvil: https://www.youtube.com/watch?v=_Jtpf8N5IDE - related. (who wants to live forever)
07:51 AM rue_house: I need better combacks
07:51 AM rue_house: eeeeeeeeeeee hmmm
07:55 AM rue_house: oh I dont need one pulse mode
07:55 AM rue_house: hey
07:55 AM rue_house: hey
07:55 AM rue_house: these counters can count down
07:55 AM rue_house: and I think they can be made to fire an interrupt at 0
07:56 AM rue_house: and I think they can be set up to stop and no reaload
07:56 AM rue_house: hey
07:56 AM rue_house: I dont need to know what I'm doing...
09:05 AM rue_shop3: ok I got one-shot working
09:05 AM rue_shop3: in countdown
09:12 AM rue_house: now I'll make it irq driven
09:13 AM Tom_L: cook
09:13 AM Tom_L: l
09:14 AM rue_house: then I should be able to set up a basic servo pulse generator
09:15 AM Tom_L: rue
09:16 AM Tom_L: know anything about security cameras?
09:16 AM rue_house: yeees?
09:16 AM Tom_L: poe kind
09:16 AM Tom_L: the good ones
09:16 AM rue_house: you want to know focal distance vs view angle?
09:16 AM rue_house: oh, I know the good ones are crazy expensive
09:17 AM Tom_L: poe with pan tilt etc
09:17 AM rue_house: to thepoint none of the estimates have been taken up on
09:17 AM Tom_L: i'm wondering if they are compatible across brands
09:17 AM Tom_L: for poe etc
09:17 AM rue_house: I could just write estimates for $1M ea and save time
09:17 AM rue_house: na, poe is mostly a mess
09:18 AM Tom_L: so pick a brand and stick with it?
09:18 AM rue_house: some things use proper poe, others are just blind power injection of random votlages
09:18 AM Tom_L: you'd think at that point they'd follow the rules
09:19 AM rue_house: na, money goes into 48V converters and hardware to identify a device as being poe
09:20 AM Tom_L: are there any pc recorders that would do the job for this?
09:20 AM Tom_L: or does it take a separate unit
09:20 AM rue_house: that I dont know
09:20 AM rue_house: all of the stuff I'v estimated has been with NVRs
09:21 AM rue_house: ($$)
09:21 AM Tom_L: nvr?
09:21 AM Tom_L: i have a system but it's not that good
09:21 AM Tom_L: i want probably 2 that are high quality
09:22 AM rue_shop3: network video recorder (aka DVR)
09:23 AM Tom_L: ahh
09:23 AM rue_shop3: high quality = beyond composite resolutions?
09:23 AM Tom_L: 1080
09:23 AM rue_shop3: yea, carefull with that
09:23 AM Tom_L: why?
09:23 AM rue_shop3: they like to show you a high horiz resolution and leave the vert at 300 lines
09:24 AM Tom_L: i was looking at 2 brands a while back and shelfed the idea for a while
09:24 AM rue_shop3: what you want to look at is image size (real) QIF DQIF...
09:25 AM rue_shop3: they also do that thing like with digital cameras where they say its 400Mpixel, but in the fine print point out its a 50Mpixel sensor with an 8x software smudge
09:25 AM Tom_L: now i can't find my notes on it
09:27 AM rue_shop3: yay, the irq based 1-shot code is working
09:29 AM rue_house: helps to remember to do the initial trigger when using a irq based interrupt for flashing
09:29 AM rue_house: now, I should be able to make servo control pulses
09:29 AM Tom_L: heh
09:30 AM Tom_L: i've had some issues that warrant getting a decent system i think
09:30 AM rue_house: sounds like your neighbourhood is getting more offensive
09:31 AM Tom_L: quite a turn in the last year
09:31 AM rue_house: http://paste.debian.net/963489/
09:31 AM Tom_L: stabbing 4 houses down couple days ago
09:31 AM rue_house: do you think its to do with peoples financial state?
09:31 AM Tom_L: not that one
09:32 AM Tom_L: but yes overall
09:32 AM rue_house: or an influx of agressive people
09:32 AM Tom_L: i'd say all the above
09:32 AM rue_house: hmm
09:32 AM Tom_L: yesterday a guy was wandering around going into ppl's houses randomly
09:33 AM Tom_L: he was mental and on drugs
09:33 AM rue_house: :| dosn't that lead to randomly being shot?
09:33 AM Tom_L: it was clear there was nobody home in his head
09:34 AM Tom_L: ^^ nuts
09:34 AM rue_house: I wonder if I can merge these two peices of code
09:34 AM Tom_L: bbl
09:35 AM rue_house: I have timers 1, 2, 3, of them, timer 1 is 'special' tho I'v not figured out how yet
09:36 AM rue_house: I'm going to do this one timer triggereing another with irq's but the hardware can do it, which I'll work out later
09:37 AM rue_house: then, sometime, I can figure out how to tie in the DMA to do multiple servos
10:07 AM rue_house: ok
10:08 AM rue_house: I think the difference with timer 1 is that its got an extra rollover register
10:08 AM rue_house: it can count its overflows
10:09 AM rue_house: I suppose I might not need to use two timers if I were to keep track of the total time on a high resolution timer
10:10 AM rue_house: I dont think I can code two programs at once
10:10 AM veverak: no? pitty
10:19 AM rue_house: 1000 1 -millinsths is 1 thousandth
10:19 AM rue_house: aka 1000 counts @ 1Mhz = 1ms
10:26 AM rue_house: if programming the arm hangs, you can ctrl-c the programming software, which will leave the arm hung, and when you run the programming software again it works fine
10:34 AM rue_house: well, my 20ms timer is doing about 11ms and my 1.5ms timer is doing about 0.8ms
10:34 AM rue_house: which seems to imply that my clock source is about double what I thought
11:01 AM rue_shop3: so, the sweep on my scope is out just a bit, and it looks like it might be having slight linearity issues on the sweep
11:01 AM rue_shop3: but aside from that, I seem to have 20ms interval with about a 1.5ms duration
11:02 AM rue_shop3: I have to crack open my scope sometime, I have a horizontal drive transistor failing intermittently too
11:15 AM rue_shop3: yay, servo likes the input
11:15 AM rue_shop3: now make it move it..
12:10 PM rue_shop3: yay!
12:11 PM rue_shop3: so, the last thing would be to measure the duty of the current pulse on the servo
12:11 PM rue_shop3: then its just all software
12:13 PM rue_shop3: so, as set up right now, I have 4000 counts/ms
12:13 PM rue_shop3: so, 8000 counts over the servos range
12:13 PM rue_shop3: I think I can improve that
12:13 PM rue_shop3: tho its way over the servos deadband
12:15 PM rue_shop3: with a divider of 18 10000 is 2.5ms
12:15 PM rue_shop3: so with a divider of 9 20000
12:16 PM rue_shop3: with a divider of 3 60000
12:16 PM rue_shop3: which is the limit for the 16 bit register
12:17 PM rue_shop3: being its integer division
12:26 PM rue_shop3: the clock on the stm32 is also aparently out a bit
12:27 PM rue_shop3: so, there we have it, the best a stm32 can do for timing, over the 300 degree range of the servo, about 48000 counts
12:27 PM veverak: sounds good
12:28 PM rue_shop3: a bit more than 15 bits
12:29 PM rue_shop3: ok now, I have to think about this
12:29 PM rue_shop3: I have a timer doing the 20ms countdown
12:29 PM rue_shop3: when it rolls over, it starts the timer that does the 2.5ms
12:29 PM rue_shop3: the duty on the motor is from "0" to "20ms"
12:30 PM rue_shop3: so, I should be able to use the input capture on the 20ms timer, to measure the motor duty
12:30 PM rue_shop3: aka load
12:30 PM rue_shop3: I need a falling edge interrupt on an io line...
12:37 PM rue_house: "Up to 51 GPIOs can be connected
12:37 PM rue_house: to the 16 external interrupt lines."
12:37 PM rue_house: this is good
12:38 PM rue_house: "Each line can be independently configured to select the trigger
12:38 PM rue_house: event (rising edge, falling edge, both)"
12:38 PM rue_house: this is also good
12:41 PM rue_house: "To generate the interrupt, the interrupt line should be configured and enabled"
12:41 PM rue_house: this implies you dont ahve to, but should
12:42 PM rue_house: waaaaait, a sec, there are interrupts, and "events"
12:43 PM z64555: this is what you get when high-level devs trying to write docs for low-level hardware
12:45 PM rue_house: some of the wording in this doc is halarious
12:45 PM rue_house: odd
12:45 PM rue_house: they have 16 external interupt event systems
12:46 PM rue_house: one for each bit of a port, aka ports A, B, C, D bit 0 go go the 'external interrupt 0' line
12:46 PM rue_house: instead of avr where its by port
12:47 PM rue_house: each one of the unused ones is free to use for software interrupts
12:53 PM rue_house: ok, so, thats not too bad
12:54 PM rue_house: the 20ms clock is running really slow, so it should be easy to grab the value while its counting
12:54 PM rue_house: 8-] oor... I could make the dma do it...
12:55 PM rue_house: nono, no dma yet
01:04 PM rue_house: ok
01:04 PM rue_house: lets see, some kinda input project
01:04 PM rue_house: maybe if I use interrupts to update a value on a pin
01:15 PM rue_house: so, on the stm32, there is no way to differentiate what you write to the port versus its state
01:15 PM rue_house: which I suppose dodn't matter
01:25 PM rue_shop3: yay, basic polled input is working
02:00 PM rue_house: geez these guys examples are horrific
02:00 PM rue_house: not one of them is a basic straightforward example
02:27 PM Tom_L: rue_house i expect you to correct that
02:29 PM rue_house: I'm the last person in the world who should be tasked to simplify something
02:29 PM rue_house: exti_enable_request(EXTI0);
02:31 PM rue_house: arg
02:31 PM rue_house: this hurts
02:31 PM rue_house: the exti goes to the nvic thru the afio?
02:31 PM rue_house: they didn't draw out the signal path of the edge interrupts properly
02:32 PM rue_house: so, if I understand this right
02:32 PM rue_house: I can only select 16 edge interrupts, one of the 16 bits from each port
02:33 PM rue_house: if I'm using an edge on bit 0 or port A, I cant use one on bit 0 of port B
02:33 PM rue_house: casue there is only 1 path for an interrupt on bit 0
02:33 PM Tom_L: not as handy as you thought
02:33 PM rue_house: _I think_
02:34 PM rue_house: that, goes thru a data selector to a signal for a bit 0 interrupt path
02:34 PM Tom_L: are the bits also the interrupt priority?
02:34 PM rue_house: its boiled down to a 16 bit mask for flag register
02:34 PM rue_house: not even going near priority right now!
02:35 PM rue_house: exti_select_source (EXTI14, GPIOC);
02:35 PM rue_house: this says I want to use bit 14 of port C
02:36 PM rue_house: that signal will go to someting internal called EXTI14
02:36 PM rue_house: but something is rong
02:37 PM rue_house: casue those select bits are part of the alternate fucntion system, not the external interrupt system
02:37 PM rue_house: or its a second system tapped off it thats just confusing me
02:38 PM rue_house: I think it is
02:39 PM rue_house: charging forward...
02:39 PM Tom_L: crawling....
02:39 PM rue_house: exti_set_trigger (EXTI14, EXTI_TRIGGER_BOTH); this sets bits in two registers that enable the rising and falling edge triggers for that bit
02:40 PM rue_house: whats definitly missing is the link to the interrupt controller
02:41 PM rue_house: which is where I'm getting lost
02:42 PM rue_house: there should be a bit mask bit 14 of the exti for interrupts, and a corresponding flag
02:42 PM Tom_L: http://www.st.com/content/ccc/resource/training/technical/product_training/3b/10/15/3e/57/60/4f/37/STM32L4_System_NVIC.pdf/files/STM32L4_System_NVIC.pdf/jcr:content/translations/en.STM32L4_System_NVIC.pdf
02:42 PM Tom_L: go read
02:43 PM rue_house: sorry, useless document
02:43 PM Tom_L: my pc is too slow to know that sorry
02:43 PM rue_house: np
02:44 PM rue_house: I need detailed maps of how the exti edge detectors get routed to an irq
02:44 PM Tom_L: http://easytronix.blogspot.com/2013/07/understanding-stm32-nvic-nested.html
02:44 PM Tom_L: maybe that's better
02:44 PM rue_house: the pdf I'm using is 713 pages :/
02:44 PM Tom_L: i had 10 books on the 68332
02:44 PM rue_house: ouch
02:45 PM Tom_L: ( still do )
02:45 PM Tom_L: that was back when they still printed stuff
02:45 PM Tom_L: one interrupt can interrupt another one....
02:46 PM Tom_L: way to cut in the hamburger line there
02:46 PM Tom_L: http://micromouseusa.com/?p=279
02:46 PM rue_house: the nvic has a bunch of registers, exti0, exti1.. exti4, exti9-5, exti15-10
02:49 PM Tom_L: http://www.embedds.com/stm32-interrupts-and-programming-with-gcc/
02:50 PM Tom_L: that one has pictures _and_ code!
02:50 PM rue_house: EXTI15_10
02:50 PM rue_house: is an interrupt vector
02:50 PM Tom_L: irq 10
02:51 PM Tom_L: those last 2 may help some
02:51 PM rue_house: this looks promising
02:51 PM * rue_house reads
02:52 PM Tom_L: more so the latter one
02:53 PM Tom_L: https://visualgdb.com/tutorials/arm/stm32/timers/
02:54 PM Tom_L: i think i gave that one the other day
06:25 PM Tom_L: rue_house, links any good?
06:41 PM baddabigboom: https://www.youtube.com/watch?time_continue=601&v=URh-oPqjlM8
06:42 PM baddabigboom: starts @ 10 mins if you want to watch the SpaceX flight
07:25 PM rue_house: got distracted
07:29 PM Tom_L: more butterflies?
07:37 PM rue_house: overhauled the pipe pile in the yard
07:37 PM rue_house: recovered in from the onsue of nature
07:37 PM rue_house: onslaught
08:00 PM rue_house: tom the article was close, but they use another library that is hiding someof how they do things
08:01 PM rue_house: I think it gave me what I need
08:14 PM rue_shop3: yay, I got edge interrupts working on an input pin!
08:15 PM Tom_L: yet more progress
08:15 PM Tom_L: are you using a lib to init things or all hand coded?
08:15 PM Tom_L: you mentioned a lib
08:16 PM rue_shop3: libopencm3
08:16 PM rue_shop3: more than anything, its defines and pretty wrappers
08:16 PM rue_shop3: unhelpfull is that its hiding things on me
08:17 PM Tom_L: all libs hide
08:17 PM rue_shop3: its nice when libs follow the datasheet names tho
08:17 PM rue_shop3: I'm learning, I cant point blame
08:18 PM synja: alter the libs then
08:18 PM rue_shop3: there is a massive lack of examples
08:18 PM rue_shop3: synja, hell no
08:18 PM synja: psh
08:18 PM rue_shop3: I could spend a year writing my own
08:18 PM rue_shop3: and then I'd just have a lib that was a year behind
08:18 PM synja: no use
08:19 PM rue_shop3: I'm doing ok
08:19 PM synja: no sense in re-writing what's already written
08:19 PM synja: just alter to your needs
08:19 PM rue_shop3: no, caue they are going to come out with lots of new versions that wont have mods I'll come to depend on
08:20 PM synja: i doubt it anytime soon
08:20 PM synja: unless they add the features to be altered
08:20 PM rue_shop3: 'soon' for me is like 10 years
08:20 PM synja: yeah
08:20 PM synja: well more like 7
08:20 PM synja: but meh
08:21 PM rue_shop3: anyhow, next is measuring the motor duty
08:21 PM rue_shop3: which should be easy
08:21 PM rue_shop3: *but*
08:22 PM rue_shop3: first I think I want to do pot based control on the servo
08:22 PM synja: ofc
08:22 PM rue_shop3: then I can put in the duty control and do the force feedback
08:25 PM synja: i got a couple of these. you can prob see the specs in the url
08:25 PM synja: https://hobbyking.com/en_us/catalog/product/view/id/64269/s/jx-pdi-hv2060mg-metal-gear-high-torque-xtra-large-digital-power-servo-62kg-0-13sec-200g/
08:25 PM synja: it's a beast!
08:26 PM rue_shop3: I really should convert a windshield wiper motor...
08:26 PM rue_shop3: been threatening that one for like 16 years
08:27 PM synja: lol
08:29 PM rue_shop3: I think I need a nap
08:29 PM rue_shop3: help me clear my head
08:29 PM rue_shop3: the servo range is 12000 to 60000
08:29 PM rue_shop3: the adc gives me 4000
08:30 PM rue_shop3: delta 48000
08:30 PM rue_shop3: so I need to multiply the adc value by 12
08:30 PM rue_shop3: then add 12000
08:30 PM rue_shop3: then set the servo position register
08:46 PM rue_house: that should do it, nap time
09:16 PM zhanx: rue_house: what is the one tool (minus your computer) you need the most?
09:31 PM Snert: ( if he doesn't say brain, he ain't thinkin' right)
09:41 PM rue_shop3: what baout my hands?
09:42 PM rue_shop3: somewhere near screwdrivers, bench vise, and drilpress
09:42 PM rue_shop3: the lathe is crazy helpfull
09:43 PM rue_shop3: I'm thinking that I should start building the mecha arms
09:43 PM rue_shop3: cause I'll need them to put togethor the rest of the mecha
09:45 PM rue_shop3: ok, the pot-servo controll code works
09:45 PM rue_shop3: great first time
09:45 PM rue_shop3: yay
09:49 PM * Tom_L took rue_shop3's nap
09:51 PM Tom_L: haha found my xilinx jtag
09:51 PM rue_shop3: hmm
09:51 PM Tom_L: burried under some cables in the drawer!
09:51 PM rue_shop3: I'v got some xilinx chips...
09:51 PM rue_shop3: I'v still not written fpga code yet tho
09:52 PM rue_shop3: or compiled
09:52 PM Tom_L: so now there's two
09:52 PM Tom_L: one on that old dev board and this
09:52 PM rue_shop3: a good start might be a spi shift register, 16 bit
09:53 PM rue_shop3: oh my todo list
09:53 PM rue_shop3: geeez
09:53 PM rue_shop3: ah, I'm working on article 7 'force controller'
09:54 PM rue_shop3: just not the one it intended
09:55 PM Tom_L: i think every 'box' i have with stickers hiding screws have the stickers torn off at the screws
09:55 PM Tom_L: wonder why.....
09:55 PM Tom_L: this being no exception
09:57 PM rue_shop3: :)
09:57 PM rue_shop3: did you say you have one of these baords and programmers?
09:57 PM Tom_L: these?
09:57 PM Tom_L: no arm
09:57 PM rue_shop3: stm32
09:58 PM Tom_L: oh yes
09:58 PM rue_shop3: hmm
09:58 PM Tom_L: stm32F4 discovery
09:58 PM rue_shop3: ah, no these are stm32f1
09:58 PM Tom_L: dunno about programmer
09:59 PM rue_shop3: Jak_o_Shadows, where were you at 4am this morning when I woke up!?
10:00 PM Tom_L: dev toolchain.. altium, atollic, iar or keil
10:00 PM Tom_L: pfft
10:00 PM rue_shop3: Jak_o_Shadows, did you get any of the arm32 stuff working?
10:00 PM Tom_L: rue, what are those $1 arm boards for arm chip?
10:00 PM Tom_L: what arm chip
10:00 PM rue_shop3: Tom_L, I was looking on ali for fpga kits and didn't see any under like $32usd
10:01 PM rue_shop3: stm32f103c8t6
10:01 PM Tom_L: i dunno what this was, i've had it a while
10:01 PM rue_shop3: their 64k flash
10:01 PM rue_shop3: 20k ram
10:01 PM Tom_L: the tools run under linux too though
10:01 PM Tom_L: in fact, that's the only place i have it installed atm
10:01 PM rue_shop3: I put the xilinx stuff on a machine
10:01 PM rue_shop3: but didn't have hardware and didn't learn what I needed
10:02 PM Tom_L: the ise is obsolete now but works for what we would use
10:02 PM rue_shop3: so these arms are not much more than an avr replacement
10:02 PM Tom_L: should be more powerful though
10:02 PM rue_shop3: shall I go to the fpga pile and tell you what I have again?
10:02 PM Tom_L: wouldn't do me much good
10:02 PM rue_shop3: well its 72Mhz, not sure on mips
10:02 PM Tom_L: my memory is grey on that
10:03 PM Tom_L: the one i have has long since been obsoleted i'm sure
10:03 PM Tom_L: it was a tiny fpga
10:03 PM Tom_L: good for learning though
10:05 PM rue_shop3: phone system: XC9572XL
10:05 PM Tom_L: mine was xc95
10:05 PM rue_shop3: I have lots of altera
10:06 PM Tom_L: 108? maybe
10:06 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/temp/xilinx2.jpg
10:06 PM rue_shop3: DSL modem: XCS05XL
10:06 PM Tom_L: good guess
10:09 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/temp/xilinx/
10:09 PM Tom_L: a bit of test code for it
10:10 PM rue_shop3: huh, thats it, that I can find now
10:11 PM rue_shop3: I have lots of arm controllers in this pile
10:17 PM Tom_L: axis and pelco were the cameras i was looking at
10:17 PM rue_house: well I'v heard of axis before
10:18 PM rue_house: but the stuff I look at changes every time I do an estimate
10:18 PM rue_house: I dont even bother to think that I will ever install the same system twice
10:46 PM zhanx: think i am getting carpel tunnel in my hands
10:59 PM rue_shop3: zhanx, did you have the same board and programmer?
11:00 PM zhanx: yes
11:01 PM zhanx: and no, i did not get to it yet
11:21 PM justan0theruser is now known as justanotheruser