Pages: [1] 2   Go Down
Author Topic: Ok, I finished an Arduino project. How to make it permanent?  (Read 6777 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey everyone,

I've been messing with Arduino since the Duemilanove version came out (the one I still use today), but I always faced the same "problem". Every time I finish a project, I document everything and later disconnect it so I can use the board into another project. I see the Arduino as a development plataform, so despite being cheap, I don't intend to buy one board and make it definitive for each project I work on.

That said, I was looking for an alternative to make my projects permanent after I prototype it on the Arduino. I've ran into some options:

1) Buying a standalone ATmega328, burn the bootloader, upload the sketch using my current Arduino, remove it from the socket and put it into a perfboard or something, connecting the other components (oscillator, capacitors etc).
2) I've seen a lot of material about uploading sketches to ATtiny45/85, using the Arduino as an ISP. I think this is incredible, specially because the ATtiny's are very cheap.
3) Using an Arduino Nano.

Number 1 seems to be the best one, but I'm not sure about one thing: most of my projects uses serial communication to the PC through USB. Does the ATmega328 provide this functionality or I'll also have to add some FTDI chip or something? I'm looking for the most simple alternative.
Number 2 I like a lot, but because I use USB/serial communication most of the time, I don't think it's possible (but for PC-independent applications, it's awesome).
Number 3 seems like I'm wasting a lot of resources too (feels like "throwing an Arduino away").
Is there any other alternative?

To sum up, I'd like to hear opinions on the best alternative to make a permanent hardware after I prototype my project with the Arduino, keeping the serial-over-USB functionality.
What are you guys opinion on this? How do you manage your finished projects?

Kind regards,
Fergo
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

3) Using an Arduino Nano.

Number 3 seems like I'm wasting a lot of resources too (feels like "throwing an Arduino away").
Is there any other alternative?

Sounds like you need the ATmega processor, crystal, and USB-to-Serial hardware, which comes to about 90% of an Arduino (Nano or UNO).

If your sketch can run on an 8 MHz Arduino you could use the internal RC oscillator.  That would save the cost of the crystal and caps (about $3).  I have seen articles about using cheap ($3) cellphone data cable for USB interface so that might work with an ATmega328P to give you most of an Arduino UNO for about $10.

 The ATtiny85 only has 8 pins.  You have to keep Vcc and Ground. You probably also want to keep Reset so you can re-program the chip without a High-Voltage Rescue Shield.  I think they left out the serial port, too.  Might make that USB-to_Serial cable useless. smiley
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the answer John. So, If I understood correctly, the USB/Serial functionality is not native into 328?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the answer John. So, If I understood correctly, the USB/Serial functionality is not native into 328?

That is correct. 

There is a newer Arduino design called the Leonardo that uses an ATmega chip that does include native USB.  Unfortunately those chips only come in surface-mount packages so they are not nearly as easy for a hobbyist to work with.  You might want to look into a Leonardo clone (the official board announced last September is not shipping yet as far as I can tell).

The USB-to-Serial chip on the UNO and MEGA is actually a small ATmega processor with native USB.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could learn how to use ArduinoISP and then load your Arduino board with ArduinoISP (from 022 or 023) and then get some blank 328P chips (328 chips work, but the signature is different). Then you could load your sketch into a chip and save the chip to run just that code.

I have made a couple dedicated cable sets - one goes to a board with 2 sockets - 1 for an ATtiny2313 and the 328(P)(has 2 sockets) and the other ends in a 6 pin header that will connect to the ICSP connector.

I just load the ArduinoISP sketch, and use my Arduino to program the other chips. Either load just the sketch, or load a bootloader so I can put the 328 in my Arduino board and use it there.

I think haveinf a few spare 328 chips with the bootloader already loaded is just a good practice.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12932
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey @Fergo,

2) I've seen a lot of material about uploading sketches to ATtiny45/85, using the Arduino as an ISP. I think this is incredible, specially because the ATtiny's are very cheap.

...is my favourite however it does not easily provide this...

Quote
keeping the serial-over-USB functionality.

