2

I am building an electronic gadget eventually to sell.

I think the Atmega IC is used in the arduino and could this be programmed as easily as the arduino?

I'm wondering if I can use the chip and buy just what I need for my circuit, which would be cheaper as there would be no licensing obligations to the Arduino company

Cheers Eamonn

migrated from electronics.stackexchange.com Feb 13 '15 at 17:51

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • What "licensing obligations" are you worrying about? The Arduino is open source hardware, which has been cloned by many other companies. Also, you will probably find that a cheap clone costs less than you would pay for the parts. – DaveP Feb 19 '15 at 5:25
  • @DaveP. I had a look on the Arduino site and they mentioned a fee for producing a product for sale. Maybe its just if you want to have the product promoted on their site and you would have the arduino logo on the product. I will do a bit more rescearch so thanks for the info. – Eamonn Feb 20 '15 at 23:55
6

Short answer: Yes. After all, Arduinos are made by starting with an ATMega (or other AVR) IC.

Longer answer: People - including myself - routinely build with a bare ATMega328p (or other MCU), programming them off-board on another system, or providing connections to allow programming them in place. Beyond that you only need the soldering skills for the chip you choose (if you're building the boards yourself). I use DIP ICs and off the shelf through-hole PCBs and hand-build one or a couple at a time. Quad Flat-Package or Surface-Mount chips are another step up in complexity for the hand-builder.

2

I'd like to second the other posts - if you are familiar with Arduino, going to a stand-alone chip is very easy.

You miss out on the following things: programming via USB, 7-12volts through the power jack, and/or power through USB, reset button, led on pin 13, and the clock. Depending on where you get your Atmel chip, you may also need to set the fuses.

The code is exactly the same, even if you go down to a smaller chip (or larger - whatever suits your project best!).

Programming: I use a FreeTronics ICSP (ISP) to program the chips, and have the 6-pin ICSP header on all my projects for easy reprogramming. This particular programmer has a "slow clock" jumper, because when you get the chip from the Atmel factory, their internal clock runs at 1mhz, too slow to program with the Arduino IDE default settings. You can leave it at 1mhz, if your project doesn't need any more, or change the fuses. You will need an ICSP to set the fuses (see further down). By using an ISP rather than usb, you also save a little memory - you don't need a bootloader (which is pre-programmed on Arduinos, but not when you buy the chips from the factory).

You will need to sort out your own power - this depends on what you need, and what you have. You can use a 5-volt AC-DC power supply ("Wall wart") and plug it into mains. Or, you can power it off USB - if you only use USB for power, you can solder the socket directly on your board. You can use a regulator (which is what the Arduino uses for the 7-12v power socket), or, if running it off a 12v power supply, it might be easier/cheaper to buy a car phone charger from the dollar store, and a lot of the work will be done for you. Also, the power supply doesn't have to be 5v - depending on your application, you might run it from 5.5v to as little as 1.8v, depending on your clock speed. Find the data sheet for the chip you use.

A reset button is very easy to add, if you need it - all it takes is a resistor and a pushbutton. Weather you need it or not, depends on your project.

The same applies to the led on pin 13 - it depends on your project.

Finally, the clock. The Arduino has a 16mhz quartz clock. You can do the same, it only takes 3 components (you will have to set the fuses, see further down). You can use a clock up to 20mhz, giving you a 25% speed boost if you need it (you may need to change some settings, because timing functions like delay depend on the clock speed - your delays will be 25% shorter). Or, you can use the internal 8mhz clock (either at full speed, or as from factory, at 1/8 speed, so you get 1mhz). At 4mhz or less, you can run the Atmega at 1.8 volt, or 0.7 volt for the "pico power" chips.

As I have mentioned, you may need to set the fuses to the correct value. The best idea is to go to http://www.engbedded.com/fusecalc/ to work out what fuse settings you want. Specific things to look for: the clock source (internal or external? what speed?), divide clock by 8 internally, and brown-out detection (Arduino chips turn themselves off when the power goes below 4.3v). Warning: setting wrong fuses may set your chip so it is very difficult to fix. You can set the fuses using an ISP; if the clock speed is very slow (I think < 4mhz? which it is when it comes from the factory), then you will have to "slow program" - some ISPs have a "slow program" jumper, but you can use an option to avrdude to do the same - I think it's -B e.g. -B10).

  • ^ for a comprehensive answer. – JRobert Feb 17 '15 at 21:12
1

That's what I do all the time. You might want to buy an ISP programmer to program the chips (e.g. USBASP or usbtinyisp). If you just want to try things out first, you can use your arduino board as an programmer by uploading the ArduinoISP sketch.

The Arduino Uno uses an ATMega328, but you could use other AVR chips too. E.g. the ATMega8, which is slightly cheaper. Or an ATTiny85, which only has a few pins, and is therefor a lot smaller (also cheaper). So you can choose a chip that best fits your needs.

0

Arduino of course started as a prototyping platform. Build this first, get it working, then move to a circuit board of your own design with the same chip and go from there. However, as the cost of all the components and really the boards themselves drops, I frequently find my self thinking, why not just use the board. Obviously if you are going to market something, having a full arduino in there might be a bit much, but if its just for your own application, I don't see any reason why you wouldn't just buy boards and use them as necessary.

0

Thanks for all the replys. I have a lot to learn as I only heard of arduino a month ago. Didn't have a reason before. My arduino hasn't arrived yet so I made my basic circuit with components on a breadboard. I think I will need the arduino as I need some monitoring in the circuit.

Thanks again much appreciated. Eamonn

0

Since you are already using Arduino, I think you not should use atmega, but must! To prevent future headaches, since you look new to electronics, I HIGHLY recommend to check for app notes by Atmel. Just type it "Atmel app notes" at google and you will find a lot of useful tips. Some of them are start to routing by crystal resonator, them GND and Vcc. Use, if possible, on each IC a 100nF ceramic SMT capacitor nearest as possible and another one of 10uF (can be electrolytic) on most robust ones (like microcontroler). Always route opposite signals (like Vcc and GND) tied together with the same size to low its impedance... If you are doing with high inductance loads you should use another sorce (and maybe also a diode as rectifier or an optocoupler).

There's a lot of good practices and if you want to sell your work, you really have to study them.

Good luck! Also look for the electronics SE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.