项目创意

10块钱成本自制Arduino淘宝商家别怪我

字号+ 作者:duino123.com 来源:未知 2016-04-28 16:24 我要评论( )

毛主席说过:自己动手丰衣足食,虽然我们已经小康了,这种精神还是要继续发扬!10元成本自制Arduino,淘宝商家如果知道了会不会哭?

PLCLIVE.COM注:
毛主席说过:自己动手丰衣足食,虽然我们已经小康了,这种精神还是要继续发扬!10元成本自制Arduino,淘宝商家如果知道了会不会哭?






This Instructable shows how to bootload and mount an Atmega328, Atmega328p or Atmega328p-pu for any project. This is a great way to save money by purchasing Atmega328 DIP package microcontrollers instead of using the Arduino development board itself. I put this together at techshop to be able to bootload microncontrollers for future applications they don't do a ton in electronics or programming but you can make some sweet gagets / enclosure there: http://www.techshop.ws!

You can purchase bootloaded Atmega328s from places like sparkfun but it's usually quite cheaper to get a non-bootloaded microcontroller. The Atmega328p-pu used in this instructable was purchased from tayda electronics for 3.50$, its a good place to buy many electrical components. All components except the wires and the arduino itself was purchased from http://www.taydaelectronics.com

I didn't make the code for the bootloading, I'm using the code offered at https://github.com/WestfW/OptiLoader

元件清单:
Atmega328烧写部分

1 - Arduino Uno with a bootloaded Atmega328
1 - Atmega328, Atmega328p or Atmega328p-pu
1 - 16MHz crystal
2 - 22pF Capacitor
1 - 10k ohm resistor
1 - breadboard
wires
主体部分
1 - Atmega328, Atmega328p or Atmega328p-pu
1 - 16MHz crystal
2 - 22pF Capacitor
1 - 10k ohm resistor
1 - breadboard
5v DC power source or
DC power source above 5v with voltage regulator (Step 6)
wires
(可选元件)
1 - LED
1 - 220 ohm resistor
1 - pushbutton
1 - 10k ohm resistor
1 - 0.1uF capacitor

Step 1: 烧写原理图



With the parts required, this is the schematic for bootloading the Atmega328.

In some cases the 16Mhz crystal circuitry is not required if the Atmega328 registers are set to use the internal clock. But if you include the circuitry it wont matter either way. (so I just recommend including it anyways)

A possible issue: as you can see the VCC to the Atmega on the breadboard is powered by Digital pin 9. This could be a problem since it can only supply so much current to the breadboard. So do not add any other circuitry to this otherwise it may not work. The VCC is connected to pin 9 so the code can easily reset the microcontroller for programming.
 
 

Step 2: 烧录程序



I'm using code from the source https://github.com/WestfW/OptiLoader

You need to make a program with a .ino file (arduino file) also a .h file (header file) and copy the code from the website.

I also included a zip file that has the program already.

Once you have this project made verify and upload to your Arduino.

If you want some feedback while the Atmega328 is being bootloaded you can connect a serial terminal to the Atmega328s serial TX pin (pin 3). To do this you will need a RS-232 to USB cable, and a terminal program like docklight or X-CTU. (This is not required)

Once the Atmega328 is bootloaded you can test it by taking the Atmega328 from the Arduino and replacing it with the recently bootloaded one. Try uploading a program to the new Atmega328 and see if it works! I would suggest uploading the blink program since no circuitry is required to see if its working.

下载OptiLoader.zip
 

Step 3: 烧录Atmega328


That should complete it for bootloading yourself a new Atmega328!

If bootloading was unsuccessful you can reference the https://github.com/WestfW/OptiLoader readme. You can also try switching the pin 9 to VCC for powering the Atmega328.

I have done this bootloading multiple times with many microcontrollers. I would recommend getting the Atmega from tayda electronics  and getting the Atmega328p-pu. The Atmega328 is a higher power chip than the p/p-pu model so if your using that model the current from pin 9 may not be enough.

 

Step 4: 烧录完的Atmega328



This part of the instructable is for mounting a Flashed Atmega328 (the chip has been bootloaded and programmed by the Arduino). 

In this instructable the blink program is flashed on to my Atmega328p-pu.

Note: The capacitor connected between VCC to Ground isn't needed and it isn't included in the schematic. (it's a 1uF capacitor)

Step 5: Atmega328原理图





Here is the schematic for mounting the Atmega328 onto a breadboard, in most cases if your making a project you will be mounting this onto a PCB or a prototyping board. 

The LED connected to digital pin 13 is not needed, but works as a good test to check and make sure your circuit works.

The circuitry for the RESET (pin 1) is also optional, if you dont want to include a reset button you must directly wire that pin to VCC. 

As you may notice there is no power source, this is because its optional what way you want to do it. The power to this circuit MUST be 5v. If you have a power source higher than 5v you can include a 5v voltage regulator in the circuit. (circuit example on next step).

Also in some cases if your using the analog pins you need to connect pin 21 to VCC.

The second picture is a schematic of the breadboard layout, the circuit is exactly the same. The external circuitry depends on what you have connected to the pins for your projects.

Step 6: 安装Atmega328稳压器


Here is a circuit example of using a voltage regulator.

ONLY NEEDED if your DC source is above 5v.

You can purchase a 5v Voltage Regulator from here:
http://www.taydaelectronics.com/ic-integrated-circuits/voltage-regulators/lm7805-l7805-7805-voltage-regulator-ic-5v-1-5a.html

The C1 and C2 capacitors depend on the voltage regulator your using. The Voltage Regulator's datasheet should tell what values the capacitors need to be. These capacitors are usually around 0.5uF to 0.1uF.

Step 7:


Step 8: 总结

In most cases you will be mounting the Atmega328 onto a prototyping board and soldering it for projects. I suggest you get a 28 PIN DIP Socket for the microcontroller so it can be removed. 
I hope this instructable was helpful, following these processes is quite simple you just need the required parts!

如需更详细资料,如有好资源分享,请加入QQ交流群:214461008

欢迎阅读,欢迎转载,不用注明出处!本站只提供入门和进阶资料,做您学习的小伙伴!

老司机也欢迎光临指导!有好内容请加群:214461008 不要看声明了,看内容吧!

相关文章
  • 如何在面包板上自制Arduino

    如何在面包板上自制Arduino

    2016-04-28 12:40

  • 自制Arduino容性开关

    自制Arduino容性开关

    2016-04-28 12:39

  • 自制Arduino摩斯码解码器 你以为你是007吗

    自制Arduino摩斯码解码器 你以为你是007吗

    2016-04-28 11:05

  • 自制Arduino全功能气象站

    自制Arduino全功能气象站

    2016-04-27 16:22

网友点评
Arduino