#robotics | Logs for 2016-08-01

Back
[05:02:45] <keffo> Anyone alive? I inherited a project using a coldfire v1 that keeps stalling due to something-something interrupts, looking for someone to aid my mental process to untangle it, any suggestions?
[05:04:28] <mrdata> idk
[05:05:07] <mrdata> keffo, what is a coldfire v1
[05:05:48] <keffo> 32bit microcontroller
[05:06:24] <keffo> It's driving an an industrial robot.
[05:07:10] <mrdata> what vintage
[05:08:04] <mrdata> https://en.wikipedia.org/wiki/Freescale_ColdFire
[05:09:51] <mrdata> oh, rather similar to motorola 68000
[05:10:43] <rue_shop3> in other words it only has 1 register and requires a memory fetch every cycle?
[05:11:13] <keffo> I know, it's ancient :)
[05:11:29] <mrdata> um, not that ancient. v1 was 2006 vintage
[05:12:08] <keffo> It's a refresh of 68k arch, cleaned it up a bit but essentially it's an old amiga :)
[05:12:19] <mrdata> sure
[05:12:46] <rue_shop3> you want to fix or replace it
[05:12:47] <rue_shop3> ?
[05:12:57] <mrdata> i worked with amiga circa 1990
[05:13:40] <keffo> There are software issues (not low level ones) that I need to fix for this robot, but it
[05:13:46] <keffo> ... it's not playing ball
[05:13:47] <mrdata> so, what are these problematic interrupts
[05:14:07] <keffo> I have no idea, as soon as I enable interrupts it stalls
[05:14:37] <rue_shop3> your using origional firmware or custom?
[05:14:44] <mrdata> trace the interrupt request lines and check their state, maybe
[05:15:16] <rue_shop3> maybe one of the interrupts is being sparratic and takes too long to deal with
[05:15:19] <keffo> Which firmware are you talking about? There is no os on the chip, it's all custom
[05:15:54] <mrdata> but you said the problem wasnt low level
[05:15:57] <mrdata> maybe it is?
[05:15:57] <keffo> To be clear, the chip and robot worked(but with bugs in it's behaviour) when the previous programmer left
[05:15:59] <rue_shop3> you said it was an industrial robot, I assumed its got a motion controller with that processor
[05:16:13] <keffo> It's a custom board with a coldfilre cpu
[05:16:23] <keffo> The designer of which is not available anymore :)
[05:16:31] <rue_shop3> yea, new custom board with an arm
[05:16:45] <keffo> For me this is a step back 10-15 years so I'm rusty :)
[05:16:48] <rue_shop3> dont inherrite other peoples problems
[05:17:27] <keffo> The problem is that these units are already ordered and purchased by customers, so the sw glitches need to be dealt with asap.
[05:17:33] <rue_shop3> whats the code on the processor do? ik? motor control?
[05:17:40] <rue_shop3> hahah
[05:17:43] <keffo> So I can't just rip everything up and start from scratch
[05:18:00] <mrdata> if it hangs when you enable interrupts, maybe the interrupt service routines are not tied in ?
[05:18:07] <keffo> No, I'll be adding IK as soon as this can be wrapped up and shipped
[05:18:42] <rue_shop3> this is the 'do I clean slate or try to make this garbage work' conundram, I always found that clean slate was better, most of the time the mess other people make takes longer to sort out than to start from scratch
[05:18:42] <keffo> I'm not sure, I tried commenting out all existing interrupts, essentially leaving them blank but the same thing happens.
[05:19:05] <rue_shop3> sounds like a kickstarter gone wrong
[05:19:19] <keffo> Oh totally. It used to be one programmer, the typical "did a CS degree" but has never worked along other programmers, so it's a glorious mess :)
[05:19:25] <rue_shop3> keffo, electronics problem, sparratic interrupt
[05:19:36] <rue_shop3> you wont beleive me, but thats what it'll be :)
[05:19:53] <mrdata> the horror
[05:20:13] <keffo> We'll see, I have no other option than to debug it from scratch. (probably rewriting from scratch too, eventually)
[05:20:16] <rue_shop3> but really, even if you have to put a STM32Fxxx in an adapter for the 68000, do it
[05:20:35] <rue_shop3> well, I think so anyhow
[05:20:58] <mrdata> the programmer reaches peak dangerousness right around 2 years experience
[05:21:19] <keffo> This is the second iteration of this robot, the first one has been out in service for about 15 years now. As soon as I can close this version, the next will have a proper itx pc in it, no more of this fiddling :)
[05:21:26] <rue_shop3> see, one of the main things is that you want a processor you can get help with and has a wide support base, the coldfire IS NOT it
[05:21:50] <keffo> Yeah, I have no idea why they did things this way.
[05:22:03] <keffo> I could justify it 15 years ago maybe, but not now
[05:22:08] <rue_shop3> cause they used that platform in the school he went to
[05:22:20] <mrdata> must be
[05:22:21] <rue_shop3> so its his tunnel vision
[05:22:26] <mrdata> mhm
[05:22:44] <keffo> Yeah, I spoke to him on the phone briefly, and he said he'd done some 40-ish projects with the coldfire v1
[05:22:56] <rue_shop3> you would even find more help with a 32bit PIC (I shudder to think)
[05:23:16] <rue_shop3> I can make 40 flashing leds too
[05:23:50] <rue_shop3> well supported processor, 8051 or arm
[05:23:56] <keffo> Oh, to make matters even more messy, the main functional part of this is handled in PLC, so chip handles motor drivers, and most actuall logic is handled over modbus through plc.
[05:25:13] <rue_shop3> are the kinematics simple?
[05:25:40] <rue_shop3> is there hardware to control the position control loops, or does that processor have to do it?
[05:25:46] <keffo> It's 5 dof, individually controlled by joystick
[05:26:02] <rue_shop3> gnight
[05:26:03] <keffo> (think industrial cleaning, high power water etc)
[05:26:44] <keffo> So nobody with handson experience with the coldfire v1 then? Any suggestions on channels to peruse?
[05:27:29] <rue_house> like I said, SUPPORT
[05:27:42] <rue_house> nobody will be able to help you with that processor
[05:27:52] <rue_house> change it for one you can get support for
[05:28:11] <keffo> Tons of people are using this thing! :)
[05:28:30] <rue_house> no
[05:28:38] <keffo> Like I said, as soon as this is resolved, I'll jump on r&d for the next robot, so it will get solved then
[05:29:15] <rue_house> does the processor just do PID loops?
[05:29:26] <rue_house> is all the damn code written in assembler?
[05:29:30] <keffo> Nono, all C
[05:29:37] <rue_house> ah good, eaiser to port
[05:30:02] <rue_house> just PID loops?
[05:30:13] <rue_house> and modbus interface
[05:30:55] <keffo> No, it basically comms with the joystick hw to record small programs that gets repeated. The only reason why there is a PLC involved in this is because that guy doesn't get C code, and the C programmer doesn't get PLC either, so they used to be in constant disagreement about implementation details
[05:31:08] <keffo> Quite a mess to be honest
[05:31:48] <keffo> My issue is that I'm simply not familiar enough with this hw, there is something I'm missing with the interrupt handling somehow
[05:32:42] <mrdata> typically, an irq line is driven low by hardware, the service routine runs
[05:32:58] <mrdata> something resets the irq line, maybe it only strobed?
[05:33:20] <mrdata> if the hardware were to hold it low, then
[05:33:36] <mrdata> the service routine would get called again instead of anything ordinary going on
[05:34:30] <mrdata> can you watch the irq lines?
[05:37:35] <keffo> Could be interrupt priorities
[05:38:33] <mrdata> well, a lower priority interrupt will be masked while the higher priority one is serviced
[05:38:55] <mrdata> but the higher priority one can interrupt the lower one's service routine
[05:40:10] <mrdata> something tells the hardware that the service routine is finished
[05:41:02] <mrdata> some systems might be able to queue interrupts but i dont recall whether 68k was such
[05:41:49] <keffo> Yeah I haven't touched anything close to this hw since 98-99 I think, I need to print some manuals :)
[05:42:20] <mrdata> yeah. i'm on my way to sleep. good luck
[05:44:17] <keffo> thanks
[14:18:33] <electron_> hi
[14:19:27] <electron_> ive got a question concerning continous path driving along a straight line with a 3 joint robotic arm
[14:23:51] <electron_> i want to drive the effector along a line. i already sample the line into successive segments and do PTP from sample to sample. the thing is that i cannot guarantee that all joints reach their end position at the same time. because of this the arm stops at each sample, waits for all joints to reach their position and then gos on to the next sample.
[14:25:38] <electron_> the problem with this approach is that this causes a stop-and-go motion, not a smooth path, as all joints need different times to reach their positions. also if i set them to specific speeds, there are situations where i cant set a speed because it is below the minimum speed. the arm has simple dc motors
[14:32:27] <Tom_itx> so when one axis reaches it's endpoint recalculate the endpoint from the current location
[14:33:59] <electron_> recalculate? i mean i do recalculation for the endpoints of all axes for the next sample
[14:35:14] <electron_> i want to get rid of that "stop" caused by waiting for all axes to reach their endpoints
[14:38:16] <electron_> i mean if i had stepper motors in the joints i could turn them as slow as i want but they are simple brushed dc-motors :-/. and i cant drive those with speeds below a certain threshold, and thus cant set the speeds for the axes in a way that i can guarantee that they reach their endpoints at the same time. thats the problem
[14:39:06] <electron_> i already tried to let the axes that reached their position run further until the last one reached its position, but this led to strange results...
[15:08:24] <deshipu> if you have limits on your motor speeds, then there is no solution that would work for every possible path
[19:29:01] <rue_shop3> electrons problem is symantic
[21:57:48] <Snert_> found a little 30A stepper driver board on ali.
[21:57:58] <Snert_> was intersting.
[21:58:29] <Snert_> kinda looked like it wouldnt be a problem to dupe the board.
[22:00:09] <Snert_> mebbe they lie 'bout the specs but seems worth a shot.
[22:46:13] <bluespark> hi folks. is it possible to put G2 timing pulley onto servo motor. i see online only eamples of G2 pulleys fitting onto stepper motors? I dont know?...
[22:46:53] <orlock> bluespark: Maybe, it would depend on the motor
[22:46:59] <orlock> bluespark: with an adaptor, sure
[22:47:09] <orlock> But why not just use a geared stepper?
[22:47:19] <orlock> Servos have limited rotation usually
[22:50:03] <bluespark> orlock: thank you for quik answers, i'm complete newbie into servo and steppers motors but i got a new tip here 'limited rotation' i will have to read wikipedia for booth motors first. thank you orlock.
[22:50:50] <orlock> bluespark: two types of servos - the most common types are hobby motors which usually only rotate 180 degrees
[22:51:34] <orlock> bluespark: what it usually means is a motor with a built in feedback loop
[22:52:08] <orlock> servo motor output shafts are not ideal for attaching a pully to
[22:53:45] <bluespark> orlock: i need type of motor servo or steeper to pull water spray head up und down like 1 meter up and 1 meter down . i was thinking servo would e good idea and to use G2 timming belts?
[22:54:50] <orlock> bluespark: servo will not have enough travel
[22:55:20] <bluespark> orlock: and you give me enough answers so far... good luck i have...
[22:55:24] <orlock> bluespark: do you need to position it only up or down, or in between too?
[22:55:57] <bluespark> orlock: yes i plan to sometimes position it...
[22:56:02] <orlock> bluespark: the timing belts should work
[22:56:15] <orlock> i was going to say, if it needed to be up or down, then a simple motor may do
[22:56:40] <orlock> but if you want in the middle, you probably want a stepper
[22:57:03] <orlock> in either case, you will want detectors for when it hits the end
[22:57:04] <bluespark> orlock: ok thtas just confirm my study what i need is correct acept the stepper vs servo i had no idea but now you gave me light the stepper would be perhaps better ide
[22:57:18] <orlock> a commercial servo may do as well
[22:57:26] <orlock> commercial/industrial
[22:57:45] <orlock> but thats basically going to ba a big stepper with some feedback and a controller anyway
[22:58:39] <bluespark> orlock: i plan to use G2 pulley/belt ... is there any other mechanism perhaps
[22:59:31] <bluespark> orlock: to pull up and down and position spray head.....
[23:00:37] <bluespark> orlock: ok i pls dont bother i will figurit with g2 pulleys...
[23:01:37] <bluespark> orlock: thank yu for your precious answering my quiestions... ggod less you and good day
[23:03:13] <bluespark> orlock: i mean god bless you and good day.... i have some wtare spliled over my keyoboard recenlty and my keys do not repsond properely.. will have to get new one... wireless are OK... thank you anyway...
[23:06:18] <bluespark> orlock: i got one more question about NEMA stepper motors. this seems so popular... why nema is there any other good stepper motor i should check...
[23:08:05] <bluespark> orlock: ok I probably waisting your precious time such a stupid question tought.....i should check google about it... thnk you anyway...
[23:14:03] <orlock> bluespark: NEMA is just a standard firm factor as far as i know
[23:28:03] <zhanx> Orlock
[23:30:43] <orlock> heya zhanx
[23:30:49] <orlock> building a new bot
[23:30:55] <orlock> around the same cordless drill motors
[23:31:08] <zhanx> Nice, I am working on a tracked arm
[23:31:15] <orlock> The damn thread isnt printing properly
[23:31:27] <orlock> but only when i try to print it as part of this gear
[23:31:33] <orlock> if i do a small test part its fine
[23:31:54] <zhanx> I has no 3d printer still for some reason
[23:32:14] <zhanx> Think I need to make one or an attachment to this arm
[23:32:22] <zhanx> 16 dof of fun arm
[23:32:31] <orlock> awesome
[23:32:54] <zhanx> You say, that I have to make it
[23:32:58] <orlock> but you want sub-mm repeatability/accuracy and 60mm/s or better movement rate
[23:33:14] <orlock> if you want to print with it
[23:33:27] <orlock> New upgrades are waiting for me at the post office
[23:33:38] <zhanx> Medical grade arm from a hospital, no motors etc just the frame
[23:33:39] <orlock> steppers with integrated 320mm leadscrews
[23:33:47] <orlock> Ah
[23:33:49] <orlock> Fanuc?
[23:34:06] <zhanx> Ultrasound thing
[23:34:15] <zhanx> Wife got it for me
[23:34:43] <zhanx> Motor mounts not nema standard
[23:34:53] <orlock> Weird.. and weirder
[23:35:02] <orlock> What brand?
[23:35:13] <zhanx> Zero marks on it
[23:35:23] <orlock> Never seen one on an arm, only handheld
[23:35:35] <zhanx> 4 foot long arm, all aluminum
[23:35:45] <zhanx> Crazy joints on it
[23:35:58] <orlock> Is it meant to have motors? not just a static friction thing?
[23:36:24] <orlock> I wonder if its one of ours, heh
[23:36:38] <zhanx> Both, it has springs and a couple of Mount points, plus wire chase points
[23:36:39] <orlock> but we usually stick to standard nema gear
[23:37:06] <orlock> theres a big Fanuc arm in a cabinet in the atrium
[23:37:40] <orlock> self-contained assembly line for something biotech related
[23:37:47] <zhanx> 3 wrist joints that do 360 degress. It's odd but mine now
[23:40:29] <zhanx> To me, it looks like a tech put it in place and used the computer to fine tune it