How to shield picaxe from rf interference

I am using a 28x picaxe, on a separate battery supply, to control a carriage moving back and forth along a track. Moving the carriage by hand with no power to the motors or relays it causes the picaxe to malfunction, outputs flicker, the logic is faulty and then it just stops working. On a previous forum a week ago MFD suggested putting the picaxe in a metal box with feed through type "D" fittings. I don't know what these are and how to hook them up. Can you explain this and what parts I need. What else can be done about rf interference, does it come from the input connections or output or serial port, were does it come from and how does the picaxe see it.


Thanks
 

womai

Senior Member
Did you already try the other remedies suggested in the thread you refer to? Above all, 100nF (NANO-Farad) ceramic capacitor between Picaxe power and ground (as close to the Picaxe as possible), and 10uF (MICRO-Farad) electrolytic or ceramic capacitor also between power and ground (but can be farther away)?

Second, make sure the Picaxe reset pin is connected to Vcc (power), and a 10nF to 100nF capacitor is placed close to it (again between power and GND). Sometimes putting a 10kOhm resistor between power and the reset pin (instead of connecting it directly to power) helps with noise immunity (but again, don't forget the 100nF cap between reset and GND).

Third, I guess you are using the standard download circuit? I.e. the download RX (input) has to be tied to ground even when the download cable is removed. In the standard circuit this is achieved through the 10kOhm resistor to ground. If you forget that, it may just work intermittendly, but is very sensitive to any interference entering the download pin - the moment this pin goes significantly above ground the Picaxe will reset.

Wolfgang
 
Last edited:
The picaxe has its own battery pack

There is a capacitor between + and - of the battery pack powering the picaxe, and the other capacitor as you said to do. The only thing that I can see as a problem is that I have long leads between the picaxe and the 6 input switchs and the 2 outputs Just putting my hand on the metal rails of the track that the carriage runs on can disrupt the program operation. The only other thing I can do is to shorten all the wires and put them in a conduit, but I just don't understand what the picaxe is seeing how is it affected why is it so sensitive to just human hand movenment or touching a metal pipe or nothing how can it work to control any kind of functioning device? Or is there some other problem that I am not aware of.
 

BrendanP

Senior Member
Please carefully read Womais post.
The capacitors need to be RIGHT NEXT TO THE PICAXE not back near the battery pack!! Have them as physically close to the IC as possible.
 

MFB

Senior Member
Read-up on filtering

The most common use of ‘D’ connectors is in older computers that had 9-pin or 25-pin versions for the serial and printer ports. Although newer computers use USB for such tasks, the original ‘D’ type connectors are readily available from Maplin in the UK. Slightly more difficult to source (Digi-Key and Farnell stock them) are filtered versions that are mechanically identical but have internal capacitors between each pin and the metal shell. You can of course buy individual feed-thru capacitors but they can cost and take up more space.

There are a few measures that you could take (whilst waiting for the feed-thrus?). For example, I am a bit worried when you say you are using ‘long’ leads to the inputs. Anything more than a few inches of unscreened cable can be a problem. Keep them short and add low-pass filters on each input. It sounds from your description that you may have left some inputs floating. Analog inputs could have a series resistor of up to 10K Ohm with about 0.1 capacitor between the PICAXE input pin and ground. Digital inputs should be connected to + 5V via a 2.2K Ohm resistor. The digital inputs that you are using may have Schmitt characteristics, if not you would benefit from adding external Schmitt triggers (eg. 74HC14). This is all pretty standard stuff which you should be able to read-up on the web.
 

MartinM57

Moderator
It sounds from your description that you may have left some inputs floating.... . Digital inputs should be connected to + 5V via a 2.2K Ohm resistor. This is all pretty standard stuff which you should be able to read-up on the web.
I agree, assuming your input switches are normally open circuit and switched to ground when operated. I'd use 4.7K or 10K but that's mostly personal preference.

If the switches are normally open circuit and switched to +V when operated, then you need pulldown resistors. Same values...

Just type "pullup resistors" into Google and follow the links....
 
Last edited:
Do anologue inputs need a 4.7k series resistor?

When I disconnect the linear potentiometer which I am using to detect position along the 20" lg track, the program works and the picaxe is stable, I have tried to use a 4.7k series resistor and a capacitor (.1uF) as suggest between the input and grd it still acts up but definately it seems to be a problem with the anologue input from the potentiometer but how do I deal with it. Any other way to make the anologue input more stable and not disrupt the picaxe?

Thanks again for your help.
 
I'm still quite a newbie, so my appologies if I am off base, but the postings on this thread mostly refer to the use of filter caps... what about a diode that prevents back-emf when the carriage is moved manually?
 

BeanieBots

Moderator
Can you please describe your 20" linear potentiometer.
It sounds like it's wiper contact might be a bit 'flakey'.

The advice given so far is fine, but none of it will compensate for a dodgey signal in the first place.
If you have access to a 'scope, have a look at the signal quaility.
If you don't have a scope, get hold of a small speaker or headphones and connect it to the wiper output via a capaictor (a few uF). If you hear crackles when the slider is moved, then that is where your problem is.
 
Interference caused by linear potentiometer failing

Thankyou Beanie Bots the linear sensor was deteriorating as it moved back and forth. It was brand new but I did not realize that the wiper had to be a precise spacing from the track. I had it close to the required spacing but it was a little too close and it was digging in. I think it is too fragile anyway as when I removed the wiper one arm came off, so I am going to buy one from ETI already mounted in an aluminium track which has the correct spacing. I don't suppose there is any other way of determining linear position +/- 1/8" over a 20" travel that is as simple as this method?


Thanks again for your help.
 

demonicpicaxeguy

Senior Member
Thankyou Beanie Bots the linear sensor was deteriorating as it moved back and forth. It was brand new but I did not realize that the wiper had to be a precise spacing from the track. I had it close to the required spacing but it was a little too close and it was digging in. I think it is too fragile anyway as when I removed the wiper one arm came off, so I am going to buy one from ETI already mounted in an aluminium track which has the correct spacing. I don't suppose there is any other way of determining linear position +/- 1/8" over a 20" travel that is as simple as this method?


Thanks again for your help.

one solution is to use a section of strip aluminium and cut a series of slits every 1/8" then using a optical switch like you would find in a mouse you should be able to determine distance travelled, as long as the slits are cut accurately it should read accurately, you could also use the same method only with a series of finely drilled parallel rows of holes in strip aluminium that count in binary 1-2-3-4 some carerfull coding would then give you direction
 

BeanieBots

Moderator
Hmm. many methods. Linear pot probably being the least common of them all.
Printers use stepper motors and count the steps.
Robotic arms typically use the method described by DPG.
If you only need steps, then carefully placed holes on the track plus opto sensor.
Diagonal strips with balanced light sensor to determine relative postion to strip is common for fine position control with accumulated error.
Linear pot is actually only usually used as a confirmation of the other sensor method for failsafe systems.
Also depends a lot on environment, speed and frequency of movement. POTs wear out. Opto sensors don't. (they can degrade with time though).
 

papaof2

Senior Member
Look for a wide carriage inkjet plotter - they come in widths up to 60". You will find these in surplus (check Ebay). Also ask at local engineering firms - old non-working units can sometimes be had if you're willing to take them away (may need a truck and two people to move it ;-)

Many of the inkjet plotters use an optical sensor (like a desktop inkjet printer) which would provide better accuracy than you need.

John
 

WHITEKNUCKLES

New Member
Rapid have 10 turn 3W wire wound potentiometers that used with a cord drum of suitable size and a turn-round pulley and used in the manner of a wireless dial should do. The 5K one that I have registers 2 Ohm for every hundredth of a turn with almost no dead band.

By mentioning ETI I assume you are in the UK and postage should not be a problem so should you care to go this way Rapid also have black control knobs and I could turn one down to make a cord drum, I have spares of their Aluminium knobs but the narrow tip is only 0.58" in diameter and I recon you would need about 0.65" for 10 turns to give 20" with a little spare movement.

Dave
 

BCJKiwi

Senior Member
How about a combination of many of the above;
Non contact is good so if you apply the slotted strip approach but make it a slotted wheel/drum then you could use the cord/wire approach to rotate it and the optical sensor to read it. That way you don't have anything critical on the moving carriage.

Or

There are also dual sensor hall effect modules that can be wired to give direction sensing as well as the count for position.

Or

You could just use a 5$ optical mouse and mount it beside the drum and sense the drum movement directly. Have not actually looked at what comes down the wire from a mouse but I'm sure someone on the forum has and could advise if this is feasible.
 
Top