Go Down

Topic: Arguino design to standalone project (Read 1 time) previous topic - next topic

DaveMac

Hello,

I have recently discovered Arduino and have some ideas to projects I'd like to try.  If after getting a working prototype is it possible/difficult to convert this into a standalone board?   I've done some research and answers seem to vary from having to convert the Arduino code to AVR first to being able to just put the Arduino code on some of the chips directly.  Any advice /pointers appreciated and I apologise for any terminology I have used wrongly!

Dave

Coding Badly

Hello,

If after getting a working prototype is it possible/difficult to convert this into a standalone board?


Upload the final version of your program.  Remove the processor from the board.  Connect a pull-up resistor to RESET.  Connect a resonator or crystal (plus capacitors) to XTAL1 and XTAL2.  Connect 0.1 uF across all VCC / GND pairs.  Connect all the accessories to the processor.  Apply power to all VCC / GND pairs.  Enjoy.

Purchase a replacement processor.  Repeat.

(If you get a "blank" replacement processor you should install a bootloader before the stuff above.)

Quote
I've done some research and answers seem to vary from having to convert the Arduino code to AVR first


Huh?  What is "AVR code"?

Quote
Any advice /pointers appreciated and I apologise for any terminology I have used wrongly!


Other than "Arduino code" and "AVR code", your terminology is fine.


Coding Badly


The processor has an internal oscillator capable of running at 8 MHz so the resonator / crystal is potentially optional.

strykeroz

Hi Dave,

There are lots of resources online explaining how to do this.  I bookmarked this one by Nick Gammon as the best I've found.

When you set it up, if you include the headers so you can use an FTDI cable or breakout you can still program it with the IDE.  

Have fun ! Geoff
"There is no problem so bad you can't make it worse" - retired astronaut Chris Hadfield

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

nickgammon


I've done some research and answers seem to vary from having to convert the Arduino code to AVR first ...


I certainly wouldn't bother doing that (whatever it means exactly). Code generated by the IDE (the .hex file) can be easily run on a standalone Arduino. The chip doesn't know which board it's on.

As strykeroz kindly pointed out, this post of mine describes doing that:

http://www.gammon.com.au/forum/?id=11637

I made an alarm clock on a standalone board (using the Arduino IDE) here:

http://www.gammon.com.au/forum/?id=11165

Another post about minimal boards:

http://www.gammon.com.au/forum/?id=11109
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

DaveMac

Thanks for the replies, I've certainly got a lot of reading to do.

Dave

Go Up