1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics Student teacher needs electronics pcb help

Discussion in 'Modding' started by Cross By Nature, 16 Mar 2010.

  1. Cross By Nature

    Cross By Nature What's a Dremel?

    Joined:
    16 Mar 2010
    Posts:
    2
    Likes Received:
    0
    Hi Guys,

    Your help would be very, very much appreciated, I am beginning to get desperate :wallbash:
    I am currently undertakng an electronics module as part of a teacher training course. Things is I am finding it very difficult to comprehend my lecturer, as are my fellow students.

    My problem is I need to build a curcuit board to be used inside a device which will help budding guitar players to recongise chord structures. I have 36 micro switches placed in a guitar fret board, each switch representing the possible placement of a finger. The switches I want to make operate a piezo sounder when they are press in a combination the same as a chord diagram. I am using a genie pic chip 18 project board which I think has 5 inputs and 6 outputs. and can also be programmed to play the required chord (should be cool). I have been trying to design the program using New Wave Concepts Curcuit Wizard, an application which baffles me.

    The problems I forsee are that some of the switches will have to be used for more than one chord. To simplify things I am only using chords C,D,E,F,G,A as the final product is only a prototype, however still needs to work.

    Any help or reference to other forums or web sites would be very much appreciated. I would be happy to return the favour in any way possible, a pint in the local, a drawing (Im quite a skilled artist, name your subject or provide a pic for reference) or maybe you might like to put it down to a random act of kindness :clap:

    Many thanks inanticipation

    Steve x x
     
  2. Moriquendi

    Moriquendi Bit Tech Biker

    Joined:
    3 Nov 2005
    Posts:
    1,691
    Likes Received:
    58
    I think you're fairly limited by the number of inputs and outputs you have available. How many switches get pressed for each chord?

    The standard way of doing this would be to use a switch matrix which would work like this;

    PIC outputs are connected to a column of switches representing each fret

    PIC inputs are connected to a row of switches representing each string.

    [​IMG]

    To read a chord output 1 is taken high, this causes any of the inputs on a string with a switch pressed to become high so you record that. Then you take output 2 high and again read the inputs. You continue this sequence until all the columns have been read. this process is invisible to the user because it all happens so fast.

    Unfortunately you need 6 inputs for this to work as it is, you would probably be able to multiplex the outputs pretty easily and multiplexing the inputs shouldn't be too much harder.

    Moriquendi
     
    mvagusta likes this.
  3. n1ist

    n1ist What's a Dremel?

    Joined:
    2 Jun 2007
    Posts:
    4
    Likes Received:
    2
    Since you only need one of the outputs high at a time, use a shift register(74hc595), 3 to 8 decoder (74hc138), or even a 4017 counter between the PIC and the frets. This will reduce your output needs to 2 or 3 pins.
    /mike
     
    mvagusta likes this.
  4. Cross By Nature

    Cross By Nature What's a Dremel?

    Joined:
    16 Mar 2010
    Posts:
    2
    Likes Received:
    0
    Hi Guys,

    Thank you very much for your replies, interesting stuff however Im still a little unclear. I was intending for the curcuit to recognise only 6 chords C,E,G,D,A,F. All of the chords require 3 switches to be pressed apart from F which requires 4. All of the chords have 1 or more switches that are also used in other chords. I have purchased from Rapid the Genie 18 Project board, I was hoping that would do the trick :-(

    Im not sure where to go from here, I feel totally confused. Any help or clrification would be very much appreciated.

    Once again thanks in anticipation

    Cheers Steve
     
  5. Moriquendi

    Moriquendi Bit Tech Biker

    Joined:
    3 Nov 2005
    Posts:
    1,691
    Likes Received:
    58
    I don't really know how to make it any simpler than my previous explanation. If you have 6 "strings" that you have to simulate then you will need 6 inputs, there's no way around that unless you can use a multiplexer and I don't think you want to do that.

    The way the switch matrix works is this. For each chord you read each "fret" (column of switches) to see which "strings"(row of switches) are pressed to that "fret", if a string is pressed to that fret it will then the input will be high for that fret. What you have to do in software is arrange for each of the outputs to be taken high in turn, the process would look something like this.

    Set output 1 high
    read which inputs are high, record this information.
    set output 1 low
    set output 2 high
    read which inputs are high, record this information.
    set output 1 low

    You continue this process until you have set each output high and recorded which strings are pressed to which fret. You then have to work out from this data (which strings to which fret) what chord has been "played" and then sound the buzzer appropriately.

    I don't think that board will do what you want, not without adding multiplexers, you have to have at least 6 inputs to make it work.

    Moriquendi
     

Share This Page