Microcontroller advice wanted

Ask and answer questions, share tips and resources for installing lighting and other electronics in your models.

Moderators: Sparky, Moderators

Post Reply
Shamrock_Don
Posts: 149
Joined: Fri Jul 19, 2002 2:57 pm
Location: Arizona
Contact:

Microcontroller advice wanted

Post by Shamrock_Don »

Looking to start playing with microcontrollers as a more versitile way of lighting my models.

What would you suggest in way of learning kits, websites, books I should be looking at.

Thanks in advance for your time.

Don
User avatar
tetsujin
Posts: 2353
Joined: Mon Feb 28, 2005 6:08 pm
Contact:

Post by tetsujin »

I worked with "Programming and Customizing PICmicro Microcontrollers" - great book, but I can't recommend trying to get the included PIC programmer circuit board to work (you need to buy something like $20 worth of parts to add to the board to make it work, plus a DC voltage source of about 18V, and I never got it working)

As for PIC programmers, I use the ones from kitsrus - the larger ones are kits themselves, while the smaller ones have pre-installed surface mount components - just add project box. Kit 182 is a nice, very convenient programmer that can run off USB power and program a good variety of parts. Kit 128 is equivalent, but it incorporates an IC socket. (#182 doesn't have a socket - you're supposed to connect it to your completed circuit to program the thing in-circuit. The thing I like about Kit 182 is it is tiny: I installed it in a project box that's about 1.25" x 2.5" x .75".
---GEC (三面図流の初段)
There are no rats.
The skulls eat them.
macfrank
Posts: 8726
Joined: Fri Oct 11, 2002 6:55 pm
Location: Los Angeles, CA
Contact:

Post by macfrank »

I would suggest the Atmel AVR microcontrollers.

Digikey sells them (they go from around $3 and up) and they also sell a low cost development system, the The STK500 is an excellent development system and comes with a couple of processors. It's $79, but it's really well worth it. You can use the free Atmel assembler IDE or WinAVR, a GNU based C compiler with it.

All modern AVRs can be programmed in circuit, and you can build a stand alone programmer as well (for development) but I think the STK500 development system is both a better investment in time and ultimately, money. Most free programmers (for both the PIC and the AVR) require a free parallel port; a USB to parallel adapter will not work. Serial port programmers (like the STK500) are a little more complicated, but they will work with USB to serial adapters, on other platforms besides Windows and without upsetting Windows low level printing drivers.

The AVRs are far better than most of the PICs if you're going to focus on assembly language programming; the architecture and instruction set are rational and easy to understand, which (IMO) not the case at all with the PIC. If you plan on just using C, it's pretty much a wash between the two.

Another option are the Freescale (ex-Motorola)68xx processors. The main drawback here is that parts and development systems are harder to obtain and there aren't all that many free options.

I have a couple of AVR projects on my web page. I've also used the [url=ttp://www.atmel.com/dyn/products/tools_card.a ... ol_id=3146]Atmel Butterfly[/url]. It's probably overkill for most lighting projects, but for $20, it's both cheap and very powerful. I used WinAVR to write software to read and save temperatures and light levels every few minutes to the on-board EEPROM. I added a couple of solar cells, a battery charger and two NiMH batteries and dropped it off in the desert for more than 4 months (between June and October of this year). The highest temperature it recorded was 160F internally, yet the device was (and still is) working fine. They're pretty rugged little micros.

Frank
jwrjr

Post by jwrjr »

I definitely recommend the pic series of microcontroller. There are not too many instructions to learn (35 is the number that often is mentioned in the datasheets) and as with most controllers, the number that you need to know runs to about 1/3 of the total. The others you can look up if you need them. As for programmers, on Ebay you can find Chinese clones of the programmers made by Microchip, if you can't afford the originals. The current version of the programming suite (MPLAB, downloadable for free) contains a limited version of the "C" language. I never use that as programming in assembler is pretty easy. But others will prefer it.
User avatar
Pat Amaral
Posts: 3730
Joined: Fri Jul 12, 2002 2:44 pm
Location: Ok, I'm here. You can start now

Post by Pat Amaral »

123 PIC Microcontroller Experiments for the Evil Genius by Myke Predko.

The book is published by McGraw Hill and is written around the Microship PICKit 1 Flash Starter Kit (pn:DV164101 directly from Microchip for $36 plus shipping) The kit comes with almost everything you need and the book tells you how to get everything else.

You'll have to modify the info a bit to engineer lighting applications but the book teaches you a lot about the programming part of the equation and gives pleanty of of insight into how to design your own applications for the MCU.
Pat A.
=============================
50% Nerd, 50% Geek, 100% Cool
User avatar
Pat Amaral
Posts: 3730
Joined: Fri Jul 12, 2002 2:44 pm
Location: Ok, I'm here. You can start now

Post by Pat Amaral »

Don'tcha just love double posts? :roll:
Pat A.
=============================
50% Nerd, 50% Geek, 100% Cool
Balok
Posts: 1599
Joined: Sun May 04, 2003 11:31 pm
Location: Livermore, CA.

Post by Balok »

You sold me macfrank, I'm gonna try the AVR. :D I've just finished my first project with the basic stamp 2. Piece of cake. Its a S.C.R.A.M. unit. Space Creature Repelling Automated Mechanism ( an alien repelling device ala Entil Zog's <a href="http://starshipmodeler.com/Other/cj_ard.htm">ARD</a>) a spoof light show. S.C.R.A.M. is velcroed to the telescope. I can recommend the basic stamp 2 because its so easy, but it is 2.5 times as expensive as the AVR.

<a href="http://home.comcast.net/~swamproot/imag ... .jpg">1</a>
<a href="http://home.comcast.net/~swamproot/imag ... .jpg">2</a>
<a href="http://home.comcast.net/~swamproot/imag ... .jpg">3</a>
<a href="http://home.comcast.net/~swamproot/imag ... .jpg">4</a>
<a href="http://home.comcast.net/~swamproot/imag ... .jpg">5</a>
<i>
Always remember
we stand on the roof of Hell
gazing at flowers.
</i>
en'til Zog
Posts: 2405
Joined: Fri Jul 12, 2002 3:03 pm
Location: The Wilds of Northwoods Wisconsin

Post by en'til Zog »

Dang, Balok, that's OLD. Last time I saw one of those was back at debris cleanup outside Ros.. um... Cic... er...

Dang, Balok, that's OLD. :D
Balok
Posts: 1599
Joined: Sun May 04, 2003 11:31 pm
Location: Livermore, CA.

Post by Balok »

Sure, old, but aged to perfection like a fine wine. Not an alien in sight since I threw the switch. None that I can see anyway. :D Your ARD too has been effective, I surmise?
<i>
Always remember
we stand on the roof of Hell
gazing at flowers.
</i>
en'til Zog
Posts: 2405
Joined: Fri Jul 12, 2002 3:03 pm
Location: The Wilds of Northwoods Wisconsin

Post by en'til Zog »

Yup. Nary a sighting of Unfriendly Space Aliens around here.

The next project is a repellent device for Invisible Tap Dancing Pygmy Elephants. Haven't seen any of those either, but you can't be too careful. :D

How are people reacting to your S.C.R.A.M. device?
Balok
Posts: 1599
Joined: Sun May 04, 2003 11:31 pm
Location: Livermore, CA.

Post by Balok »

With puzzlement. I think they are wondering if I'm nuts, but are too polite to suggest it. I'm playing it deadpan you see. Some kids do think it's real. I've still got 4 I/O pins free on the BS2 so I may upgrade the Scrammy with a selector switch that inputs an alien to attack and then the proximity alert and alarm will go off and then I'll have a seperate hand held prop that that has star trek scanning sounds or something similar. Finally, I'll go through my act... "Mam, how long have you been raising this... being?". :x

:) So far the bomb squad has not been alerted.
<i>
Always remember
we stand on the roof of Hell
gazing at flowers.
</i>
Post Reply