Let's Make Robots!

picaxe trouble


I just got a new picaxe 28x1 for christmas. I was trying it out and the pins don't seem to be working.

For example:

I connected a led to output pin 3 and ground and uploaded the code


high 3

pause 5000

low 3

pause 5000

goto main

For some reason this code doesn't seem to do anything as the led just stays on constantly. and, yes I did wire the anode and cathode the right way

Is there something wrong with my chip, or am I just doing something incredibly obvious and dumb? 


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Thanks for your help everyone!
Well I finally got something to work. Not the led but I was alble to get a motor to turn on of and on (flash). I know I shouldn't use motors on the output pins, but I only did it for about a minute. Now I know after about 2 hours that my chip is not broken.
if you have the darlington on, using the motors on the output pins is not a problem :)

Well I do have the darlington dirver chip installed , but I cant seem to find where the output for the darlington driver is on the board.

It turns out that I had the led connected to the v+ instead of the output, but still the led doesn't flash. 

Oh yeah, I am not sure what led I am using as I found it in my electronics bin, but the color is green (and yes I think 4.5 voltage drop is strange too). also I have started using a resistor 

Here is a modified picture taken from Fritsl pin walk-thru of the 28x1 board. From some post a while back where someone was trying to run a motor from the Darlington outputs. The LED can be connected in the same way, just using LED long wire anode to the V2 pin, and short wire flat side cathode to the darlington pin you choose in the row next to the chip. Use pin 3 if you want it to be switched with PICAxe output 3. With a resistor somewhere in there to limit current.


Are you sure you wired up the led to the output and not to V+? http://letsmakerobots.com/node/75

P.S.: could you give me the link of the LED you are using? or just tell me some its features like color, v.drop( it's strange to see a 4.5 voltage drop)? 

I've kinda known about that whole blue smoke thing for a while, and I know about resistance, and variable resistors (potentiometers).  And you're right I should use a resistor, but for now my (high voltage) led can handle it because I am only using 4.5 volts. Anyways have any ideas why the led is not flashing? (the led turns on, but just stays on with no flashing.)

Fritsl has a very good walk-through for the PICAxe 28x1 board. He shows there what pins are ground, which are supply voltage, which go to peripheral chips and which connect directly to the PICAxe.

He has another walk-through of the peripheral chips. You have not described whether you have the yellow resistor array or the darlington driver in the socket for the 28x1 outputs, or if any chip is in at all. If the Darlington chip is in place, then the LED should have the cathode on the output pin (of the darlington chip) and the anode towards a positive voltage (through a resistor). 

The use of the resistor on the LED is not so much for the protection of the LED, but for protecting the PICAxe or other chips from burning, in trying to deliver too much current.  PIC pins are only rated for 20 to 25 mA I believe.

using no resistor is quite bad. But i don't like it when people say that, so i am gonna explain you why.

Generally, if you look ad the datasheet of an LED, you will see it has some maximum current rating (forward current, is it?). This current rating should not be ignored. So let's say your LED has a forward current of about 20mA (most standard LEDs have a similar value).

Now, if you are powering your picaxe with 5 volts, then you are gonna need a resistor do dissipate the excess of current passing through this LED, else the current will just be too much and the LED might die, that is stop working.

To know how "big" the resistor has to be you just need to apply Ohm's law. V=I*R

So, say you are using 5V, and the LED has a voltage drop (other important feature) of 2V, then you have to subtract it from 5V, and 5-2=3V, so you basically have to "limit" these 3 volts. Now we can apply Ohm's law: 3volts / 20mA = Resistance. That 20mA is the current i stated before, if you want to have less (the LED will be dimmer with less current and brighter with more) you just put less in ohm's law. Following the above example we'll have to use a 150 Ohm resistor, using a higher one is sometimes more worth it (safer i'd say).

I am not sure i made myself clear though :) just ask in case it's not clear :) 

my mistake by full board I meant the full picaxe 28x1 board like in the start here robot