Shop OBEX P1 Docs P2 Docs Learn Events
RF interference from Basic Stamp — Parallax Forums

RF interference from Basic Stamp

MoskogMoskog Posts: 554
edited 2012-12-09 12:59 in BASIC Stamp
I have a 2m repeater-station in the mountains and recently I set up a BS2 to send current battery voltage, temperature and winddata from the station. After facing major interference from the BS2 while the repeater was transmitting I decided to move the BS2 to its own box a few meters away. The antenna wire from the repeater (RG58) is passing close to the BS2-box and the antenna is probably some 3 meters above the BS2. The repeater is placed in another box some 3 meters away. The only thing common is the power supply who feed both the repeater and the BS2. The data from the BS2 is sent once every 15 minutes via its own ham radio and that radio turns off between each transmission, each transmission lasting just a couple of seconds.
Down in the vallay I can hear the ticks from the program loop when talking through the repeater. When checking the wind,with a Davis anemometer, the interference was pretty bad and I had to disconnect the anemometer.
I tried to set up a test bech at home with the anemometer and hand held radios to simulate the remote station but had no luck getting the same interference here. So I am a little bit confused on what really makes the problem.
The repeater feeds directly from 12V, the BS2 through a 7805, could RF from BS2 go through a LM7805 and into the repeater? Any good ideas or suggestions?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-11-18 10:53
    Yes, RF from the BS2 can go through the LM7805 and into the repeater.

    The BS2 and all connections from it (like to the thermometer and wind sensor) have to be shielded with careful attention to ground loops. The power connections need to be shielded and filtered. There needs to be RF filtering on the LM7805, both input and output. That includes bypass capacitors (like 100nF and probably something in the 1-10nF range in parallel). Consider having an RF choke in series with the power supply to the BS2 and sensors. Perhaps a snap-on ferrite filter would be enough on the power leads.
  • MoskogMoskog Posts: 554
    edited 2012-11-18 13:16
    Ok, thanks, Mike for quick reply. As the repeater station is so far into the hills it isn't just easy to just take a short trip for adjusting or other service. Cold winds and snowfall could any time close the roads now and darkness at 4pm makes it impossible to go after work. So maybe I should just make a new pcb, where I take adventage of all your suggestions, so the only thing to do there will be to go in there on saturday at daytime, switch pcb's and then return. I know I'm using 100nF capacitors around the voltage regulator, but not the 10nF you mention. I also have a ferrite snap on, but forgot to take it with me last time, so that one is still in my shed.
    On the RF issue, will a Propeller generate RF at the same levels as the BS2?
    Perhaps a RG58 out to the anemometer also will prevent a lot of noise too. I'm using the count command suggested by dr Tracy Allen to read the anemometer, works pretty good if it wasn't for the bad radio interference.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-11-18 13:55
    In some ways the Propeller can be noisier than the Stamps in that the signal transitions are faster .. on the order of nanoseconds . On the other hand, the Propeller can be operated at lower speeds than the Stamps which will reduce the amount of power consumed (and switched).

    RG58 is a good idea. How about grounding? How do you have the Stamp and its regulator shielded? How is the thermometer connected and placed? How long are some of the cables?
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-11-18 20:05
    "Down in the vallay I can hear the ticks from the program loop when talking through the repeater. When checking the wind,with a Davis anemometer, the interference was pretty bad and I had to disconnect the anemometer. "

    Do I understand, that the two systems are independent except for the power supply? The idea to put a clamp-on ferrite is good, but I too have to wonder if that is a plausible interference pathway. While it is true that the BASIC Stamp itself can generate RF interference (especially the SX based multislot Stamps), it sounds like you have done due diligence to reduce that.

    Could you elaborate on "when checking the wind". Does the interference match the revolution rate of the anemometer, or does COUNT subroutine have something to do with it, or the "program loop" per se? It is hard for me to fathom involvement of the COUNT command. The Stamp is just sitting there, listening to the anemometer signal, not outputting a signal, not even executing a PBASIC loop.

    One idea is that the anemometer cable is somehow resonating with the repeater transmission, and as the anemometer turns, it periodically closes its internal switch and changes the rf absorption. Just a wild idea, but if the anemometer is in close proximity to the repeater antenna, maybe shielding there could help. Is it the Davis cable with the generic RJ11 cable?
  • NWCCTVNWCCTV Posts: 3,629
    edited 2012-11-18 20:30
    Although I am no expert at this and it may not be possible to do, but, when I was in the Army in communications we would on occassion get severe static over our secure commo connections. The way we resolved this was to run a ground wire off the antenna directly to a ground rod that was hammered about 4 feet in the ground. Worked like a charm!
  • MoskogMoskog Posts: 554
    edited 2012-11-19 08:12
    Well, there is not paid much attention to the grounding issue, everything is grounded through the supply line to the minus terminal on the battery. I guess I have a lot I could do there.
    Here is a picture inside the bs2-box:
    nykasse11_12.jpg


    The BS2 pcb with one DS1620, voltage regulator and radio modem to the right and the telemetry radio up to the left. The anemometer and other stuff is connected through the white terminals with a cat-5 data cable.

    003.jpg


    Here is the box just above the ground, further up is a smaller box containing another DS1620 and with resistors for the anemometer. Between the two boxes is an unshielded cat-5 wire who carry signals from the anemometer, one LDR for checking daylight, supply for two lights and signal/supply from the DS1620 temperature chip. The anemometer is connected to the upper box through two single wires, originally army phonelines! The repeater is located in the green box down to the left and a 5/8 wavelenght fiber glass antenna is placed ontop the mast above the picture. The antenna to the right is the telemetry antenna.

    So I guess a few things could have been done here:
    Check the bypass caps around the supply regulator,
    Put a RF choke in series close to the LM7805 input, snap on a ferrite filter too.
    Replace "army phoneline" with shielded cable out to the anemometer,
    Perhaps ground the minus cord to the antenna mast,
    Maybe shield the bs2-pcb with a grounded metal box.

    @Tracy Allen: Could you elaborate on "when checking the wind"...

    Checking the wind refers to this subroutine called 16 times before transmitting:

    CheckWind:
    COUNT anemometer, WindTime, Wind ' Check for wind
    SkurvWind = Wind */5760 /5 ' Calculate wind value
    WindAccu = WindAccu + skurvWind ' Accumulate wind values
    RETURN

    And just before transmitting the values this routine:

    CalcWind:
    skurvWind = WindAccu /16 ' Find average wind value
    RETURN ' To recalculate to meter/sec at receiver end: meter = (skurvWind * 447)/1000

    Duration of WindTime is about 5 sec.
    488 x 412 - 171K
    900 x 1200 - 136K
    1024 x 768 - 78K
  • Mike GreenMike Green Posts: 23,101
    edited 2012-11-19 09:01
    You've got to have a shielded box for the BS2 PCB. This could be metal or even plastic with a metallic coating. Otherwise, all that juicy RF noise just radiates outward. Cat5 cable uses twisted pairs. As long as you pair signal wires with grounds, that'll reduce radiated noise significantly. It's not as effective as shielded wire, but close.

    A plastic box may keep the wind and moisture out, but it's like there's nothing there as far as RF is concerned.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2012-11-19 09:21
    @Mike, What about lead foil wrapped around the plastic box???
  • LeonLeon Posts: 7,620
    edited 2012-11-19 09:30
    What is the lead supposed to do? Placing it in a screened enclosure might help, though.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2012-11-19 09:53
    I was thinking it would hold the RF inside the box. Lead is used for shielding against radiation when getting X-Rays so would it not do the same for RF ????
  • Mike GreenMike Green Posts: 23,101
    edited 2012-11-19 09:53
    Aluminum foil wrapped around the box and grounded would help. You'd want a good connection to the foil ... like a bolt through the foil and box with some conductive flat washer over the foil. There's obviously a lid with a gasket and the foil has to shield that as well with a good connection between the foil of the lid and that of the rest of the box ... probably a bolt and washer for each ... with a copper strap or wire under a washer on the inside of the lid and box connected to circuit ground. Lead is not a great conductor even though it is a metal. Aluminum or copper is much much better.

    A copper or brass screen would be good. An aluminum screen would be ok if you make connections to the screen wires by placing an aluminum bar across the edges of the aluminum and protect it from the elements ... aluminum forms an insulating oxide on its surface, particularly when exposed to the elements and you have to make sure you have a good connection to the screen wires all around that will hold up to the elements.
  • LeonLeon Posts: 7,620
    edited 2012-11-19 10:25
    NWCCTV wrote: »
    I was thinking it would hold the RF inside the box. Lead is used for shielding against radiation when getting X-Rays so would it not do the same for RF ????

    Lead shields against ionising radiation - there shouldn't be much of that about! It won't affect electronic systems unless the levels are dangerously high.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-11-19 21:07
    "Between the two boxes is an unshielded cat-5 wire who carry signals from the anemometer, one LDR for checking daylight, supply for two lights and signal/supply from the DS1620 temperature chip. The anemometer is connected to the upper box through two single wires, originally army phonelines!"

    I'd go for shielded cable for both lengths, tied well to the new shield on the box. That probably grounded to the mast and to the Stamp ground at one point. Sensor leads are quite capable of carrying the Stamp's noise outside the box as common-mode noise. Twisted pairs in the cable won't help with that. Shield + ferrite + capacitor on the sensor leads.

    Your signals are DC, except for the anemometer. That is why I honed in on what you said about exceptionally strong ticking when the anemometer was connected. It could help to describe the interference in more detail to provide clues on its source. "I can hear the ticks from the program loop when talking through the repeater. When checking the wind,with a Davis anemometer, the interference was pretty bad and I had to disconnect the anemometer." Disconnect how? Better now? Tick from the program loop, at what rate, how do you know?
  • MoskogMoskog Posts: 554
    edited 2012-11-19 22:55
    .. It could help to describe the interference in more detail to provide clues on its source.

    It is hard to describe exactly today but I do think it sounds more like a high frequent sound, with ticks that could be in harmony with the reed relay, this sound disappear when the program exits the anemometer subroutine. It also disappeard when I disconnected the anemometer, both the 5V above the pullup resistor and the connections to the right of the 100 ohm resistor (referring to your drawing at http://emesystems.com/images/OL2windRC1.gif These resistors are placed on their own pcb in the upper box.

    ..Tick from the program loop, at what rate, how do you know?

    Don't know, maybe from the bs2 itself during executing the loop. Can't think of other things that could create this ticking, its not too loud and it doesnt exacly interference the repeater too bad. Sounds more like a wrist watch when the listening to the repeater. Gone when disconnecting the bs2.
    If you would like to see the whole bs2 code I can post it later today.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-11-20 08:11
    What I'm getting at is that the ticking might be directly correlated with the turning of the cups. No wind, no ticking. High wind, lots. Variable rate. Is that a plausible theory?

    That could be related to the Stamp in a couple of ways. 1) EMI is present on the wires, but as the cups turn, they periodically short the wires together and AM modulate the interference. 2) The wiring itself resonates at the repeater frequency and as the cups periodically short the wires together, they modulate the resonance. If the sound only appears when executing the anemometer subroutine, that leans toward theory #1. The power for the anemometer excitation comes from a Stamp pin, which is only turned on during the anemometer routine, and the pullup resistor is in the second box out on the cable.

    If the ticking is due to the program loop in the Stamp, only when reading the anemometer, then I'd naively expect it to have something like a regular 5 second period, because the variable windTime is 5 seconds. The COUNT command should not have any periodicity within the 5 seconds.
  • MoskogMoskog Posts: 554
    edited 2012-11-20 09:56
    What I'm getting at is that the ticking might be directly correlated with the turning of the cups. No wind, no ticking. High wind, lots. Variable rate. Is that a plausible theory?

    Yes, sure! And they were quite loud too, when anemometer was connected.
    The problem was that I heard ticks from the repeater after returning home, with the anemometer disconnected and placed on my work bench. But there is a chance I was fooled here when listening to the repeater in my shed, that interference could come from a nearby, domestic source. Because, sitting in my living room right now, in a different building, listening to the repeater with my hand held radio, I cant hear any noise.
    That could be related to the Stamp in a couple of ways. 1) EMI is present on the wires, but as the cups turn, they periodically short the wires together and AM modulate the interference. 2) The wiring itself resonates at the repeater frequency and as the cups periodically short the wires together, they modulate the resonance. If the sound only appears when executing the anemometer subroutine, that leans toward theory #1. The power for the anemometer excitation comes from a Stamp pin, which is only turned on during the anemometer routine, and the pullup resistor is in the second box out on the cable.

    It seems to me the problem is due to both theory #1 and #2, the loud ticks could come from [when the] reed relay closes or opens and the high frequent noise could come from the resonating wire itself. That noise appeard during the CheckWind subroutine and disappeard when the routine was finised. That was tested several times up there to be sure. And that noise was so disturbing that conversation through the repeater was difficult. The anemometer power supply does not come from any BS2-pins. Its permanently connected to Vdd.

    A moment ago I've got a message from another BS2/Propeller-guy nearby, (LA6WNA) who had done some testing after work today. He found the BS2 to emit noise with a heavy peak around 139.875 MHz and several smaller peaks nearby. The repeater's RX frequency is 139.200 MHz.
    When putting a 2.2mH choke in series with the pins he said the noise almost disappeard.
    Will such kind of filters affect reading sensors?
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-11-20 18:20
    No, the chokes should not affect the readings from the sensors. Anything to keep the hash from the Stamp off of the sensor leads. Your sensors operate pretty near DC, so the 2.2mH is next to nothing.
  • john hautonjohn hauton Posts: 14
    edited 2012-12-07 16:33
    Hi, we had similar problems a few years ago after upgrading the repeater controller. In the end, the only way we could make the thing usable was to mount the controller board
    in a die cast box with ceramic feed-throughs, and low pass filters on all leads entering or exiting the box.
    regards john
  • MoskogMoskog Posts: 554
    edited 2012-12-08 00:57
    I think we solved the problem last weekend by moving the whole system away from the repeater-antenna mast to the windgenerator mast some six or seven meters away. The main problem was interference between the antenna and the anemometer wire, especially when the anemometer reed relay closed during the five seconds the BS2 was counting pulses.
    Picture of the new setup here.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-12-09 11:04
    That's a very impressive setup!

    I'm curious if you tried any of the other methods that involved shielding or rewiring. Moving the anemometer is by all measures the KISS solution.
  • MoskogMoskog Posts: 554
    edited 2012-12-09 12:59
    I'm curious if you tried any of the other methods that involved shielding or rewiring..

    What was done was to replace the anemometer wire with a shielded RG-58 wire, shield connected to the ground, also put a choke on the BS2-end of that wire, I also put a choke on the power line close to the BS2. Negative supply line was grounded to the mast. Nothing of that helped with removing the interference. The only thing that removed the noise was when disconnecting the anemometer wire, the only thing to really solve the problem was to simply move the whole thing away from the transmitter mast.

    The weather data is transmitted some 14 kilometers to my receiver station down the valley using ICOM F-51, 2m ham radios and Tigertronics modems. After being decoded by a BS2pe-based weather station the datas are once again transmitted to the PINK web server by two 433MHz RF-units and 1/4 wave antennas. The PINK put it on the Web and the datas can be seen here.
    I have seen that some times the values are kinda corrupt, not sure what happends because there are error checking routines built into the code. But the problems are in my receiver station here, I know because I have a new Propeller based receiver station running and never seen any problems there.
Sign In or Register to comment.