Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: BuddingContraptionist on October 09, 2008, 05:24:50 PM

Title: check out my first-time attempt:
Post by: BuddingContraptionist on October 09, 2008, 05:24:50 PM
alright so i bought an Axon and these three things (1 (http://www.robotshop.ca/home/products/robot-parts/sensors/accelerometer-gyro-imu/sensors-accelerometers/dimension-engineering-de-accm3d.html), 2 (http://www.robotshop.ca/home/products/robot-parts/motors/servo-motors/hitec-servo-en/hitec-hs-322hd-servo.html), 3 (http://www.robotshop.ca/home/products/robot-parts/sensors/ultrasonic-range-finders/srf02-ultrasonic-range-finder.html)).  I bought 2 6v 1400 mah NiMh batteries, and they each came with 2 connectors, one tamiya for the kyosho charger and one hitec (universal).

I'm charging one of the battery packs now, i understand it takes like 10-15 hours?  so I'll leave that on until tomorrow.  My plan is to first attach the battery to the axon through the switch, burn code on it (i'm comfortable with that part), then plug the servo on to the board like i saw in that one demo video (the unfiltered headers, on the sides).  This is because the servo is the only one that came with a wire attached to it; if i have to solder wires to the accelerometer and range finder, do i want to use "servo wire"? And I've read that I should use one power source for my microcontroller, and another for my servos/motors.  Do i have to do that with this one servo?  And how would I even use a different power source for the servo than the one powering the microcontroller?

All I want to do for now is play with these 3 things; I want to get data from the sensors (and print it out to a serial port), and i want to control the servo.
Title: Re: check out my first-time attempt:
Post by: dsheller on October 10, 2008, 02:06:13 AM
You definitely don't want to solder wires to your parts like that. Look in the main site for molex connectors, you want to build something like those. Make sure you get stranded wire for the connectors, solid core is not as flexible and will break very easily if strained in the same area repeatedly. You're going to need a way to crimp the molex fits onto the wire... personally I use a pair of needle nose pliers and some patience, but they sell crimpers that do the job as well.
Title: Re: check out my first-time attempt:
Post by: BuddingContraptionist on October 10, 2008, 07:40:31 AM
Really?  If you look at the 3rd thing (ultrasonic range finder) and scroll down, you can see they have it soldered to another board via those breakapart pins.  Why do you say not to solder them?  And molex connectors?  I found this page (http://www.tech-faq.com/molex-connectors.shtml), (and the wikipedia entry on molex connectors), and that doesn't seem to be what you're talking about...
Title: Re: check out my first-time attempt:
Post by: BuddingContraptionist on October 10, 2008, 12:43:35 PM
anyone have any thoughts on the remainder of my questions.

Do I need a separate power source for my MCU and my servos/motors?
How would I even use a different power source for the servo than the one powering the microcontroller?
Title: Re: check out my first-time attempt:
Post by: Trumpkin on October 10, 2008, 01:47:42 PM
What dsheller means by molex connector is male header.
Title: Re: check out my first-time attempt:
Post by: BuddingContraptionist on October 11, 2008, 04:12:50 PM
i have 22 gauge wire, where can I get just the individual male/female pin headers? Like the individual female casing, or the male pin that i crimp onto the wire?  i cant find that when i search...
Title: Re: check out my first-time attempt:
Post by: gamefreak on October 11, 2008, 05:23:53 PM
Im fairly certain that the Axon does not have the ability to have seperate batteries for the motors and sensors. If you are only using servos you dont need to worry about it, and if you are using motors you should be using a motor controller, which takes a pwm signal anyway.
Title: Re: check out my first-time attempt:
Post by: ArcMan on October 11, 2008, 08:19:21 PM
i have 22 gauge wire, where can I get just the individual male/female pin headers? Like the individual female casing, or the male pin that i crimp onto the wire?  i cant find that when i search...

Newark Electronics, Mouser Electronics, Digi-key, etc.
Title: Re: check out my first-time attempt:
Post by: BuddingContraptionist on October 11, 2008, 08:30:54 PM
 :-\ i don't know what i'm looking for.  these are excellent sites, but i don't even know what category they'd be in.  wire & cable?  accessories?  could you throw me a link?
Title: Re: check out my first-time attempt:
Post by: Trumpkin on October 11, 2008, 08:32:23 PM
http://www.servocity.com/html/servo_connectors___pins.html
Title: Re: check out my first-time attempt:
Post by: BuddingContraptionist on October 11, 2008, 08:45:25 PM
cool thanks!
Title: Re: check out my first-time attempt:
Post by: Admin on October 15, 2008, 07:09:46 AM
This is how I connect stuff:
http://www.societyofrobots.com/electronics_wire_connector.shtml

Don't worry, a single battery will work fine with the servos.
Title: Re: check out my first-time attempt:
Post by: BuddingContraptionist on October 16, 2008, 09:49:44 PM
is there any place i can buy the individual female/male pins in bulk for cheap?  or do i have to buy a bunch of full connector housings and whatnot with it each time?  (like from the link in Trumpkin's post, which i got and that's exactly what i wanted thanks)  ... (like this...? (http://www.mcmelectronics.com/product/WALDOM-ELECTRONICS-02-09-1119-/28-9410)  (that's the same size right?)

and as for the separate power question, what if I wanted to control 12+ servos at once?  Would I maybe want to have a dedicated, "slower" mcu that is dedicated to timing/controlling the servos, with perhaps a serial interface to the main mcu to actually process the information and issue commands?  2 power sources?
Title: Re: check out my first-time attempt:
Post by: Admin on October 16, 2008, 10:26:21 PM
Mouser and Digikey sell them in bulk, and give discounts (listed on the product pages) depending on quantity.

Buy enough for 100 of them, will last you a long time, and will probably save you 50% too.

Quote
and as for the separate power question, what if I wanted to control 12+ servos at once?  Would I maybe want to have a dedicated, "slower" mcu that is dedicated to timing/controlling the servos, with perhaps a serial interface to the main mcu to actually process the information and issue commands?  2 power sources?

12 servos, average 1.5ms each, commanded about 5 times per second = 90 ms, or 9% CPU time

Unless you are doing something processor intensive, that 90 ms really won't be noticeable.

If it was a problem, you can set up interrupts to control your servos, freeing up your Axon to do other stuff while waiting for the servo. I believe AVRlib uses interrupts for servos, just have a look.
Title: Re: check out my first-time attempt:
Post by: BuddingContraptionist on October 17, 2008, 09:49:05 PM
Mouser and Digikey sell them in bulk, and give discounts (listed on the product pages) depending on quantity.

Dude are the ones i linked to the correct size?  Because for the sites you gave... are these the pins im looking for? (http://mouser.com/search/Refine.aspx?N=3748020&Ns=P_SField)  Because i don't know the answers to any of those listboxes, except maybe 5v voltage rating...  But if the ones i linked to are the right size then damn thats way easier
Title: Re: check out my first-time attempt:
Post by: Trumpkin on October 20, 2008, 08:33:35 AM
They may not be, they look like the kind used in computer connecters. After some searching I found this http://www.hansenhobbies.com/products/connectors/connectors/
Title: Re: check out my first-time attempt:
Post by: Admin on October 23, 2008, 07:26:58 AM
BuddingContraptionist, your last link doesn't link to any particular pin.

I recommend just using the pins we already linked to. To see if they are the correct size, look at the datasheets for the ones already linked, and compare to the datasheets of the one you find. You should see measurements given.