Electronic – Voltage is 0.05 when switch is closed

pullupswitchesvoltage

I am new to electronics. Iam designing a simple circuit where I have to make a digital switch:

Circuit which I have to design

Here is what I have designed in Proteus:

enter image description here

There are 2 issues:

  1. I want it to output 5V when I close the switch but it does opposite. It outputs five when the switch is open.
  1. When switch is closed it gives 0.05 volts but I want 0V.

What changes should I make here?

Best Answer

  1. Swap the resistor and switch
  2. Nothing is perfect. Your switch has resistance. Wanting "0V" is like saying you want something to be exactly one meter long.