Page 5 of 7 FirstFirst ... 234567 LastLast
Results 41 to 50 of 66
  1. #41

    Quote Originally Posted by blackdream View Post
    nkasulay naka ug order dri boss?
    Oo perme man ko mo-order diha sa una.

  2. #42
    try dre brad o RSonline ph. tag 22 petot rana imo knob. ila pamaagi ana is order ka online then ig place nimo sa order tagaan ka nilag account number sa BPI para hulog sa bayad. kung modawat lang ni sila ug CC unta, lami kau e shopping dre

    Buy slide potentiometer online from RS Components

  3. #43
    Quote Originally Posted by alwaysdrunk View Post
    try dre brad o RSonline ph. tag 22 petot rana imo knob. ila pamaagi ana is order ka online then ig place nimo sa order tagaan ka nilag account number sa BPI para hulog sa bayad. kung modawat lang ni sila ug CC unta, lami kau e shopping dre

    Buy slide potentiometer online from RS Components
    WOW!!! nindot ni dri bro bah.. pero mahal man pd.. hehehe,

    naa koy ask bro... possible pa sa arduino uno nga ma extend iyang controllers kay murag upto 6 rman ka analog inputs ang magamit, so possible kaha nga e extend upto atleast 20 ka analog? naa kahay ways ana?

    - - - Updated - - -

    Quote Originally Posted by tatskie View Post
    Oo perme man ko mo-order diha sa una.
    salamat boss

  4. #44
    Quote Originally Posted by blackdream View Post
    naa koy ask bro... possible pa sa arduino uno nga ma extend iyang controllers kay murag upto 6 rman ka analog inputs ang magamit, so possible kaha nga e extend upto atleast 20 ka analog? naa kahay ways
    Though para ni alwaysdrunk imo question bai, ang tubag ana kay oo. Naay daghan paagi para mapun-an imo analog inputs. Since stick man ka sa Uno, mao ni ang pinakasayon:
    (1) Kung dili problema ang delay sa imoha design, gamiti na ug mux; make sure lang na pang analog iya application (e.g., 16:1 74HC4067).
    (2) Gamit ka ug external ADC, through I2C or SPI interface. Mas makapili pa ka ug mas paspas nya mas taas pa gyud resolution.

  5. #45
    Quote Originally Posted by tatskie View Post
    Though para ni alwaysdrunk imo question bai, ang tubag ana kay oo. Naay daghan paagi para mapun-an imo analog inputs. Since stick man ka sa Uno, mao ni ang pinakasayon:
    (1) Kung dili problema ang delay sa imoha design, gamiti na ug mux; make sure lang na pang analog iya application (e.g., 16:1 74HC4067).
    (2) Gamit ka ug external ADC, through I2C or SPI interface. Mas makapili pa ka ug mas paspas nya mas taas pa gyud resolution.
    salamat kaau bro, atleast naa kahatag kag idea nako, murag mao cguro ni imong pasabot

  6. #46
    Quote Originally Posted by blackdream View Post
    WOW!!! nindot ni dri bro bah.. pero mahal man pd.. hehehe,

    naa koy ask bro... possible pa sa arduino uno nga ma extend iyang controllers kay murag upto 6 rman ka analog inputs ang magamit, so possible kaha nga e extend upto atleast 20 ka analog? naa kahay ways ana?

    - - - Updated - - -



    salamat boss
    yes you can expand it. use shift register. or use many arduino uno! you can daisy chain arduino uno!

    Edit: shift register may not work... daisy chain arduino instead. one is a master and all others are slave. naay wire library ang arduino to do this. downside is you have to sacrfice 2 analog pins sa arduino. that means, 4 analog pins lang ma available. so, you have to chain 5 arduinos to have 20 analog pins.

    "daisy chain 5 arduino" will not mean you buy 5 arduinos. you only need usa ka arduino as master and build the slaves using atmega 328P chips. naa available sa bitstoc.com sa mabolo tag 181 petot kada chip.

    try google "breadboard arduino" to build a bare minimum arduino

    2nd edit: I just realized that daisy chained arduinos only expands analog pins as OUTPUT not as INPUT. in your project, you need more analog INPUTs, so daisy chain may not work as well. pag build nalng jud ug daghan arduino na bare then connect all GND together and operate independently. OR use an analog multiplexer like 4051
    Last edited by alwaysdrunk; 12-07-2015 at 12:24 PM.

  7. #47
    here is the most basic on how multiplexer works i found in web (gammon) (ex cd4051)



    - kanang I/00, I/01, I/02....I/07 mao ni sila imong 8 slide potentiometers (analog inputs)
    - kanang O/I is mao na ang analog output from your 8 analog inputs,
    padung ni sa imo arduino analog pin as INPUT.
    - kanang 8 analog inputs, dili na madungan ug bahog sa O/I, one at a time lang.
    - so mabutang na ang usa ka pin sa imong arduino mka hatag nag 8 analog values one at a time (8:1 ratio)
    - so kung need kag 20 inputs, you only need 3 analog pins sa imo arduino
    - kun mo gamit kag cd4067 (16:1) 2 analog pins lang sa rduino, 32 analog input iya mabasa one at a time

    unsaon pag set asa na input ang ibahug sa output O/I?

    *imo e set ang pins A, B and C into binary values eg. 010. kini na mga pins is connected to any digital pin from arduino

    Example:

    A is conneted to digital pin 2 sa arduino
    B is conneted to digital pin 3 sa arduino
    C is conneted to digital pin 4 sa arduino

    HIGH in arduino means 1
    LOW in arduino means 0

    kung gusto kag binary na 010 in ani ang code sa arduino

    digitalWrite(pin 2,LOW);
    digitalWrite(pin 3,HIGH);
    digitalWrite(pin 4,LOW);

    sa binary na 010, pagbasa ani in terms of ABC is CBA

    example:
    binary 110 is A=0, B=1 and C=1
    binary 001 is A=1, B=0 and C=0


    So kung gusto nimo ibahog ang input I/01 to output, kinahanglan kag binary na 001.
    set A=1, B=0 and C=0 (google decimal to binary conversion)


    Generally,kinahanglan imo code sa arduino is an unending loop!

    kini na loop: do this for all inputs tagsa tagsa!

    set binary ----- read analog value

    Why loop?? because arduino cannot predict which potetiometer you will move from a certain time.
    mas maayo ug loop kay tanan potentiometer will be checked kung naa bay na change ug value. kun wa kay gi move na potentiometer, same ra ang value.
    ang downside is naay delay labi na kung 20 na ka inputs kay mo round pman syag basa sa tanan
    before mo balik. we are talking of microseconds here so basin di ra maka apekto sa imo project

    this is how it's looped

    Last edited by alwaysdrunk; 12-07-2015 at 02:01 PM.

  8. #48
    Quote Originally Posted by alwaysdrunk View Post
    here is the most basic on how multiplexer works i found in web (gammon) (ex cd4051)



    - kanang I/00, I/01, I/02....I/07 mao ni sila imong 8 slide potentiometers (analog inputs)
    - kanang O/I is mao na ang analog output from your 8 analog inputs,
    padung ni sa imo arduino analog pin as INPUT.
    - kanang 8 analog inputs, dili na madungan ug bahog sa O/I, one at a time lang.
    - so mabutang na ang usa ka pin sa imong arduino mka hatag nag 8 analog values one at a time (8:1 ratio)
    - so kung need kag 20 inputs, you only need 3 analog pins sa imo arduino
    - kun mo gamit kag cd4067 (16:1) 2 analog pins lang sa rduino, 32 analog input iya mabasa one at a time

    unsaon pag set asa na input ang ibahug sa output O/I?

    *imo e set ang pins A, B and C into binary values eg. 010. kini na mga pins is connected to any digital pin from arduino

    Example:

    A is conneted to digital pin 2 sa arduino
    B is conneted to digital pin 3 sa arduino
    C is conneted to digital pin 4 sa arduino

    HIGH in arduino means 1
    LOW in arduino means 0

    kung gusto kag binary na 010 in ani ang code sa arduino

    digitalWrite(pin 2,LOW);
    digitalWrite(pin 3,HIGH);
    digitalWrite(pin 4,LOW);

    sa binary na 010, pagbasa ani in terms of ABC is CBA

    example:
    binary 110 is A=0, B=1 and C=1
    binary 001 is A=1, B=0 and C=0


    So kung gusto nimo ibahog ang input I/01 to output, kinahanglan kag binary na 001.
    set A=1, B=0 and C=0 (google decimal to binary conversion)


    Generally,kinahanglan imo code sa arduino is an unending loop!

    kini na loop: do this for all inputs tagsa tagsa!

    set binary ----- read analog value

    Why loop?? because arduino cannot predict which potetiometer you will move from a certain time.
    mas maayo ug loop kay tanan potentiometer will be checked kung naa bay na change ug value. kun wa kay gi move na potentiometer, same ra ang value.
    ang downside is naay delay labi na kung 20 na ka inputs kay mo round pman syag basa sa tanan
    before mo balik. we are talking of microseconds here so basin di ra maka apekto sa imo project

    this is how it's looped

    salamat kaau boss, very detailed nga explanation, pero complicated pd sa akong side.. hahaha, pero studyhan lng ni nako boss

    kini nga process boss, pwde kaha ni sya?
    Last edited by blackdream; 12-07-2015 at 03:19 PM.

  9. #49
    mao rana sya boss, lain lang iya gigamit na chip. sa ako example 4051 chip which is an 8 I/O mux kana is i think is 4067 w/c has 16 I/O.

    kana na picture mao na ako gi explain sa ako example. blue lines = ABC sa ako example. pink line is O/I (output sa mux input sa arduino) kana imo picture has a total of 32 analog datas to read. more than what you need. sa akoa example kun duhaon ka chip, 16 ra ka analog data. btw, single chip rana ako gi example kana imo picture double. sa arduino UNO kung kana na chip imo gamiton (16 I/O) mo abot nag maximum 16 x 6 arduino pins = 96 analog data imo mabasa one at a time . so up to 96 ka slide potentiometer imo magamit.

    bilib sad ko nimo boss kay base sa imo experience aning arduino, smart kaayo imo mga questions.

  10. #50
    Quote Originally Posted by alwaysdrunk View Post
    mao rana sya boss, lain lang iya gigamit na chip. sa ako example 4051 chip which is an 8 I/O mux kana is i think is 4067 w/c has 16 I/O.

    kana na picture mao na ako gi explain sa ako example. blue lines = ABC sa ako example. pink line is O/I (output sa mux input sa arduino) kana imo picture has a total of 32 analog datas to read. more than what you need. sa akoa example kun duhaon ka chip, 16 ra ka analog data. btw, single chip rana ako gi example kana imo picture double. sa arduino UNO kung kana na chip imo gamiton (16 I/O) mo abot nag maximum 16 x 6 arduino pins = 96 analog data imo mabasa one at a time . so up to 96 ka slide potentiometer imo magamit.

    bilib sad ko nimo boss kay base sa imo experience aning arduino, smart kaayo imo mga questions.
    pero ang codes pd ana boss? for the maintime wla pako ana nga chip pero try daw ni ug check if okay ba ni sya nga code? NOTE: Para lng ni sa first chip ang code ani nya... dli ko sure kung unsaon sya nga pwde ma apply for more than one chip.

    Code:
    //Mux control pins
    int s0 = 8;
    int s1 = 9;
    int s2 = 10;
    int s3 = 11;
    
    //Mux in "SIG" pin
    int SIG_pin_0 = 0;
    int SIG_pin_1 = 1;
    
    
    void setup(){
      pinMode(s0, OUTPUT); 
      pinMode(s1, OUTPUT); 
      pinMode(s2, OUTPUT); 
      pinMode(s3, OUTPUT); 
    
      digitalWrite(s0, LOW);
      digitalWrite(s1, LOW);
      digitalWrite(s2, LOW);
      digitalWrite(s3, LOW);
    
      Serial.begin(9600);
    }
    
    
    void loop(){
    
      //Loop through and read all 16 values
      //Reports back Value at channel 6 is: 346
      for(int i = 0; i < 16; i ++){
        Serial.print("Value at channel ");
        Serial.print(i);
        Serial.print("is : ");
        Serial.println(readMux(i));
        delay(1000);
      }
    
    }
    
    
    int readMux(int channel){
      int controlPin[] = {s0, s1, s2, s3};
    
      int muxChannel[16][4]={
        {0,0,0,0}, //channel 0
        {1,0,0,0}, //channel 1
        {0,1,0,0}, //channel 2
        {1,1,0,0}, //channel 3
        {0,0,1,0}, //channel 4
        {1,0,1,0}, //channel 5
        {0,1,1,0}, //channel 6
        {1,1,1,0}, //channel 7
        {0,0,0,1}, //channel 8
        {1,0,0,1}, //channel 9
        {0,1,0,1}, //channel 10
        {1,1,0,1}, //channel 11
        {0,0,1,1}, //channel 12
        {1,0,1,1}, //channel 13
        {0,1,1,1}, //channel 14
        {1,1,1,1}  //channel 15
      };
    
      //loop through the 4 sig
      for(int i = 0; i < 4; i ++){
        MIDImessage(176, controlPin[i], muxChannel[channel][i]);
      }
    
      //read the value at the SIG pin
      int val = analogRead(SIG_pin_0);
    
      //return the value
      return val;
    }
    
    void MIDImessage(byte command, byte data1, byte data2) //pass values out through standard Midi Command
    {
       Serial.write(command);
       Serial.write(data1);
       Serial.write(data2);
    }

  11.    Advertisement

Page 5 of 7 FirstFirst ... 234567 LastLast

Similar Threads

 
  1. Kinsay kamao mo ayo ug video card?
    By amdcool2 in forum Computer Hardware
    Replies: 4
    Last Post: 02-17-2014, 01:29 PM
  2. Looking For: Kinsay kabalo mo program ug maemo based phone?
    By jinjievitis in forum Cellphones & Accessories
    Replies: 6
    Last Post: 12-05-2012, 01:01 PM
  3. Replies: 14
    Last Post: 11-10-2012, 12:53 AM
  4. Replies: 9
    Last Post: 01-23-2012, 12:51 AM
  5. Replies: 0
    Last Post: 08-27-2009, 11:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top