# Tag Archives: english

Last updated by at .

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.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.build.mcu=atmega328p
nano328.build.f_cpu=16000000L
nano328.build.core=arduino


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.

## 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

## 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

// 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)")


## 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

## Fuzzy Logic with Enginering Applications: Timoty J. Ross

Bagi yang memerlukan buku tentang fuzzy logic silakan didownload disini untuk keperluan belajar secara pribadi, dan jangan dikomersialkan tentunya.

## Handmade mount of helmet handycam

This time I really need to make a video documentation for the activity test fly a model airplane.  I do not want to miss important moments before the plane crashed as I have been posting here.

Since I have a bicycle helmet and a camcorder, I make my own “mount camcorders” which was originally mounted on the helmet. Mount made from sheets of aluminum with a thickness of 1.5mm. Then add slots are made from aluminum is also used to put the head of the camera tripod.

In order to mount the aluminum can be attached firmly to the helmet, I used a rubber strap. The next head of the camera tripod can be inserted into the slot that has been made.

As a test, a video that has been posted here, been using this helmet camcorder.

## New design of version 3 tricopter frame

The first version of tricopter frame that I made as I have been positing here, too heavy to fly. I am not satisfied then create a new one is version 2 as I have been posting here

Version 2 is flying at very stable, but unfortunately I did not record it in video form. The last time before the crash, photos of tricopter looks like the following.

The total weight of about 1.2kg, using Lipo 2200mAh, 3 pieces of DT750, 3 pieces 10×4.7 propeller. Due to my carelessness as the less experienced pilots to fly tricopter, finally fell. The damage was a broken rear propeller, rear arms folded toward the front.

This accident caused me as a pilot can not estimate the time of flight, at an altitude of about 6m out of power. But of this accident I have weaknesses that exist in the frame.  Weaknesses are:

1. Rear Arms too flexible towards the horizontal. This will cause oscillation when it will take off, due to the thrust vector.
2. The whole arm is less robust. Required construction with a lightweight and robust materials.
3. It should be added to the cage, to protect the rotor of the motor.

## The third version of the tricopter frame

This third version, I use a wooden beam 1cmx0.5cm as his arm. I combine the two beams of wood with a plastic spacer with a distance of about 1.8cm.

## Center Plate

As the center plate, i continue to use acrylic with a thickness of 4mm. By using acrylic, 3 pieces of the arm can be held with strong enough.

The front of the bottom plate made extending, place prepared for lipo. Usually the rear arm is heavier than the front left and right arm because there is a servo and mechanical, so it can be used to balance the CG position at its center.

If necessary center plate will be cut into smaller in size, but does not reduce strength to hold the arm.

Center plate has sufficient space about 3cm wide, enough to insert the ESC. There was also enough to put a silicone cable which in fact requires considerable space, especially when the front arm is folded back.

## Version 3 tricopter frame

The results of the design tricopter shown in the photo album below:

## The uniqueness of vector thrust mechanical

I designed a mechanical servo for motor on the rear that is different from the general mechanical. Here I directly connect the servo with an iron rod. Iron rod being held by the aluminum tube by using two bearing to reduce frictions. ron rod which is connected to the servo using the servo plastic arm to be cut. Then put into an iron rod and reinforced with bolts. The other end of an iron rod attached to the aluminum tube to hold the motor mount.

## An easy way to see the responses of ENC-03 gyro chip

Chip Gyro of ENC-03 is often used as a sensor to stabilize the aircraft or multicopter using RC. To learn seriously need to know the workings and characteristics of this chip. Data sheet for this sensor can be downloaded here. Chip is famous for its resistance to vibration and is easy to use because it has an analog output.

The sensor works because of the angular velocity, analog output voltage will depend on the angular velocity applied to the sensor.  Sensor output voltage will follow the following equation:

$V_{out}=&space;V_0+S_v\cdot&space;\omega$

V0 is the static output voltage at angular velocity = 0 deg/s. $V_0=&space;V_{ref}&space;\pm&space;0.6&space;V$

From datasheet $\small&space;V_{ref}=1.35V$. Thus the magnitude $\small&space;V_o=1.21V&space;-&space;1.41V$. Sv is scale factor in mV/deg/S = 0.67V. And $\tiny&space;\omega=-90&space;to&space;90deg/S$.

## Schematic

