stuff

Michael 2727

Senior Member
Picaxe Beginners Check List

&quot;Google Knows Everything&quot; <A href='http://www.google.com' Target=_Blank>External Web Link</a>
Almost anything you need to know about common electronic
components can be found e.g. ratings, voltage, currents, circuits,
uses, data sheets, specs, prices.

<b>Data Sheets </b>
Learn how to read, at least some of the basics in Data Sheets.
(Power Supply Min/Max, I/O Pin sink/source currents, etc.)
You can learn a lot from them and avoid common mistakes.

<b>picaxe manual_1.pdf
picaxe manual_2.pdf
picaxe manual_3.pdf </b>
Are the Bibles of Picaxe. There is very little that cannot be found
in these three documents. (put them on your desktop)
There are also Picaxe manuals on every Picaxe project and more.

<b>Pins / Chip Legs </b>
Device Pin numbering, I/O (input/output) referred to in programming
may not be the same as physical Legs on the chip, be aware of this.
Pin 1, 2, 3, etc. Is not always Chip Physical Leg 1, 2, 3.
See picaxe manual_1.pdf, p: 17 to 20.

<b>Power Supply </b>
The Ideal voltage to run a Picaxe is 4.5V to 5.5V DC Regulated or
Battery. They can run as high as 6V or low as 3V but reliability
may not be guaranteed, see the data sheets or Picaxe PDF files for
further information.
For a reliable result the adopted standard has become - 3 x AA Cells.
A supply bypass / filter capacitor 0.1&#181;F is always recommended, to
be placed across the supply rails as close as possible to the picaxe chip
itself to reduce supply variations and noise spikes. In extreme cases a
1.0 to 10&#181;F could be used.
A DC wallpack/plugpack is not always DC, it may have a large DC ripple
if no capacitor is fitted. Without extra filtering it will be unsuitable.

<b>Download Circuit </b>
Check the Serial Download circuit is correct, (picaxe manual_1.pdf, p: 21)
This requires a 10K and 22K Ohm resistor.
These 2 resistors are not a voltage divider and must be used only
as per Rev-Ed diagrams.

If the Download circuit is NOT required you must still terminate the serial-in Pin
via a 10K resistor to Neg <b>Always. </b>
<b>Reset, </b> if using larger Picaxe devices the Reset Pin must also be held high
to Pos via a 4.7K resistor for the chip to function.

<b>Download Cable </b>
For best results use the Rev-Ed download serial cable and stereo socket for
termination. See - Section 1, picaxe manual_ 1.pdf, p: 22)

<b>Program Editor </b>
Make sure that you have the Editor Software configured to the correct
settings for the chip you are using at the time.
See - picaxe manual_1.pdf, p: 26

<b>USB </b>
If using a USB adaptor make sure that the correct driver is setup.
See - picaxe manual_1.pdf, p: 14


<b>Wiring Up </b>
In the development stage use, (cough) Stan Board, sorry Bread Board to
wire up your circuit. Once you have got everything working and tested
move on to soldered Vero Board, etc or a real PCB. Bread Board - <A href='http:// www.picaxe.orcon.net.nz/bread08.jpg' Target=_Blank>External Web Link</a>
It's much easier to unplug a breadboard wire and shift it than to de-solder
components.

<b>Outputs </b>
Picaxe outputs can ONLY supply 20 mA of current, sink/source.
Sink = Pos 5V+ through the Load and Resistor to a LOW picaxe pin.
Source = 5V+ from a HIGH picaxe pin through the Load and Resistor to Neg.
At 5V DC supply a 270 Ohm resistor will pass 18.5 mA of current.
At 5V DC supply a 330 Ohm resistor will pass 15 mA of current.
330 Ohms is the standard resistor used LEDs in most applications.

