My apologies for the lack of given information or my knowledge in this subject. I haven't done much electronic-related before (I know how to use basic IC's such as the 555's, 4017's, etc), but I've never worked with any microcontrollers before.

I'm basically searching for a (cheap/well-priced) programmable microcontroller which can connect to a computer through USB and be controlled via a Visual Basic (preferably) application and control the brightness of at least 7 different LEDs at the same time. I have no idea where to go looking for one that'd suit my needs, nor do I know what specifications it needs (other than what I've said).

As for programming it, I'm unsure of what I'd need to install the program onto it (some sort of device?), but any programming language is fine - I've been writing software for over 3 years, it shouldn't be a problem.

I'd also rather do it this way than buy a cheap Arduino clone so I can learn from this and have a project to do (despite not knowing much, electronics is a hobby of mine). I should probably also mention that I've been searching around for over 2 hours now, but not come across anything conclusive.

Any responses would be greatly appreciated, thank you :)

  • 1
    \$\begingroup\$ Keep in mind that "Arduino" is basically a fancy name for a line of AVR microcontroller development boards. There's no shame in using their hardware for a prototype. \$\endgroup\$ – duskwuff -inactive- Jun 20 '15 at 0:34

Arduino IS based on a microcontroller (by atmel) and is basically a breakout board for such microcontroller plus some friendly way to upload a program to it.

It's programmable in c++ so it's quite easy and, as @Michael said, the community is huge. You can use the program on a bare chip without the board if you provide the proper connections, parts etc...

That said i'm a PIC user and i don't really like the bulkiness of arduino (both in terms of price, physical space and memory occupied by the bootloader) and the way its community works.

BUT if you want to program a pic or an avr you need an external not-so-cheap programmer (search for pickit2 or avr dragon...way more than an arduino) and a proper c compiler. Then remember that usb access comes at a price (i.e. writing a program to use it but then you need a way to program the chip in the first place!).

Arduino has everything you need to start FAST and such a program would be nearly trivial with all the libraries, a thing i wouldn't dare to say for a "from scratch" project like yours. Then again, if you want to learn bare embedded programming just grab a micro, buy or build a programmer, download the tools and start by blinking a LED then build from that. I'd advocate for PICs but really it doesn't matter. AVRs have nice open source tools while PICs are slightly cheaper. You'll find hundreds, thousands of discussions on which is best and why they're wrong :P

| improve this answer | |
  • \$\begingroup\$ Is there a method of easily controlling many LEDs using PWM without having to have a costly microcontroller with over 10 channels? I read something about shift-registers - are they a cheap (and slightly easy) method of doing so? \$\endgroup\$ – Karl Jun 20 '15 at 1:34
  • \$\begingroup\$ The simplest way is to use an addressable RGB led strip. It takes two pins on the microcontroller + power and ground, and you can control a whole string of leds. Adafruit.com carries a nice selection of their "neopixel" branded version. You can use an arduino uno to drive them, but you can also use some cheaper alternatives. Adafruit has the Trinket which is a little bit harder to use but would work fine, assuming you don't need pins. \$\endgroup\$ – Eric Gunnerson Jun 20 '15 at 2:43
  • \$\begingroup\$ Like @EricGunnerson said addressable rgb leds are very easy but are (relatively) pricey. Shift registers are indeed very cheap and very easy to use BUT to use them for pwm control you need a somewhat complicated algorythm (keeping track of every channel and generating the proper waveform) and fast clocks and gates, i'm assuming you want to have independent pseudo pwm channels (or you would have used a single pwm output with a power stage or buffer...whatever). So the answer is: maybe. It depends on your needs, time, skills and budget. \$\endgroup\$ – zakkos Jun 20 '15 at 21:13
  • \$\begingroup\$ I was forgetting one extremely important thing! You don't need to reinvent the wheel or burden your controller with too many tasks, on the market there are IC's that do what you need without too much hassle. Instead of a shift register you may want to look at led pwm drivers. They provide you a packet that contains the serial input (like a shift register, i.e. more I/O pins for you) many PWM channels (No complicated algorythms!) and constant current drivers...all that at a price like 5€ or less on a single buy... \$\endgroup\$ – zakkos Jun 20 '15 at 21:28
  • \$\begingroup\$ @zakkos Thank you for the suggestions! I'll check them out. \$\endgroup\$ – Karl Jun 21 '15 at 1:02

Why not just use an Arduino? They're cheap (I pay $9 for Arduino Nanos), they have a great community for beginners, and they can be controlled from VB (read up on the Serial command).

If you need more PWM pins for controlling brightness, use an Arduino Mega. Not as cheap, but Arduino's are still by far the best platform for a hobbyist in terms of versatility, accessory products, and support.

| improve this answer | |
  • \$\begingroup\$ Most Arduinos are just Atmel AVR microcontrollers with a simplified software development environment. You can program the microcontroller (ATMega328 in some versions) directly in C or assembly, bypassing the Arduino environment. \$\endgroup\$ – Peter Bennett Jun 20 '15 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.