Author Topic: Need help with Microcontroller/Bluetooth/Programming set  (Read 6404 times)

0 Members and 1 Guest are viewing this topic.

Offline razarizviTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Need help with Microcontroller/Bluetooth/Programming set
« on: March 06, 2007, 12:12:37 PM »
 Hi All,

I am working on a device and I would greatly appreciate some guidance. The device needs to have 4 small motors (12v dc), a vibrator (like in cell phone), a weighing mechanism (<5 ounces), and an electromagnet. The device should be able to accept commands wirelessly from the PC and return back status information (e.g. execution completed, etc). I have programming experience (C, C#) and can work out the mechanical parts but am a newbie in electronics.

Can someone please help me figure out what is the best way to go about this. How do I find:
- the right generic microcontroller that works with 4 motors, vibrator, electromagnet, weighing device.
- the bluetooth components for communication
- the programming toolkits

Is there a good tutorial out there that goes through these steps. Will appreciate help.

Thanks,
Raza

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: Need help with Microcontroller/Bluetooth/Programming set
« Reply #1 on: March 06, 2007, 04:03:03 PM »
hey,
so the first thing i suggest you do is research a microcontroller platform.
the most 2 widely used microcontroller families are Atmel's AVR and Microchip's PIC.
most beginners start with a pre made project board using one of these 2.
everyone has their favorate but here's 2 to get you thinking:
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3146
http://www.parallax.com/html_pages/products/basicstamps/basic_stamps.asp
as you allready have a background in C i'd say the Atmel link would be of the most interest to you.
any pre made microcontroller board should have some sort of documentation about it's programming environment. many are open source.

now for the motors you are going to need some sort of motor controller.
a motor will draw too much current for a microcontroler to power directly.
for small projects one option is to use radiocontroll model servos. these contain all the electronics you need to drive the motor in a handy little package.
http://www.societyofrobots.com/actuators_servos.shtml
for larger motors you are going to need to make or buy a motor controller. what you need will depend on what sort of motor you want to drive. the critical thing you want to compair between a motor and a motor controller is voltave and the motor's stall current.
http://www.active-robots.com/products/motorcon/

controlling an electromagnet will have similar problems to controlling a motor. a full motor controller would be over kill but a MOSFET would do the job.
http://www.societyofrobots.com/electronics_advanced_components_tutorial.shtml#mosfet

for bluetooth you will want some sort of bluetooth module which you will connect to your microcontrollers UART (serial port).
Admin did a writeup here:
http://www.societyofrobots.com/electronics_bluetooth_robot.shtml
and another from some other guy:
http://www.sparkfun.com/commerce/present.php?p=Bluetooth%20Primer

what else was on your list?
vibrator. i once saw a mobile phone vibrators for sale. maybe you can find one of those. or use a motor with an off center weight.
weighing device. no idea on that one.

out of interest, what are you building?

hope this gives you some starting points.

dunk.
« Last Edit: March 06, 2007, 04:04:21 PM by dunk »

Offline razarizviTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Re: Need help with Microcontroller/Bluetooth/Programming set
« Reply #2 on: March 06, 2007, 05:15:52 PM »
Thanks for the detailed explanation.

I was hoping this whole exercise would be something like the lego mindstorms kit with a chip and 4 motors and sensors sticking out like medusa's head and all i have to do would be to write a few lines of code ...  but this is like going back to school all over again  :'(   Nonetheless, I'll see the project through.

This might sound silly but I'm making a cat food dispenser so I can monitor how much he's eating, get pics/snapshots, etc when we're away from home. That way we can go to our website and see a log of how much he has eaten along with his meal time snapshots.  ::)

This is what I understood from your suggestions..

- I need to get the AVR Butterfly (~$20) that will work as the microcontroller
- I need actuator-servos for the motor. Not clear with this one. The description on your link says that the servos are not used for 360 degree rotation but for precision movement. So is that not a problem since I need my motors to rotate for X number of seconds each clockwise and then counterclockwise for a fixed period of time. Also, for four 12v dc motors, do you suggest I get 4 servos or 1 motor controller? In some pictures servos are shown as chips and others as motors. So can you please recommend a particular product. I already have a bunch of 12v motors.
- For the electromagnet, is there not a prebuilt device that I can stick to the microcontroller? What specification mosfat would you recommend?

Thanks for all your help,
Raza

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: Need help with Microcontroller/Bluetooth/Programming set
« Reply #3 on: March 07, 2007, 03:51:45 AM »
Quote
Thanks for the detailed explanation.
your welcome.

Quote
I was hoping this whole exercise would be something like the Lego mindstorms kit with a chip
that's the reason i suggested those 2 controllers boards. they are about as close as you get. (without buying a Lego mind storms set...)

Quote
- I need to get the AVR Butterfly (~$20) that will work as the microcontroller

so there are lots of other boards based on the AVR out there. i only suggested the butterfly because you can get it with a nice book that will give you a running start.
http://www.amazon.com/gp/product/customer-reviews/0976682206/sr=8-1/qid=1173259607/ref=cm_cr_dp_pt/103-4126969-3787050?ie=UTF8&n=283155&s=books&qid=1173259607&sr=8-1
i have little experience with preassembled microcontroller boards because i always make my own.
anyone else out there got any other recommendations on beginner friendly boards?

Quote
- I need actuator-servos for the motor. Not clear with this one. The description on your link says that the servos are not used for 360 degree rotation but for precision movement. So is that not a problem since I need my motors to rotate for X number of seconds each clockwise and then counterclockwise for a fixed period of time.
so hobby servos are little packages that contain motor, gearing and controll electronics. the end result is a package that you can move an arm on the top through either 90 degrees (or 180 degrees depending on the servo model) or anywhere in between.
these are used for steering in model cars or moving controll surfaces on model aeroplanes.
if you want a small motor that continuously rotates on demand it is possible to modify a servo. it involves breaking it open and removing/cutting a few components. (do a search for "hack servo".) the result is a servo that you can controll the speed it rotates of instead of controlling the exact position.
Quote
In some pictures servos are shown as chips and others as motors.
the chips will probably be servo controllers.
a servo is the motor, gearing and controller all in a little black casing.

i'd recommend starting with just the microcontroller. as you read and learn about programming it a lot of your questions about the other components and how to connect them will reveal them selves.
i can guarantee if you go out and purchase all the components at the start, your plan will change and many of them will go unused.

dunk.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Need help with Microcontroller/Bluetooth/Programming set
« Reply #4 on: March 07, 2007, 10:12:55 PM »
for the weighing device, you will need a force sensor or load cell. unfortunately force sensors are typically fairly expensive and require additional external support circuitry. there are ways to make them, too, but i havnt done it myself. depends on your required precision. basically you want a device that outputs X voltage given a certain compression from Y weight.

the Wiring Board is another microcontroller that looks easy but ive never used it before (it uses AVR, too)

as for electromagnets, they are a pain and dont have much force. they just suck up battery power and overheat in my experience. my recommendation is to find another solution for that :P

to get a servo to rotate continuously, you would want to modify it:
http://www.societyofrobots.com/actuators_modifyservo.shtml
(but you lose position control if you modify it)

the cheapest servo you can get is the HS-311 for about $9. its a great deal considering it comes with a built in motor controller. ok there are actually cheaper ones, but they are tiny micro servos that dont have much torque . . .
« Last Edit: March 07, 2007, 10:17:06 PM by Admin »

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
    • Jon's Place

 


Get Your Ad Here

data_list