Robot arm: feedback sensory (Skutter v0.2)


93 posts   Page 3 of 4   1, 2, 3, 4
by Ravenous » Fri May 25, 2012 12:32 pm
Also: I've only ever used hall sensors on some motors I got, which have them built in as encoders. They're also three pin devices.

The ones I have need a pullup resistor on the output - 4.7K from the ouput to +5V.

Also this is effectively giving me just an on/off signal for pulses, though of course they're probably different sensors. (Google "devantech emg30" for the motors I used.)
Posts: 1677
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK
by morphy_richards » Fri May 25, 2012 12:44 pm
:oops:
How embarrassing...

What is it with me? I get these ideas but as soon as it comes to putting stuff together it all goes a bit A over T...

You should see what I did to my mountain bike... I tried to change the cassette (gears) on the back wheel. In the process of unscrewing the lock ring for them I somehow managed to also unscrew the axle that runs through the whole back wheel without noticing. I put the back wheel back on, feeling proud of myself for fixing gears and the wheel promptly fell to pieces.

And then in the process of replacing the back wheel with a spare one I broke a pedal and then in the process of fixing that I stripped the thread out of the crank (pedal thingie) and had to buy whole new set of cranks . But got the wrong size!

Anyway, I digress.

Thanks Ravenous, you were indeed correct and I am a bit of a numpty. Those sensors do work as expected.
User avatar
Posts: 886
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by Ravenous » Fri May 25, 2012 1:23 pm
morphy_richards wrote:
How embarrassing...

Never mind. You don't do house wiring do you? :)

As for the bikes, my own mental block is removing cranks. I forget to remove the lock nut before fitting the crank extractor... which means I eventually rip the thread out of the crank. Very hard to get the cranks off again after that...

Out of interest how far away can you get a reading with those sensors and a typical magnet? (It won't be linear of course so you'd need some sort of conversion routine to calculate distance.)
Posts: 1677
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK
by tzj » Fri May 25, 2012 1:42 pm
you could use stronger magnets ^^

you can get a thousand neodinium balls pretty cheaply.

