Showing posts sorted by relevance for query arduino-micro. Sort by date Show all posts
Showing posts sorted by relevance for query arduino-micro. Sort by date Show all posts

Thursday, 12 May 2016

MENGATASI MASALAH ARDUINO IDE stk500_getsync(): not in sync: resp=0x00

[1] Driver USB to UART Tidak Terpasang
    Permasalahan diatas merupakan salah satu kasus yang paling sering terjadi, terutama sekali pagi pengguna yang masih pemula ,Hal ini disebabkan karena jenis koneksi yang digunakan untuk berkomunikasi antara komputer dengan mikrokontroler ternyata berbeda-beda, hal ini pun terjadi pada papan Arduino yang menggunkan Chip FTDI atau USB to UART/ Serial.

    lain halnya Jika anda memiliki papan Arduino R3 yang menggunakan konverter USB to Serial berupa chip Atmega16U2 maka biasanya tidak terjadi masalah komunikasi diatas. Hal ini karena firmware Atmega16U2 yang digunakan sebagai media komunikasi (USB Serial Converter) akan mampu menciptakan Virtual COM Port dengan driver standar USB COM sehingga tidak membutuhkan driver eksternal, 
Gambar 1. Arduino Uno dengan Chip Atmega16U2

    Bagi anda pengguna Windows 8, ternyata driver Arduino (Arduino IDE Versi 1.0.5) belum tersertifikasi sehingga pada beberapa jenis papan Arduino masih saja mengalami kegagalan Upload. Untuk menyelesaikan masalah tersebut silahkan Unduh Arduino IDE 1.0.6 yang sudah diperbaiki Signatur Driver-nya 
Arduino Chip FTDI FT232

   Pada beberapa jenis papan Arduino masih ada yang menggunakan komunikasi USB to UART menggunakan chip FTDI atau FT232. Misal Arduino Nano, atau Arduino Pro Micro yang membutuhkan tambahan perangkat USB to UART yang biasanya direkomendasikan menggunakan FTDI Friend. Jenis komunikasi serial USB to UART yang menggunakan chip FTDI (biasanya FT232) memerlukan driver eksternal yang harus dipasang pada sistem operasi kita secara manual. Kita harus mengunduh driver-nya sendiri dan kemudian memasangnya pada komputer kita. Unduh driver FTDI FT232 disini.

     Komunikasi serial selain menggunakan FT232 ternyata baru-baru ini beredar papan Arduino murah dengan komunikasi serial menggunakan chip CH340. Chip jenis ini juga sama memerlukan driver eksternal untuk menciptakan Virtual COM Port yang berfungsi sebagai jalur komunkasi serial. Unduh driver CH340 dari situs resminya disini atau disini bagi pengguna Linux dan Mac.

Gambar 3. Arduino Uno dengan Chip CH340

    Chip CH340 adalah jenis USB to UART yang belum lama digunakan. Chip CH340 lebih murah dari pada FT232 sehingga papan Arduino yang menggunakan chip China ini harganya lebih murah. Papan Arduino yang menggunakan Chip CH340 terkenal dengan nama produk DCcduino.

    Jika kita berhasil memasang driver USB to UART pada komputer tapi ternyata masih muncul masalah avrdude: stk500_getsync(): not in sync: resp=0x00 maka kesalahan mungkin ada pada penjelasan berikutnya.

[2] Kesalahan Board dan Serial Port
     Permasalahan ini adalah hal biasa, baik bagi pemula atau pun yang sudah profesional. Bagi pemula biasanya terjadi karena masih bingung dalam mengenali Arduino, tapi bagi profesional biasanya karena terlupa atau kurang teliti. Memiliki beberapa tipe papan Arduino kadang membuat proses pemindahan tipe papan Arduino menjadi terlupakan dan munculah kegagalan komunikasi. Solusinya mudah saja, setelah selesai menulis kode Arduino dan sebelum melakukan compile serta upload kode pastikan bahwa pemilihan papan Arduino pada perangkat lunak sudah sesuai dengan tipe papan Arduino yang akan menjadi target. Jika anda menggunakan Arduino Uno sebagai target, pastikan bahwa Arduino IDE juga di set pada Arduino Uno. Untuk menyesuaikan papan Arduino dengan Arduino IDE maka klik menu Tools > Board > Pilih sesuai dengan tipe Papan Arduino yang anda miliki.

