Author Topic: RF Interference?  (Read 1748 times)

0 Members and 1 Guest are viewing this topic.

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
RF Interference?
« on: June 30, 2012, 02:44:43 PM »
I'm using  this encoder and decoder to build a remote control for my robot.  It works perfectly except for one crippling glitch: I lose comm every time the drive motor is running!

If I put the decoder in "latch" mode, then the motor will run forever as soon as I hit the "drive" button (I checked, all the decoder outputs are frozen while the motor is running).  If I put it in "momentary" mode then the motor keeps hiccuping off and on as it gains and loses the the signal!

If I unplug the motor and put a multimeter on the header, it works perfectly, it seems like the problem only occurs while the motor is actually running.

At first I thought it was an EMI issue, but then I realized that if I'm in latch mode, I can get the motor to stop by turning the remote control (encoder side) off and on again (just off won't do it), which doesn't make sense at all.  Maybe it can receive the first packet just fine but not any subsequent packet?

I am stumped on this one, help!
« Last Edit: June 30, 2012, 02:47:18 PM by pterrus »

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #1 on: July 01, 2012, 09:25:57 AM »
If it helps, I opened up the plastic motor housing and found that there was already a capacitor across the terminals.  Not sure if I should replace it or what.  (The robot's base is a toy truck)

Here's what it looks like: http://imgur.com/5ahdp

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: RF Interference?
« Reply #2 on: July 01, 2012, 09:31:08 PM »
Hi,

If I put the decoder in "latch" mode, then the motor will run forever as soon as I hit the "drive" button (I checked, all the decoder outputs are frozen while the motor is running).  If I put it in "momentary" mode then the motor keeps hiccuping off and on as it gains and loses the the signal!

If I unplug the motor and put a multimeter on the header, it works perfectly, it seems like the problem only occurs while the motor is actually running.
An easy one then, as it's clear that it is caused by the motor and what remains is to find what "feature" of the motor is the culprit.

Possible candidates:
Noise injected into the power lines (cure: Filter the power lines).
Noise radiated into the logic (cure: Shielding).
Too soft (weak) power supply (cure: Add buffer caps or upgrade the supply's current capability).

That's assuming that your circuit is designed (and build) in a sensible way - Always add the schematic when you ask questions about a circuit - we can't catch possible errors without a complete schematic, that is a correct representation of how you build it (not how you wanted or planned to build it, but how everything is connected up as is).


At first I thought it was an EMI issue, but then I realized that if I'm in latch mode, I can get the motor to stop by turning the remote control (encoder side) off and on again (just off won't do it), which doesn't make sense at all.  Maybe it can receive the first packet just fine but not any subsequent packet?
If it works fine without the motor, stop guessing about its ability to receive packets.
From what you wrote so far, there's nothing excluding EMI (which can cover several aspects).
I could shoot of my best guesses as to what's happening, but life's too short for trouble-shooting in the dark, so post the schematic and a couple of sharply focused pics of the setup. Add info on the motor (voltage and current) and your supply (does it happen with freshly charged batteries or only when it's semi-discharged?)

Test with a dummy load (power resistor or light bulb) equal in (dynamic) resistance to the motor and tell what happens (add an LED with a 470 Ohm series resistor for easy indication of when it's running).
If the problem persists (with the dummy load), you need to beef up your supply with caps and if it goes away, you need to filter the power lines to the motor.

Twist the motor wires in any case (2..3 twists/inch should do) and make sure the motor encasing is grounded through a heavy gauge, well soldered, wire.

If you have access to an oscilloscope, try it on the supply lines to the logic for starters.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #3 on: July 02, 2012, 07:22:20 AM »
Hi,

If I put the decoder in "latch" mode, then the motor will run forever as soon as I hit the "drive" button (I checked, all the decoder outputs are frozen while the motor is running).  If I put it in "momentary" mode then the motor keeps hiccuping off and on as it gains and loses the the signal!

If I unplug the motor and put a multimeter on the header, it works perfectly, it seems like the problem only occurs while the motor is actually running.

An easy one then, as it's clear that it is caused by the motor and what remains is to find what "feature" of the motor is the culprit.

Possible candidates:
Noise injected into the power lines (cure: Filter the power lines).
Noise radiated into the logic (cure: Shielding).
Too soft (weak) power supply (cure: Add buffer caps or upgrade the supply's current capability).

That's assuming that your circuit is designed (and build) in a sensible way - Always add the schematic when you ask questions about a circuit - we can't catch possible errors without a complete schematic, that is a correct representation of how you build it (not how you wanted or planned to build it, but how everything is connected up as is).

I'm at work right now, but I'll draw up a detailed schematic later if the first few ideas don't work.  For now, the encoder and decoder circuits are wired up exactly as shown in the pdf I linked to above, both powered with regulated 5V.  Here's a quick block diagram of the downstream stuff I'm driving the motor with:



At first I thought it was an EMI issue, but then I realized that if I'm in latch mode, I can get the motor to stop by turning the remote control (encoder side) off and on again (just off won't do it), which doesn't make sense at all.  Maybe it can receive the first packet just fine but not any subsequent packet?

If it works fine without the motor, stop guessing about its ability to receive packets.
From what you wrote so far, there's nothing excluding EMI (which can cover several aspects).
I could shoot of my best guesses as to what's happening, but life's too short for trouble-shooting in the dark, so post the schematic and a couple of sharply focused pics of the setup. Add info on the motor (voltage and current) and your supply (does it happen with freshly charged batteries or only when it's semi-discharged?)

I'll post a pic of the setup later and try to get a reading on how much current the motor is drawing.  Vcc going out to the motor is about 8.5 V.

Test with a dummy load (power resistor or light bulb) equal in (dynamic) resistance to the motor and tell what happens (add an LED with a 470 Ohm series resistor for easy indication of when it's running).
If the problem persists (with the dummy load), you need to beef up your supply with caps and if it goes away, you need to filter the power lines to the motor.

This is a good plan and I'll try it.  I can find the motor resistance with just a multimeter across the leads, right?

Twist the motor wires in any case (2..3 twists/inch should do) and make sure the motor encasing is grounded through a heavy gauge, well soldered, wire.

If you have access to an oscilloscope, try it on the supply lines to the logic for starters.

The motor wires look plenty twisted, but I don't think the motor casing is grounded (see picture in my second post).  I'll definitely try that first.  I don't have an oscilloscope unfortunately.

I don't know if this helps narrow it down or not, but the base I'm using (including the motor) was originally an RC truck, and there was obviously no interference issue in its former life.

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #4 on: July 02, 2012, 07:26:42 AM »
By "beef up your supply with caps", do you mean put a cap between my unregulated bus and ground?

That's easy to do, so is there a down side to doing this or should I just do it?

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #5 on: July 02, 2012, 07:43:22 AM »
Oh, one more thing: the motor driver worked just fine when it was just the microcontroller controlling it.  Additionally, all of the logic seems fine even with the motor running.  This suggests it's a radiated EMI issue, right?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: RF Interference?
« Reply #6 on: July 02, 2012, 11:09:50 PM »
Hi,

I can find the motor resistance with just a multimeter across the leads, right?

It would only reveal the (very low) DC resistance of the windings, but when you measure the current (at the 8.5V you mention), preferably with the motor loaded close to what it will be in the final setup, just use Ohms Law: R=U/I (or R=E/I if you prefer).

U (or E), I and R are the symbolic representations for voltage, current and resistance respectively. What you measure or calculate with real world numbers is called V, A and Ohm.
You can't (or rather shouldn't) ever mix symbolic representations with the nomenclatures for real values (like the very widespread (in the US at least) mix saying R=V/I)
(Just trying to teach you the right way from the get go)

That aside, say you measure 500mA (0.5A) with 8.5V over the motor, you work the values into the formula: R=U/I => 8.5V/0.5A=17 Ohm.
(These numbers are just an example, fill in your measurements as appropriate).


The motor wires look plenty twisted, but I don't think the motor casing is grounded (see picture in my second post).  I'll definitely try that first.  I don't have an oscilloscope unfortunately.

The motor casing is connected to the brown wire.
The motor only uses a single cap. Break the connection (Unsolder) between the terminal with the brown lead and solder a 47..100nF cap (preferably ceramic types like the 100nF already installed between the terminals) from each terminal to a single spot on the casing around midway between the terminals and connect a wire from that point to ground.
A light sanding with 240..600 grit emery paper on the casing will make it better take the solder (don't overheat, plastic end caps don't like that :))

Here's how to do it
C3 is the cap already installed, C1 and C2 is 47..100nF.
The right hand side circuit is for filtering the positive supply line (right before it enters the L293), but see if C1..C3 cures it first.


I don't know if this helps narrow it down or not, but the base I'm using (including the motor) was originally an RC truck, and there was obviously no interference issue in its former life.

I guess the circuit had a lot of caps and perhaps other measures to make it happen.

BTW. At what voltage was it driven before the big snip?


By "beef up your supply with caps", do you mean put a cap between my unregulated bus and ground?

Yes.


That's easy to do, so is there a down side to doing this or should I just do it?

Just do it ;D

When the motor starts, i draws a high current shortly (surge or inrush current). It does so because the supply sees the non-rotating motor as more o less a short (only the DC resistance of the copper windings). As soon as the motor rotates, it changes the polarity fast (hence AC internal to the motor and this AC meets its arch enemy Dr. Induction, who manages to keep things at reasonable levels.

This inrush current will dip the voltage on the power line, but using a sufficient wire gauge for the current drawn and adding buffer capacitors, the dip can be minimized, so it won't make the logic go haywire (if that's the problem - but buffer caps should be used on any DC-motor supply regardless).


Oh, one more thing:

Next time you want to add something to a previous post, please use the "Modify Post" function - it makes it much easier to answer than collecting from several posts :)


the motor driver worked just fine when it was just the microcontroller controlling it.  Additionally, all of the logic seems fine even with the motor running.  This suggests it's a radiated EMI issue, right?

Nah, it tells you that it may be radiated, but my guess is, that there's a greater chance of it being a power line issue.

Did you add caps (around 10..100nF) on the supply terminals/pins of each IC?
If not, grab some 100nF ceramic SMD caps (1206 casing), they are fairly easy to place/hold  with tweezers and can be mounted on the solder side of an IC - the shorter the trace between power pins and cap, the better.

Larger caps (sort of, 10µF and up) are good for buffering a power line. Small caps (1..100nF) are good for slowing the rise time of eg. motor generated noise and digital noise.

The motor voltage should have a separate lead from the battery positive terminal, as power line noise is then shunted in the battery (which can be seen as a huge capacitor in this respect).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #7 on: July 03, 2012, 07:37:09 AM »
Thanks so much for all your help!  I have a bunch of stuff to try now.

At what voltage was it driven before the big snip?
I'm using the same battery pack.  I assume it was just driven at battery voltage before, but yeah there was almost certainly some filtering I've omitted.  I kept the old circuit board; I'll check and see what they did.

I'll post an update after I filter the supply, install the caps on the motor, and ground the casing.

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #8 on: July 04, 2012, 01:27:00 PM »
Okay, so I did the following:

  • Added two 0.1 uF caps to the motor casing as shown: http://imgur.com/l9nm8
  • Added a ground wire to the casing
  • Added a 390 uF cap between my unregulated bus and ground

I was hoping it would be that easy, but I'm still having the same problem: motor runs indefinitely as soon as I press the button and never gets the signal that the button is released.  This time I moved the remote control around and noticed I could get it to work correctly in certain spots.  Not sure if this is an improvement.

I measured the motor current as about 150 mA at a voltage of about 7.5 V, so that gives us a resistance of 50 ohms.

Here are some pictures of the setup in case it helps identify something I'm doing blatantly wrong :)
http://i.imgur.com/YPhJL.jpg
http://i.imgur.com/5Fyzz.jpg

Seems like the next step is test with a dummy load.  I guess I need to buy a 50 ohm power resistor?
« Last Edit: July 04, 2012, 01:30:03 PM by pterrus »

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #9 on: July 06, 2012, 07:18:31 AM »
I did some more testing last night.  The first thing I tried was to hook up a decoder pin to an LED, and then just hook up the motor directly to a separate 9V battery.  It didn't work at first (couldn't get the LED to light up while motor running), but then I just twisted the leads on the 9V battery connector and it worked perfectly.  Aha, getting somewhere!  The next thing I tried was to swap the battery pack and the 9V such that the motor was powered by the pack and the electronics by the 9V.  Again, worked perfectly.

Finally, I brought the circuit back to its original configuration with everything powered by the one battery pack, making sure to twist all the wires from the battery all the way to the basic stamp board.  Didn't work.

This all seems to suggest the issue is noise on the power lines after all.  I've already included a big capacitor between unregulated and ground, what else can I do?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: RF Interference?
« Reply #10 on: July 06, 2012, 08:41:16 PM »
Hi,

[...] This time I moved the remote control around and noticed I could get it to work correctly in certain spots.  Not sure if this is an improvement.
If nothing else, it's a further clue.
Does it help to get closer?
How was the antennas direction when it worked and didn't work?


Here are some pictures of the setup in case it helps identify something I'm doing blatantly wrong :)
I'd reduce the length of the wires a lot - especially the one from the receiver board. Wires act like antennas.


Seems like the next step is test with a dummy load.  I guess I need to buy a 50 ohm power resistor?
If you series connect 5 pcs. of 10 Ohm (0.25W) resistors you have your dummy load.
7.5V x 150mA is 1.125W and 5 x 0.25W is 1.25W.
Two LED's in anti-parallel in series with a 1k resistor over the 50 Ohm will do for monitoring and you might wanna add LED's on the inputs of the L293, to see if the signals reach it.

How about the schematic?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: RF Interference?
« Reply #11 on: July 06, 2012, 08:51:17 PM »
Hi,

[...] I've already included a big capacitor between unregulated and ground, what else can I do?
Add the right part of the pdf-file to the motor if it's motor generated power line noise.

However, I'd find it more likely (from what you wrote) to be a too saggy supply.
I assume the large chip right under the DB-9 connector is a voltage regulator. Is it a LDO regulator (what is written on it)?

If there's extra voltage to drop, a diode and a cap can make the logic supply immune to brown-outs caused by the motor.

How much current does the circuit (less motors) draw (i.e. all logic, the receiver and what else is driven from that line)?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #12 on: July 09, 2012, 08:58:30 PM »
I had a little time to test tonight and can now answer a few of your questions:

It does help if I get closer.  The best seems to be when the transmitter antenna is close to the receiver antenna and tilted a bit, whatever that means.

I tried using a 50 ohm 2 watt resistor as a dummy load.  Worked perfectly in a few different configurations.

The rest of the circuit (less the motor) draws 81 mA.

Here's what's written on the Basic Stamp board's regulator:

UTC
LM2940L
50EAUKA1

I haven't tried your filter from the right side of the pdf yet, can you recommend a part number for the inductor?

I haven't drawn up a schematic for you yet, but here's the schematic of the BS2 board that I'm using from Parallax: http://www.parallax.com/dl/docs/prod/boards/HomeWorkBoard-v1.3.pdf

Combined with the schematic from the last page of http://www.rentron.com/Files/CIP-8.pdf and my block diagram, that covers pretty much the whole circuit.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: RF Interference?
« Reply #13 on: July 10, 2012, 02:40:03 PM »
Hi,

It does help if I get closer.  The best seems to be when the transmitter antenna is close to the receiver antenna and tilted a bit, whatever that means.
Good, then the interference can't be that bad and should be easy to fix.


The rest of the circuit (less the motor) draws 81 mA.

Here's what's written on the Basic Stamp board's regulator:

UTC
LM2940L
50EAUKA1
Great, Add the part in red in the attached schematic snippet.
C1 at least 470µF, better 1000µF and for D1, I'd recommend a Schottky (for the lowest possible drop), but any diode will work.
The voltage regulator needs up to 5.8V in to stay in regulation and with a common silicium diode (like eg. 1N4004) the input from the battery should be at least 6.6V.

With the specified current drain and a 1000 µF cap, it will then keep the drop below 0.8V for 10ms, which should be plenty
The battery have to this 0.8V higher, so in total, it should be ~7.4V total
This points towards a 7 cell NiMH battery or a 2 cell Lithium battery, if you want to be able to use the full charge.

How many cells and which chemistry is your present battery pack?


I haven't tried your filter from the right side of the pdf yet, can you recommend a part number for the inductor?
Any ring core from eg. a PC supply can be used (preferably the yellow ones, as they are powdered iron) and filled with as much magnet wire (0.5mm in diameter or heavier) as you can get onto it, but if you need to buy one, go for 1..2mH and with a current suitable rating.
A ring core can be made even more efficient by two anti-parallel windings, but before you use any inductor, try adding the cap and diode to your circuit, as it may do the trick.

Edit, Not C1, but C2 in the attached :)
« Last Edit: July 10, 2012, 02:41:30 PM by Soeren »
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #14 on: July 10, 2012, 09:44:15 PM »
Thanks again for your help.  I'll try out your suggestions this weekend and see what happens.

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #15 on: July 11, 2012, 09:10:10 AM »
So it occurs to me that I'm going to have to hack the basic stamp board a bit to add these components, which makes me a little nervous.