edit: its OK you already sorted it...
Last edited by tzj on Fri May 25, 2012 1:48 pm, edited 1 time in total.
http://www.themagpi.com <---- Checkout the MagPi
(The MagPi - Co-Founder)
User avatar
Posts: 300
Joined: Thu Jan 05, 2012 3:09 pm
Location: Barnsley, SY, UK
by morphy_richards » Fri May 25, 2012 1:47 pm
I tested it first with one of these little circular fridge magnet things. Not very good and hardly any range - I think that's because I cant actually tell where the north and south poles are.
Image
Next I tried with the magnet from my fish tank glass scraper - not at all scientific because it's so big and bulky but at least I know what direction the poles are in. This time I'm trying to simulate what might happen if the sensor was on the base of the robot and moving past a fixed magnet (by moving the magnet past a fixed sensor - but it's the same thing as far as the electronics is concerned)
Image
Promising... 30 degrees of range or 3cm of movement before the output drops to about half the input voltage.
Image
Obviously this is a rubbish magnet to use.
Next test will involve fixing several sensors to the rotating part of the base and a fixed magnet on the non moving part.
A stronger magnet should give more range too - neodymium magnets are cheap apparently

Image
User avatar
Posts: 886
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by tzj » Fri May 25, 2012 2:00 pm
http://www.theneocube.com/

that's where I got mine, I swear I was £40, must have been a sale...
http://www.themagpi.com <---- Checkout the MagPi
(The MagPi - Co-Founder)
User avatar
Posts: 300
Joined: Thu Jan 05, 2012 3:09 pm
Location: Barnsley, SY, UK
by Ravenous » Fri May 25, 2012 2:09 pm
You know something, I still these alternate solutions to encoders are a bit dodgy. I'm sure you could have installed encoders by now...

On this page, which is an article we looked at before...

http://www.instructables.com/id/Modific ... ndFinally/

...the guy claims he got 1024 pulses in 180 degrees turn of the shaft. You need an arduino or something to count the pulses, but that has to be simpler than all these hall sensors/optos on gray tracks/nuclear reactors/flux capacitor things you've been trying over the last few weeks! Is it really that hard to get an encoder inside the waist joint?
Posts: 1677
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK
by tzj » Fri May 25, 2012 2:18 pm
there's something we haven't tried a flux capacitor!
as with nuclear you need kwaliphicashuns...

wait... think of a mem-resistor, but one that remembers magnetic flux... which would be a mem-inducer rather than a 'flux capacitor'.

I know its unrelated, but it just came to me.
http://www.themagpi.com <---- Checkout the MagPi
(The MagPi - Co-Founder)
User avatar
Posts: 300
Joined: Thu Jan 05, 2012 3:09 pm
Location: Barnsley, SY, UK
by catmaker » Fri May 25, 2012 2:40 pm
Hi guys, maybe these IC's could help?
http://www.ams.com/eng/Products/Magnetic-Encoders
Posts: 50
Joined: Thu May 24, 2012 8:32 am
by morphy_richards » Fri May 25, 2012 2:43 pm
lol
I hear 'ya... but I'm convinced that one of these methods will work and when it does it will be simpler. The only other concern I've got about the opto-shiney-through-hole method is that it doesn't tell you where you are to begin with ... so you could have the shoulder at maximum at time = 0 and the system would have no way of knowing this.

Also, with the general idea of making an article for Magpi / a manual trying out loads of different methods for sensing is all good as far as I'm concerned because each one can get a write - up with an informed explanation of pros, cons and potential pitfalls.

This can all go beyond any robotic arm or "skutter" device - I think for me trying stuff out has almost (but not quite entirely) overtaken the urge to just make the thing as quickly as possible. All these methods could be used in any type of project, be it robotic or . ... um... electronic automatic fishtank life support system :?

It's also got to be said that posting things up on here and then people chiming in has been really really really useful.
User avatar
Posts: 886
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by tzj » Fri May 25, 2012 2:52 pm
@cat maker

awesome! you can get FREE samples!
http://www.themagpi.com <---- Checkout the MagPi
(The MagPi - Co-Founder)
User avatar
Posts: 300
Joined: Thu Jan 05, 2012 3:09 pm
Location: Barnsley, SY, UK
by morphy_richards » Fri May 25, 2012 2:57 pm
tzj wrote:@cat maker

awesome! you can get FREE samples!


Awesome indeed! That's a brilliant find!
User avatar
Posts: 886
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by morphy_richards » Fri May 25, 2012 7:13 pm
Ravenous wrote:
Also this is effectively giving me just an on/off signal for pulses, though of course they're probably different sensors. (Google "devantech emg30" for the motors I used.)


They look like really capable motors... How 'powerful' are they? One day I want to make a kind of Johnny5 human sized robot using a Kinect that could have some serious uses for people with profound multiple learning difficulties... I was thinking electronic wheelchair or mobility scooter motors would be the way to go. Are these in any way equivalent?

Ps... Back temporarily on the topic of mountain bikes (hey its my thread) the new cranks I fitted have a much bigger gear attached (haven't counted the teeth but its substantial), although I need to sit down with a 4 pack and a screwdriver to readjust the front derailer my bike is way faster now 8-)

Edit - ah I was looking at the EMG49.
User avatar
Posts: 886
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by catmaker » Sat May 26, 2012 1:41 am
catmaker wrote:Hi guys, maybe these IC's could help?
http://www.ams.com/eng/Products/Magnetic-Encoders


(Hmph) I dozed off reading these datasheets and had my laptop taken & put away...
But wow! These IC inventions are pretty amazing! Whatever gave these AMS guys this idea?
I am going to widen my search if anyone makes suitable adapter PCBs for these ICs this afternoon... (fingers crossed)
Posts: 50
Joined: Thu May 24, 2012 8:32 am
by Ravenous » Mon May 28, 2012 8:33 am
The EMG30 motors I mentioned are great for a small robot, I made my still-unfinished "trolley" with four of these and the whole thing can easily take at least a few kilos of dead weight on top. The recommended 100mm wheels they do are good too, though I feel full speed might be a little too quick to control. (I built simple motor controllers to reduce the speed.) Maybe I should have got just two motors, and geared them down with pulleys. (The motor & encoder wires go out at an angle so can get broken off, but easily re-soldered.)

The EMG49 versions weren't around at the time, but they look very impressive. But needs 24V and probably hefty drivers too.

Proper wheelchair-duty motors are much bigger I think. The "robot wars" - type builders use them I think - I remember someone mentioning 750W, which would need a hefty battery and motor drivers.
Posts: 1677
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK
by morphy_richards » Tue May 29, 2012 3:10 pm
I think I'm on track to get a reliable measurement of rotation for the base of the arm.

I got hold of 3 neodymium magnets which are surrounding the rotating part of the base but stuck (with blue-tack) to the fixed part - you can see two of them in the image below (the third one in the middle is mounted inside the case)

I've mounted 3 hall effect sensors at 90 degrees to each other on the edge of the rotating part of the base (image below - currently stuck to bits of cardboard and also held down with blue-tack)
Image
As the base rotates I see the following three values from each sensor - shown in the graph below.
Image
You can see a kind of baseline at about "300". Each sensor value dips below this as it interacts with one or more south magnetic poles (speculation).

There is some "noise" along the baseline but this does not matter because each sensor describes a smooth curve as it (and the arm) rotates. At no point would the arm be relying on a noisy baseline reading in order to determine position. There is always a smooth curve which can be used and it should be possible over the next few days to determine a relationship between the three values and the angle of rotation.
Edit - I think the noise may be external EM interference. I've got a lot of electronics (monitors, computers etc.) all piled up in one place on my desk and right next to it is my Arduino.

There is some discrepancy between values:
Green maxes out at ~550
Red at ~ 525
Blue at ~ 520

I think that's probably due to the fact that the sensors are currently mounted in cardboard, stuck down with blue tack and lined up as accurately as I am able to do so by going "splodge" on part of the base with my big fat thumb.

It's not too much of an issue - I will find a more permanent sticking method and measure the positions more accurately but there will always be a need for some calibration with the software.

Anyway, I think I've got this cracked now. At 35 pence per sensor that's not a bad solution!

The rest of this (for measuring rotation of the base is concerned) is just software :D
User avatar
Posts: 886
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by Ravenous » Tue May 29, 2012 3:38 pm
You've just invented a Gray code absolute (well almost absolute) position encoder based on magnets instead of stripes. One day we'll all look back and remember where we were when we first heard :)

You could get more steps with more magnets...

If the magnets and sensors were spaced out irregularly (not every 90 degrees), the pattern wouldn't repeat in a periodic way. Then it might be easier to identify the regions uniquely, from a single reading, rather than having to count the peaks going past. I've been thinking about this but can't prove it...
Posts: 1677
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK
by SN » Tue May 29, 2012 3:52 pm
Ravenous wrote:You know something, I still these alternate solutions to encoders are a bit dodgy. I'm sure you could have installed encoders by now...

On this page, which is an article we looked at before...

http://www.instructables.com/id/Modific ... ndFinally/

...the guy claims he got 1024 pulses in 180 degrees turn of the shaft. You need an arduino or something to count the pulses, but that has to be simpler than all these hall sensors/optos on gray tracks/nuclear reactors/flux capacitor things you've been trying over the last few weeks! Is it really that hard to get an encoder inside the waist joint?

This was where we came in - I do like this approach but I have no arduino, I'd hope there'd be a solution using only the raspi and its gpio capabilities
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?
User avatar
Posts: 1008
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
by morphy_richards » Tue May 29, 2012 4:59 pm
I'm using an arduino at the minute because its an easy way to convert the values I'm getting from these sensors (which are voltage ranges) into digital (number) values. Also I haven't got a pi yet so I have no choice.

I'm going to have to create my own method for connecting all these analogue sensors to the digital Pi and do the necessary conversion between them (or get a Gertboard). There are a few ideas floating around for this. I'm currently considering this . viewtopic.php?f=44&t=6391
The chip I'm looking at to do this should be fairly cheap and in the best tradition of Bodge, I'll look for the simplest method to do it.
User avatar
Posts: 886
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by blobert123 » Tue Jun 05, 2012 2:19 pm
There is a mod available for this robotic arm www.instructables.com/id/Modifications- ... dba/#step1

hope that helps
Im working on a similar project too :-)
Posts: 13
Joined: Wed May 23, 2012 6:48 pm
by morphy_richards » Tue Jun 05, 2012 4:04 pm
Thanks for that, we've seen it a couple of times already. Actually I think Ravenous has been utterly bemused by my total refusal to use the idea in that instructable. There is another one here that uses potentiometers.

