Last updated by at .

Monthly Archives: July 2012

Tricopter fitted with a canopy becomes more stable

I have tricopter flight test as it has been posted here, be fitted with a canopy. Tricopter face becomes more beautiful and graceful. Once I tried to flight test, different looks, performance becomes more stable, especially if the thrust me down became not come down quickly because there is an air cushion.

I plan to add wings to the arms in front to look more beautiful. Or may increase the stability of the aileron.

Flight test

YouTube Preview Image

Cincopa WordPress plugin


Posted in Multicopter Frames, RC Model, tricopter | Tagged , , , | Leave a comment

Flight test of tricopter using ver. 3 airframe

In this post about tricopter testing using a airframe design of version 3. Regarding the design of the airframe of ver 3 was designed by me, I have posted here. But some  modifications has been made to reduce the high vibration, by releasing the motor protection is made of fiberglass. Furthermore, the motor is placed directly above the tip of the arm, fastened with bolts and Rivet.

This is an experience of second time as pilot, I can fly tricopter with confidence to the stable with no accidents.

First Test

YouTube Preview Image

Second Test

YouTube Preview Image

Third Test

YouTube Preview Image

Fourth Test

YouTube Preview Image

Specifications

  1. Frame size
    Arm size, Motor axel to center about 47Cm. Motor axel to motor axel about 82Cm. Height about 19Cm.
  2. Brushless motor
     3 x DT750, drive with 20A ESC.
  3. Propeller
    1 CW 11×4.7 + 2 CCW 11×4.7
  4. Controller
    KK Board ATMega 168
  5. Power
    LIPO Turnigy nano tech 50A, 2200maH
  6. Weight
    Total 1290gr

 

Cincopa WordPress plugin


Posted in Multicopter Frames, RC Model, tricopter | Tagged , , , | Leave a comment

Build the Arduino board using ATMega8/168/328 chip

This post is for who want to learn Arduino but a thin pocket to buy a relatively expensive Arduino board. Or for those who really love the person who tinkers electronic hardware. Microcontroller ATmega 8, 168 and 328 have the same number of pin is 28 for DIP packaging, microcontrollers are selling a lot of this type are relatively cheap compared with other microcontroller. By having one of the microcontroller and coupled with a few components can actually function like the original Arduino board.

Build an Arduino board

To make the Arduino microcontroller there are many choices of which will be used. But in this post could use the ATmega 8, 168, 328. I use the ATmega 328 with larger program memory capacity is 32KB. this post could use the ATmega 8, 168, 328. I use the ATmega 328 with larger program memory capacity is 32KB.

Components are supposed to provide are:

  1. IC1: Microcontroler ATMega8/168/328, it’s up to you please choose one.
  2. Q1: Resonator Crystal about 8MHz or 16MHz.
  3. R1: pullup resistor for reset about 1K – 10K.
  4. C1 and C2 about 22pF.

 You can build on perforated veroboard or breadboard. By using the breadboard pins you can connect using a single wire diameter of 0.5mm. If using veroboard, to connect between the pin, use a single 0.5mm wire soldered directly.

Build on breadboard

Build on perforated board

VCC supply voltage is 5VDC, not to reverse the polarity, if it does then it will make the microcontroller burned.
To fill the bootloader program, usually using ICSP with 4 signal MISO, MOSI, SCK and RESET. I recommend using USBasp can be made using the ATmega8 microcontroller.
Supply voltage of 5V can disuply USBasp programmer, by taking power from the computer USB port. How to make USBasp programmer click here.

I built USBasp like the one on this link.

Burn bootloader

To upload program serially using the Arduino IDE, bootloader program should be flashed into chip ATmega328. Bootloader is used if you are uploading a program via the serial RS232 interface.  This uses pins of RX / TX’s  microcontroller, in addition to the RST pin is used to reset automatically when the upload program.

But if you do not use this method, there are other ways to use the pin MOSI, MISO, SCK, RST of microcontroller, by using a USBasp programmer or other. The Arduino IDE of 1.0.1 version capable to program this method via this pins. In this way the bootloader certainly not required.

To burn bootloader:

  1. Connect the USBasp programmer to MISO, MOSI, SCK, RST of microcontroller pins.
  2. You can use the 5V power supply of USB/programmer or use a separate power supply.
  3. Run the Arduino IDE.
  4. Select menu Tools->Board-> “Nano Arduino w / ATmega328″. Chip is recognized as a bord ATMega Nano with 16MHz crystal.
  5. Select menu Tools->Programmer->USBasp. If you are using another programmer choose accordingly.
  6. To burn bootloader. Select menu Tools->Burn Bootloader.

Equally important is to know the connection USBasp programming on the programming process to succeed. At USBasp There are two types of connectors and 10pin 6pin. I use the 10pin type USBasp homemade.

Programming pin on USBasp is MISO, MOSI and SCK are connected to the MISO, MOSI and SCK the target microcontroller. While RES is connected to the RESET to reset the target microcontroller into program mode. VTG is a voltage source while the +5 V from USB port of your computer. GND is the common channel. So the total that must be connected to the microcontroller board is 5 cable if you have a supply voltage of +5 V itself. If the board and do not have a +5 V supply and is obtained from a computer USB, VTG microcontroller is connected to VCC. Care should be taken not to both, to avoid damage to the computer because the voltage to be clashing.

YouTube Preview Image

Upload Program

To test whether the bootloader worked fine, tried to upload a program from existing examples on the arduino called “blink”. Connect your computer TX -> Arduino RX (pin 2), RX computer -> arduino TX (pin 3), DTR computer -> Arduino RESET (pin 1). Remember the three channels of serial computers must have a TTL logic level voltage 0 V or 5V. If you use a USB to serial in general, the output is still in its early stages RS232 voltage levels. To convert RS232 to TTL voltage levels using MAX232 IC.

YouTube Preview Image

Posted in Arduino, Tutorial | Tagged , | Leave a comment

Testing of the Arduino Servo library on brushless motor’s cesna 130-46

I’ve created an Arduino ATmega328 built on a perforated veroboard. To connect between pins, I use in soldering wires directly. I use a 16MHz crystal clock and  the Arduino will recognize  as a board of “Nano Arduino w / ATmega328″.

In order board is easy to use, I added a header connector as in the rc receiver configuration is GND / +5 V / Signal. To facilitate the program upload the ISP, pin TX / RX / RST microcontroller mounted single header connectors. 

RST microcontroller connected to the RTS of the serial interface using the USB dongle that works automatically reset. In addition, I added the LED on the D9 in order to test whether the Nano board can work well. 

Next I will test this board for the throttle of the brushless motor. I am using the simple program that has been available in the example program.

I use a 3S lipo, 18A ESC as a 5V voltage source Arduino board. Potentiometer connected to ADC0 or A0 pin to set the throttle.

YouTube Preview Image

Posted in Arduino, Electronics, foamy plane, RC Model | Tagged , , | Leave a comment

PID applications on arduino to control the temperature of the heat exchanger plant.

Arduino library for PID controller algorithm has been made and can be applied with ease. By using the arduino PID library can be applied to various fields of control systems, here applied to regulate the temperature of the heat exchanger plant. 

Plant made using nylon with 600 Watt electric heater. To know the LM35 temperature sensor plant used as it has been posted here. While signal conditioners circuit for temperature sensor has been posted here as well.

As an actuator, I use a method of switching pwm IGBT components. The pwm switching circuit I have described in posting here. As a controller, I’m using a microcontroller ATmega328 with Noano Arduino bootloader. 

PID library

Library for Arduino PID can be downloaded here. After you download folder PID_v1 put in the folder “libraries” where the Arduino installed. 

To test the response of the PID used a simple program as follows:

#include 