setelah itu pastikan tipe papan Arduino antara perangkat lunak dengan perangkat keras sudah sesuai, maka selanjutnya memastikan jalur komunikasi serial yang digunakan antara komputer (Arduino IDE) dengan papan Arduino. Periksalah USB Serial Port (COM) yang digunakan oleh papan Arduino pada Device Manager di komputer anda.

Setelah yakin tipe dan jalur komunikasi sudah benar, maka selanjutnya pastikanlah Serial Port antara Device Manager dengan Arduino IDE sudah sesuai. Jika jalur komunikasi yang digunakan pada Device Manager adalah COM3 maka pastikan Arduino IDE juga menggunakan COM3. Klik menu Tools > Serial Port > Pilih COM yang digunakan sesuai dengan yang ada pada Device Manager.

Jika sinkronisasi antara komputer dengan papan Arduino sudah benar tapi ternyata masih muncul masalah avrdude: stk500_getsync(): not in sync: resp=0x00 maka kesalahan mungkin ada pada penjelasan berikutnya.

[3] Penggunaan Pin 0 (RX)
  Permasalahan ini memang jarang terjadi. Hal ini karena pin 0 (RX) yang tersedia pada Arduino jarang sekali digunakan. jadi ada baiknya anda jangan menghubungkan rangkaian ataupun module tambahan pada saat hendak mengUpload program.

[4] Arduino IDE Korup
Permasalahan ini jarang sekali terjadi namun untuk mengetahui program Arduino korup atau tidaknya anda bisa mengeceknya dengan menggunakan board Arduino lainya.

atau anda juga bisa mengecek papan Arduino anda dengan PC lainya jika di dapati Papan Arduino anda bekerja dengan baik ada kemungkinan softwere Arduino IDE anda korup atau komputer tidak dalam keadaan baik.

Jika setelah papan Arduino dicoba pada komputer lain tapi ternyata masih muncul masalah avrdude: stk500_getsync(): not in sync: resp=0x00 maka kita akan masuk ke tahap selanjutnya yakni pengecekan boardloader

[5] Bootloader Rusak atau Hilang
   Akhirnya sampai juga pada tahap ini. Permasalahan pada bootloader merupakan permasalahan yang tidak terlalu rumit terkecuali bagi para pemula. untuk mengetahui boadloader dalam keadaan baik atau rusak anda cukup melihat led pada pin 13 jika pertama kali dinyalakan LED akan berkedip sekali secara cepat, jika tidak berkedip ada kemungkinan boodloader hilang atau IC dalam keadaan rusak, cara mengetahuinya hubungkan USBasp pada pin ISP IC ATMega16au lalu gunakanlah softwere AVR Dudes untuk mendetect jika terbaca maka ic dalam keadaan baik jika tidak itu berarti ic dalam keadaan rusak, jika IC dalam keadaan baik maka tanamkanlah kembali boodloader pada IC tersebut.

jika yang satu  ini jugak tidak bisa maka ceklah boodloader pada IC targetnya, atau mikro utamanya, cara pengecekanya sama dengan cara pengecekan boodloader pada IC USB To UART yakni dengan menghubungkan USBasp ke ISP targetnya lalu klik tombol detect pada AVR Dudes jika sudah terdetect maka IC dalam keadaan baik dan burn boodloader IC targetnya.

Wednesday, 21 October 2015

PROPELLER :: PROPELLER(ROTATING) LED DISPLAY





People often use ARDUINO platforms and other microcontrollers (pic, avr ) for making a propeller led display. If you are from a rural area like me it will be a little difficult to have such good hardware.I am trying to make one using AT89S52 microcontroller (which is very cheep).

i'm using a 11.0592MHz crystal and a 7805 for power supply leds are connected to the PORT0 of the MCU. 8 LED's are used for displaying letters. I used 7 red and 1 blue led to make it look good. you can connect LEDs to the microcontroller in two ways
  1. ACTIVE HIGH (logic '1' on MCU pin will make the LED glow)
  2. ACTIVE LOW (logic '0' on MCU pin will make the LED glow)

