Robin McB said:
Hi – just to add a couple of points:
re: 1 LED Output
I would suggest the following
Note that you drive the IO Pin low to turn the LED on. The advantage is tha the port outputs are likely to have a higher sink ability (switched "0V") than source (Switched +ve). t also makes calculating the value of RLimit very easy!
i.e. Subtract LED forward voltage (usually between 1V8 and 2V2) from the supply voltage (3V3) then divide by the current required to light your LED (no more than 3-4mA, choose a low-current LED).
The Cct you show to drive a higher power LED is pretty much right, I would make it clear that the supply for the LED can (probably should!) be different from the 3V3(?) RasPi voltage.
This would be used as you show with an LED connected to "OC" or as below to a relay )I"ve shown a BT47W which is an industry standard – and quite cheap – 2 Pole Change Over relay. This is good for switching quite a few things for experiments. They are also in a standard package and very easy to mount on stripboard, etc. You can also wire to two "poles" in parallel to switch a higher current. NOT for mains use though.
I know this is very basic stuff, but I hope it may be of use to anyone who knows basically what they have in mind but wants a more specific details of what values, etc are likely to actually be!
ok and re: 3 Simple switch. I"ve made that work (using a 100n cap) connected to 5 PIC chip I/O Port, but with 200m of cable out to the (low quality) switch and a very simple software debounce. I would say you can feel confident that it would work with a reasonable button / switch and a few centimeters from the board!
I"m quite happy share any info re-interfacing, such that I can …
@Robin McB - I somehow missed your post! Sorry for not commenting on it, very useful information there.
You can see the tutorials (so far just the LED one) starting to take shape now on the wiki:
Feel free to add anything/comment/correct if you wish to.
Update: On the software side…some extra info is in this thread (ukscone using devmem2):