Breaking News
Blog

My Arduino Robot Bites the Dust! Oh, the Horror…

NO RATINGS
1 saves
View Comments: Newest First | Oldest First | Threaded View
<<   <   Page 2 / 7   >   >>
salbayeng
User Rank
Rookie
using magnets for feedback
salbayeng   10/27/2013 5:29:22 AM
NO RATINGS
Hi MAx.

I've used magnets on at least 3 actuator projects .

----------------------------------------

Austria Microsystems make a good range of encoder chips & magnets, although some of the SMD packages are a bit small.

http://www.ams.com/eng/Products/Magnetic-Position-Sensors 

These typically resolve the position of the magnet to at least 256counts , and usually use I2C or similar. You can daisy chain the chips with SPI too. These are good, but can be finicky about spacing above the magnet.

This magnet could go on the wheel.

----

Alternatively if you use a 2pole magnet, you can use a magnetic compass chip, and this can be about 10mm away from the magnet, which might help in your geometry, I've used a magnetic compass chip this way, as a proof of concept for retrofitting the Austria Microsystem chips as an upgrade to reed switches.

-----------------

Off the shelf linear actuators almost always use a 2pole to 6pole ring magnet attached to the motor or a gear shaft with a screw through the middle. And then standard hall effect switches. 

---------------

Note if making your own , you must use "Latching" hall effect sensors

---------------

I also did a batch of about 100 of gluing encoders to the back of a gear motor,

(insert picture here???? the upload image from computer button has dissappeared?)

 

This had a 4mm stub shaft sticking out the back of the motor. You take a "Diametrically polarised" disc magnet (about 5mm across) ,  pick it up with bamboo tweezers put a pinhead of polyurethane on the magnet, then place it on the slowly rotating motor shaft, give it a nudge with the tweezers and it will centralise. You then put two half-pea sized globs on the PCB and push it onto the rear of the motor, and secure with a rubber band while the PU sets. The power is on all the time, so you should see both LED's flashing.

These don't usually work on the type of gearmotor you have there, as the motor shaft is flush on this motor style.

---------

You can just take some of the 3 leaded Hall effects, solder them to a bit of veroboard, and glue this on the motor, The magnet/hall effect combo is quite tolerant of positioning. (Unlike slotted disk optos)

-----------

Ok Doing the Quad encoder in Firmware

(a) There is a booby trap in the way Atmel do the pin change interrupts, while you can get a pin chnage interrupt on every single pin, in practice there are only 4 pin change interrupts, one for each port, i.e. A , B,C,D. So you must hook up the "A" channel of your first motor to say any of the A pins, and the "B" channel of your second motor to say any of the B pins, and the third one to any "C" pin. The "B" encoder channels can go aon any pin.

(b) The PCI is set up to go off for any change on hall effect A , so all the ISR has to do is add one if hall effect A and B are both the same , or subtract one if different. 

Here is some sample code:

 

Ew_pulse_isr:
       If Ew_quad_b = Ew_quad_a
              Then Ew_position_long = Ew_position_long - Ew_step_long
              Else Ew_position_long = Ew_position_long + Ew_step_long
Return

 

Note you also get a free "multiply by scaling factor" thrown into the above!

in my case Ew_position_long is a fixed point representation, where the top 16bits are the sun angle in minutes, and the bottom sixteen are the fraction, (so you just map the top 16 bits as an integer and ignore the fraction) the scale factor is embedded in  Ew_step_long which equals 8509 with my particular gearing, this is basically a fraction i.e.  8509/65536 = 1/7.7019 , so in my case I move 1 minute (= 1/4 of a degree) with 7.7 counts , and as there are two counts per revolution, this is nearly 4 turns on the motor. 

Have fun!

Crusty1
User Rank
CEO
Re: PCB lazer plotter
Crusty1   10/27/2013 4:28:31 AM
NO RATINGS
@David, Yes a limited bed size, but as a test bed for the idea it has everything going for it. Even the ability to put in the drill holes.

And it will also fit on my lathe and vertical drill so I get the best of both worlds if the idea is a failure. As luck would have it my Kistarter backing for Microduino presents me with a Microduino stepper kit for 3D printing, so the table can also work for small part printing.

I shall order the table today and wait for all the other bits to come together. Looks like much of the glue circuits will be on Veroboard which is always my fall back PCB.

Thinking about it, I can always put the table to work as a micro milling cutter and mill some circuit boards straight from the copper.

Will try everthing out with and up down fibre pen and paper before moving to a board.

I can see that this is going to turn into a Crusty Bits blog at some stage. Watch out Max!

Life got hectic when I started to rebuild my old UK101 in an FPGA, little did I think I would be looking at home PCB manufacture.

 

