Sunday, June 10, 2018

Arduino Minimization [Part 1] Standalone MCU [Eng]

The development board, the Arduino series, is really an easy-to-access development kit that does not need a foundation in electronics to make real electronic circuitry. It's like programming in BASIC language.
arduino uno에 대한 이미지 검색결과
Arduino Uno

However, when using the development board such as Arduino Uno, there are some troubles. One is to purchase Arduino Uno whenever you develop to practice miscellaneous projects. The genuine price of Uno board is about 20,000 won(Korean), and the compatible product is about 5 ~ 6 thousand won, so purchasing several boards for simple experiment is a burden. I've been testing a lot of trivial things because of curiosity. That's why I bought many development kits like Uno, Mega, and Due. In the end, I remember wandering to Ali Express and buying a compatible board as cheaply as possible.

It is a little unfortunate that you try to disassemble what you've already made on the breadboard each time to try something new. It's no different than buying an expensive Lego to destruct to make new one.

Another problem is the size of the development board itself. I try to implement a simple system, but even the simplest uno board is not small enough because it is the size of a palm. And it's a little annoying that it contains things that seem to be not needed. Of course, there are smaller versions like Arduino Pro Mini and Arduino Nano that have the same performance to Uno.

arduino nano에 대한 이미지 검색결과
Arduino Nano
arduino pro mini에 대한 이미지 검색결과
Arduino Pro Mini
Arduino Pro Mini is the smallest but requires a separate FTDI to upload sketches.

ftdi232에 대한 이미지 검색결과
FTDI232


The Arduino Pro Mini still has some unnecessary elements inside, such as voltage regulators, indicator LEDs, and switches as the case may be. If only the MCU is available, it can be integrated directly on the development test board, which will be most advantageous for miniaturization. So, can not we just use core chips (MCUs)? Of course, it is possible, but there are some restrictions to use it. Let's talk about the easy-to-handle DIP type. (If you can handle SMD well, you can use SMD type.)

atmega328p dip에 대한 이미지 검색결과
ATmega328p DIP type

ATmega328p (below 328) in the form of DIP can be used on a universal board. From now on, let's just talk about the more important thing, not just appearance, for using the MCU in an independent form. First, an external power supply is basically required for the MCU to operate.

atmega328p pinout에 대한 이미지 검색결과
ATmega328p Pinout

The 328 has two VINs. The power must be applied within the drive voltage at pin numbers 7, 8 and 21, 22. The 328 may already be operational when the power is turned on. However, an external clock signal must be provided for normal operation. This part corresponds to pin numbers 9 and 10 written in XTAL.
arduino uno crystal oscillator에 대한 이미지 검색결과
Crystal
The 328 can be driven with an external clock with a set of power and crystal + capacitors. However, you can also remove it because the 328 contains its own oscillator already. So why use an external clock? It is because of the difference in precision performance that 328 can not use 16Mhz, which is the default speed in Uno, when using internal clock, and it operates at 8Mhz maximum.

You do not have to use 16Mhz, right? That's right. If you are dealing with sensors for IoT implementation, logic implementation is more important than the clock speed. Of course, even in the case of logic implementation, if the sensor needs the sophisticated timing and resolution, it is good to be unconditionally fast. And the timer is limited to half of 62.5Khz at 16Mhz because it runs at clock speed.

Please read the following article about timer:

But today, our value lies in miniaturization. Let's use the built-in oscillator and proceed to the next story.

With the built-in oscillator, there are no additional components to connect to the 328. Now let's talk about how to get a program (sketch) upload. This part will be covered in [Part 2].

I think the convenience of the Arduino is probably due to the bootloader in many case. It obscures the complex settings for the MCU and eliminates the need for programming peripherals. Next, let's talk about it.


Coming soon: Using Arduino Minimization [Part 2] Bootloader










No comments:

Post a Comment