1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

I'm exhausted, and a newb...

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by Franknstein, Apr 19, 2007.

  1. Franknstein

    Franknstein New Member

    Joined:
    Apr 19, 2007
    Messages:
    53
    Likes:
    0
    Thanks Eric.

    Like this: ?
    [​IMG]

    notice common of now named switches y1-y6 (S1-S6 were confusing me as they share the same name as S1,S2,S3,S5 to the left of my diagram) is not connected to anything anymore, its just as it was on the USB joystick board from the factory, and does not share continuity with my 0V GND wire.

    Is that correct now? I want to be sure, before I do something wrong and blow something up ;)

    Also, whats wrong with using the meter btw?

    tnx again
     
  2. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,180
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi,
    That looks OK to me.
    When its connected up and plugged in check the voltages with your meter.
    Lets know what they are.

    The problem with testing for continuity with ic's connected is that some meters when on the 'ohms' resistance range can have a voltage on the leads due to the meters internal battery. Depending on the type of meter it may apply a 'reverse' voltage on the ic's. Also you will get misleading readings caused by pathways thru the ic's.
     
  3. Franknstein

    Franknstein New Member

    Joined:
    Apr 19, 2007
    Messages:
    53
    Likes:
    0
    Ok, plugged in and put on the joystick test utility again, now it seems a bit better, when powered up, none of the joystick buttons are on... But selecting any combination of S1,S2,S3,S5, will also not yield any change.

    Point of interest: If I just touch wire 'z' to wire 'x' (this was a last resort test), all six of the buttons y1-y6 become active.

    One thing I dont understand about this circuit is that wire 'x' and wire 'z' are not common, so how can it complete the circuit ever, unless I wire them together (which makes all six permanently on)

    Getting 5V between y1-y6 and X when all of switches S1,S2,S3,S5 are open
    Getting 1v between y1-y6 and Z when all of switches S1,S2,S3,S5 are open

    I get the same 5v when I try activate y1, this is on wire X
    I get .5v when I try activate y1 (so it drops .5v), this is on wire Z
     
    Last edited: May 1, 2007
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. philba

    philba New Member

    Joined:
    Mar 12, 2006
    Messages:
    1,886
    Likes:
    8
    Location:
    Seattle

    to start with, disconnect the output of the '154 from the joystick. then measure the voltage from each of the outputs as you run through the switch combinations. (i.e., select 1st gear and then check the voltage on all 16 outputs). They should all be high except for one. If that's not right, then check to see that the inputs to the 154 do the right thing as you run through the gear selections.

    just a thought, you didn't wire the chip backwards? It's a surprisingly easy thing to do. even for old timers...

    something that was discussed but I wasn't quite clear on, does your joystick want active high or low inputs? I would guess low but you will need to verify that.
     
  6. Franknstein

    Franknstein New Member

    Joined:
    Apr 19, 2007
    Messages:
    53
    Likes:
    0
    I haven't disconnected and tested the outputs of the '154 yet, will do that a little later.

    I'm pretty sure the chip is in the correct way, I soldered on a chip holder too. The actual chip has a full circle on the bottom, and a semi-cicle indent on the top, the datasheet shows just the semi-circle on the top, so thats how I did it...

    Not too sure what inputs the joystick requires. I thought you guys said it was CMOS, so it had to be active low. Nonetheless, if i diconnect my newly built cicuit enirely from the joystick and take a jumper and bridge wire Z to terminal y1, it activates that button, without any external voltage whatsover.

    Thats what I didn't really understand about this whole circuit. I thought we could just close each switch remotely, instead of introducing voltage from an alternate circuit.

    I'm very confused now! :(

    EDIT:
    Tested the inputs, they work perfectly, chip is wired fine aswell.
    The outputs: Seem to be great aswell, I get a mutually exclusive Low output for each corresponding gear. ie (y1 is high 5v+ in all possible gear combinations including neutral, except for 1st gear.) This is using wire y as the anode on the multimeter.

    This seems like a good thing, the circuit seems to work perfectly, except its not activating the gears on the joystick.

    Im am so sure that it has something to do with the fact that wire 'Z' on my latest diagram does not have continuity at all with 0V gnd, whereas that is the common opposite terminal for all the joystick buttons y1-y6.
     
    Last edited: May 1, 2007
  7. philba

    philba New Member

    Joined:
    Mar 12, 2006
    Messages:
    1,886
    Likes:
    8
    Location:
    Seattle
    OK, the question is what is Z, gnd or +5V? just use your multimeter to measure between Z and gnd - 0V means it is gnd or low, +5V means it is, well, +5 or high. That will tell us if it uses AH or AL (if Z is gnd, then its AL and your circuit should work). If it's +5V, then you will need the inverters (74HC04) between the 154 outputs and the joystick.

    You aren't "closing a switch", you are presenting a voltage level to the internal inputs of the joystick. The 154 (and almost all 74XX logic circuits) output a voltage level. Logic inputs look for a voltage level. Look at your switch inputs to the 74HC154 - that's basically what the joystick input circuits are doing as well. They are feeding the 154 with a high or low voltage level.

    and by the way, the inputs don't care where the voltage comes from as long as the output circuit and input circut share a common ground.

    edit: you should check all 16 '154 outputs to be certain I didn't make a mistake (not unheard of y'know..)
     
  8. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,180
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi ryan,

    Havn't been able to get on forum page today, until now!, no idea why, web working fine otherwise.

    Have you done the tests that philba has suggested??

    I suspect that the Z wire is a 0v [gnd] Common for the 'z' inputs.

    Measure from the 'z' wire common to the BLACK 'Z' wire, if you read 0V on your meter then 'z' is the Common.

    Else let me know.

    We are all most there, fingers crossed!
     
  9. Franknstein

    Franknstein New Member

    Joined:
    Apr 19, 2007
    Messages:
    53
    Likes:
    0
    Ya, I've been trying the forum since 5.30am this morning, must have been a server error or something.

    ANyways, back at work today, so will try all these tests a little later when I get home.
     
  10. Franknstein

    Franknstein New Member

    Joined:
    Apr 19, 2007
    Messages:
    53
    Likes:
    0
    Ok tested now,

    I just measured across Main black wire on joystick 0v GND, and wire Z (which is the common ground for the y switchs), and I get +4.5v... so I take it its an active high circuit and I will need to add the inverter IC?

    I understand how the circuit works, how we are introducing voltage to each of the y1-y6 terminals, but what I'm saying is the joystick circuit has this ability already, take a look at my drawing below, the joystick had 6 little rubber buttons which go over terminals y1-y6, obviously I've ripped the casing apart and the little red rubber buttons are not there anymore, but if the joystick is plugged in and I just jump the terminals between y1 and the common track, y1 activates... Thats why I was confused about the way we've done it now, I just thought the solution was going to be a far simpler one... I am glad its not because I've learned a lot from this experiment.

    [​IMG]




    tnx
     
    Last edited: May 2, 2007
  11. philba

    philba New Member

    Joined:
    Mar 12, 2006
    Messages:
    1,886
    Likes:
    8
    Location:
    Seattle
    that sounds correct. a 74HC04 is a great solution but just about any hex inverter (no that's not a Wiccan thing) will do the trick, though.
     
  12. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia
    I agree with philba. The inputs are Active High so you need a hex inverter.
     
  13. Franknstein

    Franknstein New Member

    Joined:
    Apr 19, 2007
    Messages:
    53
    Likes:
    0
    Ok, I'm about to retreat to the garage to solder on my new CD74HCT04E on the stripboard. Will return with the results within then next 1 hr.
     
  14. Franknstein

    Franknstein New Member

    Joined:
    Apr 19, 2007
    Messages:
    53
    Likes:
    0
    DAMNIT!!! still not working. Seems all y1-y6 buttons are on as soon as I plug the circuit in.

    I tested some things though:

    If i put the meter between pin Vcc and Pin GND of the 74hc154e when the GND of the entire circuit is connected to wire y1-y6 common (see joystick diagram above), I get +2.5v in NEUTRAL. If I ground the entire circuit to the 0v GND input from the USB, I get a +5v.

    Done some testing from the beginning of the circuit, it seems there were a few errors on the logic inputs/outputs of the '154.
    I tested Low/High's when in each individual gear:

    DATASHEET: http://pdf1.alldatasheet.com/datasheet-pdf/view/27015/TI/CD74HC154E.html

    Gear|A0|A1|A2|A3| <--- A0-A3 = CORRECTLY MARKED INPUTS AS ON DATASHEET FOR '154, note its reversed though
    1....|.H.|.L.|.H.|.L.|
    2....|.L.|.H.|.H.|.L.|
    3....|.H.|.L.|.H.|.H.|
    4....|.L.|.H.|.H.|.H.|
    5....|.H.|.L.|.L.|.H.|
    6....|.L.|.H.|.L.|.H.|

    Gear 3 was connected to pin y10 output, which is incorrect, should be y13.
    Also, there seems to be no logical output for gear 5, check the datasheet, there is no output for those inputs.
    Without that gear 5 being resolved, this wont work?? Any ideas?

    One more thing:
    I disconnected the HEx inverter to test some things:

    it seems that, if I ground the circuit to the 0v GND of the USB joystick input (the one that yields 5+ through the red wire)
    then each gear when selected, selects a combination of either 5 or 6 buttons simultaneously,
    ...12345678 <--- joystick buttons on test program on pc. (little red lights show on the program when a button is activated)
    1|11011010
    2|11110110
    3|havent rewired this one correctly yet
    4|11101110
    5|this one has no output as previously discussed
    6|11011010

    In a way it kind of works, because each gear represents a comination of many outputs.

    If I ground to the common y1-y6 track though, they are all on all the time.

    Right now, logically, I am stumped. Theoretically, the circuit should work, I understand completely the HIGH and LOW concept, and througoughly tested the circuit input by input/ output by output, and the cicuit works (except for those two gears, but that cant possibly throw the whole thing off). I think that I am interfacing into the joystick board incorrectly.
     
    Last edited: May 3, 2007
  15. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia
    3 days ago, I had a feeling that you were missing something. I had intended to ask you to do some measurements to resolve this, but you seemed happy yesterday.

    What I suggest you do is:-

    1. disconnect the new circuit from the Joystick

    2. connect the negative probe of the meter to x (ie. on the 0 Volt line)

    3. Measure the voltage at y, it should be +5 Volt based on your previous statements, but I want to be sure.

    4. measure the voltage on Z.

    5. short y1 and note the voltage on Z. Is there any change?

    5. measure the voltage on y1.

    6. short y1 and note the voltage on y1. It should be about +5V.

    Write a table of these results of steps 4 ~ 6 so we can see them clearly, ie.

    _____y1
    _____open closed
    Vz

    Vy1

    NOTE
    It is better to write binary numbers in the same order as decimal numbers, ie. the most significant first. eg. you would not write forty six as 64.

    So the A0 ~ A3 should be in the same order as on the data sheet since A3 is the most significanr bit (MSB)

    hence, decimal 13 is written in binary as 1101, ie. A3 = 1, A2 = 1, A1 = 0, A0 = 1.
     
    Last edited: May 4, 2007
  16. philba

    philba New Member

    Joined:
    Mar 12, 2006
    Messages:
    1,886
    Likes:
    8
    Location:
    Seattle
    that's why I said to double check it. glad you caught it.
    this sounds like your joystick controller uses active low. the clue is that it selects 5 or 6 buttons. I suspect you got something the wrong way around on your labeling of the joystick circuits.

    I agree with len, take careful readings and report the results.

    You'll get there, just hang in.
     
  17. Franknstein

    Franknstein New Member

    Joined:
    Apr 19, 2007
    Messages:
    53
    Likes:
    0
    Ten characters here (well over ten) << ignore this
     
  18. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia
    There is no need to do the table. I have extracted the info I need.

    Re your question about point 5, I quote:-

    5. short y1 and note the voltage on Z. Is there any change?

    Negative probe of meter is still on X, positive probe is on Z.
    y1 shorted to X... before short: 3.88v, after short 3.36v (Is this how you meant for me to test this step? I'm not too clear on the details).


    Yes. I assume by "after short" you mean that the voltage was measured with the short on. So "during short" would be more accurate.

    It looks to me that the IC in the JS is operating from a 3.9 Volt supply. That's why y1 goes to 3.5 V when the s/c is applied. Note there is some small inconsistency since Z falls to 3.36 V when the s/c is on but you said that y1 is 3.5 V. They should be equal. But this is not important. If you wish, you could check this by moving the probe from Z to y1 while the s/c is on.

    I conclude that the inputs are active high.

    So I don't know why there are 5 or 6 ones on the screen when you connect the circuit.

    I suspect that the 5 Volt from the inverter is affecting the JS in some way thus causing it to show strange results. As Philba said, you would think the JS inputs were AL.

    So I suggest that you use PNP transistors to switch the y signals.

    Do you have any PNP transistors in your junk box? Virtually any small signal transistor will do.

    So if you don't have 6 in the junk box, buy some such as the
    PN200, BC327, BC328, BC556, BC557, BC558, BC559, 2N3906, or similar.

    You won't need the inverter.

    I'll post a circuit later.
     
  19. philba

    philba New Member

    Joined:
    Mar 12, 2006
    Messages:
    1,886
    Likes:
    8
    Location:
    Seattle
    before you wire up transistors, try running the 154 from the joystick power. it should work down to a Vcc of 2V.
     
  20. ljcox

    ljcox Well-Known Member

    Joined:
    Dec 25, 2003
    Messages:
    3,205
    Likes:
    28
    Location:
    Melbourne Australia
    Yes, Try Philba's suggestion, but I don't know how much current the Z output will source. Note that you may need to connect the common end of R1 ~ 4 to Z also. But try them connected to +5V first.

    I need you to do one more test. Set your multimeter to measure current and connect it between Z and y1 (+ probe to Z), measure the current. I expect it will be less than 10 mA and possibly much smaller.

    I have attached 2 options for you to consider if Philba's suggestion does not work.

    Red LEDS should suffice. The point of the LEDs is to offset the voltage since they have a voltage drop of 1.7 ~ 2 V. The LEDs may not glow but that does not matter.

    I did not check the output connections, but you know which ones to use.

    I just did a cut and paste on your drawing.

    EDIT. Another possibility just occured to me. Use Philba's suggestion, but power the 74HC154 (and the resistors) from the +5V and the 74HC04 inverter IC from Z. The input protection of the 74HC04 should prevent the Z line being pulled towards +5V.
     

    Attached Files:

    Last edited: May 4, 2007
  21. Franknstein

    Franknstein New Member

    Joined:
    Apr 19, 2007
    Messages:
    53
    Likes:
    0
    YES! It works!... Well, 80% working....

    Gears 1,2,3,4 work perfectly
    Gears 5,6 seems to activate all 6 y1-y6 buttons, not sure why.

    In order to get it to this stage, I did what Len said at the 'EDIT' of your post, connected the '154 and resistors to +5v, and the hex chip Vcc to Z. But one major thing to note. I disconnected the wire which commons the ground of the new circuit to the ground 0v of the joystick, if thats connected nothings works at all, all y1-y6 are off. So how on earth is this new circuit getting power??? If the new circuit ground is not connected to the ground of the power source??
    Any ideas on gears 5/6?

    EDIT: Ok, I've tested the '154 inputs in each gear.
    Negative probe on on isolated new circuit ground. And Positive probe on the entry side of each resistor. It seems the highs are 1.8v, and the lows are 0v. This is true for each gear, except 5,6, where the highs are 0.8 volts and the lows 0v. I suspect that 0.8v is not high enough to register a High on the '154, thus all four inputs are low, which yields a combination of many results. Should I change the value of the resistors to a lower Ohm value?

    Thanks again for all your guys help, and thanks for the drawings Len, hopefully we dont have to use them though.

    tnx!
     
    Last edited: May 5, 2007

Share This Page