I guess right now the plan is de-solder the Vin pin of the regulator, and carefully bend it up off the PCB, being super careful not to break anything.   Then bridge the gap with the diode.  Finally, solder the + lead of the capacitor onto the top.

Is that the best way to do this?  Any tips?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: RF Interference?
« Reply #16 on: July 14, 2012, 03:31:43 AM »
Hi,

So it occurs to me that I'm going to have to hack the basic stamp board a bit to add these components, which makes me a little nervous.
Not at all :)


I guess right now the plan is de-solder the Vin pin of the regulator, and carefully bend it up off the PCB, being super careful not to break anything.   Then bridge the gap with the diode.  Finally, solder the + lead of the capacitor onto the top.

Is that the best way to do this?  Any tips?
The cap goes over the power terminals of the board.
The negative side of the battery pack goes to the power ground terminal.
The diode goes from the positive side of the battery to the power positive terminal.
( Like this: B+ o--|>|--o Board positive terminal)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #17 on: July 14, 2012, 06:11:30 AM »
So it doesn't matter that the motor Vin is also downstream of the diode?

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: RF Interference?
« Reply #18 on: July 15, 2012, 05:03:26 AM »
Hi,

The motor power should be taken directly from the battery terminals (via a fuse of course).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #19 on: July 18, 2012, 08:45:41 PM »
Okay, this is just baffling me more and more.