It is better to connect the leds in active low configuration(cathode to MCU pin and anode to Vcc through 220ohm resister for current limiting.

The whole arrangement is placed in a wheel using foam plaster so the it sticks on both sides
the wheel is attached to 6mm shaft and 1000RPM metal gare motor.




Keep the arrangement as strong as possible. So that it won't fall out of the high speed rotating platform.Try to make it stable to suppress the vibrations at high speed. I attached the 9V battery using a tape to the circuit board of MCU .It means  I am using "ON BOARD" power supply.

I arranged the LEDs on a separate PCB and connected them to the pinheads and an eight pin female connector is used to connect the 8 LEDs to connect to PORT0 of AT89S52.

I used the KIEL software to program the microcontroller. i prefer to work with C rather than assembly. I am using a USB based programmer to burn the AT89S52 MCU.

 try to make your code flexible so that you can easily modify to display any word
at first every thing was a bit messy
watch the video


   
        looks nice is isn't it.
I'm trying to make a single stand still display. calculation of proper delay is very important in making this project.because speed of  any two motors is not equal.calculate delay as per your motor.motor speed should not be less than 1000.

 for displaying each letter make a standard notation.I'm following 5*7 notation



if your motor is rotating in clock wise direction then the corresponding code will be as follows.
 leds are connected to PORT0 of AT89S52 so the logic will be
                P0=0x81; delay( );//define this function as per your motor
P0=0x6f;  delay( ); 
 P0=0x6f;  delay( );
 P0=0x6f;  delay( );
   P0=0x81;  delay( ); 
                              P0=0xff;  delay( );// to make one column gap between letters 
if it is anti clock wise then
same code in the reverse order
in this example im using the letter "A" which is symetrical
for other letters you need to follow from down to top of the code algorithm discussed above
                                                               P0=0xff;    delay( );// to make one column gap between letters
P0=0x81;  delay( ); 
P0=0x6f;  delay( );  
P0=0x6f;  delay( ); 
P0=0x6f;  delay( ); 
P0=0x81;  delay( );
similarly for active high the following notation must be followed
  so the code will be:

led=0x7e;delay();
led=0x90;delay();
led=0x90;delay();
led=0x90;delay();
led=0x7e;delay();
                                            led=0x00;delay();column gap betwwn 2 letters
so that you can display any word on your moving display

but the question is how much delay we need to use after each and every colum
follow theses calculations..
DELAY CALCULATIONS 
motor speed===1000 RPM
time for one rotation===60 milli seconds
radious =30cm
peremeter=2*3.414*30=204.84~205
width of led column=0.5cm ( this indicated the duration of led glow in terms of length of display)
total num of columns(leds)=205/0.5=410
410 leds=60 milli seconds
one led(column)time=146 micro seconds// 
columns for each letter=6
time for a letter=6*146=876 micro seconds
length for letter=6*0.5=3
total leters=205/3=68
THE CALCULATIONS VARIES ACCORDING  TO THE GLOW TIME OF LED AND RADIUS OF THE ROTATING ARM 
motor speed===1000 RPM
time for one rotation===60 milli seconds
radius =30cm
peremeter=2*3.414*30=204.84~205
width of led column=1cm( this indicated the duration of led glow in terms of length of display)
total num of columns(leds)=205
205 leds=60 milli seconds
one led(column)time=292 micro seconds
columns for each letter=6
time for a letter=6*292=1752 micro seconds
length for letter=6
total leters=205/6=34
THESE ARE ROUGH CALCULATIONS BECAUSE THE MOTOR SPEED IS NOT ALWAYS CONSTANT 
BUT THEY HELP IN APROXIMATING THE DELAY



 if you are a bit good at it
TRY WITH  "RGB" LEDS
ALL THE BEST   
EXAMPLE PROGRAM     
circuit diagram using 8051 
//THIS PROGRAM IS FOR 8051
// in this code i did not used lookup tables for reducing the complexity                                                      
// i just gave code logic for one letter'A' and space ' '                                                                               

#include<reg51.h> 

                                                                                                                            
#define led P0 //port0 will be connected to leds 
                                 
unsigned int del=50//variable to control delay
                                                                                           
void delay(void)
{
 unsigned int i,j;
for(i=0;i<del;i++)
for(j=0;j<1275;j++);

}
void display(unsigned char car); // declaration of a function 

void main()
{
 while(1)
{
  display('A'); // this displays a continious rotating"A  A  A  A"
  display(' '); 
//try to change the del value as per your motor until you get a perfect
//display once you got it then write your code for remaining letters 
//once you did this it will be very easy you can do your own fonts
//like "smily" ,"heart" etc 
//but the main logic is to achieve perfect "delay".once if you refer to the
 //delay calculations you will get it
//direction of rotation is also one important thing(clock wise or anti clock) 
// this "A" is simetrical so works on both directions.
}

}

void display(car)
{
  
  switch(car)

  case 'A' : // letter A
   
   {
    led=0x81;  delay( ); 

    led=0x6f;  delay( );  

    led=0x6f;  delay( ); 

    led=0x6f;  delay( ); 

    led=0x81;  delay( ); 

    led=0xff;  delay( );// to make one column gap between letters  
   } 
    break;
  
   case ' '  : // space
   
   {
    led=0xff;  delay( );

    led=0xff;  delay( ); 

    led=0xff;  delay( );  

    led=0xff;  delay( ); 

    led=0xff;  delay( ); 

    led=0xff;  delay( ); 
    
    led=0xff;  delay( );// to make one column gap between letters 
  
   } break;
  default:
   led=0xfe;
}
// END of program

=======================================================================================



                                             //THIS PROGRAM IS FOR AVR

// in this code i did not used lookup tables for reducing the complexity                                                      
// i just gave code logic for one letter'A' and sapace ' '                                                                              

#include<avr/io.h> 
#define F_CPU 8000000 // crystal frequency used in the circuit this helps in calibration of delay as per your frequency 
#include<util/delay.h> header file for generating delay for
                                                                                                                            
 DDRD=0xff;     //declaring portD as out put  
 #define led PORTD   // the word "led" will be replaced by PORTD at compile time                                                                       
unsigned int del=50 //variable to control delay
                                                                                          

//the delay function is ther as default in util package of winavr so use:  _delay_us( );
void delay(void)
{
 _delay_us(del);
 _delay_us(del);
 _delay_us(del);
 _delay_us(del);
}
 //remaining logic will be same for all microcontroller units

void display(unsigned char car);

void main()
{
 while(1)
{
  display('A'); // this displays a continious rotating"A  A  A  A"
  display(' ');
//try to change the del value as per your motor until you get a perfect
//display once you got it then write your code for remaining letters
//once you did this it will be very easy you can do your own fonts
//like "smily" ,"heart" etc
//but the main logic is to achieve perfect "delay".once if you refer to the
 //delay calculations you will get it
//direction of rotation is also one important thing(clock wise or anti clock)
// this "A" is simetrical so works on both directions.
}

}

void display(car)
{

  switch(car)

  case 'A' : // letter A
  
   {
    led=0x81;  delay( );

    led=0x6f;  delay( ); 

    led=0x6f;  delay( );

    led=0x6f;  delay( );

    led=0x81;  delay( );

    led=0xff;  delay( );// to make one column gap between letters 
   }
    break;

   case ' '  : // space
  
   {
    led=0xff;  delay( );

    led=0xff;  delay( );

    led=0xff;  delay( ); 

    led=0xff;  delay( );

    led=0xff;  delay( );

    led=0xff;  delay( );
   
    led=0xff;  delay( );// to make one column gap between letters

   } break;

 default:
   led=0xfe;
 // gives an underline when no letter to display blue line in the code
}
// END of program

=======================================================================================
i m giving  the example for understanding the logic of this project.you can extend the code by adding number of "switch cases" i made it for active low logic means logic zero indicates led glowing and one indicates off.
with this technique you can make your own custom designs like "heart " "smile"
by changing the "del" variable value you can change the width of a letter.because no two motors are alike.
i prefer you to go for 1000 RPMmotor from vegarobokits. Which will be around 145 Rs


This propeller LED display can be made stable using an interrupt source. An IR sensor can be used to make it stable. Better to use a IR slot sensor as shown in the picture it will be a faster compared to an LM358 based sensor. if your motor is faster than 1500 rpm then this sensor is the best.





observe this video carefully.... you will find a small yellow paper on the base ground which comes in between the slot sensor pins and triggers the display. So your display always starts from a particular point

propeller LED display on sealing fan

in the above pic the fan is shaking due to weight imbalance.

this is due to improper delay between the letters.



the video:





Bluetooth controlled rotating POV LED display 



                                  ALL THE BEST

          +++++++++++++++++++++++++++++++++++++++++++++

=============================================

NOTE: 


  DON'T JUST ASK FOR THE ENTIRE CODE.  


TRY TO


 DEVELOP IT FOR YOUR SELF 


     GO THROUGH THE ARTICLE ONCE AGAIN


 YOU 


WILL FIND EVERY THING  

+++++++++++++++++++++++++++++++++++++++++++++

=============================================

                                                                                                                                 

=========================================================================
=========================================================================  


FOR THOSE WHO WANT TO BUY THE KIT:

FREE SHIPPING ALL OVER INDIA


MAIL US AT
vaabrobotics@gmail.com