#robotics | Logs for 2016-09-22

Back
[06:51:18] <anonnumberanon> z64555, sounds like a good strategy
[07:34:36] <z64556> yeah, if only I wasn't so lazy. :D
[07:37:39] <z64556> Oh, I was just reminded of something my dad said. He once debugged a microprocessor using a transistor radio, simply because he didn't have a logic probe and all of the pins on the chip were being used
[07:39:06] <z64556> EMI from the chip during operation would change frequencies, depending on the clock cycle and where it was in the code
[08:32:23] <anonnumberanon> z64556, yeah it can be a pain in the butt to get into the code but once you're in it's magical
[08:36:58] <anonnumberanon> You need 4 PWMs for the ESCs or even more than that? Wasn't sure if you were going to have a servo on the quad-copter as well.
[08:48:07] <anonnumberanon> also that story about your dad is good!
[08:49:29] <anonnumberanon> what's the deal with him is he in the industry?
[09:01:15] <anonnumberanon> /reconnect
[09:46:51] <anonnumberanon> "// every 2.5ms counter 2"
[09:47:12] <anonnumberanon> shouldnt this be every 20 ms rue_bed ? rue_house ?
[09:47:47] <anonnumberanon> oh sorry, and I'm referencing your servo driver code
[09:48:53] <rue_house> each pwm starts 2.5ms apart
[09:49:01] <rue_house> aka, the max interval time
[09:49:02] <anonnumberanon> oooohhhh
[09:49:30] <rue_house> ripple update
[09:49:34] <anonnumberanon> ah, so that's the reason only 8 PWMs
[09:49:44] <rue_house> if you dont, you might have to turn more than one off at the same time, and you cant do that
[09:50:06] <rue_house> if you drop the timing accuracy you can do it
[09:50:45] <SpeedEvil> On what processor?
[09:50:58] <anonnumberanon> Ahrduineaux
[09:51:06] <rue_house> m328
[09:51:55] <rue_house> how can he not know yet?
[09:53:03] <anonnumberanon> Nobody's perfect.
[09:53:17] <rue_house> I been on and on about it for more than 2 years now
[09:53:25] <anonnumberanon> Except Lilu Dallas.
[09:54:42] <anonnumberanon> I'm going to test a few other methods including nops, reading TCNTx, and maybe more.
[09:55:29] <anonnumberanon> That is, using timer overflow without ISR, plus reading TCNTx.
[09:55:37] <rue_house> software interrupt feeding into an emulated 4017
[09:56:38] <anonnumberanon> Yeah okay I don't know how I would go about trying that one.
[09:57:17] <rue_house> preloaded shift registers
[09:58:00] <rue_house> if you go with 2 external 4017, you can do 20 channels
[09:58:44] <SpeedEvil> Or just buy a proper processor
[09:59:19] <rue_house> I find the m328 is cost effective and fits in any project that needs 8-32 servos
[10:00:28] <anonnumberanon> SpeedEvil, such as? Some processor with millions of pwm outputs or something?
[10:01:33] <anonnumberanon> rue_house, yep i tried the 4017 thing, you can see the waves in my video when I show the oscilloscope screen, it was very groovy
[10:01:58] <anonnumberanon> the pwms grow longer and then shorter like an accordion
[10:02:35] <rue_house> if the 4017 thing is done with code like mine, you can stream two timers on io pins, so simotanious events are not a problem
[10:02:55] <rue_house> off to wikr!
[10:21:45] <SpeedEvil> anonnumberanon: the 328 is a slow 8 bit processor. There exist quite fast 32 bit processors for a similar or lower price.
[10:26:23] <anonnumberanon> SpeedEvil, Yeah I want to make my own ARM dev board one day. Just can't be bothered learning ARM programming right now. Plus fundamental timing programming techniques are probably the same over different microcontroller architectures right?
[10:26:42] <anonnumberanon> Do the timers work the same?
[10:27:42] <SpeedEvil> The timers are broadly comparable, but http://www.digikey.com/product-detail/en/stmicroelectronics/STM32F030F4P6/497-14044-5-ND/4357517 - for example - the processor is a _lot_ faster
[10:28:06] <SpeedEvil> and 32 bit, so you don't get annoying 'spend ages doing 32 bit math on an 8 bit pocessor issues.
[10:29:58] <SpeedEvil> For example, you set an interrupt at 100khz, and run down a list of cmp/set to the ports.
[10:34:06] <veverak> DONE
[10:34:07] <veverak> FINALLY DONE
[10:34:15] <veverak> damn it, writing thesis is pain sometimes
[10:41:33] <anonnumberanon> sometimes
[10:42:26] <anonnumberanon> SpeedEvil, I'm in the realm of 1MHz interrupts :)
[10:45:33] <anonnumberanon> brb
[11:01:35] <SpeedEvil> yeah - but you're arranging the timing beforehand
[11:01:57] <SpeedEvil> your CPU is not fast enough to do all of the timers in the interrupt
[11:02:11] <SpeedEvil> If I've understood what limited backscroll I read
[12:06:27] <z64556> atmega isn't an ARM arch, is it?
[12:07:47] <z64556> I read in the stellaris's doc that because of the ARM arch, it can take a few cycles for the flash memory to be set. Which means that IRQ's should be cleared within the ISR at the beginning
[14:05:09] <anonnumberanon> SpeedEvil yeah the cpu speed is kind of lacking so plenty hacks must be put in place.
[14:10:27] <anonnumberanon> z64556 nah its not arm this is the avr architecture
[14:10:59] <anonnumberanon> it's 8-bit words, most arm is 32 bit words
[14:15:34] <anonnumberanon> can you reference the datasheet?
[18:57:08] <rue_house> anonnumberanon, it takes a processor of more than 100Mhz to emulate a 1Mhz computer that has dedicated hardware systems
[18:57:45] <rue_house> which is why a m328 running at a mere 16Mhz can react to things faster than a 72Mhz arm
[18:58:03] <rue_house> :) yea I skipped a bit of stuff there
[18:59:59] <rue_house> "if you consider everything I didn't say, what I did say is true"
[19:00:52] <rue_house> esp since the 72Mhz processor needs to go thru about 6 wait states after writing to an io port
[19:01:38] <rue_house> which is why you get the DMA to do your io
[19:14:25] <z64555> anonnumberanon: yeah, I can look it up
[19:16:10] <z64555> rue_house: the issue is perhaps more aggrevated with short ISR's. If the ISR is too short, it might execute several times while waiting for the clear interrupt instruction is written
[20:26:34] <anonnumberanon> 6 wait states he said, into the trash it goes
[20:30:40] <anonnumberanon> but look here, disable micros() interrupts, put as many nops as need, count all that time taken doing pwm, add it to the time counter before we disabled interrupts, reenable interrupts, and voila, can use synchronous tasking while getting the very fine resolution of NOPs.
[20:31:45] <anonnumberanon> but gotta hand tune it maybe like if you want to do 15 nops, remove a few and make it 13 because there is a function overhead of maybe 2 nops for whatever code structure the NOPs are in.
[20:33:02] <anonnumberanon> could even do a while(i<153){ NOP; i++;}
[20:34:24] <z64555> ye gods
[20:38:28] <rue_house> my comments were not for an avr, but other microcontrollers
[22:36:50] <rue_shop3> its distressing me that I repeatedly lose the index finger of the 12' mecha
[22:39:45] <Jak_o_Shadows> Do you have other fingers?
[22:39:48] <Jak_o_Shadows> How are you doing fingers?
[22:39:54] <Jak_o_Shadows> Have you ever linked photos of them?
[22:40:34] <rue_shop3> hmm
[22:41:04] <rue_shop3> http://ruemohr.org/~ircjunk/robots/sparrow1/p1080426.jpg
[22:42:04] <Jak_o_Shadows> So like 30cm fingers, nice.
[22:44:56] <Jak_o_Shadows> Push/pull tendons?
[23:05:21] <rue_house> pull
[23:05:33] <rue_house> :))) I just got the tendon stitched!
[23:05:37] <rue_house> yaaaaay
[23:05:41] <rue_house> that took like 6 months
[23:06:11] <rue_house> this means tommoorow (if I live) I can put them on the finger and see if they work
[23:10:12] <Jak_o_Shadows> By push/pull, I meant one tendon for closing, another for retracting
[23:11:24] <rue_house> ok, so the finger has 3 joints, (base joint included)
[23:11:44] <rue_house> now we know the last joints rotation is a function of the jiont before it
[23:12:16] <rue_house> so that leaves us with 2 joints to actuate
[23:13:09] <rue_house> as robot people, that would seem to indicate you need 4 tendons,
[23:13:17] <rue_house> 1 for each direction of each joint
[23:13:25] <rue_house> but nature didn't do it that way
[23:13:50] <rue_house> if you think about it, you dont need 4 tendons to acutate 2 axies
[23:14:05] <rue_house> if those axies were x,y, you would be tipping a plane
[23:14:25] <Jak_o_Shadows> Not if you can control the position of the tendons, not just 1D force.
[23:14:54] <rue_house> and the plane could just as well be controlled by 3 points
[23:15:12] <rue_house> I said there were 2 axies to control, aka, each joint
[23:15:19] <Jak_o_Shadows> yes
[23:15:24] <rue_house> if you took those and considered them x,y
[23:15:37] <rue_house> then you can control both with 3 points, aka 3 tendons
[23:15:42] <rue_house> anyhow thats what nature did
[23:15:46] <Jak_o_Shadows> Yes.
[23:15:47] <Jak_o_Shadows> I follow
[23:15:57] <rue_house> there are two tendons on the inside and 1 on the outside
[23:17:16] <orlock> rue: crap sounds painfull, why?
[23:17:34] <rue_house> turns out it saves 25% of the actuators
[23:17:41] <rue_house> and only adds a little math
[23:17:52] <orlock> hold on, are you talking about a robot, or actual tissue in your hand?
[23:18:00] <Jak_o_Shadows> So just so it's clear, how many tendons per finger?
[23:18:02] <Jak_o_Shadows> 3?
[23:18:51] <rue_house> so, I'v not recalculated yet, but for 47 axies, that means I dont need 94 muscles, I only need about 71
[23:19:21] <rue_house> which means I dont need 188 valves, I only need 141
[23:19:42] <rue_house> 3 tendons per finger for curling
[23:20:15] <rue_house> turns out that one finger is locked side to side too, dont need to actuate that
[23:20:27] <z64555> Jak_o_Shadows: that would be a pull/pull tendon :P
[23:20:31] <Jak_o_Shadows> Yup. One attahched to the tip, the other the middle?
[23:20:44] <rue_house> its worse than that jim
[23:20:45] <Jak_o_Shadows> haha, yes z64555, that's a much better way of describing it
[23:21:35] <rue_house> http://image.wikifoundry.com/image/1/rdysqVtdYiCJqeiYDeqNPA74188/GW471H275
[23:22:12] <rue_house> the image is hard to reverse engineer because one 'tendon' is doing different things as it goes along
[23:22:52] <rue_house> but I think I'v got it
[23:22:59] <rue_house> I'll know more tommorow
[23:23:04] <z64555> just a bunch of linkage points
[23:23:08] <Jak_o_Shadows> ah, yep, that's similar to what I was thinkin
[23:27:41] <rue_house> X = B+A/2; Y = B-A/2
[23:27:49] <rue_house> that somehow manages to implement that
[23:28:02] <rue_house> no, thats the wrong one
[23:28:31] <rue_house> I cant store the formula in memory long enough to get it here
[23:28:55] <z64555> just side-by-side the windows
[23:29:16] <rue_house> its on paper in the hall
[23:29:32] <z64555> oh, lol
[23:29:32] <rue_house> but I'm glad someone else in the world know what windows are for
[23:33:24] * rue_house tires to say to the little voice that spending $5 on 100 transistors just 10 times will cost $50, but can only hear the little voice being overrun by the idea of having 1000 transistors
[23:39:00] <rue_house> the MPU5060 is used in a lot fo steadycams, I wonder if that means it dosn't require a stupid emoung o f iltering
[23:39:37] <rue_house> I mux'd the f
[23:53:18] <rue_house> hahahahah
[23:53:20] <rue_house> hahahah no way
[23:53:28] <rue_house> https://www.aliexpress.com/store/product/Free-Shipping-10PCS-PT4115-SOT-89-PT4115B89E-SOT89-5-LED-driver-chip/1916536_32637565195.html
[23:53:50] <rue_house> I THINK this is EXATLY what I need for my current controlled force feeedback system
[23:54:20] <rue_house> er no
[23:54:27] <rue_house> wtf, datasheet mixup
[23:56:16] <rue_house> no, I'm right, kinda
[23:57:32] <Jak_o_Shadows> Current sense and auto-adjust?