I built your circuit as follows: I installed a 1N5817 just upstream of the basic stamp board's terminals (just upstream of the 9V battery clip in the picture).  I then soldered a 1000 uF capacitor across the terminals.  I also ran a wire from the battery directly to the spot on the breadboard where the motor controller picks up its Vcc2.  I experienced the same  problem as before.

Next I tried a bunch of things.  I hooked up the motor directly to battery voltage (using the wire I ran from the battery) and tried to light up an LED with the remote control while the wheels were spinning.  Didn't work.  Unplug the motor, works perfectly; plug in the motor again, no signal.

Now the weird part.  I hooked up the motor directly to "Vin" on the basic stamp board.   That's the unregulated voltage downstream of the diode.  I could control the LED perfectly (even across the room) while the motor was spinning and this is the only way I've ever been able to do so.  I didn't expect this to work and I still don't understand why it should.  The only thing I can think of is maybe it has something to do with the length of the wires in the other configurations?

I couldn't get it to work with the motor controller no matter what I tried (wouldn't work with Vcc2 coming from either before OR after the diode).

I could use some help interpreting these results.

My current battery pack is a 6 cell Ni-Cd  to answer your earlier question.  It's the original that came with the truck.
« Last Edit: July 18, 2012, 08:56:59 PM by pterrus »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: RF Interference?
« Reply #20 on: July 20, 2012, 07:07:55 PM »
Hi,

