Microcontroller Projects

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

Moderators: Sparky, Moderators

Sparky
Moderator
Posts: 2404
Joined: Thu Jun 05, 2003 8:28 am
Location: Are we there yet? (Chicago)
Contact:

Microcontroller Projects

Post by Sparky »

Here's a place to post micro controller projects. Try to keep each controller in one post (edit it as the project develops or information request pour in).

Once the project matures I suggest a writeup for the How to section on the main site (how it works and how to install in the/a kit).
Last edited by Sparky on Wed Feb 04, 2009 5:01 pm, edited 1 time in total.
<a href="http://www.kc6sye.com/2_wheresaneatpart.jpg" target="_Sparky">Is this plastic thingy on the counter a neat part?</a> <a href="http://www.kc6sye.com/1_casting_inprogress.jpg" target="_Sparky">Let's cast it.</a>
User avatar
kitty
Posts: 1337
Joined: Wed Jan 23, 2008 6:54 pm
Location: Eindhoven NL

Console and Model units update 28 sept 2008

Post by kitty »

Thanks for the intro and the sticky Sparky.


How This came about.

A while back i got myself a 1/350 PL 1701 A refit from SM store.
Before actualy building it I wanted to design the lighting and all the components for it.
I got in touch with Matt Jansen from schakelingen online (dutch for circuits on-line) and asked if he could help me with the circuits for a console unit and a unit for in the model using 2 PIC's.
He asked me to exactly describe what i wanted and to put it in writing and he came up with a design that had only 3 wires going into the model.
After some conversations we ammended that design a bit and although it needs 4 wires now, it now has a bidirectional communication.
I also added some LEDS to the console unit to use as status indicators for the lightgroups on the model side .
This makes the simple design very versatile and at the low voltages it produces no heat worth mentioning.
I also removed a voltage regulator that was in the model since originaly it was designed for a 12v powersupply, but we don't want heat producing components in the model.
You can program sequences and effects in the microcontroller inside the model and trigger them with a switch or a sequence on the microcontroller outside.
The whole lot will work on 4.5-5 V with 2 amp max current on the powerlines, but inside it's all less then 100 mA per group usualy.
I'm still working on decent small double sided PCB's for the outer and inner controller units because i want to start using the same design over
and over again with just the need to write new programs for the PIC's depending on the model.
So here is the little gem:

https://www.dropbox.com/s/fpt9f2ucbw5pq ... s.gif?dl=0
Mat Jansen/Kitty Sweelssen.
This design is free under GNU.

How it works:

The top circuit is the console circuit, the bottom circuit is the circuit in the model.
The components are 2 x PICs, 2 x Darlington arrays, 1 x 4Mhz crystal a few condensators and resistors.
As you can see the 2 circuits are connected to eachother with 4 wires.
Keep in mind that those led/resistors series on the modelside are not realy on the board, its just to explain where they go.
Actualy the outputs of the darlingtons end in pins on the edge of the board so you can connect the negative leads for the different groups to them.
Instead of 1 led with resistor you can also put multiple series parallel, just apply the right resistor values.
I use a common +5V instead of a common negative because it makes the most sense with this aproach, the outputs of those darlingtons will have 5V when the micro controller has low state output and they are pulled down to - by setting the microcontroller's output high.
Thus creating a Voltage difference.
Due to the fast rise and slow fall of the darlingtons you can also set the brightness by raising or lowering the frequency with which you alternate the high/low state at their inputs.
Thus fading the groups in or out or regulating the brightness of the groups
The rest is a matter of the right programming

There is an example for how to connect multiple leds with their resistors parallel.
Just in case someone doesn't know how to do that.

The PCB layout:
I haven't gotten around to that yet.
I built it on experiment board (approx 2"x 4" for the model unit)and tested it with switches conected to the console and leds connected to the model-unit.
If a good PCB layout is designed it would all fit on a 1.5"x4" or 2"x3" PCB for the model unit and smaller for the console unit
But since i don't have an autorouter i have to design it by hand and that is a part i realy hate.
One mistake and i can start over again (usualy the point where i throw in the towl and put it off untill another time)
So if anybody wants to try their hands on double sided PCB layout, be my guest.

