how to pick a microcontroller and program for flashing led? total newbie - Page 1
Forum section: electronics / beginners

author: HAMMERNROCKS1
author_rank: Newbie
timestamp: June 15, 2011, 06:31:44 pm
content: Hello all, I am looking/begging to get a little help with a project I have been working on and off for the last three years. I started building model police cars as a hobby and way to take my mind of an injury and associated pain. I have been using flashing LED's up until now. On and off over the last three years I have been researching how to build a small PCB board to use so I can have multiple programmed flashing LED sequences. I have found lots of info. I usually end up researching outdated or totally bad advice. By the time I figure it out I get discouraged and stop. I know I can buy prebuilt lights or diy kits fort this hobby. This is something I want to do as much of it as possible myself. It's stress relief from all that I have to unfortunately deal with. I enjoy learning new things too, it helps take my mind of my pain at times. I have someone who will make the boards for me and other parts. I need help choosing a small inexpensive lowprofile micropros. This will be used for 8-16 led's. I'd like to be able to program 12-20 flashing sequences in the device. one of the boards will be 60mmx12.5 (needs to be as low as a profile as possible)for an idea of size I am working with. In terms of programing which is going to be the best language (as dummy proof as possible) while providing me with a cheap way to download info to the micro? I have looked at some premade programing kits but I do not need all they offer or the expense and it seems like most of the programing programs can be downloaded free anyways. I would really be grateful to any help I can get. this site was recommended to me for asking the questions I had. I am looking forward to making some progress and getting out of neutral in this. THANK YOU.

author: sacherjj
author_rank: Frequent Contributor
timestamp: June 15, 2011, 06:37:09 pm
content: I would recommend getting an Arduino Uno. This will be a test board for you to learn how to start. There are many tutorials out there. After you are more confident in the code, you can make a board with a compatible Atmel micro.The Arduino boards only need a connection to your computer's USB, so the startup and downloading programs is very fast.If you progress to needing more power, you can then program the boards in raw C code, rather than Arduino.

author: HAMMERNROCKS1
author_rank: Newbie
timestamp: June 15, 2011, 07:47:21 pm
content: what line of cheap micros should I be looking at or have as options? where is a good source to get these things? I have some info on the Ard, I was looking at it yesterday. It looked promising and a little difficult. After the last few times of getting all invovled in outdated stuff, I wanted to make sure I was going down the right path. I havent played with any codes, etc in about 30years. As a Kid, I had a Texas Insturment computer that only worked if you wrote a program for it do something. (it was very basic) I taught myself how to use it. Other then that, I have no experience in anything like this and definately need all the guidance I can get. Thank you.

author: sacherjj
author_rank: Frequent Contributor
timestamp: June 16, 2011, 12:11:34 am
content: Arduino is about as easy as you are going to get with a micro. It doesn't get much easier.

author: Vertigo
author_rank: Regular Contributor
timestamp: June 16, 2011, 01:21:27 am
content: do a search on youtube, theres lots of people showing off their arduino projectsand i even saw a few tutorials specifically about controlling LEDs.here u can get an overview of what kind of arduino boards there are:http://www.arduino.cc/en/Main/Hardwareas stated above: the uno is the main standard board, and prolly the best choice for beginners.if the 'Uno' board is to big, the 'Nano USB' is smaller and seems to have the same capabilities.just like the Uno it has USB onboard, and is ready to go as is. (though i have seen this one shipped with and without header pins.)this one can also be stuck on a breadboard for easy prototyping.smaller still is the 'Pro' and 'Pro Mini', which is the same as the nano, but does not have the USB onboard.u need to get an adapter to hook it up to the pc, but that leaves a smaller part to put into the models.so thats a 'Pro Mini' or 'Pro Mini' + 'USB adapter' and you are ready to go.

author: HAMMERNROCKS1
author_rank: Newbie
timestamp: June 16, 2011, 05:44:21 am
content: I looked at the Ard boards and its way more then I need. I was looking more for something to cheaply program a 18- 20 pin micro with the led flash sequences i want, run a test and evulation phase (through the program) plug it into a very basic pcb with leds for actual test and onto the next micro. the micro would then be installed on the pcb's I am having built. There isnt a lot of pieces to pcbs. I am going back and looking for something similiar to what I am talking about, in ref the program and their program kits. it was complelty different then the Ard and ard boards.

author: HAMMERNROCKS1
author_rank: Newbie
timestamp: June 16, 2011, 06:05:29 am
content: The other thing I had been looking at was the MICRCHIP PIC starter kits.http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en535806(pick18f4xk20 starter kit)http://www.microchip.com/stellent/idcplg%3FIdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805&part=DV164120(pickit2starterflash board)there was another with even less but supposedly enhcanced software and I cant find it right know. But this was more what I was thinking instead of an ARD board. Bottom line I need to keep the cost down. Unfortunately, disability pay SUCKS!!! I have a ton of unpaid med bills from my surgieries on top of a family and two little ones Im trying to give more then I had grown up. Eventually the dis pay and bills will get worked out. but until they do I have to be a frugil as I can espically with my hobbies. I wasnt sure if there was something cheaper, easier, or I could make the everything myself and just get a program. I appreciate all the help and advice I am getting. Its fun learning about all of this and I have had more more progress lately after reaching out to a wider group of people instead of trying to figure it all out by myself. I did email microchip about their kits and micro's. I never heard back from them. It was also a turnoff about them. I still need to figure out which micro will work best for me too. Thanks