This circuit is the simplest. Voltage source connected to the RC tap, 100 ohms and 47uF to eliminate the ripple in the voltage source.

Gyro output voltage tap connected to the RC, 6.8KOhm and 0.68uF, serves as a simple lowpass filter to eliminate the output voltage caused by vibration.

Vref is the output that generates a voltage as a reference that may be required by the circuit on the outside.

At Vref is necessary to add capacitors of 4.7uF.

## Microcontroller

To read the response of the output voltage of the gyro, so easy to do I use nano Arduino board. This board contains a microcontroller type ATMega 328p. Because it already has an internal ADC, it will be easy to record responses.

In my Arduino programming using A0 as the ADC to convert the voltage output come from the gyro into digital numbers. Hereinafter ADC conversion result is sent serially to be recorded by using hyperterminal on windows.  I decided to process the data and plotted using Scilab.

## Board of ENC-03 Gyro

I got this gyro board by removing the yaw gyro on kkboard. However, it should be added 100ohm resistor and 47uF capacitor on the power supply VCC. And 0.68uF capacitor also needs to be added to the gyro output.

In accordance with the data sheet, this board is placed upright and moved radially. Can also be placed upright and inverted, but the gyro output voltage changes will be reversed as well.

To be able to move freely in the radial, required a dish to put this gyro board. To connect with pin of the Arduino board, can be soldered directly  using  cables.

Additional compenents of resistor and capasitor can be soldered into header pins of this board.

## Dish

In order gyro board can be moved radially with ease, need a dish to put the gyro board. The dish is made using styrofoam plate. At the center of the dish, bamboo as a holder mounted to rotate the dish. Arduino board and gyro board placed on this dish.  Furthermore, the Arduino board is connected with usb cable to the computer to record the results of Gyro responses of the radial motions.

This method is the most inexpensive and easy to make because it uses materials easily obtained is styrofoam.

## Other Dish

Because I can do the job using mechanical equipment such as lathes, milling machines, drilling machines, welding machines and so forth. I prefer this dish using iron material, because it is more robust and stable during use.

## Basic Recording

The basis of recording the response of the gyro output is done by reading through the adc conversion. I am using the Arduino programming with nano board. Arduino program as follows:

void setup() {
Serial.begin(115200);
}

void loop() {
Serial.println(sensorValue);
delay(50);
}

#### Recording steps:

1. Turn on Arduino by plugging USB’s arduino board to the computer.
2. Open hyperterminal, set baud to 115200 baud, 8bit, No parity, 1 stop bit.
3. Connect communication by clicking “Call” icon. You must ensure that the serial channel selection is correct. You will see the data receive by hyperterminal
4. Rotate the dish, you’ll see a change of data in hyperterminal.
5. To record and stored in a file, select the “Transfer -> Capture Text”. Then asked to fill in your name and the file folder.
6. Turn the dish as the fourth step in accordance with your wishes.
7. Stop record by select the “Transfer->Capture Text->Stop”.

#### Processing of data

The file name of the data is capture5.txt. Further data will be read and processed using Scilab program. Use the console to process manually. Scilab commands as follow:

-->// read data file into sh matrix

// convert sh matrix string content into d matrix as numeric
-->d=evstr(sh);

// convert adc data (0-1024, 10bit) into analog voltage
-->analog=(d/1024)*5.0;

// how big is the size of data
-->size(analog)
ans  =

694.    1.

// make t matrix as time (axis plot) 0 to 693
-->t=0:693;

// plot data
-->plot2d(t,analog,style=2)

The results of the graph are shown as follows.

| Tagged , , | 2 Comments

## Engineering design of measuring instrument for testing propeller thrust

This mechanical design serves to measure the thrust generated by the propeller.  In the world of aeromodelling, to design a model aircraft  require  the performance datas of thrusts that generated by the propeller. This will find the suitability of the propeller for the type of aircraft.

Overall, the mechanical system can be divided into several parts:

1. Pole
Serves to hold the thrust by the propeller. At the bottom there is a weight load that does not shake.
2. Slider
Is a moving part which rests two linear bearings. This section is used to hold the motor / engine and propeller.
3. Motor/Engine and propeller mount
Serves to hold the motor/engine and propeller. This section will vary according to the motor/engine.
Sensors that work mechanically, driven by a slider that moves as result of thrust backward.