Now the weird part.  I hooked up the motor directly to "Vin" on the basic stamp board.   That's the unregulated voltage downstream of the diode.  I could control the LED perfectly (even across the room) while the motor was spinning and this is the only way I've ever been able to do so.  I didn't expect this to work and I still don't understand why it should.  The only thing I can think of is maybe it has something to do with the length of the wires in the other configurations?
Long wires are a bad thing, as electric noise can couple through radiation (antenna effect) capacitive coupling (close parallel running wires) and inductive coupling  (large loops of wire) can all be equally problematic, but moving wires, twisting them or screening them will quickly show a change if this is the problem.

When you spun the motor from the unregulated DC, only brush noise could happen and you can thus probably rule it out, based on your findings.

The difference, when on the bridge, is the PWM, so this must be the base of the culprit.
If you had a 'scope, you'd be able to pinpoint it in a minute, but abstracting from your experiments, I'd imagine a grim 'scope screen if probed. That is not as interesting as the cure of course, so, for starters, try...
Changing the PWM frequency a good whack.
Increasing the cap sitting directly over the motor terminals to up to 1µF or more (just add a bunch of smaller caps, they have to be non-polarized, so no common electrolytes).
Keep the wires from the driver to the motor as short as possible and twist them.
Only make one change at a time, and then re-test if the reception range has changed in any noticeable way. One thing at a time and you have a better chance of knowing which helped (if any ;)).