//Define Variables we'll be connecting to
double Setpoint, Input, Output;
int pwmOutput = 9;
int feedBackPin = A0;
int ComputeOk; 

//Specify the links and initial tuning parameters
PID myPID(&Input, &Output, &Setpoint,1.25,4,0.5, DIRECT);

void setup()
{
  //initialize the variables we're linked to
  Input = analogRead(feedBackPin);
  Setpoint = 500;

  //turn the PID on
  myPID.SetMode(AUTOMATIC);
  Serial.begin(115200);
}

void loop()
{
  Input = analogRead(feedBackPin);
  myPID.Compute();

  analogWrite(pwmOutput,Output);
 
  double curErr = Setpoint-Input;
  Serial.print(curErr);
  Serial.print(" - ");
  Serial.println(Output);
  delay(50);

 }

Posted in Arduino, Control system applications | Tagged | Leave a comment

Arduino using Visual Studio capable as debugger

In March, 2012, visualmicro.com released a plugin for the Arduino using visual studio. For those who are tired of using the original Arduino IDE, can use visual studio as a new IDE. Thus visual studio will be used as an Arduino-based microcontroller development.

This plugin can be used in Visual studio 2008 or 2010 version. I tried it using Visual Studio 2010.

 

I like visual studio, because the windows look very comfortable and can be configured. Moreover, it can add a facility other programming languages which have been there before in visual studio. I’m most looking forward to is the ability to debug the program to be developed. Debug capability is still in beta, is still tested by the tester, I am one of them.

Here I will explain how to install the plugin for the Arduino, in visual studio 2012.

The installation steps are:

  1.  Install Arduino IDE ver. 1.0.1
    Arduino program still used by the plugin. Use the release version of the Arduino. 
  2. Install visual studio 2008 or 2010.
    You can choose one of them, I chose which 2010 version.
  3. Download plugin arduino fro visual studio here.
    You should always follow the latest version, because the plugin was developed from time to time. Install the program and will be in the folder: C:\Program Files\Visual Micro\Visual Micro for Arduino.
  4. Run visual studio.

Visual studio configuration

After your Arduino 1.0.1, visual studio 2010 and Arduino plugin, run visual studio you will see there is an additional menu.

On the File menu there is a sub menu “Arduino project” serves to create a new project based on the Arduino. 

While on the Project menu there are sub menu “Add New Arduino item” which serves to add a file in the Arduino program are c, c++, arduino. The second sub menu is “Add arduino library” used to include library from core or user.

Additional sub-menu is the menu as found in the Tool menu in the Arduino. For those familiar with the Arduino, already knowing the functions of this menu.


Next, you must configure it to show where the location of the Arduino program is placed, by pressing the menu Tools-> Options.

 

In addition to my experience visual studio requires additional database program that is “Microsoft SQL Server compact 3.5″, the program can be downloaded here

Good Luck.

 

Posted in Arduino, Tutorial | Tagged , , | Leave a comment

Arduino 1.0.1: serially upload using handmade board of ATmega328

If you build your own Arduino with ATmega328, when integrated with a serial upload utility, will fail as I did. But if you re-use the old version of the Arduino IDE such as 0023, certainly not a failure.
Surely you will be disappointed, because the Arduino IDE version 1.0.1 has certain advantages not possessed in the previous version.

In the release version of the Arduino started version 1.0.0, has advantages compilation faster because only compile files that experience a change in editing the source. Obviously this is very loved by the users, because the development process will be faster.

When you use the original Arduino board, such as nano board, a serial upload process does not fail. Due to the release version was added a upload facility via the programmer, as you do to fill the bootloader.  I never gave up, so use this facility and not use the serial. But using less programmer takes the number of pins: MISO, MOSI, SCK, but upload is only using pin serial RX / TX. I think the serial uploading  is more effective manner, does not reduce the use of pin and at the same time for data communication or debugger.

I find the problem why this happened, because I think the same principle and use the same chip.