This mechanical system can be used to test the thrust by using electric motors or engines. Thus it will become easier to get the appropriate size of the propeller.

The data can be obtained by using a mechanical system are:

1. Relationship between the RPM with the generation of thrust.
2. The relationship between RPM and current/power which is absorbed.
3. The relationship between the current/power which is absorbed and thrust.

Point (1) The first can be used to obtain the performance of the propeller (the motor has more power), the second is used to obtain the size of the propeller in accordance with the motor / engine specific.

Point (2) can be used to calculate or test a long fly to the configuration of the motor, propeller and certain batery capacity (mAH).

Point (3) can be used to calculate the efficiency of the power absorbed by the thrust generated.

## How it works

The main principle of this mechanical is the Motor/Engine and propeller can move through the slider. In order to be a little friction, slider is associated in two linear bearings. The use of two linear bearings also serve for the motor does not rotate. If the wind direction toward the front, then there will be thrust to the rear. One end of the slider there is a “load cell pusher” that serves to suppress the load cell at the time when thrust generated. By adding a signal conditioner, the output voltage of load cell can be converted to digital by using the ADC.

## Motor/Engine Mount

In order to hold the motor/engine include propeller need mount that can joint to slider. This mount has a variety of forms according to the motor / engine that is used.

To measure the thrust with a direction to the rear, I use the sensor “load cell”.

1. CAPACITY:  15kg(30lb)
2. RATED OUTPUT:  2.0 ±0.1mv/v
3. ZERO BALANCE : ± 0.5 % F.S.
4. OUTPUT EFFECT ON ZERO: 0.03 %F.S. ( within 5 minutes)
5. CREEP: 0.030~0.05 %F.S. ( within 5 minutes)
6. NONLINEARITY ,HYSTERESIS AND REPEATABILITY: <± 0.03 % F.S.
7. INPUT IMPEDANCE: 395±5 Ohm
8. OUTPUT IMPEDANCE: 350±5 Ohm
9. TEMPERATURE EFFECT ON OUTPUT %OF APPLIED LOAD: ± 0.03, %F.S./10c°
10. TEMPERATURE EFFECT ON ZERO %OF RATED OUTPUT: ± 0.8,%F.S./10c°
11. EXCITATION VOLTAGE: 10 Volt
12. INSULATION RESISTANCE: 300M W
14. MATERIAL: Aluminum Alloy 2024-T351
16. STORAGE TEMPERATURE: -25 to +70 deg. C
17. OPERATING TEMPERATURE: -10 ~ 40 deg C
18. MAXIMUM PLATFORM SIZE: 150×200 mm
19. CONNECTION:
(Red: +Excitation; Black:-Excitation
Green: +Signal; White: -Signal)
4 leads, flexible stranded wire – length 200 mm , PVC insulated AWG 28, UL listed

## Making tricopter airframe became lightweight

Tricopter airframe of my design result that i posted here is too heavy if setup  using 3 motors. I will use it for Y6 copter because has the robustness . Now, i decided to create a new so lighter weight with a total weight not more than 1kg. This time I should be more careful to calculate the weight and the use of materials. Weight can be reduced is the airframe, while the electronic components and supporting not possibly be reduced. Components that have the assurance of weight is:

1. 3 motor, DT750, @78gram, total: 232 gram
2. Nano-Tech, Lipo, 3S, 2200mAH, 45C Constant / 90C Burst, total: 201 gram
4. Controller: 9 gram
5. Tower Pro mag 18 ESC x 3 (reflash), @19.5, total: 58.5 gram
6. Silicone cable, connector etc,  approximately: 30 gram

Fix weight will be : 232 + 201 + 9 + 9 + 58.5 + 30 = 529.5 gram

For example, if the planned total weight is 850gr then the rest of the airframe that the maximum weight allowed is 850gr – 529.5gr = 320.5gr.

## Stub

The three arms of airframe materials used alumium piece of 1cm x 2cm box. I plan to make the long arm of the distance between the motor axel and CG is 50cm. Also, Front left and right arm can be folded into the back of the arm parallel to the rear, for easy transportation to the field.