If you need to drive <b>anything </b> at all that requires more than 20 mA
you must use a transistor, either bipolar e.g. BC548, BC337 or Darlington or
MOSFET 2N7000 or IRF530, IRF540, or an SSR (solid state relay) etc.
An SSR can be driven simply via a 330 Ohm resistor, to it's internal LED.
See picaxe manual_3.pdf, p: 7. A simple small MOSFET circuit here
just remove the capacitor if no delay required and energize from the picaxe
output instead of the switch. - <A href='http:// http://www.porepunkahps.vic.edu.au/home/jef01/files/display/30-Sec-ON-HOLD-OFF-MOSFET-circuit.jpg' Target=_Blank>External Web Link</a>
A diode needs to be used on all devices that have a coil e.g. Motor, Relay or
Solenoid to prevent Back EMF voltages destroying transistors, picaxe outputs
when they turn off.

<b>Floating inputs </b>
In some cases an input can pick up unwanted noise if this is the case it can
be tied to either Pos or Neg via a 10K Ohm resistor.
Virtually no current is needed, this only keeps an input stable.
<b>Outputs </b> don't usually need to be terminated.

<b>Program Code </b>
Program code is up to the user to sort out, start out simple, flash an LED then
work your way up. If you still have a problem post it to the forum and someone
is bound to have a solution or suggestion.

<b>Posting to the Forum </b>
If you don't know anything about electronics we don't care, we all had to start
somewhere. What annoys people the most is only getting half the story when
trying to sort out your problems. Tell us EVERYTHING about your project.
We will be able to sort out your problems much better if we get the whole story.
It's not much good asking &quot;why do I get a COM 1 error&quot;, when you forget to
mention that you are using a USB adaptor with no driver and only tell us that
the stereo socket and plug are wired correctly and have been checked several times.

Or that before you knew what you were doing you tried to drive a small
motor directly from a picaxe output <b>without </b> a resistor and wonder why
your program won't light a simple LED.

The more you can tell the forum the quicker the solution will be found.
The Search function in the forum can be a very useful tool.
Over a 3 month period the same question can be asked by a dozen or so
people. <b>The answer you seek may have already been answered several times over. </b>

Vague questions will only get you vague answers, think about what you really need
to know, keep it concise, we don't really need to know what colour the cat is that
you intend to attach your device to when finished.

Posts should always be placed in the <b>current </b> Forum.
Do not use the Archived Forums for new posts. If you have to just start a new
topic using the old heading. You could add (cont) if you wish.


Picaxe counts in Binary
<code><pre><font size=2 face='Courier'>
MSB LSB &lt;&lt;&lt; count direction
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 |
Add the 1's under each column to get the decimal number.
0x128, 0x64, 1x32, 0x16, 1x8, 1x4, 0x2, 1x1 total = 45 in decimal.
00101101 = 45 </font></pre></code>

Learning basic binary is not a prerequisite but it will help as you
move to more complicated programming.

Picaxe Maths functions are performed right to left &lt;&lt;&lt;&lt;&lt;&lt; e.g. b1 = b2 + b3

Hexadecimal numbering can also be used in some cases, it would be
an advantage to search the Net for basic counting in both Binary and Hex
and save the pages for later reference.
And while you are there get the resistor Colour Code as well.
The Resistor Poem, I learned as a kid - <code><pre><font size=2 face='Courier'>
Black Berries Run Over Your Garden, Blue Violets Grow Wild
Black Brown Red Orange Yellow Green Blue Violet Grey White
0 1 2 3 4 5 6 7 8 9 </font></pre></code>

&quot;Picaxe Basic&quot; was designed to be very easy to use. Start out with a
simple &quot;flash an LED&quot; then work your way up.
Jump in give it a go, you may be pleasantly surprised.

These are only my personal thoughts and not an official Rev-Ed document.
But I hope this may help the newcomers as an initial starting point.

Michael -
and a few others that had their 6.7 &#162; worth.


Edited by - Michael 2727 on 19/04/2006 14:57:54
 
Top