novski Posted December 9, 2012 Report Share Posted December 9, 2012 Hi Im redesigning my board so i can fit a Bourns PEL12T Encoder in my circuit. As known its not possible to use the DIN modules developed here by Midibox people, but i like the idea of illuminating the shaft of the encoder. So i found the matching register for the DOUT module but can't find the complementary to an 74-165 that works with High signals on inputs. Does anybody have an idea how to manage those inputs without using NPN transistors for every input? Atached my schema i drawn from DIN Module schema and the schema of the encoder (LED and SW part.) witch don't match together... thanks for any help! novski Quote Link to comment Share on other sites More sharing options...
Sauraen Posted December 12, 2012 Report Share Posted December 12, 2012 (edited) On the pin of the 74HC165 shift register to which you will be connecting the switch pin of the encoder, don't connect the resistor package to that pin. Instead, run an equal-value resistor from that pin to ground. You may then need to invert the state of the switch in the software. As is, the resistors are pull-ups: if the input to the pin is disconnected (open switch) the IC will see +5 through the resistor, but if the pin is connected to ground (closed switch connected to ground), that will "override" the resistor and the IC will see ground. If you want your switch connected to +5 instead, then switch it so that the resistor is a pull-down, connected to ground. Edit: If that was too confusing I'll draw a schematic. Edited December 12, 2012 by Sauraen Quote Link to comment Share on other sites More sharing options...
novski Posted December 18, 2012 Author Report Share Posted December 18, 2012 HI Sauraen Sorry for that delay, i had to draw that by my self first. Then i understood what you mentioned. I think that doesn't work as well because then the LED will go dark every time i push the switch, doesn't it? That wold be a workaround but not really nice to look at...wold this work? Quote Link to comment Share on other sites More sharing options...
Sauraen Posted December 22, 2012 Report Share Posted December 22, 2012 That looks like it will work, but what I suggested won't make the LEDs go out when you press the button. The only connection between the LEDs and the button is that one side of all of them are connected to +5. Just take the pin connected to the switch (SW), connect it directly to the shift register (don't connect the resistor package to that pin, though leave it connected everywhere else), and also connect a 10K resistor from that pin to ground. If you mean that the button state will be inverted as far as the software sees it, that is correct, you'll have to switch it back in the software. One advantage of your design is that this button is not inverted, it behaves like all the others as far as the software is concerned. But I don't know how many of these you have, so you might have to buy a lot of transistors for your design. Quote Link to comment Share on other sites More sharing options...
novski Posted December 25, 2012 Author Report Share Posted December 25, 2012 (edited) Hi again! Thanks for your advice. I went over the Schematics again and noticed in the Datasheet of 74165 that there is a inverted output on that part. So i think your solution is the best. To go sure i drawn it new. Is this corresponding with your thoughts? I attached a snapshot of the part and added the full schematics of my Encoder Board i want to build... I will test this on breadboard somewhere around new year. Thanks for the help! Edit: Better open that one in separate Window. Its to big for container... Edited December 25, 2012 by novski Quote Link to comment Share on other sites More sharing options...
Sauraen Posted January 18, 2013 Report Share Posted January 18, 2013 That bus is a little confusing, but as best I can tell that is almost correct. If you have eight of these button/LED things with their switch wires connected to the eight inputs of a DIN shift register, just connect the resistor packages' common line to ground instead of +5, as you did. You can still use the DINx4 board, just bend that pin on the resistor packages out and solder an extra wire from there to ground. The one problem is that the 10K resistor connected to the SER input of the 74HC165 still has to be connected to +5, not ground. Usually it is part of the resistor packs, but here because it needs to be different on the other side, you have to use a discrete resistor for that one (and not connect the resistor pack to that pin). I might advise you use discrete resistors for all them on that side of that shift register. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.