For me this project has kind of gone off on a tangent recently into a way of investigating types of feedback. It's going to have to get back on track soon though because I want this thing finished before the end of July.

Good luck with your own project too... can I inquire what you had in mind for it? :)
User avatar
Posts: 886
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by Ravenous » Wed Jun 06, 2012 8:12 am
Nah, no longer bemused - it's probably the "standard" method but I can see the attraction in looking for alternate methods, you've already found several. Maybe the pupils can invent a few more.

I also know trying to fit incremental encoders into an existing motor/gearbox that's not built for them is a pain! I have so many old toy motors, etc. in boxes at home which I thought I could use for "something"...
Posts: 1677
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK
by blobert123 » Thu Jun 07, 2012 5:43 pm
Im going to make a robot on wheels with a rising platform on which there Will be a wifi controlled pi operating the whole thing :-) along with two arms (guess what type ) and Im hoping to add on an extra finger to each arm :-)
Posts: 13
Joined: Wed May 23, 2012 6:48 pm
by SN » Wed Jun 13, 2012 9:48 pm
Light blub moment. Having watched the GPIO intro video by RaspberryPiForBeginners a simple solution would be to have simple make/break contact switches attached to the GPIO pins which make on the extremities of movement of the joints. Not sure their are enough for complete coverage (2 per joint) but even one per joint could be used to set a reference position.
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?
User avatar
Posts: 1008
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
by morphy_richards » Thu Jun 14, 2012 8:58 am
That could work well. So, if you told the arm to :
(1) Start rotating (say) left until it triggers the switch and then
(2) Start timer and start rotating right
(3) On hitting right switch stop timer and rotation.
(4) Divide time by 270 /* The base can rotate by 270 degrees. This would give the time needed for the arm to rotate by 1 degree
You would need two switches per joint. Counting joints - there are shoulder, elbow, wrist (not counting the gripper ATM) and base. That would mean 8 switches are needed which would be well within the scope ogf the GPIO. Even 10 is do-able so you can do the gripper as well.
Image
That method would also be a solution for the rotary - non absolute opto encoder method that Ravenous has pointed out. Rotate arm segments until the opto encodes report there is no more movement occuring and treat that point as first position. Then take all subsequent movements from there.
User avatar
Posts: 886
Joined: Mon Mar 05, 2012 3:26 pm
Location: London