Sign in to follow this  
Followers 0
urban soul

32 switches + leds = current ?

4 posts in this topic


I am new on the list. My MidiBox is here: -> 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 ?


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!


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!



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.


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.




              To DIN SR pin[/tt]

Try that, take some measurements...

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




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



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

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


Share this post

Link to post
Share on other sites


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!


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