I see. The receiver does not need much current - I think it's barely more than 1 mA. I will try experimenting with the resistor value.
I do still have the other capacitors in place in the circuit. This has all proven stubbornly resistant to being made to work well :-(. Maybe I should call it a failed experiment at some point, and redesign the physical side of it to allow for separate power supplies. I'm not sure why it's so hard to use one power supply, but it seems like it is going to be beyond my ability to get it working.
A good analogy to what's going on is similar to what happens when you kick on a hairdryer or vacuum cleaner.... for a brief moment the lights will flicker when the hairdryer or vacuum is turned on.
...or even an automobile if the lights are on when you start the vehicle.
The "inrush current" can visually be seen by the flicker of the lights causing "noise" on the power line. With a motor using·brushes such as in your case, you have several make-break connections happening very quickly contributing to noise on your supply line... this goes away (or becomes isolated rather) when you use separate power supplies... it would be a very bad thing if you started your car, and your neighbors car lights dimmed [noparse]:o[/noparse])
You can also provide isolation on a single supply by increasing the overhead voltage and regulating comfortably below the "noise ceiling".
The Resistor/Capacitor filter can be thought of as a shock absorber, making a "smoother" ride on the bumpy (noisy) road.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Thanks... I have a few parts on order such as a ferrite ring and we'll see if this will help [noparse]:)[/noparse] Also I am working on changing my physical design a little bit to accommodate 5 batteries instead of 4, so maybe this will help a little bit too, as you said - more voltage headroom.
Sorry to drag up this old thread. But I have figured it out!
Well, that's not *quite* true. It was more trial and error, than actual figuring per se. But the point is, I got it to work.
I spent days trying every possible thing I could imagine. Ferrite beads on the motor wires. Cap/resistor filters before the BS2e and the RF receiver both. I even tried putting such a filter (reversed of course) on the ground lead into the receiver as well as the +5 lead. I tried faraday cages on the motor. I tried using a 5v voltage regulator to power the BS2e and the receiver, or just the receiver, or just the BS2e. I tried replacing my motor control transistor with a MOSFET. I tried using 8v into the BS2e. Nothing worked! As soon as the motor was in the circuit in any way at all, the RF range went down to inches. I was about to just give up entirely.
Finally, and I'm not sure what made me think of this, I tried putting a 1000 uF / 10 Ohm filter in the power circuit of the motor. Success! For some reason, this made all the difference in the world. Now, with one power supply, and the motor in the circuit, I can control it from as far away as I can get inside my house. I also put a 100 uF/10 Ohm filter before the BS2e, but I'm not even sure that's needed any more (and it was surely not sufficient on its own).
Experimenting a little, there's a relationship between the PWM frequency and the size of the cap I need to use. I guess this makes sense. If I revert to the HW PWM command (and thus lose the ability to control two motors independently) then I can make do with a 100 uF cap. If I use my software PWM, then the 100 uF doesn't cut it, and I need to use the 1000, and I suspect an even bigger one would be better yet.
I didn't even know about these sorts of filters before Beau posted the example, so thank you very much for that. I never would have thought of it on my own, but now that I have thought about it for a while, I think I have a basic feel for how they work.
I guess this is a little wasteful. A filter before the receiver doesn't really matter because the power needed there is so very low. But in the power circuit of the motor, we're talking a few hundred mA, so I guess I will be burning a fair amount of battery power to loss in the resistor. I might play with other resistor values a little bit.
jhankle, ·
Glad that you got it working...The filter that I describe is your basic RC filter.· Generally people don't think to use a filter such as this on a power supply, but because the power requirement is relatively low this method is acceptable.· One thing to keep in mind is that the value for R should be kept low.· The reason is that it will form a voltage divider with the circuit that you are powering and possibly lower the voltage to a level that the device cannot function properly.·· Take for example a device that requires 50mA at 3.3V and you have a resistor value of 10 Ohms... the capacitor in this case is not as important so we will ignore it for this example.·· Using Ohms law V = I*R ... The voltage across the 10 Ohm resistor will be 0.5V· ...So now Your circuit that expects to see 3.3V will now only see 2.8V··· ...Under the same circumstance with a resistor value of 5 Ohms, the voltage across the resistor would be 0.25V· ...The 3.3V circuit would then see 3.05V··· ...Hopefully this makes sense and you can see why it is important to keep the R value low. ·
Here is an online RC calculator that you can play what-if with... · http://www.sengpielaudio.com/calculator-RCpad.htm ·
...As far as determining the actual frequency you need to be concerned with, you really need a scope to see where a problem might be.· The values that I choose were meant to attenuate 50Hz or 60Hz interference that can cause problems in sensitive equipment. ·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 1/22/2008 4:05:33 PM GMT
Comments
I do still have the other capacitors in place in the circuit. This has all proven stubbornly resistant to being made to work well :-(. Maybe I should call it a failed experiment at some point, and redesign the physical side of it to allow for separate power supplies. I'm not sure why it's so hard to use one power supply, but it seems like it is going to be beyond my ability to get it working.
Don't get discouraged, your almost there!
A good analogy to what's going on is similar to what happens when you kick on a hairdryer or vacuum cleaner.... for a brief moment the lights will flicker when the hairdryer or vacuum is turned on.
...or even an automobile if the lights are on when you start the vehicle.
The "inrush current" can visually be seen by the flicker of the lights causing "noise" on the power line. With a motor using·brushes such as in your case, you have several make-break connections happening very quickly contributing to noise on your supply line... this goes away (or becomes isolated rather) when you use separate power supplies... it would be a very bad thing if you started your car, and your neighbors car lights dimmed [noparse]:o[/noparse])
You can also provide isolation on a single supply by increasing the overhead voltage and regulating comfortably below the "noise ceiling".
The Resistor/Capacitor filter can be thought of as a shock absorber, making a "smoother" ride on the bumpy (noisy) road.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Well, that's not *quite* true. It was more trial and error, than actual figuring per se. But the point is, I got it to work.
I spent days trying every possible thing I could imagine. Ferrite beads on the motor wires. Cap/resistor filters before the BS2e and the RF receiver both. I even tried putting such a filter (reversed of course) on the ground lead into the receiver as well as the +5 lead. I tried faraday cages on the motor. I tried using a 5v voltage regulator to power the BS2e and the receiver, or just the receiver, or just the BS2e. I tried replacing my motor control transistor with a MOSFET. I tried using 8v into the BS2e. Nothing worked! As soon as the motor was in the circuit in any way at all, the RF range went down to inches. I was about to just give up entirely.
Finally, and I'm not sure what made me think of this, I tried putting a 1000 uF / 10 Ohm filter in the power circuit of the motor. Success! For some reason, this made all the difference in the world. Now, with one power supply, and the motor in the circuit, I can control it from as far away as I can get inside my house. I also put a 100 uF/10 Ohm filter before the BS2e, but I'm not even sure that's needed any more (and it was surely not sufficient on its own).
Experimenting a little, there's a relationship between the PWM frequency and the size of the cap I need to use. I guess this makes sense. If I revert to the HW PWM command (and thus lose the ability to control two motors independently) then I can make do with a 100 uF cap. If I use my software PWM, then the 100 uF doesn't cut it, and I need to use the 1000, and I suspect an even bigger one would be better yet.
I didn't even know about these sorts of filters before Beau posted the example, so thank you very much for that. I never would have thought of it on my own, but now that I have thought about it for a while, I think I have a basic feel for how they work.
I guess this is a little wasteful. A filter before the receiver doesn't really matter because the power needed there is so very low. But in the power circuit of the motor, we're talking a few hundred mA, so I guess I will be burning a fair amount of battery power to loss in the resistor. I might play with other resistor values a little bit.
·
Glad that you got it working...The filter that I describe is your basic RC filter.· Generally people don't think to use a filter such as this on a power supply, but because the power requirement is relatively low this method is acceptable.· One thing to keep in mind is that the value for R should be kept low.· The reason is that it will form a voltage divider with the circuit that you are powering and possibly lower the voltage to a level that the device cannot function properly.·· Take for example a device that requires 50mA at 3.3V and you have a resistor value of 10 Ohms... the capacitor in this case is not as important so we will ignore it for this example.·· Using Ohms law V = I*R ... The voltage across the 10 Ohm resistor will be 0.5V· ...So now Your circuit that expects to see 3.3V will now only see 2.8V··· ...Under the same circumstance with a resistor value of 5 Ohms, the voltage across the resistor would be 0.25V· ...The 3.3V circuit would then see 3.05V··· ...Hopefully this makes sense and you can see why it is important to keep the R value low.
·
Here is an online RC calculator that you can play what-if with...
·
http://www.sengpielaudio.com/calculator-RCpad.htm
·
...As far as determining the actual frequency you need to be concerned with, you really need a scope to see where a problem might be.· The values that I choose were meant to attenuate 50Hz or 60Hz interference that can cause problems in sensitive equipment.
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 1/22/2008 4:05:33 PM GMT