Finally I managed to modify the configuration file so that the upload is successful series in the Arduino IDE version 1.0.1. using a homemade board of the ATmega328.

 

I also like to reset automatically when the upload program. For that you must connect the RTS pin of the USB-Serial to TTL module to the ATmega328 RESET pin (pin 1). This way you do not need to manually press the RESET button, every upload program. In addition also connect the RX / TX between ATmega328 (see 2.3) with a USB-Serial to TTL module. in pairs. Also do not forget to GND should be connected as well.

Boards.txt file modifications on the Arduino IDE ver. 1.0.1 using handmade ATmega328 Arduino Board

I found a way to change files in the folder of boards.txt \hardware\arduino\boards.txt.

Handmade Arduino board is configured as a Nano-328 board. You must change the configuration of the board.

 Further search for the following text in the file of boards.txt.

nano328.name=Arduino Nano w/ ATmega328

nano328.upload.protocol=arduino
nano328.upload.maximum_size=30720
nano328.upload.speed=57600
nano328.bootloader.low_fuses=0xFF
nano328.bootloader.high_fuses=0xDA
nano328.bootloader.extended_fuses=0x05
nano328.bootloader.path=atmega
nano328.bootloader.file=ATmegaBOOT_168_atmega328.hex
nano328.bootloader.unlock_bits=0x3F
nano328.bootloader.lock_bits=0x0F

nano328.build.mcu=atmega328p
nano328.build.f_cpu=16000000L
nano328.build.core=arduino
nano328.build.variant=eightanaloginputs

In the second line of text:

nano328.upload.protocol=arduino

change to:

 nano328.upload.protocol=stk500  

The completely configurations of boards.txt file will be:

nano328.name=Arduino Nano w/ ATmega328

### nano328.upload.protocol=arduino
nano328.upload.protocol=stk500
nano328.upload.maximum_size=30720
nano328.upload.speed=57600
nano328.bootloader.low_fuses=0xFF
nano328.bootloader.high_fuses=0xDA
nano328.bootloader.extended_fuses=0x05
nano328.bootloader.path=atmega
nano328.bootloader.file=ATmegaBOOT_168_atmega328.hex
nano328.bootloader.unlock_bits=0x3F
nano328.bootloader.lock_bits=0x0F

nano328.build.mcu=atmega328p
nano328.build.f_cpu=16000000L
nano328.build.core=arduino
nano328.build.variant=eightanaloginputs

That means using the STK500 protocol for serial usb-serial to ttl module, while the “arduino”, is the original Arduino board serial protocol. Finally, you must reboot the IDE arduino for new configuration. 

Posted in Arduino | Tagged , , , | Leave a comment

Measuring the response of the electric water heater using the Arduino

This post describes how to measure the response of the electric water heater using the Arduino. By using simple program on the Arduino is very simple to read the output of the temperature response. Arduino has a 10bit ADC accuracy is used to read the output of the LM35 temperature sensor.

The output voltage of the LM35 sensor is amplified using the LM358 with a voltage gain of 5.47. While the output voltage of the LM35 is 10mV per degree centigrade. So the total output voltage LM398 is 5.47x10mV = 54.7mV per degree centigrade.

Arduino simple program are as follows: 

To read the temperature using the Arduino ADC channel 0 (A0). Results of ADC convertion is sent in serial with baudrate of 115200baud. By using hyperterminal program, the conversion result is stored in a file in text format form. 

 Measurement steps

  1. Upload arduino program to arduino board
  2. Fill water with water and setup the water flow about 6ml/sec
  3. Connect output of temperature sensor to A0 of arduino
  4. Run hyperterminal and setup the filename to capture data
  5. Start no power on elektric heater for some seconds
  6. Start power of electric heater for some minutes
  7. Remove power of electric heater for some minutes
  8. Stop hyperterminal
  9. Graph the results using scilab

The result of temperature outputs can be downloaded here.

