Page 1 of 5 12345 LastLast
Results 1 to 10 of 46

Thread: Cheapest MC that fulfills my needs?

  1. Cheapest MC that fulfills my needs?

    Hi,

    What is the cheapest MC that could be used to hold a program to control 1 motor, 2 servos, 2 IR or light sensors, 1 accelerometer, and 1 other sensor, so 3 out and 4 input. This is for a swarm bot, so nothing sophisticated is needed beyond this. Also, the smaller the better, I have a board to communicate through serial so it doesn't need to be on each chip.

    Thanks

  2. #2
    Join Date
    Apr 2008
    Location
    Sacramento, CA, USA Area
    Posts
    5,341
    Rep Power
    173

    Re: Cheapest MC that fulfills my needs?

    Inadequate info. What kind of motor? I'm not aware of any microcontroller that has a motor controller. You'd need a board that has a microcontroller + a motor controller - or an external motor controller that the micro can talk to.
    I Void Warranties´┐Ż

  3. #3
    Join Date
    Nov 2007
    Posts
    397
    Images
    71
    Rep Power
    49

    Re: Cheapest MC that fulfills my needs?

    Get a boarduino, and a motor controller. That should be good enough.

  4. Re: Cheapest MC that fulfills my needs?

    Is there anything cheaper or anywhere I could get the parts necessary for around $10, especially if I go a direct solder route? I am shooting for a unit price of the entire bot at $20, $33 tops. Perhaps certain items on ebay that would be good for stripping for parts?

    Edit: If I just get an ATmega168, would I be able to make what I need? What do I need for a motor controller?
    Last edited by Firestorm65; 03-03-2009 at 09:31 PM.

  5. #5
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    94

    Re: Cheapest MC that fulfills my needs?

    Look for the Lego NXT brick. It can control lego servos, and with some bread boarding can support standard servos. You can also hack the cables to control standard motors. Not sure how cheap you can get an NXT brick for though. If you starting from scratch, and own nothing then $33 would be a stretch...

    Depending on the strength needed in the motors you could use continuous rotation servos...or hacked standard servos and mount your own wheels...check out MG995s...you can pick them up for under $10 a piece...which would put you over your limit...

    OK...I'll stop now.

    DB

  6. #6
    Join Date
    Apr 2008
    Location
    Sacramento, CA, USA Area
    Posts
    5,341
    Rep Power
    173

    Re: Cheapest MC that fulfills my needs?

    Unless you're doing very large volumes, I think you'll have problems meeting that goal.

    Sure - you could go with the ATMega168 - but you've still neglected to tell us what size motor you're looking at. Voltage, current draw, ... ? That effects what you need for driver transistors.

    Plan on more than half of your goal price just going to print the board. Processor and discreet parts will be another half of your goal price. Motor and servos will exceed your entire goal price. Wheels probably half your goal price again. What are you going to mount it on? Plan on half your goal price there.

    As you can see - that's not terribly realistic unless you're building at least 5000 unit quantity.
    I Void Warranties´┐Ż

  7. #7
    Join Date
    May 2008
    Posts
    2,228
    Images
    155
    Rep Power
    124

    Re: Cheapest MC that fulfills my needs?

    Quote Originally Posted by Firestorm65 View Post
    Hi,

    What is the cheapest MC that could be used to hold a program to control 1 motor, 2 servos, 2 IR or light sensors, 1 accelerometer, and 1 other sensor, so 3 out and 4 input. This is for a swarm bot, so nothing sophisticated is needed beyond this. Also, the smaller the better, I have a board to communicate through serial so it doesn't need to be on each chip.

    Is there anything cheaper or anywhere I could get the parts necessary for around $10, especially if I go a direct solder route? I am shooting for a unit price of the entire bot at $20, $33 tops. Perhaps certain items on ebay that would be good for stripping for parts?

    Edit: If I just get an ATmega168, would I be able to make what I need? What do I need for a motor controller?
    Have you sourced motors/wheels yet? I find the drivetrain of small robots typically cost 1-2x as much as the controller. For something about 4x4" these would be great : http://www.solarbotics.com/products/gmpw_deal/ but you will be at $16 in drivetrain. For something 2.5x2.5" or so, http://www.solarbotics.com/products/gm10w_deal/ but even more expensive, $20 for drivetrain. Either could be driven by a SN754410 quad-half-h-bridge (read: dual motor driver), Digikey sells them for about $1.65 (qty 10 i believe). If you don't want to add the cost of a 7404, you have to either do some funky code to use 4-IO-lines (see my SVN server for examples) or use 6 with simpler code. 2x motor = 1-bit timer/counter + 2 PWM channels.

    2x servos = 1x16-bit timer/counter + 2 PWM (assuming we dont want to generate the pulses in software... which we probably almost certainly don't). Also note, cheap micro servos will run at least $5 each and more likely $10 for something that won't explode. Servos are also gonna constrain your choices for clock sources, external crystal adds 0.50$ to a dollar.

    Accelerometer... this can be tricky.. cost is probably gonna be $20-30, and interfaces range from I2C to SPI. On the mega168, the I2C is on analog pins, so you lose 2/6 analog pins. 2x light sensor = 2xAnalog. 1 other sensor... what kind? I'm guessing a sharp IR/something else analog.. note price.. but also note there goes an analog. All of these sensors are gonna cost money, I typically figure a small wandering bot uses sensors = 2x drivetrain in cost (4x controller costs). Specialized sensors (fire fighting, more accurate localization, etc) can easily kill this rule...

    So that means our micro needs I2C/SPI + 3channels of ADC (watch out, if I2C is on ADC ports, need a 6 port ADC), and one 8-bit and one 16-bit timer, each with 2 PWM. I think the ATTINY48 could do what you want.. but note it only has 4K of ROM, 256 ram... but its only 1.36$ QTY25 from Digi.

    Remember, you're still gonna need a programmer (AVRISP2 or similar), plus headers for ISP. Swarms typically require communication between them.... note that the Tiny48/88 lacks a standard serial port, which brings you back to the mega168. And what exactly are you gonna use for communication, XBEE, or some other serial device?

    -Fergs

  8. Re: Cheapest MC that fulfills my needs?

    So it is a GEV, aka a WIG etc. that will be randomly searching for something, let's say a cell signal for now. (plans have changed slightly) It will fly around avoid obstacles until it finds what it's looking for. Plans call for a converted balsa wood rubberband wingship with two motorized propellers for steering and propulsion, two IR rangefinders at 45 degrees off the nose in each direction, and one "main" sensor for whatever it's looking for. As a WIG, it doesn't need a lot of force to stay barely aloft, with a two foot wingspan it will only be a foot off the ground. It will be balanced enough that roll and pitch are set. It will carry instructions to turn away from obstructions closer than 5 feet and that is the only search algorithm. If it finds something, it will revert to a circling pattern unless it goes out of range, that is all. Cheap and dirty, relying on numbers to cover failures. Two $3 motors should cover each drone. If I only need a $5 microcontroller, a $1 rubberband plane kit, two IR or light sensors, and one main sensor, what else is needed?

    Summing up, dump the servos for a second motor, no accelerometer, direct drive of propellers so no drive train, balsa so light and cheap, and a 6V lithium cell battery, 30 minutes would be wonderfully above expectations. What is the least I need to buy to control it, don't mind doing direct solder to MC's. Communication is simply they don't bump into each other and possibly a flashing LED in addition to the circling.

    And it is only now I realize this is probably in the wrong section, sorry about that.

    Edit: I realize I have yet again failed to provide all the necessary information in my OP; I guess I expected you to all read my mind :P
    Last edited by Firestorm65; 03-04-2009 at 01:43 AM.

  9. #9
    Join Date
    Jul 2008
    Location
    Belgium
    Posts
    633
    Images
    2
    Rep Power
    59

    Re: Cheapest MC that fulfills my needs?

    I suggest you go to either microchip.com or atmel.com with your requirements, and search the microcontroller tables for the cheapest controller that has what you need.

    For driving the motors you don't need an H-bridge since they will only need to go in one direction, a simple FET might do.
    With this size i guess you're going for something like a pager motor, so a 2n7002 (or 2 in parallel, stacked one on top of the other if needed) could do fine.

    Basically you just need some electronics, so it can be done for this budget, but this is not going to be an easy project.
    Artificial Intelligence is no match for Natural Stupidity

    "For a list of all the ways technology has failed to improve life, press three" - Alice Kahn

    Resistance is futile! (if < 1)

  10. #10
    Join Date
    May 2008
    Posts
    2,228
    Images
    155
    Rep Power
    124

    Re: Cheapest MC that fulfills my needs?

    Quote Originally Posted by Firestorm65 View Post
    So it is a GEV, aka a WIG etc. that will be randomly searching for something, let's say a cell signal for now. (plans have changed slightly) It will fly around avoid obstacles until it finds what it's looking for. Plans call for a converted balsa wood rubberband wingship with two motorized propellers for steering and propulsion, two IR rangefinders at 45 degrees off the nose in each direction, and one "main" sensor for whatever it's looking for. As a WIG, it doesn't need a lot of force to stay barely aloft, with a two foot wingspan it will only be a foot off the ground. It will be balanced enough that roll and pitch are set. It will carry instructions to turn away from obstructions closer than 5 feet and that is the only search algorithm. If it finds something, it will revert to a circling pattern unless it goes out of range, that is all. Cheap and dirty, relying on numbers to cover failures. Two $3 motors should cover each drone. If I only need a $5 microcontroller, a $1 rubberband plane kit, two IR or light sensors, and one main sensor, what else is needed?

    Summing up, dump the servos for a second motor, no accelerometer, direct drive of propellers so no drive train, balsa so light and cheap, and a 6V lithium cell battery, 30 minutes would be wonderfully above expectations. What is the least I need to buy to control it, don't mind doing direct solder to MC's. Communication is simply they don't bump into each other and possibly a flashing LED in addition to the circling.

    And it is only now I realize this is probably in the wrong section, sorry about that.

    Edit: I realize I have yet again failed to provide all the necessary information in my OP; I guess I expected you to all read my mind :P
    I feel like the physics of this might be off. I'm by no means an expert on airpfoil design, but I feel like a "rubberband airplane kits" don't actually have any aero lift from their wing airfoil, the idea is that they just fall slowly due to light weight and because they go fast forwards they look like they go a long ways. If you can't generate any aero lift off the wings, you can't hold your altitude.

    The next issue is "balanced enough that roll and pitch are set". Correct me if I'm wrong, but it seems this is infeasible. Without pitch feedback (via tilt switches or more likely an accelerometer) you can't possibly hope to keep your altitude... as battery voltage drops, the motor speed will too, until the plane falls out of the sky...

    -Fergs

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •