Jump to content

DIN with High Input ?


novski

Recommended Posts

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

post-10711-0-89218000-1355051657_thumb.p

post-10711-0-48910300-1355051680_thumb.p

Link to comment
Share on other sites

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 by Sauraen
Link to comment
Share on other sites

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?

post-10711-0-49235500-1355839101_thumb.p

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

post-10711-0-36000600-1356437593_thumb.p

Edit: Better open that one in separate Window. Its to big for container...

post-10711-0-19824200-1356437724_thumb.p

Edited by novski
Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...