If your PWM frequency is eg. 5kHz, try eg. ~1kHz, ~3kHz and 7..9kHz (to change the possible harmonics).

Is the reception equally bad with:
A few percent PWM?
Around 50% PWM?
Close to 100% PWM?
(Test and take notes like a pure scientist whatever you do - it will hep you immensely).


I couldn't get it to work with the motor controller no matter what I tried (wouldn't work with Vcc2 coming from either before OR after the diode).

I could use some help interpreting these results.

My current battery pack is a 6 cell Ni-Cd  to answer your earlier question.  It's the original that came with the truck.
IIRC, it works fine if the motor is on a separate power source from the rest and from what you have written so far, I imagine that it's the PWM pulses into the motor windings wreaking havoc.


A 'scope may be found in a "Hacker Space" i you have one within reach or perhaps a helpful local Ham Radio operator could be found (the really good ones knows all about EMI and such, plus how to cure it).


Yet another trouble shooting tool, that I used extensively as a kid (before I got my first 'scope) is a cheap crystal earpiece. They can be hard locating these days though, as they have a crappy sound and dynamic earpieces are cheaper to manufacture, but a piezo disc and a series cap of around 47..470nF can be used as a substitute.

What you'd be listening for (in this case), is the harsh sound of the motor terminals - anything that gets the sound more "round"/pleasant/less tinny is good and listening to different circuits over time it can be a very precise and helpful tool at an outlay of... pocket change :)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #21 on: July 20, 2012, 07:54:25 PM »
I'm not using a PWM, all of these experiments I just described were done with flat DC.  Is there anything else it could be?   I can post some updated pictures of the setup when I get home if that would help.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: RF Interference?
« Reply #22 on: July 20, 2012, 09:52:34 PM »
Hi,

I'm not using a PWM, all of these experiments I just described were done with flat DC.  Is there anything else it could be?
Obviously ;)