Graph the results using scilab 

 By using the Scilab command in the console such as the following, the response will be obtained graphically.

// read file
-->sh=read_csv("D:\TA\AFRI\PENGUJIAN\capture1.txt");

// convert to matrix
-->d=evstr(sh);

// check size of matrix
-->size(d)
 ans  =

    2652.    1.  

// make matrix of time with sampling about 2ms
-->t=0:0.002:2651*0.002;

// check size t matrix must same with d matrix
-->size(t)
 ans  =

    1.    2652.  

// convert to voltage, fullscale of adc = 5Volt
-->v=(d/1024)*5;

// convert to output voltage of LM35
-->v_sensor=v/5.47;

// convert to exact temperature with 10mv per centigrade
-->tc=(v_sensor*1000)/10;

// plot data
-->plot2d(t,tc,style=5)
-->xgrid()

-->title("Step Responses of Water Heater")

-->xlabel("Number of Samplings")

-->xlabel("Time in second")

-->ylabel("Temperature of water heater fluid (centigrade)")

 

Posted in Electronics | Tagged , , , | Leave a comment

High Voltage and Current isolated PWM switching

 

I just finished doing some experiments on high voltage and current isolated pwm switching. This actually starts the need for a dc electric actuators to be installed within the heat exchanger control system. 

The need to serve the electric heater actuator, with a 300 Watt power operates at a voltage of 220VAC. In my mind, I would use an electronic method of DC chopper.  To set the pulse width is used by pwm, which will be controlled via an Arduino microcontroller ATmega 328. Finally came the other requirements of the actuator system must be optically isolated, so the ground to be separated. This is usually to avoid EMI (electromagnetic interference). For switching, there are three options are SCR, MOSFET or IGBT. While the optical isolation, I make sure to choose 4N35.

After 3 days of my designs and try it out, finally got it perfect. Through this post, I will share my experiences to all visitors who need these actuators.

How it works

This simple system without a transformer, the voltage source is directly rectified by the B1 and C1 to reduce the ripples. R1 and R2 form a voltage divider circuit, serves to provide a low voltage dc supply components for 4N35. 4N35 will be supplied with a DC voltage of 12V. However, the voltage on R2 is made higher than 12V to keep the possibility of fluctuations in voltage 220VAC. These fluctuations are usually 10 percent. So at about 200VAC voltage, DC voltage at R2 must be greater 12V.

Furthermore, components R3 and D1 form a circuit for cutting / create a stable voltage to 12V by the zener diode 12V. R3 is used to reduce the current flowing in the zener when the voltage on R2 above 12V. Voltage at the zener diode fed into the circuit R4 and C2 to eliminate riple as a lowpass filter.

12V voltage is then fed to the collector of the 4N35 as the supply voltage.  Emitter of 4N35 in series with R5, so that when the LED is not given voltage, the emitter voltage is zero. This is so when the LED is not given voltage, the output is 0 volts to MOSFET (N) or IGBT (N), and not in an active condition. In short, the input and output 4N35, not as an inverting logic. R6 is a series resistor when the transistor becomes active from 4N35, a pullup to 12V. The value of R6 is selected adjustable voltage requirements of the MOSFET or IGBT Gate.

Lastly, R7 aims to reduce the LED current of 4N35, of course, adjust your PWM peak voltage.

Value of Components

Lastly, R7 aims to reduce the LED current of 4N35, of course, adjust your PWM peak voltage. 

  1. R1 = 220K/1W, R2 = 20K/1W, R3 = 2K2/1W, R4 = 470/1W, R5 = 47K/0.5W, R6 = 47/0.5W, R7 = 100/0.5W
  2. C1 = 220uF/350V, C2 = 47uF/25V.
  3. OP1 = 4N35
  4. Q1 = IGBT HGTG18n120 / 1600V /30A

 

 


Posted in Electronics, Elektronika | Tagged , | 2 Comments