Programming.
These PICS have a flashmemory and have a pretty simple basic set of instructions and builtin features.
Programs for the console and the modelunit are in the making for the Enterprise 1701 refit.
The modelunit will have all the routines for the effects like the photon torpedo and the different stardrive configurations.
The console unit has for instance the startup sequence like in the movie
Here are 2 timeline diagrams i made for the startup sequence in the console and the effects routines in the model so Matt knows what to program.

well,these links are gone, so instead a diagram with the schedule for the start sequence and the function switches
https://www.dropbox.com/s/re19io8cxlbjo ... s.png?dl=0

clarification for the diagrams:
As soon as the circuit has power, the console will block all the switches except a start/reset switch and since i connect all the windows leds to +5V and - with their own resistor the windows will light up.
Push the start/reset button and the startup sequence will commence, which will block all the switches untill it is finished, it will call on routines in the microcontroller inside the model.
After the startup sequence is finished, the switches are released so you can manualy switch every group.

Except for the drives and deflector.
you controll them with an up and down switch.
After the startupsequence deflector, impulse and warp engines are in engines down state and the down switch is blocked. pushing the up switch, fades the deflector, impulse and warp engines to impulse state.
Pushing up again switches those groups to warp state and blocks the up switch.
So you can never have warp glow with impulse glow or copper deflector glow with impulse and warp or blue deflector glow when in engines down state.

I think that is pretty niffty.

once the startup sequence is finished and the switches are released, pushing the start/rest switch will restart the console PIC, thus start the startup sequence again.
a complete shutdown of everything means shutting of the power.

Matt has finished the communication routines and the complete program for the console.
He is working on the program for the inside controller which will contain the sequences for the torpedo launch, fade-in and fade-out sequences for the deflector, impulse engines and warp glow, so it will fade impulse, fade warp and change the color of the deflector depending on the impulse/warp status.
When both programs are finished and tested we will make them available also.

Costs
Total material costs for the controller units with darlingtons: € 30 or thereabouts if you use experimental board, a bit more if you make or buy doublesided PCBs.
Add the cost of (72?) LEDs and resistors and maybe a speaker if you want sound also and you have a state of the art programmable lighting set for €80 or so.
I bet in the US you could get it all for $80 or less

Hope this is usefull

Working on the programms now.
Just to show that we're still working on this project, here are 2 little routines for the serial communication.
remarks and labels are in dutch and i'm not translating it now.
In the final programms it will all be replaced with English, but for now you'll need a dictionary to make sense of the remarks , and labels.
To read them, download the files below and open them in an editor (they are plain text)
Transmit: www.sweelssen.com/STRTRKTX.pbp
Receive: www.sweelssen.com/STRTRKRX.pbp
Life is hectic for me with starting my own little business and Mat hasn't got much free time left between his job and the work in his house so it's all going a bit slow atm, but it's still moving :)
Last edited by kitty on Wed Oct 31, 2018 10:08 am, edited 18 times in total.
Democracy may be only a few steps removed from anarchy,
But at least it's not as loud.
You broke your little ships. See you around Ahab. :spock:
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 »

Kitty -

