basic electronics - resistor use with PICAXE pins

Bryang

Member
Hi,
I’ve got questions for experts of basic electronics!...

When it comes to putting in resistors into the circuits, I have basically been following the suggestions in the PICAXE manuals but not really being comfortable as to exactly what’s happening, although it has been working fine!

The rules I go by include:
1. Ground all input pins that I don’t use
2. Ground the Serin pin when not programming
3. Don’t connect the 5V directly to the input pin (via a switch). Use 10k resistor on the opposite side of the pin to the switch (ie: for digital inputs)

5V_____ 5V___
| |
/ sw Z 10k
pin___| pin__|
| |
Z 10k / sw
| |
GND___| GND__|

Some of the schematics in the manual also put in a 1k resistor in series to the switch
5V__________
|
/ sw
pin___M____|
1k |
Z 10k
|
GND________|

Now comes my assumptions & questions!...

I assume the pin is looking at the CHANGES in voltage between the 5V rail & the GND (ie: a signal), and so that the path from the 5V rail to the GND rail isn’t simply shorted between the 5V & GND, we need to put in a load, hence the 10K resistor, rather than sending the current directly thru the PIC.
Is that correct?
Why use 10K, and not 1K? or 100K? or 22R?
I assume the 1K in series is a ‘good practice’ item… What is the 1K resistor in series there for? My assumption would have been to give a degree of filtering of the signal but why not use a capacitor if this is the case? And again, why 1K?

Any comments would be appreciated

Thanks
Bryan


 
 

premelec

Senior Member
briefly... 10K is high enough to not be much of a load at 5 volts and low enough to effectively keep the pin from 'floating' - 1K is good to limit currents inadvertently applied. Whatever works! :) Remember there are all sort of signals around - static discharge, capacitively cou0pled AC and RF etc - we live in an electromagnetic soup these days and integrated circuits are sensitive to small power levels... and we'd like them to work reliably rather than erratically... most of the time...
 

hax

New Member
Sometimes the values are chosen because they match up with other values on a PCB.

For instance, the download circuit requires a 22k resistor and a 10k resistor.

Lets say that other parts on the PCB might be a darlington transistor and a switch.Now you could use almost any resistor value to connect to the darlington as it has very high internal gain. You also could use almost any value resistor to act as a pull up or pull down resistor for the switch.

So which values do you choose....


A designer that is designing a PCB for students to build might think it is best to supply a total of 3 x 10k resistors and 1 x 22k resistor for the kit.

Why?

Just coz the parts list wont be too varied and just coz it might be easier for students to distinguish which resistor is which... They can use process of elimination. It would also be easier to pack the kits up with resistors that have only two values.

You could say that there is a mathematical ideal value for any application, but many times it is not crucial at all, and just having a lower variance in a parts list is as good a reason as any.

The only problem I have found with this is that every time I go to an electronics shop, the most common values are sometimes sold out. That is 1k, 4k7, 10k, and a few others.
 
Top