...which is when I turn to these...
http://www.pjrc.com/teensy/
Logged

Northern California (by San Francisco)
Offline Offline
Sr. Member
****
Karma: 3
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Let me second Coding Badly's suggestion of the Teensy. They cost $16 but they work really well if you need the serial over USB function. The other option I have used to buy a cheap USB programmer off of eBay and use it with an RBBB (Really Bare Bones Board) Arduino. That ended up costing about the same.

Adafruit sells a board for $20 that is similar to the Teensy. http://www.adafruit.com/products/296 But I could not get that board to work with serial over USB. (Plus I had a real tough time programming that board. The Teensy was much better.)
Logged

Cleveland, TN
Offline Offline
Full Member
***
Karma: 2
Posts: 207
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I will throw one more point in here. Sparkfun sells the 328p with the bootloader already on it for $5.50 which saves a little bit of headache and it is still really cheap for option one but you will need to add the FTDI chip and peripherals. I have seen cables with the FTDI built in which might also be an option.

http://www.sparkfun.com/products/9718  FTDI Cable

http://www.sparkfun.com/products/10524 328p with bootloader.

Logged

Luck,

Wade

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1925
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, with the low cost of Arduino-compatibles at $19 to $20 , it seems to make sense to stick with the standard form factor with regular USB, and no compromises or programming issues.

DISCLAIMER: Mentioned stuff from my own shop...: like these:  http://goo.gl/uAFvA   Comes with a regular USB cable..

WhatIf you could buy a package of 5 at, um, $18 or $19 each? Would that be useful / interesting? 

Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12932
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
with regular USB

What is "regular USB"?

Quote
it seems to make sense to stick with the standard form factor ... and no compromises or programming issues

Comparing a "standard form factor" board to the Teensy, what are the compromises?  What are the programming issues?
Logged

London
Offline Offline
Full Member
***
Karma: 0
Posts: 146
Ugi was not declared in this scope
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I always seem to end up with my projects on bits of perf-board.  That way you can add as much or as little as you need in terms of components.

A '328 in a socket might set you back about £4, add £1 for crystal (unless you are running at 8MHz internal which is fine for many projects), caps, reset switch and a pull-up resistor and you are good for most projects.  Occasionally you might want power and/or pin 13 LEDs with 1Ks.  Cost of those likely to be trivial.  If you are not using a smoothed 5V supply or power from USB then you will want a votage regulator.

If you want to keep USB communication then a CP2102 based USB to TTL converter will add another £2 but might save you needing to add a voltage regulator.

Likely max cost of the controller part of the project, even allowing for a few headers etc is likely to be £7-8.  Not much less than £12ish for a nano but you can still make 3 projects for the price of 2.
Logged

California
Offline Offline
Faraday Member
**
Karma: 88
Posts: 3382
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If most of your projects need the Serial to USB functionality, how many of these devices do you have connected to the computer?
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6619
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you don't need USB functionality in your finished project, then it's quite simple to build your circuit on stripboard. Buy a blank atmega328p chip (no need for a bootloader) and include an 6-pin ICSP header in your design. Then you can program (and re-program) the chip in it using your Arduino as an ICSP. See http://miscsolutions.wordpress.com/2011/08/09/prototyping-small-embedded-projects-with-arduino/. You can cut the component count by using a 3-pin ceramic resonator instead of the crystal and two capacitors.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1925
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
looking for an alternative to make my projects permanent after I prototype it on the Arduino.

That's where we started... My point was that if you have everything worked out on a standard Arduino 328 board, then if a board costs $19 or so, maybe you don't need to change form factors, change pin connections, worry about USB or not etc etc.

If you want to miniaturize it, or want to go to very low battery power etc, that's a different set of considerations.  Then Teensy or ProMini are attractive.
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27114
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There's also options like this
http://store.nkcelectronics.com/arduino-pro-328--5328516.html
Connect up your power, ground, IO as needed.

Or build up what tou need
http://store.nkcelectronics.com/arduino-runtime-board-rev-b.html
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1] 2   Go Up
Jump to: