Lost Noob Needs Direction

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
vorkosigan
 
Posts: 4
Joined: Sun Feb 06, 2011 5:04 pm

Lost Noob Needs Direction

Post by vorkosigan »

I have a project that I am working on and I could use a little guidance since I know extremely little about the electronics side of things.

I have the Tamiya Planetary Gear box motor and I would like to be able to turn this on and off with an application on a PC. I'll probably also want a light sensor that can connect to this application as well. I will also have around 8 white leds that I will want to be controlled (all on or all off) as well. I figure this will connect to the PC using USB.

I can write a program for the PC side of things, but I know nothing about what I'll need for the electronics side of things.

1. What parts do I need so that I can make this without making it overly complicated? (I have a tendency to make things more complicated than they need to be.)
I don't really know where to begin, so I thought it would be good to have the parts I need in front of me and a rough idea and then I could search out more specific answers from there. But at this point, I don't know if I need something like an Arduino or if there are simpler ways.

2. Can I run the motor and leds off the power from the usb cable? They wouldn't need to both be on at the same time.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Lost Noob Needs Direction

Post by adafruit_support_bill »

If you just need to turn the motor on and off, a simple transistor circuit will do.
If you need to reverse the motor, you will need an H-bridge circuit, such as the one in the Adafruit Motor-Shield.
For smaller motors sometimes you can get away with using usb power, but it is really much better to use a separate supply. Motors are electrically noisy devices and have high peak current loads that can cause the the arduino to malfunction.

eventhorizon
 
Posts: 114
Joined: Tue Jan 25, 2011 6:09 pm

Re: Lost Noob Needs Direction

Post by eventhorizon »

You don't necessarily need an Arduino. You can start with an ATTINYxx coupled with an H-bridge driver and a decent voltage regulator (with big enough caps to steady out the voltage fluctuations). Try searching for V-USB on the internet and with that, you can upload the basic stuff you need for that ATTiny to interface with the USB.

uhe
 
Posts: 178
Joined: Mon Sep 03, 2007 4:50 pm

Re: Lost Noob Needs Direction

Post by uhe »

While I agree with eventhorizon that a ATtiny2313 e.g. would also do the job, a Arduino with the motor
shield is easier for getting started when you're not that much into the electronics side.

A ATtiny solution will be cheaper (if you don't count the hours) but you'll have to build all the electronics
your self. For USB you have to implement it your self in software or use a FTDI chip.

With an arduino + shield you have to pay more but you'll get a bigger microcontroller, a ready to use USB
connection and a tested motor driver. You can always use that as template to build your own solution!

As always it's time & skil vs. money ;)

User avatar
vorkosigan
 
Posts: 4
Joined: Sun Feb 06, 2011 5:04 pm

Re: Lost Noob Needs Direction

Post by vorkosigan »

I think this may be where I am having a problem. I am trying to break things down into smaller steps, but I may be thinking too far ahead on this one. I think I am trying to work through to the final product when I need to work on how it will actually work first.

I looked at the Arduino and the motor shield. I guess I want to be sure of the direction I am going before I spend the money. I think I am trying to picture how once I have used an Arduino to get my project working I would use that to make more?

Sorry... I don't think I know enough to ask the right questions. Just trying to get an idea of what I am doing before I start spending money.

Time I've got a lot of. Money, not so much. Skill... well, none at the moment but I learn quickly once I get started. ;)

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Lost Noob Needs Direction

Post by adafruit_support_bill »

If you describe what your goal is, we may be able to give more specific advice.

If you are new to the world of microcontrollers, a good place to start is with an Arduino and the tutorials. That will walk you through the basics of Arduino programming, LEDs, switches and communicating with your PC. If you buy one of the starter kits, it will have the extra components you need to complete the tutorials.

uhe
 
Posts: 178
Joined: Mon Sep 03, 2007 4:50 pm

Re: Lost Noob Needs Direction

Post by uhe »

Vorkosigan wrote:I think this may be where I am having a problem.
What is *this*?
Vorkosigan wrote:I think I am trying to work through to the final product when I need to work on how it will actually work first.
Start by drawing *the big picture* (YES, grab pen and paper and draw it!).
In the second step you can refine it with more specific information like who will drive what and which components are used.
Vorkosigan wrote:I don't think I know enough to ask the right questions.
Then you need to give more informations so that people can imagine where your problems are.
For example: what do you have and what do you want? (And yes, it matters if the motor should only turn in one direction or in both!)
As Arduwino said: If you describe what your goal is, we may be able to give more specific advice.

User avatar
vorkosigan
 
Posts: 4
Joined: Sun Feb 06, 2011 5:04 pm

Re: Lost Noob Needs Direction

Post by vorkosigan »

uhe wrote:What is *this*?
"This" would be what I said after that. Seeing a bigger picture and not breaking it down small enough.
uhe wrote:Start by drawing *the big picture* (YES, grab pen and paper and draw it!).
In the second step you can refine it with more specific information like who will drive what and which components are used.

Then you need to give more informations so that people can imagine where your problems are.
For example: what do you have and what do you want? (And yes, it matters if the motor should only turn in one direction or in both!)
As Arduwino said: If you describe what your goal is, we may be able to give more specific advice.
img001.jpg
img001.jpg (12.03 KiB) Viewed 1469 times
That's the rough idea. I'm here asking about the question mark. The motor only needs to turn in one direction. The leds are either all on or all off and they do not need to be on when the motor is running, though it doesn't matter except for power consumption if they are on when the motor is or not. The plan is to have a program on the computer (That I will write in C#) that can tell the motor when to turn on and when to turn off.

For the final product, I would want it to use only the parts that it needs and nothing more. Like I said earlier, I would love to get it to run off the power provided from usb, but if that won't work, a power adapter that plugs in to the wall will have to do.

It looks like one of the Arduino starter kits is a good way for me to go. I may just be getting a bit ahead of myself in trying to figure out how to take what I do with that and make it into a final product later. I just wanted to be more sure that that's the way to go before spending the money.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Lost Noob Needs Direction

Post by adafruit_support_bill »

Based on those requirements, the transistor circuit link from my first response should handle both the motor and the LEDs (with current limiting resistors for the leds).

The best way to go about it is to get familiar with the Arduino and use it to build your prototype.
Once you have that, you can look into stripping it down to the essential components. If you stick with the Atmega microprocessor, you will be able to re-use the code.

User avatar
vorkosigan
 
Posts: 4
Joined: Sun Feb 06, 2011 5:04 pm

Re: Lost Noob Needs Direction

Post by vorkosigan »

Thanks all. :)
I'll get one of the Arduino kits and play around with that then.

uhe
 
Posts: 178
Joined: Mon Sep 03, 2007 4:50 pm

Re: Lost Noob Needs Direction

Post by uhe »

:)

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”