push-button circuit - a question

KTarke

Senior Member
I've already made/tested a bunch of Picaxe circuits, that use pushbuttons for various reasons.

Connected the "usual way": button between Vdd and inputpin, a 10K pulldown resistor between inputpin and ground.

In the code, handled the "bounce" with pause 25.


BUT not until today have I noticed the example circuit in Picaxe manual(s)!

There is also a 1K resistor between button an d Picaxe input.
(never used a resistor in that kind of place)

Since I do not now much of electronics designing (more of using and repairing), I would appreciate, if one of the Wiser ones would explain me:

-what is the purpose of the mentioned resistor?
-what are the benefits of using it?
-Do You really think, it is necessary?
 

Chavaquiah

Senior Member
Suppose an error in the program or a glitch turns the pin into a low output. The Picaxe would try to sink as much current as you could give it and soon you'd start smelling something burning (I did melt a breadboard, btw).

Is it really necessary? Sit down and wait for a Wiser one to explain how to cross a road... ;)
 

Dippy

Moderator
I think Chava has covered it, though not all examples show the extra resistor. e.g. Manual 3 page 26.

It's always best to 'play safe' when giving examples. Sometimes an extra component or two, sometimes a 'safer' component value.
It's called "erring on the side of caution".
Often an extra component is better than a smoking chip :)

These things can be modified as your electronics experience improves and as your knowledge of the interaction between software and hardware improves.

If you ever have a query just post your question.

EDit: What is the "vc++ pin" ?
 

Dippy

Moderator
To Curry.

If you are talking about the +V positive supply pin you don't have a resistor.
In some noisy circuits you could have a small value RC but usually not.

In general with chips you don't have a resistor on the power supply pin.
If you need to limit current on the I/O then you put resistors on the I/O.

If the res value was too high it would prevent operation entirely.
A smaller value res may allow operation but the voltage drop across it would vary with processing and O/p load.
This would give a varying supply voltage to PICAXE in effect - not desirable - therefore unwanted.
It would also upset the output driving capability which is not very clever.
A very small value does nothing and is entirely pointless.

So, it would range from inactive , through unpredictable behaviour , down to pointless.
Summary: Generally, leave it out.

Have a think why and where we we need resistors and how to determine the 'ideal' value for the task. When drawing a circuit consider the current flow and direction and calcuate what a resistor in a certain place will do.
 

KTarke

Senior Member
THANK YOU all for Your response!

Chava answered the thing, I was wondering, what could be the real need for that resistor.
Never thought about the possibility of bringing (accidentaly) the pin low, and the consequence...
Now, I still can leave the resistor out when I know the reason...:)

I did not understand Dippy's Edit: what is the "vc++ pin"?
Did not see anyone to use that expression in this thread.
I use (maybe erraticly?) Vdd as positive supply, Vss as negative supply (OR 0V if there is no negative voltage, although it is then more clear to talk about GND)
 

Dippy

Moderator
"I did not understand Dippy's Edit: what is the "vc++ pin"?"

- it was what Curry asked before editing the post and changing it from "vc++" to "voltage in".
This sort of thing happens now and then and often breaks the continuity of the thread.:rolleyes:
 
Top