Sign in to follow this  
Followers 0
urban soul

32 switches + leds = current ?

4 posts in this topic

Hello,

I am new on the list. My MidiBox is here:

http://www.schlemmer.gmxhome.de/ -> Galery

My design is strictly one-way. No feedback from the DAW.

Is it a good idea to replace the 10k resistors on the DIN module with 220R ones so as to drive 32 LEDs by the buttons ?

Vss---220R---LED---BUTTON---GND

The 220R resistor would be connected to DINx4. But then pressed button gives +1,6V instead of 0V. Does the 74HC165 draw any current here? Or is it possible to connect after the LED ?

Lot's of questions. Thanks TK  - this is an amazing project!

Urban

Share this post


Link to post
Share on other sites

I'm not great with hardware so I'm going to let someone clever answer that question in case I get it wrong and blow the thing up :)

...but I had to say:

Now THAT's a pirate!

_midibox23.jpg

Yarrgh!

Share this post


Link to post
Share on other sites

First up, no, you should not expect that the SR will read your button press.

The VIL for the 74HC family of chips is 0.8V.

The VIH for these is 2.0V.

The WHAT?

VIL = The maximum voltage :P allowed as a 'low' (logic 0) at an input.

VIH = The minimum voltage allowed as a 'high' (logic 1) at an input.

This means that a switch intended to pull the input low, must present to that input a voltage of less than 0.8V. Anything higher than this and results are not guaranteed.

1.6V falls right into the undetermined place between VIL and VIH

The 10k resistors are a pull-up device, intended to give the PIC / SR chips a steady high state (logic 1) when the button is not pressed. Changing these for LEDs with resistors might lead to the SR reading incorrectly.

Now, you may find that results are better if you keep what you have, but connect the SR pin to the junction of button+LED, not the LED+220R.

ie:

[tt]Vdd---220R---LED---+---BUTTON---VssGND

                  |

              To DIN SR pin[/tt]

Try that, take some measurements...

If it doesn't look good, how about this?

[tt]

Vdd-------10k-------+

                    |

Vdd----220R----LED--+----button/SR pin-----Vss(ground)

[/tt]

P.S.

** Edit: the 1.6V you are reading is the voltage drop across your LED **

(Don't forget to answer the question...) :)

Edit:typo

Share this post


Link to post
Share on other sites

Hi,

thanks for the reply. I had a look at the specs of HC74 and I have the same findings. Also the inputs of the HC74 draw enough (<4mA) current to have the LEDs glim.

Thanks again for diving into my question. I think your option 2 is the best way to do it!

Urban

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0