Tuesday, January 13, 2015

Time to Roll your own..........

I love circuit design. I can do it all day and enjoy the reward of having a functional design that looks good too. Its sorta like making an art project, except mine are usually never seen, unless you lift the lid........

I realized that I was using my arduino commercially purchased board as a test bed. While this works, really makes no sense to use it in the final prototype as it just ties up a board I can really use some place else for testing, hence time to roll my own.

I had been using the Atmega Arduino 2560 board as a test bed. While I love this board, it used for playing and testing not for final projects. I did a little digging and really designing a arduino compatible board is pretty simply, and there are so many different types and sizes to choose from. I had been using a breadboard version of the Atmega644, primarily because I had it, it has 23+ I/Os and 64K of memory to use. I have used virtually every MCU out there from the atmega2313, to the Atmega2560. I looked around and decided the Atmega2560 was good but with all the 100 pins to solder, and they only came in TQFP flat packs I looked at perhaps going a little smaller. In all reality the 644 is a good chip, but its kinda funky. I use it and just ignore the funky stuff...by funky stuff I mean it was originally used in 3D printing in the early days....and quite frankly it was passed over rather quickly when the Atmega1280s came out, which was in the same package but had double the memory (128K).....I decided to stick with the ATMega1284. It is available in both the TQFP package and as a 40DIP. I have both.

Most that I have found dont come with a bootloader either, which in reality doesnt bother me as the 644 didnt have one either, I just used ICSP. I have gotten so used to using In Circuit Programming that I really dont care about the bootloader and it gives me an additional 2K of memory that the bootloader would have taken anyway......

Generation 1 of the 644/1284 arduino compatible




The board works nicely. Its just 2.4inches long and 1 inch wide. There are again no USB ports but a hardwired ICSP port. You just need RESET, MISO, MOSI and SCK to program this chip. Its 12Vdc power in is knocked down with the use of a very nice and more robust 5V LDO regulator. This VR has about twice the required heat sink area since I used both the top and bottom layers on the board and the plated through holes allow heat to travel between the layer and air to pass through the holes....I wished I had thought of this, but I didnt....but it works really really well for very little space needed on the board. You can still feed 8V in which I probably will, but this board will take the full 12V if desired.

I went ahead and designed the 328 board as well. I did one in DIP and one with SMD. I did this because there is a need for it in the project that you will see later, but Ill show the two designs here




The top one is obviously the smd version and the bottom the DIP. Again with the larger heat sinks and the plated holes both of these will take 12 volts. Also to note all of these are wired for power indication, the smd versions are all one .8inch header centers, and Digital Pin13 is hard wired with a LED for checking things....if I have a problem, to eliminate the possibility that the MCU is bad I always load the "blink" sketch......this will cause D13 to go high and low, and the PGM LED will then blink....saves time and heartache.

So there you have it the roll your own versions of the MCU for the controller. Now we can get to the firmware.........

No comments:

Post a Comment