To estimate the weight of the arm by using aluminum box, need to be weighed to obtain density values. Picture on the left, aluminum is 42cm long with a weight 63.8gr. Thus the value of the density of this aluminum is 63.8gr/42cm = 1.52gr/cm if no reduction of weight. Assumed if the extent of reduction of 1/3 the total weight will be (2/3) * 63.8gr = 42.53gr. So the density becomes 42.53gr/42cm = 1.01gr/cm.

Weight reduction should be considered by not reducing the strength of the material. To reduce the aluminum material, i use a milling machine 10mm and 0.5mm.

If the individual requires long sleeves 50cm + 2cm = 52cm, then the total weight before do to weight reduction  wil be 1.52gr/cm * 52cm = 79.04gr. However, if the weight reduction is 1/3 of total weight, the weight will be 52.69gr. So the total weight for the 3 arms will be 158.08gr.

If one arm require long about 50cm + 2cm = 52cm, then the total weight before weight reduction will be 1.52gr/cm * 52cm = 79.04gr. However, if the reduction in weight 1/3 of total weight, the weight will be 52.69gr. So the total weight for the 3 arms will be 158.08gr.

## Reducing the weight of the arm

I can reduce the weight of the arm by making a hole with size 4cmx2cm on one side by using a milling machine.

Arm length is 42cm, the weight to be 35.9gr, still has the strength and robustness. The density will be 35.9 gr/42cm or 0.855 gr/cm, very lightweight. Now the weight down to (0.855/1.52)*100%=56.23%.

For comparison the wooden arm of the weight is 58.4gr 1cmx2cmx60cm size. Then the density is 58.4gr/60cm = 0.913gr/cm. But has the disadvantage can not be reduced weight and easy to absorb water.

So the choice is aluminum as tricopter arm.

## Center plate

Center plate is very important to tie the three pieces of arms in order not changed because no force and pressure and keep the robustness. Of course if you can have a light weight.

Here I use a fiberglass-acrylic with a thickness of 5 mm. The rear arm tied with two 4mm bolts. Two fornt arms  fastened with a bolt that can be folded backward. But I need to add a bolt lock to stop two arms so do not move when flown.

For a while, I did not reduce the weight of the center plate and I would do at the end if necessary. Center plate has a weight of 124.4 grams. However I doubt the strength to hold the arm, if the surface of the center plate is reduced.

## Motor mount

To put the motor to the arm, I make my own mount for the DT750 to be stronger than the original. Of course they are made of aluminum then becomes a bit heavier than the original. However, very strong because it uses the M3 bolts. The two bolts used to hold DT750, one bolt is used for hooking into the arm.  I use this  mount for all three motors.

## Tilt Mechanical of rear motor

On this mechanic, I use a direct connection to the servo shaft with two bearings. In this way, tilt will be a smooth movement. Two bearings mounted in a nylon tube in the two sides.  I use an iron with 5mm diameter, then inserted in the bearing hole. By using aluminum tubes, rear motors can be connected  by using bolts.

## First flight testing

Previously I had never flown a multi rotor, so I do not believe in myself if I could fly this tricopter. I decided just to test if the lift could be stabilized.

## Second flight testing

I tried a second time to be confident.

## Third flight testing

Now I believe myself to fly a homemade tricopter.

Tricopter of my design has a total weight of approximately 1100 grams by using a 2200mAh Lipo. When it began to hover absorbing power about 120Watts or 10Ampere at 12V Lipo voltage.

## My design of tricopter frame

This is an article about frame design for tricopter. My creativity is in the form of a new design tricopter frame, made of aluminum, box and pipe.  I combine the two ways to remove the assembly from the frame tricopter, by folding and by taking off parts.

This is my first experience playing with tricopter, had never flown. I ventured to make from scratch by reading theory, video, and the experience of others.

This frame design has the distance between the motor and the center of the frame about 55cm. So it is a large category of tricopter frame.

If frame in condition of disassembled, tail arm can be folded into front and two arms of front motor can be pulled as two separated arm parts. Also three landing gear can be opened by loosen of three screw.

## First Setup

This is my first experience making tricopter. This tricopter design is a combinations of aluminum, wood, steel wire and kid baseball as landing gear.

My setup as follow:

1. Length of motor axel to center is modified about 50cm.
2. Batery Lipo 2200mAH.
3. Controller KKBoard ver. 3.0 (Atmega 328).
4. ESC 3x Tower Pro Magnum 18A, reflashing.
5. Motor 3x DT750, 750Kv.
6. 3x propeller 11×4.7.