Douglas.Butler
User Rank
Rookie
Re:Robot Movement feedback
Douglas.Butler   10/26/2013 9:59:30 PM
NO RATINGS
A relay lens is a lens or lens set that replicates an image on a different imaging plane with little or no modification.  http://en.wikipedia.org/wiki/Relay_lens  A borescope is an extreme example.

In this case a double convex lens can focus the floor on the optical mouse chip without having the chip too close to the floor.  I once built a sensor to track the slimey encrusted bottom of a ship for a ship hull inspection robot where the lens also sealed against seawater and provided a 3:1 optical motion reduction so the robot could go faster than the mouse wanted to track.  The robot wheels tended to slide on the hull but the optical tracker could track without touching.

Duane Benson
User Rank
Blogger
Re: What does "Torque: 0.78Kg-cm (rated load)" mean?
Duane Benson   10/26/2013 9:15:19 PM
NO RATINGS
David - re "how to squeal without offending"

Motor drivers (mostly higher powered than Max is using) can emit a pretty harsh squeel at the wrong PWM frequency. Give the subject, I'd suggest squeeling like a motor driver.

Duane Benson
User Rank
Blogger
Re:Robot Movement feedback
Duane Benson   10/26/2013 9:10:54 PM
NO RATINGS
Douglas - re: "a pair of optical mice for movement feedback"

That's quite clever. I hadn't thought about something like that. I certainly have a few old mice that don't get any use any more.

Susan Rambo
User Rank
Blogger
Re: What does "Torque: 0.78Kg-cm (rated load)" mean?
Susan Rambo   10/26/2013 6:06:59 PM
NO RATINGS
Hi David: LOL. The pig did cross my mind.  (As in male-chauvinist...ha ha.. I could not resist that one.) I don't want to distract from the topic anymore, but I'm just saying that school boys can squeal as much as girls, and some of them even have higher voices for a time. And yes there are usually electronics involved when boys squeal. (I know...I gave a coworker an Enocean energy harvesting dev kit.  She came back the next day and said her teenaged son squealed and didn't want to go to the concert or sports event that night with his dad. He wanted to stay home and tinker with the dev kit.)

Max The Magnificent
User Rank
Blogger
Re: What does "Torque: 0.78Kg-cm (rated load)" mean?
Max The Magnificent   10/26/2013 5:50:49 PM
NO RATINGS
@David: Now there's a conundrum: how to squeal without offending Susan??

Start practicing and we'll see how well you do when you cme to EE Live! 2014

That reminds me of the old Zen thing... "If a man says something in the middle of the forest and there is no woman around to hear him, is he still wrong?" LOL

Max The Magnificent
User Rank
Blogger
Re: What does "Torque: 0.78Kg-cm (rated load)" mean?
Max The Magnificent   10/26/2013 5:47:39 PM
NO RATINGS
@Susan: As a former schoolgirl, I resent your implication.

Are you saying that you never once squealed when you were a schoolgirl? Although it's a long time now since I was at school, I seem to recall that squealing was regarded as being obligatory LOL

Max The Magnificent
User Rank
Blogger
Re:Robot Movement feedback
Max The Magnificent   10/26/2013 5:44:44 PM
NO RATINGS
@Douglas: For a three wheel robot like that, especially running on carpet, I prefer to use a pair of optical mice for movement feedback.  It is better if you can use a relay lens to space the mouse sensor up from the floor a little.

Tell me more (like whats a "relay lens") -- can you email me at max.maxfield@ubm.com?

 

Max The Magnificent
User Rank
Blogger
Re: What does "Torque: 0.78Kg-cm (rated load)" mean?
Max The Magnificent   10/26/2013 5:42:24 PM
NO RATINGS
@David: And I seem to remember you were going to have an on-board accellerometer?


Yup -- also gyroscopic sensors and a magnetometer. Also ultrasonic range sensors. However, talking to Adam (Aeroengineer) yesterday, he pointed out that untrasonic measurements can be affected by temperature and humitidy, so I'm going to have to have those sensors also. Since this is just a platform for me to play with, I'm going to load it with sensors and then get the robot to use whatever is most appropriate for what it's trying to do at the time (mostly this will involve sneaking up behind the dog and then making a loud noise :-)

<<   <   Page 2 / 7   >   >>
Most Recent Comments
HitheshM500
 
NIRANKUSH456
 
NIRANKUSH456
 
David Ashton
 
Rich Krajewski
 
sranje
 
MeasurementBlues
 
MeasurementBlues
 
Sanjib.A
Flash Poll
Radio
LATEST ARCHIVED BROADCAST
Join our online Radio Show on Friday 11th July starting at 2:00pm Eastern, when EETimes editor of all things fun and interesting, Max Maxfield, and embedded systems expert, Jack Ganssle, will debate as to just what is, and is not, and embedded system.
Like Us on Facebook

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
EE Times on Twitter
EE Times Twitter Feed
Top Comments of the Week