author: joelby
author_rank: Frequent Contributor
timestamp: June 16, 2011, 06:11:19 am
content: Really, any microcontroller will be fine for your application. Your choice will be determined by the parts you can actually get, the peripherals you need, and personal preference.PIC and AVR are the main contenders. Alternatively, the Ti MSP430 is excellent value - you can get the Launchpad for $4.30, which includes a programmer and two chips that you can pull out and use in your own designs. The programming interface can be the most expensive part - from memory the PicKit is around $50-70 and the AVR thing is quite expensive if you want in-circuit debugging.If you want to use truly low profile parts, you'll have to use surface mount packages. Normally you'd provide an in-circuit programming interface rather than pre-programming chips (which is difficult to do with surface mount, without specialised equipment).The programming language doesn't really matter. All of the common MCUs have a free C compiler of some sort, or there's a manufacturer/family-specific assembly language for each. At the higher language level, there are BASIC compilers, the Arduino sketch thing (which works on bare AVR chips too), and so on. Choose something you're comfortable with, or for the most flexibility, use C until you are.

author: Zero999
author_rank: Super Contributor
timestamp: June 16, 2011, 04:56:48 pm
content: It depends on how much you want to spend, how much time you have and how interested you are in learning programming?If you just want the cheapest price per chip go with the PIC16F54 or PIC16F57 which have all the pins you need and are more than powerful enough just to flash a few LEDs.If you want easy Arduino is probably the best way to go but I have literally no experience of it.

author: westfw
author_rank: Super Contributor
timestamp: June 18, 2011, 01:30:54 am
content: Quote"Way more than you need" is one way to avoid frustration. You're not likely to beat the $30 price tag (less, for clones) just by using a slightly smaller microcontroller...Think of the "learning" and the "doing" as separate. A nice aspect of the arduino is that you could use the standard board for the learning phase, and then pop out the microcontroller and put it into a simpler custom-made board when you have everything figured out.

author: tsmz
author_rank: Contributor
timestamp: June 18, 2011, 10:18:54 pm
content: I'd also recommend getting an Arduino. I wouldn't go for the Mini or other shrunk boards, just stick with the Uno (or even Duemilanove if you can get it cheaply). It's important to get the DIP version with a socketed microcontroller, not the stupid SMD version.Why is the arduino the right tool for you?It's reasonably inexpensive for a development board, works quite well and is an exceptionally frustration-less experience overall. Yes, of course it's slow and the programs take massive amounts of memory, but you can easily create programs that work right away without having lots of (I'd even say any, if you're willing to learn) experience in programming. If you get frustrated easily, I'd highly recommend the arduino. It's not a toy like some other platforms, you can also do real C with it (in fact, youaredoing real C with it, you're just using high-level hardware abstraction library functions most of the time; if you feel like it, you can do direct port manipulation easily), but you don't have to.The arduino uses Atmel's AVR microcontrollers, and the programs you write can be ported to smaller AVR micros as well, depending on which functions you use. If you're just doing blinking LEDs, chances are you won't use much RAM, so it could be entirely possible to fit the stuff on an ATMega 8 or 48 or what have you instead of the default 328. The Arduino can be used as a crude programmer for AVRs, so it's certainly doable to develop your programs on the Arduino, then optimize the code a bit to fit on the smaller chips and flash it to an ATMega 8 for use in your circuit. ATMegas are easily available and not too expensive, so I'd really stick with the Arduino.Of course, you can use other chips as well or even program the AVR with an AVR programmer. But honestly, I wouldn't bother. You're not building thousands of LED circuits, so individual MCU price is not of great concern. The fact that you didn't already start programming microcontrollers for your stuff just tells me that you'd be quite unhappy and frustrated by using "normal" MCU development solutions.Of course, if you want to do it, get some AVRs, PICs or even the cheap MSP430 value line devices, they'll all work reasonably well.

author: Trigger
author_rank: Regular Contributor
timestamp: June 19, 2011, 12:35:21 am
content: If you have a .edu email account use it to create an account on microchip direct and get a pickit3 they've solved most of the problems with them and you can use your .edu email to get free samples of any microcontroller you want to work with.True it's not as noob friendly as the Arduino, but you get access to a wide range of microcontrollers to experiment with.

author: Jimmy
author_rank: Regular Contributor
timestamp: July 17, 2011, 09:06:23 am
content: Why not go for the arduino mini?http://littlebirdelectronics.com/products/arduino-pro-mini-328-5v16mhzI have a couple of them and they work great for led projects you can add on outputs easily so you have more outputshttp://littlebirdelectronics.com/products/tlc-5940-pwm-driverI just soldered the mini and tlc-5490 to a prototype board and now you have 16 channel for led's that you can dim there are heaps of tutorials onlinehttp://www.arduino.cc/playground/Learning/TLC5940is a good starting point I know it says servo's but led work a treat.