## Tricopter is too heavy

My design is to heavy about 1450 gram.  The total thrust is approximately 3x1200gram = 3600 grams. Will raise approximately (1450/3600) * 100 = 40.3% of maximum thrust. Current will flow when lift is approximately (18Ampx3) * 40.3% = 21Amp. It is assumed that the maximum thrust of each motor will absorb the current 18A.

I hope the approximate calculation is correct, this tricopter will be able to fly even though only a few minutes.

If the tricopter weight of 1450gr can hover, I will reduce the weight of the frame to a minimum, but still sturdy.

## Current’s Hover of my heavy tricopter frame

I measure the total flow, while tricopter hover at about 14Amp. The difficulty is producing lift the motor to be balanced. I suspect when reflash ESC towerpro mag8, tp_nfet.hex firmware versions are different versions. Or has one propeller CCW (front left) has different characteristics and have the most powerful thrust.

This Tricopter hover on the condition of 50% of the throtle. At full throtle, has a strong lift. I try with the help of hand-held with tricopter is above the head. I can loosen the grip and let go of the hand quickly, tricopter can fly, but still not balanced.

These experiments use a gain of 1/2 to 3 potentiometer.

Posted in hobby, Multicopter Frames, RC Model, tricopter | | 2 Comments

# For Sale

Condition: New, For price email me: bsiswoyo@ub.ac.id with subject: “ART”

For any questions: please send comment to this post / quantity: 1

Item ready: Malang, East Java, Indonesia

This artwork is handmade by my wife. Image is landscape of house on the mountain.

### Specifications:

1. Picture size: Width 90cm, Height: 70cm
2. Frame size: Width 107Cm, 87Cm
3. Using acrylic yarn.

# For Sale

Condition: New, For price email me: bsiswoyo@ub.ac.id with subject: “ART”

For any questions: please send comment to this post / quantity: 1

Item ready: Malang, East Java, Indonesia

This artwork is handmade by my wife. Image is al-Aqsa mosque in Indonesia country, located in the city of  Kudus, province of East Java.

### Specifications:

1. Picture size: Width 65cm, Height: 50cm
2. Frame size: Width 70.5Cm, 55.5Cm
3. Using acrylic yarn.

In this post, I will explain how to design a keypad by using an internal ADC of the microcontroller or microprocessor system.

ADC will be used to determine which any key is pressed in the state. In principle, there is a circuit that can generate a differrent voltages at each place of push button pressing. A simple circuit is by applying a voltage divider circuit using some  series resitors, which can lead to different voltages for each keystrokes.

For example, it is necessary to distinguish the five key functions in the program the microcontroller, the UP, DOWN, RIGHT, LEFT, and SELECT button. There are required 6 pieces of resistor: 2K, 220, 330, 1K, 3k3 and 10K, in order to generate the  rising voltage at ADC of microcontroller by successive key presses: UP, DOWN, LEFT, RIGHT, SELECT.

1. The circuit will work as follow:

1. If  the “UP” button is pressed, the voltage to ADC will be 0 Volt, because the 2K resistor will be pulled down to ground.
2. If the “DOWN” button is pressed, the voltage to ADC will be:
$\frac{330\Omega&space;}{330\Omega+2K\Omega}.5V=0.7082V$
3. If the “LEFT” button is pressed, the voltage to ADC will be:
$\frac{330\Omega+620\Omega&space;}{330\Omega+620\Omega+2K\Omega}.5V=1.6102V$
4. If the “RIGHT” button is pressed, the voltage to ADC will be:
$\frac{330\Omega+620\Omega+1K\Omega&space;}{330\Omega+620\Omega+1K\Omega+2K\Omega}.5V=2.4684V$
5. If the “SELECT” button is pressed, the voltage to ADC will be:
$\frac{330\Omega+620\Omega+1K\Omega+3K3\Omega&space;}{330\Omega+620\Omega+1K\Omega+3K3\Omega+2K\Omega}.5V=3.6207V$
6. If no button is pressed, the voltage to ADC will be:
$\frac{330\Omega+620\Omega+1K\Omega+3K3\Omega+10K\Omega&space;}{330\Omega+620\Omega+1K\Omega+3K3\Omega+10K\Omega+2K\Omega}.5V=4.4203V$