This is all very nicely laid out. I can't wait to see the code when it's done. Do you have an english version of the model side timing diagram? I'd like to read your comments at the bottom but I don't read dutch (it IS dutch, right? - if it isn't, my apologies).
Pat A.
=============================
50% Nerd, 50% Geek, 100% Cool
User avatar
tetsujin
Posts: 2353
Joined: Mon Feb 28, 2005 6:08 pm
Contact:

Post by tetsujin »

That's pretty cool. I've been thinking of doing something similar - using TTL-level RS-232 as an interface to control lighting modules inside models...

I am a bit curious, however - why did you wind up needing bidirectional comms? It seems like all the control unit has to do is send commands to the controller inside the model - not really sure why it needs to get data back...

('Course for the circuit I'm designing I had been thinking bidirectional in the first place - mostly "just because" - except that I decided I wanted to be able to hook up multiple model controllers to the same RS-232 host - it's easier to do that if the multiple models just listen - if they send data back, then that needs to be synchronized...)

(EDIT): Oh yeah - what if instead of 16 LEDs at the control unit, you used an LCD display instead? Small alphanumeric displays are pretty cheap these days...
---GEC (三面図流の初段)
There are no rats.
The skulls eat them.
User avatar
tetsujin
Posts: 2353
Joined: Mon Feb 28, 2005 6:08 pm
Contact:

answering questions

Post by tetsujin »

jgoldader wrote:Tetsujin,

I know there's a sticky thread for microcontroller projects. Are there any links to references that you could post to that thread? A sort of "how-to," or "how to get started?"

About all I know is that I'd need an interface board and software for programming the PIC, and of course a board and power supply, and I'd assume resistors, possibly transistors too, for powering LEDs.

Suppose, for sake of argument, I wanted to make a board that could flash several LEDs at different rates. Something like that.
I started off with the book "Programming and Customizing PIC Microcontrollers" by Myke Predko. The book includes a PCB for building a PIC programmer but I could never get it to work, so I bought "kit 182" from kitsrus.com instead. One of the nice things about kit 128 and kit 182 - they are powered by the USB port, so you don't need an external power supply. (To put a PIC into programming mode you need to apply something like 17 volts to it - so most PIC programmer circuits, especially cheap ones, require you to buy a DC power supply with that level of output... kit 128/182 use a DC-to-DC converter to raise the USB 5V power to 17V)

Most PICs can drive or sink 20mA on the I/O pins, so usually it's enough to just give them a series resistor to drive an LED.

There are different ways you can control the different blink rates - various PICs have timing interrupt features and such but what I would usually do is write a delay loop (run a bunch of instructions to create a fixed delay, 100ms maybe) and then call that in an outer loop which maintains independent counters for each LED. (Call the delay function, decrement all the counters... if any counter reaches zero, reset it to its starting value, and flip the state of the LED that goes with that counter)
---GEC (三面図流の初段)
There are no rats.
The skulls eat them.
jwrjr

Post by jwrjr »

For programming PICs, there are two options better than the rest. You can get the PICKIT2 (or a clone), or an ICD2 (the clone is frequently called the ICD2.5). Either will program most of the available chips. Both use software called MPLAB IDE. The latest version can be downloaded from the Microchip website for free. It even includes a limited C compiler (which I personally don't use. Once you get used to it programming in Assembly language is pretty easy. Some chips only have 35 instructions and you won't need all of them).
User avatar
tetsujin
Posts: 2353
Joined: Mon Feb 28, 2005 6:08 pm
Contact:

Post by tetsujin »

The KitsRUs programmer I use doesn't support debugging - and I guess there is the question of how well it'll be supported in the future. But I think it's also cheaper... And for me the fact that their protocol is published is a big advantage, 'cause I was able to use that published protocol to write code that let me use my programmer on Mac and Linux... (But I think there are also third-party efforts to get the same functionality for ICD2 devices...)

<shrug> I don't know - honestly I haven't been keeping up with developments on Kits R Us's products but it doesn't seem like they've updated anything in about a year. I continue to use and enjoy my kit 182 programmer but maybe the ones jwrjr suggested really would be a better choice, even if it did wind up costing a bit more it might be a better choice in the long run.


BTW - on the matter of ICSP programmers vs. socket programmers...

When I first started out I figured it was a no-brainer that socket programmers would be way easier to deal with. This was before I started dealing in surface-mount components, of course - but apart from that, after dealing with circuits and the programming interfaces for a while, I found that the hassle of removing a PIC from the circuit, putting it in the programming socket, flashing it, and then putting it back in the circuit was more trouble than just figuring out how to design my circuit around the constraints of ICSP... Plus all that plugging/unplugging of PICs from sockets was hard on the pins. (My K149 programmer has a ZIF socket, so it doesn't damage the PICs to put it in or take it out of the programmer - but the circuit the PIC is going to operate in is another matter...) So while it may seem simpler when you're starting out to have a programmer with a ZIF socket, I don't think it's worth wasting the time dealing with it or the cost of getting the socket. ICSP really isn't that hard...
---GEC (三面図流の初段)
There are no rats.
The skulls eat them.
jgoldader
Posts: 974
Joined: Mon Oct 08, 2007 7:24 pm
Location: Philadelphia, PA

Post by jgoldader »

Just wanted to thank those who are contributing to this thread. Thanks!

Jeff
jwrjr

Post by jwrjr »

I've had no trouble finding ZIF socket modules that plug into an ICSP port on Ebay. That's where I found the one that I use regularly.
User avatar
kitty
Posts: 1337
Joined: Wed Jan 23, 2008 6:54 pm
Location: Eindhoven NL

Post by kitty »

The bidirectional com is for checking status on the circuit inside the model.
It allows you to put some sort of indicators on the console and it can send back data from the circuit inside to the console indicating that a certain process is finished.
With a universal usage in mind it was just a matter of adding 1 extra wire which ofcourse can be omitted if you don't want bidirectional communications between the controller inside the model and the console.
Also the console circuit could also be used as a control unit inside a model although somewhat simpler than the unit we designed for the enterprise.
The whole point of the project was to design a simple programmable contoller for a model (whatever model) that can interact with a circuit outside the model using only 4 wires between them to make it easy to put them on stands.
There are even smaller and bigger PICs that you could use, some even with the same pin layout but this combination should suffice to produce most lighting schemes i can imagine, it even can produce sound , depending on the programming.

As for the leds on the console diagram, they are drawn in as leds, but they will be lighting a nice Okuda style display incorporated in the base i intend to make

BTW sorry for reacting a bit late to previous posts, but i had an unfortunate accident that resulted in a collapsed longue and a few broken ribs and torn muscles, so i had other things on my mind the last 2 months or so.
I'm back, although in a dimished capacity, because i still cannot sit up straight for a prolonged time.
Mat has been in England for a while, he's back, so i think we'll have some pic programms to post soon.

And since more people are aware of this thread: could someone make a nice compact PCB layout for this these two circuits?
Because i don't have an autorouter and on experimental board it works but its a messy bunch of chips and wires :D
Democracy may be only a few steps removed from anarchy,
But at least it's not as loud.
You broke your little ships. See you around Ahab. :spock:
jwrjr

Post by jwrjr »

A program called WinQcad (I don't know the URL but will find it if needed) has a decent autorouter and is easy enough to manually edit. Best of all, the 'hobbyist' version is freeware. Extended versions are not expensive (compared with other PCB programs).
User avatar
tetsujin
Posts: 2353
Joined: Mon Feb 28, 2005 6:08 pm
Contact:

AC Hakuheisen Wiring / "Raven" PCB design

Post by tetsujin »

So I'm planning to do a bunch of Armored Core models and I want to light them up - not only the eye lenses, but also thrusters and possibly other bits of detail as well. The plan is to use a microcontroller embedded inside the model to do PWM brightness control on the LEDs, and to accept commands via serial input so I can tell it what to do next...

The problem is, it turns out there's really not a lot of extra space inside most of these kits. Even where the kits have large parts (like the chest, which is usually pretty wide and very long on an AC) the parts tend to be very flat, with a lot of snap-fit and structure inside, and the parts are often built up out of a lot of individual layers of detail, which means that by the time you peel everything away there's generally nothing left...

So, not going to let a little thing like that get me down... I started looking into how I could make my microcontroller installation smaller. The most obvious thing was to just use a smaller PIC and a bunch of SMT components (resistors, etc.). Unfortunately most of the PICs in that size range don't have built-in support for operating as I2C slaves - my current plan is to try to implement that in firmware using interrupts.

My first attempts to fit the circuit into the model were based on using the Sparkfun Electronics SOIC-8 breakout board. This board simply mounts a SOIC-8 chip and provides locations where you can install regular 0.1" spaced pins to plug the circuit into a perfboard or whatever. However, I soon discovered that even that small board was large enough to be challenging to install in the model - given that it doesn't really provide anything apart from a comfy home for the IC, I decided to try to design a smaller board with better capabilities.

So basic specs:
  • No larger than 12mm square (even that may be a bit large, honestly...
  • Mounts a SOIC-8 PIC, provides my power/serial connection, an ICSP connection, and as many LED outputs as I have left.
  • Provides solder pads for mounting SMT pull-up resistors for the LEDs and the serial I/O lines
  • Outside connections (one per I/O line, multiple ground connections, plus power/serial and ICSP connections) are provided by through-hole 2mm headers. (I have even smaller headers, but 2mm tend to be the smallest inexpensive size...)
This was my first attempt at designing a board. I used the free application "PCB" to do it... "PCB" is functional enough but it definitely has some bugs in it - I quickly learned that if certain operations (like selecting certain things, or inserting objects from the library) stopped working, it's time to save your file, quit the application, and restart. Also, I realized after completing the design (and optimizing it down from 12x12 to 11x12) that I actually don't need both the serial and ICSP connections - if I provide the ICSP connector and make it accessible on my model, I can use the same connection as my power/serial connection for regular operation simply by not connecting anything to the "programming voltage" line. Also, if I make a single set of holes for a combined PWR/IO/ICSP connector, I could run long pins through it and wind up with one connector on each side of the board - I may redesign the board to include these optimizations. The other thing I'm not sure of is the proximity of certain traces, etc. to the edge of the board. I don't know if that's a problem...

I also realized that it may be more useful to create a board that's long and narrow, rather than square. The place where I'm thinking of installing this board could maybe handle an 11-12mm wide board, depending on how much kit material I cut away - but there are other locations I was considering as places to mount the board which wouldn't be able to accept something that wide - but most of them could probably take a longer board... So I may take a second crack at designing this board later. I'm not really designing it with the idea of having other people use it - which is a good thing, because right now the board is so crowded I didn't have much room for silkscreen... But if it works out I may use it as the basic controller board for any project that doesn't need a large number of I/O pins.

I call the PCB design "Raven" because it goes inside an Armored Core. (AC pilots are called "Ravens" - in the old games anyway...)

AC Hakuheisen WIP
"Raven" PCB (top side)
"Raven" PCB (bottom side)
---GEC (三面図流の初段)
There are no rats.
The skulls eat them.
User avatar
tetsujin
Posts: 2353
Joined: Mon Feb 28, 2005 6:08 pm
Contact:

Post by tetsujin »

Well, I discovered at least one problem with that board I designed:

All the PIC's I/O lines sit on pull-up resistors (need pull-up resistors for I2C communication, and they seem like an easy way to both drive and current-limit the LEDs, too) - but one of the I/O lines is shared with the ICSP connector for the programming voltage. This means that if the I/O line is connected to the anode end of an LED, it'll get 14 volts (probably overdriving the LED) if I try programming the circuit while it's connected to the LEDs. (Why would I do that? Basically 'cause I may want to update the program code after the model's sealed up...)

So I'm thinking about how to address this: possibly by another board re-design, replacing the pull-ups on the I/O lines with series resistors, connecting the I/O lines to LED cathode instead of anode, and switching the I/O line between "low" and "open" to turn the LED on and off...

Redesigning the board again will be a bit of a chore (I already redesigned it once, to get rid of a pin header I didn't need and simplify the layout - trimming the board size down from 12x12 to 11x10) but it will mean that I'll be able to use all four I/O lines and safely program the circuit while it's connected to those LEDs...

By the way - can anybody tell me whether I could realistically be able to etch a board like this myself? I designed it with the idea of having it produced professionally - but I do have stuff for etching, so I could try it. I just don't know the limitations of home etching in general. For instance, this board was designed for minimum size - as such the vias are pretty small, and the traces are as small as the board manufacturer would allow. In a situation like that, should I just not even bother trying to etch it myself? Or is it worth giving it a shot?
---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 »

tetsujin wrote: By the way - can anybody tell me whether I could realistically be able to etch a board like this myself? I designed it with the idea of having it produced professionally - but I do have stuff for etching, so I could try it. I just don't know the limitations of home etching in general. For instance, this board was designed for minimum size - as such the vias are pretty small, and the traces are as small as the board manufacturer would allow. In a situation like that, should I just not even bother trying to etch it myself? Or is it worth giving it a shot?
If the board is double sided with thru-hole vias, it'll be a little harder to etch at home, the two difficulties being registration of the front and back side and the vias. You can fix the via problem with thin wire soldered to the pads on each side of the board. Registration isn't too difficult either.

I've shown this single sided surface mount board I made. Everything fit in an 8 pin DIP footprint. My soldering job wasn't the greatest (I was in a rush) but that board regulated the power from batteries and a couple of solar panels that powered a small computer. It survived more than 3 months in the desert, with temps inside the box reaching at least 170F on occasion.

The traces on that board are 0.3mm to 0.35mm wide.

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

Post by tetsujin »

macfrank wrote:
tetsujin wrote: By the way - can anybody tell me whether I could realistically be able to etch a board like this myself??
The traces on that board are 0.3mm to 0.35mm wide.
Reasonably promising, then. The traces on my board are 0.2mm wide (8mil - the minimum as specified by batchpcb.com) so it might work. I think I can get the registration close enough - though I've never tried etching a board, so we'll see...

Thanks for the info.
---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 »

tetsujin wrote: Reasonably promising, then. The traces on my board are 0.2mm wide (8mil - the minimum as specified by batchpcb.com) so it might work. I think I can get the registration close enough - though I've never tried etching a board, so we'll see...

Thanks for the info.
I made that board with Press N Peel blue, in a laminator. If you use a similar toner transfer system, you probably want to use a laminator, since the heat and pressure will be even. if you use an iron, it'll be very hard to get those narrow traces. Also, if you use a toner transfer method, print several copies. I made about 10 copies, and all 10 were good (although one had a missing chunk in a large copper pad).
Madman Lighting
Posts: 1818
Joined: Sat Mar 05, 2005 9:16 am
Location: Serenity.
Contact:

Post by Madman Lighting »

I made my original prototypes using a laser printer and toner transfer. It works OK as long as you put down an extra layer of "sealant" film over the toner to better control the etching.

I used a modified laminator to do the transfers, that gave the best results vs using an iron or other hot surface.

-John C.
That Madman Who Lit Up Deep Space Nine
User avatar
kitty
Posts: 1337
Joined: Wed Jan 23, 2008 6:54 pm
Location: Eindhoven NL

Post by kitty »

You need electronics for your models?

Check out these sites:
http://www.arduino.cc
http://blog.makezine.com/archive/2008/1 ... guide.html

to get a taste of it:
www.sweelssen.com/v3_arduino_small.pdf

they have miniboards and nanoboards that are fully programmable with usb port.
easy to make shields for them with al sorts of I/O (so you get sandwich boards) or solder directly to the pins of the nano boards.
and the stuff is cheap

13 I/O ports and there are also versions with more ports (Sequino)
so with an Arduino you can control 13 groups of whatever, including steppermotors.

Cool stuff
Democracy may be only a few steps removed from anarchy,
But at least it's not as loud.
You broke your little ships. See you around Ahab. :spock:
Shizman
Posts: 288
Joined: Mon Dec 01, 2008 11:24 am
Location: Cambridge, Ontario, Canada

Post by Shizman »

kitty wrote:You need electronics for your models?

Check out these sites:
http://www.arduino.cc
http://blog.makezine.com/archive/2008/1 ... guide.html

to get a taste of it:
www.sweelssen.com/v3_arduino_small.pdf

they have miniboards and nanoboards that are fully programmable with usb port.
easy to make shields for them with al sorts of I/O (so you get sandwich boards) or solder directly to the pins of the nano boards.
and the stuff is cheap

13 I/O ports and there are also versions with more ports (Sequino)
so with an Arduino you can control 13 groups of whatever, including steppermotors.

Cool stuff
This is awesome stuff. Do you think you'll further pursue the Arduino now or continue on with your PIC projects?

Personally, I'm going to get an Arduino to play with but still learn the PIC stuff too.
User avatar
kitty
Posts: 1337
Joined: Wed Jan 23, 2008 6:54 pm
Location: Eindhoven NL

Post by kitty »

In the future it probably will be arduino and sequino stuff because the basic boards are so cheap and easy to program (i'm especially charmed with the arduino nano since it is so small).
Besides, i'll have to delve into the arduino stuff some more because i'm going to build me a RepRap next year.
But i won't forget my initial design for the PIC based electronics for the enterprise lighting, that i will finish because i like to finish what i start.
At least then i'll have 2 universal microcontroller boards that i can use in all sorts of models, no matter what happens with the arduino stuff (and it's something i came up with myself).
Democracy may be only a few steps removed from anarchy,
But at least it's not as loud.
You broke your little ships. See you around Ahab. :spock:
macfrank
Posts: 8726
Joined: Fri Oct 11, 2002 6:55 pm
Location: Los Angeles, CA
Contact:

Post by macfrank »

AVRs (the microcontroller used in the Arduino) tend to be much easier to program in assembly language than PICs. They can also be programmed in C and there are excellent free C compilers and assemblers available for the AVR.
Shizman
Posts: 288
Joined: Mon Dec 01, 2008 11:24 am
Location: Cambridge, Ontario, Canada

Post by Shizman »

kitty wrote:In the future it probably will be arduino and sequino stuff because the basic boards are so cheap and easy to program (i'm especially charmed with the arduino nano since it is so small).
Besides, i'll have to delve into the arduino stuff some more because i'm going to build me a RepRap next year.
But i won't forget my initial design for the PIC based electronics for the enterprise lighting, that i will finish because i like to finish what i start.
At least then i'll have 2 universal microcontroller boards that i can use in all sorts of models, no matter what happens with the arduino stuff (and it's something i came up with myself).
That sounds good. Maybe we should post our findings with what we come up with with regards to the Arduino stuff. I ordered my card yesterday so I should have it shortly. I also want to play around with PICs as well since I want to learn about them too.
Shizman
Posts: 288
Joined: Mon Dec 01, 2008 11:24 am
Location: Cambridge, Ontario, Canada

Post by Shizman »

macfrank wrote:AVRs (the microcontroller used in the Arduino) tend to be much easier to program in assembly language than PICs. They can also be programmed in C and there are excellent free C compilers and assemblers available for the AVR.
Ya, programming them in C is what attracted me greatly. I already have years of experience in this, so I can hit the ground running. Assembler, however, not so much.

This is exciting!
jwrjr

Post by jwrjr »

The downloadable programming environment for PICs (MPLAB IDE) comes with a free C complier. I don't use it as the assembler instructions are pretty intuitive, but its there.
User avatar
kitty
Posts: 1337
Joined: Wed Jan 23, 2008 6:54 pm
Location: Eindhoven NL

Post by kitty »

jwrjr wrote:The downloadable programming environment for PICs (MPLAB IDE) comes with a free C complier. I don't use it as the assembler instructions are pretty intuitive, but its there.
I know, but compared to the Arduino boards, Pic boards are pretty expensive
A decent USB PIC programmer will set you back €100 or more over here.
The Arduino has it's own USB programmer onboard or a cheap USB programmer (€20) that you can remove after programming for the nano's.

Another advantage of the Arduino and the built in programmer is the abundance of open source software already written for them (mainly Java & C so they are platform independent).
So you can get quite far with only copy & paste :)

Not to mention that the electronics (controllerboard, motorcontrol boards etc.) for a 3D printer, 3D milling machine or lasercutter will cost you only € 150 or thereabouts if you go for the arduino and the sofware is already written and open source.
The PIC versions will set you back at least twice that amount (not including the programmer)
Democracy may be only a few steps removed from anarchy,
But at least it's not as loud.
You broke your little ships. See you around Ahab. :spock:
jwrjr

Post by jwrjr »

The programmer that I use for PICs only cost $35.00 (Dollars, not Euros). And it was made by Microchip (a Pickit2). It is not a clone. A clone would cost even less.
As for me, I never use generic project boards. The last printed circuit boards that I had made only cost $3.50 each.
User avatar
kitty
Posts: 1337
Joined: Wed Jan 23, 2008 6:54 pm
Location: Eindhoven NL

Post by kitty »

I don't etch boards myself anymore for environmental and health reasons.
Having a small board (5x3 cm) for 7 leds, 8 resistors and 1 transistor with vias made will cost me about 15 euro's per board.
Not to mention the costs involved in a more complicated and larger PCB.
Besides, i just cannot assemble SMD PCB's, the stuff is too small for my eyes.
So i rather buy an Arduino Nano than start messing about with specific designs that i cannot solder anyway.
I don't have a credit card and i don't want one, i don't like buying on credit.
Just look at what that did to the economy of the US.
Lots of people only working to pay off their debts.
I'm not falling into that trap.
Therefore i have limited resources, since companies like microchip, amazon etc. only accept creditcards.
And why should i bother with designing something if what i need is already available built and for a reasonable price.

Don't forget i live in a 3rd world country as far as modeling or home made electronics are concerned.
25 years ago we had 5 hobbystores in this town (200,000 inhabitants)
and 4 electronics stores.
Now not a single electronic store and only 2 hobbystores , 1 sells mainly trains and a few kits (military vehicles) and the other only RC stuff.
I doubt that you can find 2000 people in the Netherlands that are into modeling (and i'm leaving trains and RC out of that equasion)
I have to drive 1-2 hours to get resistors, capacitors, LEDs, TTL and CMOS chips etc. (and only a limited assortment there) or order from an online shop.
So generic boards aren't so bad for me.
Democracy may be only a few steps removed from anarchy,
But at least it's not as loud.
You broke your little ships. See you around Ahab. :spock:
modeler1964
Posts: 400
Joined: Sun Oct 21, 2007 8:26 am
Location: Tiger Town, Louisiana

Post by modeler1964 »

Kitty
Thanks for the info on the arduino boards. I have often wondered why a system could not be designed to provide navigation lights, tos nacelle effect ,strobes and interior lighting without having to buy 3 boards to do it. Seems like this product could be the answer. How bad is the learning curve for a newbie and programing these things?
Kindest Regards
Bryan
Madman Lighting
Posts: 1818
Joined: Sat Mar 05, 2005 9:16 am
Location: Serenity.
Contact:

Post by Madman Lighting »

It IS possible to make such a board, I was actually thinking of doing such a thing myself as a new product.

Theres just two small catches: cost and available market.

What would people pay for such a kit and how many people will buy it to justify the development cost?

Answer up people: What would be a fair price for such a beastie and how many actually want one? Wish hard enough and you'll get it!

-John C.
That Madman Who Lit Up Deep Space Nine
User avatar
Disillusionist
Posts: 1134
Joined: Wed Apr 09, 2003 10:11 pm
Location: Closer than you think

Post by Disillusionist »

modeler1964 wrote:Kitty
Thanks for the info on the arduino boards. I have often wondered why a system could not be designed to provide navigation lights, tos nacelle effect ,strobes and interior lighting without having to buy 3 boards to do it. Seems like this product could be the answer. How bad is the learning curve for a newbie and programing these things?
Kindest Regards
Bryan
Although I come from an electronics background, I'm a complete newbie to micro controller programming. However, I ordered an Arduino Duemilanove, and have been playing with it the past couple of days. It's really a nifty (and very versatile) device. The programming isn't that bad at all. There's a learning curve, obviously. But, when it comes to flashing and dimming LED's for models, that's pretty simple to achieve.
Post Reply