What receiver and transmitter do you use?

Put at least 100nF over the receiver supply terminals.

From previous posts, it seems like you use OR gates to OR a pin from the controller with a pin from the decoder?
I don't think that it will have much impact on your present issue, but I'd feed the decoders outputs into the controller and then let the controller output go directly to the L293D.

Do you have any floating inputs on the decoder chip? (If so, tie them to a rail (+5V or 0V) as appropriate. If you tied unused inputs via a high value resistor, then what's the value? (might help to tie them harder (= lower resistance).

Try mounting the motor to the L293D with very short wires (2" max.) and a similar max. length from controller to L293D - in general, get your wires as tight as possible.

Is there a short wire from the motor shell to the negative terminal of the battery?

Did you try any shielding?

Solderless bread boards (SBBs) suck at high frequencies, at transient protection and at high impedance stuff, as each contact point is a very effective antenna for both receiving and transmitting (large compared to a small solder joint and with extremely sharp edges (which means that electrons are radiated easily)
If possible, place an un-etched PCB, a copper plate or at least an aluminum plate underneath each SBB and ground well (make sure you don't short anything with it).
Might be good with a similar precaution on matrix boards when things acts up (Isolate with a tough plastic sheat if needed).


   I can post some updated pictures of the setup when I get home if that would help.
Yes, show me your short wire setup! ;D

And once again... Although it may seem tedious, test after each single change, or you'll not know what caused the problem, when you get it working.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #23 on: July 23, 2012, 09:31:11 AM »
Do you have any floating inputs on the decoder chip? (If so, tie them to a rail (+5V or 0V) as appropriate. If you tied unused inputs via a high value resistor, then what's the value? (might help to tie them harder (= lower resistance).
All of the unused inputs to the encoder are tied to ground, but I have many unused outputs on the decoder that are floating.  Is this bad? 

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #24 on: July 23, 2012, 09:34:10 AM »
Transmitter: TWS-434A
Receiver: RWS-434

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #25 on: July 23, 2012, 09:59:03 AM »
Put at least 100nF over the receiver supply terminals.
Did this a while ago, no change.

From previous posts, it seems like you use OR gates to OR a pin from the controller with a pin from the decoder?
I don't think that it will have much impact on your present issue, but I'd feed the decoders outputs into the controller and then let the controller output go directly to the L293D.
Yeah it doesn't work when this logic is bypassed entirely and it's just the motor and an LED so even if this is a problem it can't be the only one.

Try mounting the motor to the L293D with very short wires (2" max.) and a similar max. length from controller to L293D - in general, get your wires as tight as possible.
Yeah I think this is the next step and I've been trying to avoid it because it's a big pain.  Guess it's time to invest in crimpers.

Is there a short wire from the motor shell to the negative terminal of the battery?
Yes.  As short as I can get it given where the battery and the motor are.

Did you try any shielding?
Not yet.

Solderless bread boards (SBBs) suck at high frequencies, at transient protection and at high impedance stuff, as each contact point is a very effective antenna for both receiving and transmitting (large compared to a small solder joint and with extremely sharp edges (which means that electrons are radiated easily)
If possible, place an un-etched PCB, a copper plate or at least an aluminum plate underneath each SBB and ground well (make sure you don't short anything with it).
I'm using two breadboards, one that's right on the basic stamp card as shown, and the other already has a plate underneath it.

Offline pterrusTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: RF Interference?
« Reply #26 on: July 23, 2012, 10:36:07 AM »
Sorry for the quad post.  I'm thinking about buying something like this to troubleshoot the problem.  Would the 200Khz bandwidth specified be enough to detect the noise I'm interested in?  The TWS-434A transmits at 433.92 Mhz, so I'm guessing no?
« Last Edit: July 23, 2012, 10:43:33 AM by pterrus »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: RF Interference?
« Reply #27 on: July 23, 2012, 08:41:05 PM »
Hi,

[...] but I have many unused outputs on the decoder that are floating.  Is this bad?
No. The reason that a high impedance input should always be defined (be held in check) is, that electrical noise will otherwise bring it to oscillation, in some cases it may block the entire device from normal functioning or even kill it.

Outputs OTOH is always in check, being driven either high or low and even when using outputs that can be disabled (made high impedance), nothing gets to it from the outside.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: RF Interference?
« Reply #28 on: July 23, 2012, 09:30:27 PM »
Hi,

Sorry for the quad post. 

Next time you want to post more than once in a row, just hit "Modify" and add to the post.


I'm thinking about buying something like this to troubleshoot the problem.  Would the 200Khz bandwidth specified be enough to detect the noise I'm interested in?  The TWS-434A transmits at 433.92 Mhz, so I'm guessing no?

Well...
I think the "DSO Nano" is a fun toy to bring along for non-critical out-of-lab work, where you'd normally bring a cheap DMM, but I wouldn't like to have it as my only option.
A 200kHz scope is hopeless when it comes to digital signals - as long as the signals behave it's OK, but unfortunately, this is not when you need a 'scope. For Audio work it should be sort of OK (the bandwidth, I have no experience with the quality, or lack of same, in the Nano).

It will do well in checking your power supply, as any problems at higher frequencies are cured with a small cap, twisted leads etc., but then I'd recommend using a free Sound Card oscilloscope for that (with a resistive divider in front of it). (This is the best free Sound Card 'scope I've ever seen).

If you want a real scope, I'd recommend getting a working CRT 'scope - finding a 20MHz 'scope for less money than the Nano shouldn't be too hard, but it does take up some space.

This is just my personal opinion, and it's coming from a guy owning a mix of 'scopes (analog CRT's DSO CRT's, USB 'scopes and handhelds). Your perspective may lead you to a different conclusion, but do try out the free Sound Card 'scope that I linked above before shelling out, then you can learn using a 'scope and make a more informed decision about buying or not in a short while.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: RF Interference?
« Reply #29 on: July 23, 2012, 09:42:51 PM »
Hi,

Transmitter: TWS-434A
Receiver: RWS-434
IIRC, these modules are fairly blond (i.e. easy to confuse) and with all your long wires jamming the transmission, I wouldn't be too surprised if the noise was enough to drop the reception - all the more reason to make sure you don't have too much noise going on.

If you have a small handheld AM radio, tune it to a quiet spot (with your circuits off) and fire up the circuits while using the radio to "scan" for noise (buzzing or whine) near the different wires.
If you find a very noisy wire, note the distance and position/angle of the radio relative to the wire(s). That way it's easy to spot if a change helps or not.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here

data_list