If the output of the voltage divider circuit (“to ADC”) fed to the 10bit ADC input, then any key presses will produce a decimal:

1. UP button: 0V will be 0 decimal.
2. DOWN button: 0.7082 Volt will be 145 decimal.
3. LEFT button: 1.6102 Volt will be 329 decimal.
4. RIGHT button: 2.4684 Volt will be 505 decimal.
5. SELECT button: 3.6207 Volt will be 741 decimal.
6. No Button: 4.4203 Volt  will be 905 decimal.

3. How to programming tricks

In fact every keystrokes are not exactly generate a voltage as described in point 1. Means a range slightly above or below the voltage. Thus, the voltage value of the middle is taken, for example: the “UP” from 0V to 0.7082 / 2 = 0.3541V, the “DOWN” from 0.7082V to 0.7082 + (1.6102-0.7082) / 2 = 1.1592 V, and so on.
More easily calculated from point 2, the decimal after being converted by the ADC.
1. The button of  “UP” on pressed state when the conversion result of ADC is defined below value of 145/2 or 72 decimal.
2. The button of  “DOWN” on pressed state when the conversion result of ADC is defined below value of 145+(329-145)/2 or 237 decimal.
3. The button of  “LEFT” on pressed state when the conversion result of ADC is defined below value of 329+(505-329)/2 or 417  decimal.
4. The button of  “RIGHT” on pressed state when the conversion result of ADC is defined below value of 505+(741-505)/2 or 623 decimal.
5. The button of  “SELECT” on pressed state when the conversion result of ADC is defined below value of 741+(905-741)/2 or 823 decimal.
6. No button on pressed state when the conversion result of ADC is defined below value of 905+(1024-905)/2 or 964 decimal.

C  Programming

/*********************************************************/
// created by: Bambang Siswoyo
// Electronic department - University of Brawijaya
/*********************************************************/

int adc_button_table[6] = { 72, 237, 417, 623, 823, 964 };
int NUM_KEYS = 6;
#define UP      0
#define DOWN    1
#define LEFT    2
#define RIGHT   3
#define SELECT  4
#define NOKEY   5

{
............................................
............................................
}

int get_key()
{
int k_num;            // number of key

// Convert voltage from voltage devider
for (k_num = 0; k_num < NUM_KEYS; k_num++)
{
{ return k_num }
}
}

void main()
{ // main program for testing only
int btn;

btn = get_key();
// action
switch(btn)
{
case UP:
//do something when var equals 0
break;
case DOWN:
//do something when var equals 1
break;
case LEFT:
//do something when var equals 2
break;
case RIGHT:
//do something when var equals 3
break;
case SELECT:
//do something when var equals 4
break;
case NOKEY:
//do something when var equals 5
break;
}

# For Sale

Condition: New or Never used, For price email me: bsiswoyo@ub.ac.id with subject: “ELAB-080″

For any questions: please send comment to this post / quantity: 3 box

Item ready: Malang, East Java, Indonesia

## Features:

The ELAB-080 integrates a dual channel Digital Oscilloscope, 16 Channel Logic Analyzer, Arbitrary Waveform Generator, Digital I/O and a dual channel power supply all in one convenient package!!

Modern PCs provide the power and sophistication that test and measurement equipment need. The ELAB-080 package comes complete and ready to use with the instrument, two oscilloscope probes, logic analyzer and AWG cabling and a USB cable. All you need to supply is the PC and you have a powerful test system. Electrical engineers in the 21st century need 21st century equipment that doesn’t cost an arm and a leg.

PC-Based
PC-based instruments use the power and interface of a computer without the bulkiness and cost of traditional bench top equipment.
Compact Size
The ELAB-080 is an extremely powerful unit packed into a very small package. Weighing approximately 1.4 pounds, the ELAB is easily moved from place to place whether your in the office or out in the field.
Fast Sampling Rate
Boasting an 80MHz sampling rate and 32K sample storage on each of two DSO channels.
Driverless operation
The ELAB utilizes a HID driver so there is no requirement to install a new driver every time you move your equipment or change computers. It’s as simple as plug in and start using. This also allows makes the ELAB less susceptible to driver conflicts and errors.
Included with the ELAB-080:
• Two 60MHz Oscilloscope Probes
• Complete Wiring Harnesses
• Power Supply
• USB Cable

Posted in for-sale | Tagged , | 2 Comments