led flashes

borz

Member
Hi I have 433 module which I am trying to set setup . I have used the code below to program my picaxe . Now without the whole circuit connected just the picaxe powered up
the output led on output 4 flashes regardless of what input is doing. I have isloated the picaxe form main circuit still does the same . Tried different picaxes . have got 100nF cap from rail to Gnd . Not sure what to do

Thanks

(code)

input 1 '
pause 3000
main:

if pin1=0 then checkdata
goto main


checkdata:

b9 = 0
serout 2,T2400,(85,85,85,85,"sink",b9)'
for b0 = 1 to 4
high 4
pause 500
low 4

next b0

goto main
(code)
 

BCJKiwi

Senior Member
What is connected to pin1?
Which PICAXE?
Presumably the PICAXE is reading this Pin1 as high all the time (depending on PICAXE, Port type and supply voltage, this can be as low as 2volts or less).

So check for switch not breaking or a short/secondary path which supplies some voltage to pin1 all the time.

Is there voltage on pin1 all the time? (i.e. check with voltmeter).
 

Dippy

Moderator
"Now without the whole circuit connected just the picaxe powered up "

- Except he has an LED connected - anything else connected that you haven't mentioned??


Have you tried connecting Pin1 to Vsupply and starting it up? What happens?

Never leave important input pins floating around.

Post a schematic, my Crystal Ball has conked today.
 

marky26uk

New Member
433 module

Hi, if this is the AM 433 Mhz module then you get spurious rx from other sources.
You'll find that the output is high or low eratically so you can't use the input function to detect when the rx receives a signal, as this will happen all the time.
You'll have to use a serout with qualifiers, this is what i use mine for anyway for datalogging from my weather station outside as i use the am modules.
You can then tell your program to jump to a next sequence upon only receiving the correct sequence of serout data.
These AM modules are no good for simple high & low when a signal is received, they are more prone to interference.
I will be getting some FM modules soon as these aren't very good.

Yours,
Mark
 

moxhamj

New Member
marky26 is right. If you use serout with "sink" as the qualifier then you need to use serin with "sink" as well.

But I suspect there are other more fundamental things not right. And Dippy's crystal ball isn't working any more. We are doomed, I say, doomed...
 

hippy

Technical Support
Staff member
Danger Will Robinson

I think there's been some misreading of the original problem.

This is the transmit side of the system and it's this side which has the LED flickering ( indicating transmission ) regardless of the input signal.

Most likely it's not having a pull-up on pin 1 or that isn't the pin to which the input is actually connected.
 

Dippy

Moderator
I'm glad you spotted that and mentioned it hippy. I could see this going off at an irrel tangent.
 

borz

Member
Led flashing more information

Thanks everybody . and sorry for not giving a precise and clear background of the issue

It is a 08M picaxe.Yes hippy you are correct . It is the transmission side . Initially I had the Tx module 433.92 Mhz connected to output 2 , Input 1 connected to a IR sensor and output 4 is the indicator led . Other pins are left floating . Thats when I noted the led flashing without the input being triggered. Also just to add I hadn't turned the Receiver on. BCJKiwi I Had tried that no voltage at pin 1.

Now trying to isolate the problem I removed the picaxe from the main circuit to another breadboard .This time I only have output 4 connected to a indicator led and rest of the pins floating except Vcc and Gnd of course.

Hope this is clearer .Am I missing something fundamental?.I my self do not have an electronic background but I have keen interest in electronics. This is my first play around project . When came across the picaxe I had to try it . Must admit the resources and information on this website is just tremendous and more valuable forum members experience.

Thanks again everybody
 

borz

Member
thanks everyone for your replies . BCJKiwi did what you suggested worked like a charm . so Now I have got the Transmitter side working . Cool thanks again
 

moxhamj

New Member
It probably is a good idea to tie any input to either high or low (via 10k etc), regardless of the chip. Eg I had a 74HCT04 chip with some unused inputs. These chips draw tiny amounts of current when they are not switching. But say an input is changing at 1Mhz - then the current draw goes up as it takes energy to change an output. And while a floating input might end up resting high or low, sometimes high impedence ones don't. You can see this on a logic probe on the outputs - sometimes with a finger near an input, and most certainly if there is RF around. On prototypes it is a bit of a pain grounding unused pins, but on PCB programs like Eagle it is but a moment's work to connect up unused inputs.

Borz sounds hooked now. Let us know how it turns out - a number of us on the forum are actively working on RF projects and learning about all sorts of tweaks and optimisations :)
 

sputz

Member
Thanks Borz, Acula. I was playing with a ir emitter/photoR sensor and was getting all kinds of weird readings and googling I found a suggestion to connect the unused input pins to G. Didn't explain why.

Is the 10K resistor necessary? I simply used shunts(jumper) to connect the unused input pins to V since they fit in so nicely!
 

BCJKiwi

Senior Member
There is a risk using a direct connection - some ports can be outputs as well as inputs and some are 'not defined' at startup.

With a shunt, this is a potential short to 0V (or 5V if a pullup) and the port could be damaged.
A 10k Resistor provides the necessary bias on the port but limits the current to a safe very low value - Ohms law gives 0.0005A for 10k and magic smoke at 0R with a 5V supply!
 

sputz

Member
Thanks bcjkiwi. I use the 28x project board which has dedicated pins for analog inputs. That's where my confusion over the 10k resistors come from. If they are purely input pins, why are resistors required? Or is my understanding flawed?
 

MPep

Senior Member
Borz,

I am wondering if the programming input pin was tied low at all, as recommended in the manual.
In a previous post you mention that you only had an LED connected, as well as power supply, +ve and -ve.
 

BCJKiwi

Senior Member
@Sputz,
Recommendation is to tie all unused inputs high or low, precisely because they are inputs!
While PICAXE firmware has some ports on some chips defined as inputs only, that is not necessarily dedicated in silicon so when powering up there is an added risk using a direct connection in place of a 10K Resistor. 1/8Watt 10K Resistors are small and inexpensive, SMD Rs are even smaller. Consider it to be insurance at a much lower cost than troubleshooting a dead port and replacing the PICAXE.

The project board may be labeled with Analogue inputs but in the all 28X and up these are also general purpose inputs. The fact they are nominally analog does not change the way they behave if left floating.

It is true that on many circuits people 'get away' without doing this. However if an input is not specifically tied high or low then it is floating and free to pick up on any stray fields floating around.
Since these are CMOS devices, they are sensitive to all manner of stray fields including your body.

So it pays to follow the recommended practise.
 
Last edited:
Top