Go to Post Paul Copioli - A guy who is 13 years older than me, but acts about 13 years younger. - Amanda Morrison [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-05-2008, 01:40
Browzilla Browzilla is offline
Fearless Leader
AKA: David Vriezen
FRC #2530 (Team Inconceivable)
Team Role: Electrical
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Rochester, MN
Posts: 57
Browzilla is on a distinguished road
Send a message via AIM to Browzilla Send a message via MSN to Browzilla
Selecting a microcontroller

I'm planning a project and need to select a microcontroller. This being my first experience with microcontrollers outside of FIRST, I'm relatively in the dark as to what exactly I need.

My project needs to control 6 devices drawing 20mA each. Due to my plans, each'll have to be on a different I/O pin.

Can someone explain or help me find an appropriate microcontroller?

Features I'd like:
Cheap. I'm hoping to make a few of these projects up for teammates.

Low cost-of-entry. I don't want to have to spend tons of money on software or cables and such.

Preferably programmed in C, C++, or BASIC. I could learn something else if I had to, but this would be easiest for me.

Preferably USB interface, not serial.

I use a Mac, so if whatever software I need for this is available for Mac, that'd be ideal. That said, I could pull out the old Windows box if I needed. OS X would be nice, but low priority.
  #2   Spotlight this post!  
Unread 20-05-2008, 02:45
dtengineering's Avatar
dtengineering dtengineering is offline
Teaching Teachers to Teach Tech
AKA: Jason Brett
no team (British Columbia FRC teams)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Vancouver, BC
Posts: 1,831
dtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond repute
Re: Selecting a microcontroller

Well, I'm a bit biased here because most of my chip-level work with uC's has been with the PIC 16F series of chips, and for a couple bucks each (they'll even ship you a couple demos for free if you ask nicely) the PIC16F627A would be a good place to start (yes, you can get more advanced PICs for about the same price... but I've worked with the 627A a lot, and it just springs to mind first.)

There is a free C compiler available, PICC Lite, although I don't know if it will work on a Mac. PIC Basic Pro is also a very luxurious language for compiling to the PIC... it has all sorts of easy to use routines, but does cost a couple hundred dollars. The programmers can be whipped up on a breadboard if you want to use a PC parallel connection, but you can also buy them either assembled or as kits for less than $100. And I think you can even get a USB programmer for less than $100.

We've been using them for years with my engineering 11 students and while I found the 16F84A tended to be even more resistant to damage (one even kept working after a student put it in backwards, shorting it out so I burned my finger on it when I touched it!), the 16f627a has been pretty good, too, and is dirt cheap to boot. I don't mind throwing one or two out when students toast them. (But don't tell the student's that, or they'll stop believing my "be more careful" theatrics.) Besides, with the internal oscillator you don't need a crystal, or anything other than a +5V and GND to get your chip up and running. It makes for very simple circuit boards! You will be stressing it a bit if you put all 20mA draws on the same port and turn them all on and leave them on for a long time, but it should be able to handle it.... and if you are worried just put three on PortA and three on PortB.

An added benefit is that you should find lots of MPLab and PIC machine level expertise on this forum as PIC chips have powered the FRC control system since... well... since longer than I know of... and continue to run the VEX robotics platform.

Jason
  #3   Spotlight this post!  
Unread 20-05-2008, 10:01
whitetiger0990's Avatar
whitetiger0990 whitetiger0990 is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Earth
Posts: 157
whitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of light
Re: Selecting a microcontroller

Arduinos are fun. Not sure if it's fit for your project, but it's incredibly cheap for what it can do. I have a Boarduino myself
__________________
print$q=chr(ord($q)+$1)while("7443-0201-8465130105-12-03135-82482113-06-7672-070208-0613-70"=~/(-?\d\d)/g);
  #4   Spotlight this post!  
Unread 20-05-2008, 10:09
Binome's Avatar
Binome Binome is offline
Programmer/Electronics/CAD
AKA: Patrick
FRC #2273 (SHIM)
Team Role: Leadership
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Surrey,BC
Posts: 105
Binome is a glorious beacon of lightBinome is a glorious beacon of lightBinome is a glorious beacon of lightBinome is a glorious beacon of lightBinome is a glorious beacon of light
Re: Selecting a microcontroller

Well, if your into having usb connectivity and a nice selection of languges the microchip pic 18f2550/4550 series is pretty nice. They can run a USB bootloader, use minimal external components(a resonator and a couple of caps), and there are BASIC(picbasic/picbasic pro) and C(c18 student edition) compilers.

A good cheap programmer is the Pickit 2 from microchip, at around $35 its a steal for a high voltage programmer.

Now, if you have newer mac boxes, bootcamp might be your option because pretty much everything for pic development is windows only.

Last edited by Binome : 20-05-2008 at 10:11.
  #5   Spotlight this post!  
Unread 20-05-2008, 11:16
Stuart's Avatar
Stuart Stuart is offline
#include coffee.h
FRC #1745 (P51- Mustangs)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Dallas, TX
Posts: 414
Stuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond repute
Send a message via AIM to Stuart
Re: Selecting a microcontroller

Well if you want something easy that you wont have to build alot of stuff just to get start doing things. I would suggest a Propeller chip. great chip cheep(20$for a proto board), powerful(8 cores), and the object exchange makes using this chip really easy because most things you would want to hook this thing up with has a class written for it.
__________________
Proud mentor of Team #1745 the P-51 Mustangs

If at first it doesn't work, use a hammer.
If that doesn't work, use a bigger hammer.
  #6   Spotlight this post!  
Unread 20-05-2008, 14:22
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,393
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: Selecting a microcontroller

I'm also a big fan of the PIC family, they are easy to use, there are 1000's of example circuits, programming books, development systems, etc. Myke Predko has a number of good PIC books. If you are just starting out I'd suggest 123 PIC Microcontroller Experiments for the Evil Genius as a way to learn both the programming and electronic side. One of his books comes with a circuit board to give you a head start.

Parallax's propeller is a good choice, as is their Basic Stamp chip family. Once again, like the PIC there are a number of good development systems to use.

Another program in Basic chip is the BasicX-24 microIt has a very good development tool. It's PC based, so that may be an annoyance for you. Robodyssey sells a very nice support board (and the chip) along with a great programming and robotics book

My suggestion, if you are just going to do this one project, Basic Stamp. If you think you'll do some minor robotics stuff with sensors and servos, then choose BasicX. Serious micro development, go with the PIC. Advanced programming, then the Propeller chip.

Good luck!
Foster
  #7   Spotlight this post!  
Unread 20-05-2008, 17:50
Browzilla Browzilla is offline
Fearless Leader
AKA: David Vriezen
FRC #2530 (Team Inconceivable)
Team Role: Electrical
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Rochester, MN
Posts: 57
Browzilla is on a distinguished road
Send a message via AIM to Browzilla Send a message via MSN to Browzilla
Re: Selecting a microcontroller

Thanks for the links everyone.

An arduino or basic stamp all seem like probably a bit overkill for what I'd like to do.

I want to drive 6 four-lead multi-color LEDs that each draw 20mA. They all have to be controlled independently of each other. So, I should have a total current draw of 120mA, yes?

Unfortunately, I'm not sure of how to tell whether a specific chip supports it. Those PICs are looking pretty nice and cost-effective, but I can't determine which model I need.

Edit:
Apparently I missed checking out the spec-sheet on the Parallax Propeller last night.
According to the data sheet here it looks like (unless I'm reading it wrong) that the chip can put out 40mA per I/O and a total of 300mA?
Am I reading that right?

Last edited by Browzilla : 20-05-2008 at 18:11.
  #8   Spotlight this post!  
Unread 20-05-2008, 20:14
programMORT11
 
Posts: n/a
Re: Selecting a microcontroller

Did you look at any of the AVRs? AVR 32-bit MCU as a chip probably could do what you want, and I think that most of Atmel's boards are available for integration with it.
  #9   Spotlight this post!  
Unread 20-05-2008, 20:25
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,011
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Selecting a microcontroller

Don't base your chip choice on current-handling capacity. To switch an LED on or off, you can control a simple transistor (like a 2N3906, about a dime each, handles 100 mA easily) sinking just a few milliamps from the microcontroller.

If you want to control them linearly, that is, more than on or off but also 'in-between', then you can pulse them at varying duty cycles, or bias the 3906 for linear operation.

An analogy is controlling motors: we use Victors instead of the MC itself.

If it is a three-color LED (R, G, and 2xB is common), EACH of those needs 20 mA, or 80 mA per (internal) device. 6 x 80 = 480 mA.

Don
__________________

I am N2IRZ - What's your callsign?
  #10   Spotlight this post!  
Unread 21-05-2008, 17:39
dtengineering's Avatar
dtengineering dtengineering is offline
Teaching Teachers to Teach Tech
AKA: Jason Brett
no team (British Columbia FRC teams)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Vancouver, BC
Posts: 1,831
dtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond repute
Re: Selecting a microcontroller

Quote:
Originally Posted by Browzilla View Post
Those PICs are looking pretty nice and cost-effective, but I can't determine which model I need.
I originally suggested you try the 16f627A they can source/sink 200mA total with any one pin doing up to 25mA. The catch is it sounds like you are going to be hooking up 18 LEDs (six packages with three LEDs in each to achieve the multi-colour effect.) Although you can, with sufficient programming trickery using the PIC's tri-state (high, low and high-impedance) I/O capacity, run many more than 18 LED's off the PIC's 18 outputs, and can use PWM to ensure that you don't exceed the current capacity of the chip, that is hardly a fun way to start.

Now this means that you are going to be looking for a very specific set of characteristics. First of all, if you want to use the freeware PICC Lite compiler, you will be limited to the processors supported by that compiler. Secondly you will want at least 18 I/O pins. Thirdly, you would probably like to have the PIC able to handle a fair bit of current. 200mA is the maximum I have seen any PIC listed as handling, so that means that if you want to have all six "lights" go white (all 18 LED's on at the same time) you will either run each LED at about 10mA, or will need to do as Don suggests and use some transistors or else an IC capable of boosing the power output a bit. Note that uC's are not known for being a robust source of power, so being able to source/sink up to 200mA is pretty impressive for a little PIC chip.

I'm also assuming that you want to use a DIP package for "through hole" mounting, typical of a common home made circuit board or breadboard, rather than a surface-mount package.

The constraints of PICC lite are probably the most severe. Most of the chips supported by it are 18 pin chips with just 15 I/O lines... not quite enough unless you cut back to 5 tri-colour LED's. However there are some larger PICs that it supports. One possibility is the 16f917. Note that this chip only handles 90mA source/sink across all ports, so some form of amplification will be needed. Another possibility is the 16f887 or 16f877a. Note that the 877a can handle 200mA, so the idea of running all 18 LEDs at 10mA without external amplification is possible on this chip... but it costs a bit more.

What I would suggest is picking a few PICs that might work out okay, then going to www.microchip.com and finding the "sample" button in the middle of the screen and asking them to send you a couple samples that you can try out.

And while you are at it, perhaps someone reading this thread who is familiar with a broader range of IC's might be able to suggest a buffer or opto-isolator or similar chip that would be capable of driving 18 LED lines at 20mA each so that you wouldn't need an individual transistor for each line.

Jason
  #11   Spotlight this post!  
Unread 21-05-2008, 23:22
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,370
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: Selecting a micro controller

You might want to look at Cypress Semi for their color LED controller solution. They have a demo board with a PSOC micro controller, LED driver, and 3 primary color high brightness LEDs. It's 149$. May seam like allot but its a complete kit to experiment with generating a wide spectrum of color with LEDs. The Cypress PSOC micro controllers are different than PICs. Cypress has allot of app notes to get one up to speed on their form of micro controller. They have a neat programming environment called PSOC express. It's graphic drag and drop programming. It includes a state machine builder that allows the coding of some very powerful algorithms. I recently bought one of their evaluation boards and really liked the Cypress system.
Here is a link
http://www.cypress.com/ez-color/index.jsp
  #12   Spotlight this post!  
Unread 21-05-2008, 23:31
Browzilla Browzilla is offline
Fearless Leader
AKA: David Vriezen
FRC #2530 (Team Inconceivable)
Team Role: Electrical
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Rochester, MN
Posts: 57
Browzilla is on a distinguished road
Send a message via AIM to Browzilla Send a message via MSN to Browzilla
Re: Selecting a microcontroller

Something I just realized that does change the number of I/Os needed as well as the current:

I only plan to drive two of the LEDs. I can achieve the effect I want entirely without using one of the colors.
  #13   Spotlight this post!  
Unread 23-05-2008, 09:11
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: Selecting a microcontroller

Yet another PIC fan here (can you understand now why Microchip OWNS the microcontroller business even after all these years? ), and I have been using PIC processors for three years now at my co-op with an awesome robot controller board we whipped up and had made at a PCB prototyping house. The board has a number of different shift registers allowing for hundreds of digital outputs along with a couple bytes of directly-linked pins for high speed digital IO, along with an ability to directly connect to some of the more interesting pins that come out of the micro (i.e. input captures, counters, etc.), some 8255's for general purpose digital input, and a pair of RS-485 transciever pairs for communication to up and downstream devices on the production line.

The board is set up to use the 18F8722 as it's microcontroller, same as is in the FRC controller. It's a fantastic processor, lots of internal peripherals to keep you busy, just wish it had DMA sometimes. But, who can argue with a cheap processor that can handle communications AND run two step-driven axes at 12,500 steps/second with interpolation.

This processor is availble on the HPC Explorer board from microchip as well, and can be used with the on-board bootloader it comes loaded with if you want to go that way, or you can get and ICD. I believe the PICkit2 programmer will program the 18F's too. (just search microchip's website with any of these names if you want more).

A new processor I've recently started working with is the 33F series of digital signal controllers. Awesome pieces of hardware, running at 80MIPS... very nice library of single-instruction math functions too (namely, fractional divide, square and accumulate), DMA capable, CAN compatible, some even have dual analog converters if I remember right. Just a few months ago I finished writing the low-level hardware driver for a 33F to run a 128x64 graphics LCD. My first project ever to have a TV to talk to the world with!

Well, besides that huge LED segmented display on our robot this year...

Hope that helps... post if you have questions.

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
  #14   Spotlight this post!  
Unread 23-05-2008, 09:46
Adam Y.'s Avatar
Adam Y. Adam Y. is offline
Adam Y.
no team (?????)
 
Join Date: Mar 2002
Location: Long Island
Posts: 1,979
Adam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to behold
Send a message via AIM to Adam Y.
Re: Selecting a microcontroller

Quote:
Originally Posted by Binome View Post
A good cheap programmer is the Pickit 2 from microchip, at around $35 its a steal for a high voltage programmer.
You know if one were to ignore the fact that it uses a Serial port the STK500 from Atmel is a far better choice than anything from Microchip. Also, the Arduino and an AVRISP would be a nice cheap development environment.
Quote:
An arduino or basic stamp all seem like probably a bit overkill for what I'd like to do.
Why would an Arduino be overkill? It's an Atmega168 which for all intents and purposes is equivalent to the PICs. It just has extra peripherals that you probably would end up adding in the end.
Quote:
Something I just realized that does change the number of I/Os needed as well as the current:

I only plan to drive two of the LEDs. I can achieve the effect I want entirely without using one of the colors
You typically don't want to drive LEDs directly off the IO port of a microcontroller. LED drivers are usually utilized which the microcontroller controls.
__________________
If either a public officer or any one else saw a person attempting to cross a bridge which had been ascertained to be unsafe, and there were no time to warn him of his danger, they might seize him and turn him back without any real infringement of his liberty; for liberty consists in doing what one desires, and he does not desire to fall into the river. -Mill

Last edited by Adam Y. : 23-05-2008 at 09:55.
  #15   Spotlight this post!  
Unread 23-05-2008, 10:03
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,393
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: Selecting a microcontroller

I can only hazard that it looks complicated.

I'd suggest the boarduino since it drops into a breadboard. That would make circuit testing / design easier.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting bits from an analog input Spencer E. Programming 2 13-01-2008 09:06
Observation about Selecting Alliances Kel D General Forum 14 13-05-2004 07:43
Selecting Autonomous Behavior Gobiner Programming 5 22-01-2003 09:44
Order of Selecting who plays in Elims JoshB Rules/Strategy 5 06-01-2003 10:22
Selecting finalists at regionals Ken Loyd General Forum 2 02-10-2001 10:41


All times are GMT -5. The time now is 05:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi