![]() |
Re: Selecting a micro controller
Quote:
Don't be put off by "graphical environment". Basically the PSoC is a two part chip - 1 part microprocessor, 1 part reprogrammable hardware. The micro gets coded up in C. The rest gets coded up graphically. What is this stuff he speaks of? Well, it is somewhere between pure FPGA and set hardware. Each chip gets some number of blocks that can be set up to do specific tasks. As an example, a digital block might be a serial port, SPI driver, I2C port, Timer/PWM/Counter, Random Number Generator, or a CRC checker. An analog block can be as simple as an A/D, or it can do some really cool switched capacitor analog filtering (way too much rock for just one hand!). Also, the capacitive sensing truely rocks - attach a bit of copper the size of your finger to a pin, and it is a button. While not as flexible as a true gate array, you do get the benefit of doing some stuff in hardware. Give them a shot! |
Re: Selecting a microcontroller
Quote:
Since this application would only require 12 lines, the 16f627a would be an ideal choice. Not only will Microchip send you a couple of freebies to experiment with, but they can be purchased for just $2.95 from digikey (dropping to $1.48 if you order 25 or more). They require NO external circuitry in order to run... just feed them something between about 2.5 and 5.5 volts and hook them up to ground and you're good to go. Plug in your LEDs and resistors direct to the I/O pins and there is no simpler or cheaper way to build the circuit described here. (Well, at least that I know of...) I'd even be willing to hazard a guess that the PIC could handle the 240mA required to drive each LED at 20mA... at least for a short period of time... if it were kept reasonably cool. I haven't tried it... but if you fry a PIC, it's not like it is a big problem. They are cheap enough to sacrifice a few. The software can be created in machine code using MPLAB (free) or using PICC Lite (also free, and also using the MPLAB IDE). I can't promise that it will run on a MAC, but I can bet you can find an old PC for free that will run it. If you have an old PC kicking around then you can also build the NOPPP, the "No Parts PIC Programmer" or the Classic PIC Programmer or any number of other DIY designs that can be done on a breadboard and plugged in to a parallel port. My favourite is the TPIC, as it also serves as a prototype board as well as a programming board, but I'm not sure if they are still for sale. In any case, there is no shortage of commercial PIC programmers and kits for sale. There are many other microcontrollers that could do the job, but there aren't many that can do it as simply and inexpensively as the PIC... particularly if you plan on making more than one of this device. You will be spending more on the LED's than the uC, I'll bet! Jason |
Re: Selecting a microcontroller
That sounds perfect. Although I may have to do something about the overheating; I'm hoping to be able to integrate this into a piece of clothing or something.
And if I did manage to get it into clothing, I was hoping to produce several more. Also, the reason I'd think an Arduino is overkill is that they cost $35 or so each, and have more than enough power to do what I want to do. $35 for the microcontroller alone, aside from adding another $12 for the LEDs and whatever the clothing article would possibly cost. |
Re: Selecting a microcontroller
Either way, pic or ATmega (arduino), you will probably need a programmer or micocontroller with a bootloader on it. An Arduino is pretty much just a $4 ATmega168 with a bootloader on it paired up on a board with a powersupply and USB to serial chip. The nice thing about arduino is that the software runs great on a mac, and you can just buy that board or a cheap clone and it will work. No need for a programer, vmware, or mplab.
|
Re: Selecting a microcontroller
Quote:
You may also want to consider a surface mount package for a clothing application... all PICs are available in surface mount packaging. I will pass you on to others for tips on doing it as I've stuck to good old through-hole DIP stuff for everything I need to do, but I understand simple surface mount isn't that hard if you have a good soldering iron and a steady hand. I'd say the best way to see what a PIC can handle in regards to current draw (they might actually mean it when they say there is a 200mA limit... I haven't driven more than about 10 LEDs at a time off a 627a so couldn't tell you for sure) is to try it. If you can't light up all the LEDs at once, you could always increase the value of your resistors to bring the current draw down a bit. The LEDs won't be at peak brightness then, but should still be pretty darn close to it. As a point of general interest, while I am sure this fits in to the "not exactly great practice" category and several people will happily explain why this won't work, you can run several LEDs directly off a PIC running at 5v without any resistor between the LED and ground. It would be a conservative estimate to say that my students have done this on over 200 PIC 16f84, 16f84a, 16f627 and 16f627a chips without any problem. If you were to run your PIC on 3V (2xAAA batteries perhaps?), it may be possible for you to hook up all your LED leads directly to the PIC and back to ground without the need for any other components. And if I'm wrong and you fry the PIC... you're out two bucks. Give it a try! That's one thing I love about the PICs... not only are they tough little chips, but they are cheap, cheap, cheap! Jason |
Re: Selecting a microcontroller
I would definitely recommend one of the Arduino models. I just got one a couple of weeks ago and it is great. The programming is easy, the software runs great on the Mac (I even got it up and running with XCode, you can PM me for the template), and it could be used in future projects. There is even the Arduino LilyPad, a board designed for clothing applications. It sounds like it would be perfect for what you need.
Also, each output pin can provide 40ma, twice your requirement. The chip can be found for about $7. The full-sized arduino boards are socketed so you could replace the chip if needed. Even if you don't go for the arduino, I would definitely recommend the Atmega168 chip because it is cheap, durable, and can be programmed on almost any OS using widely available open-source tools. |
Re: Selecting a microcontroller
Quote:
|
Re: Selecting a microcontroller
Quote:
I was gonna try to put it in a hat or vest or something that wouldn't really require washing, since really I'd only wear this thing out around geeks. Like, say, FIRST things and such. |
| All times are GMT -5. The time now is 05:25. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi