Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Noise induced in a wire

  1. Dec 4, 2016 #1

    Borek

    User Avatar

    Staff: Mentor

    Not sure if I posted it here or elsewhere. I made a Nixie clock controlled with an Arduino. To make it possible to set the clock I have added a button connected with a wire. Pressed button generates an interrupt which I use to "round" the clock up or down to a full minute. The button has a capacitor added and some debouncing delay added in the code. It all works quite nicely, with one problem. Apparently now and then the wire acts as an antenna, producing false signals which shift the clock.

    My first thought was to move the wire away from the 180V SMPS. It helped, but not completely. I will cut the wire to make it as short as possible (I am still on the breadboard, with Arduino Mini Pro sticking up, so I am limited in my options and the wire has to be hanging in the air for now), but somehow I am not convinced it will help get rid of the problem completely.

    Any advice? What are my other options? Are there any standard ways of screening wires, getting rid of induced signals? I did some googling but didn't found anything obvious and easy to apply to my mess of wires. Chances are it is this mess that is a source of the problem and moving to a PCB (with a good separation of the Arduino/button connection and the high voltage circuit) will help, but I don't want to make the (almost) final version and risk it will still suffer from the same problem.
     
  2. jcsd
  3. Dec 4, 2016 #2

    anorlunda

    User Avatar
    Science Advisor
    Gold Member

    Twisted pairs and coaxial cables are the classic ways. In your case, the simplest thing might be too twist the pair of wires you already have.
     
  4. Dec 4, 2016 #3

    Borek

    User Avatar

    Staff: Mentor

    Unfortunately, I have one wire only.

    To make things more clear, that's how it looks (half of that is most likely like scratching the left ear with the right hand, but first, I didn't know better, and second, I used whatever I had/could easily buy/borrow):

    1. Arduino Mini Pro
    2. RTC (connected via I2C, green and orange wire in front)
    3. SMPS 12V → 180V (for Nixie tubes)
    4. SMPS 12V → 5V (Arduino, RTC, 2xSN74HC595N and 4x74141PC)

    The red arrow points to the culprit wire connecting the button (mounted on the breadboard) to the Arduino.

    IMG_5860-Edit.jpg

    On the right there are shift registers and blue cables (only half of them visible) go to the Nixie board (scrapped from some old voltmeter).

    And the whole thing, about 20 minutes ago:

    IMG_5862.jpg
     
  5. Dec 4, 2016 #4

    Baluncore

    User Avatar
    Science Advisor

    Maybe you could reduce the value of the pullup/down resistor that clamps the wire voltage while waiting for a key press.
    Power will only be wasted in that resistor when you press the button.

    Edit:
    Looks like you have a loop without a pull-up resistor?
    What is the circuit of your button.
     
  6. Dec 4, 2016 #5

    Borek

    User Avatar

    Staff: Mentor

    I had to check - it was grounded through 10k resistor. I put 1k there, we will see if it helps. These are completely random events, sometimes the clock works OK for several days, sometimes it shifts several times a day, so checking takes a lot of time.
     
  7. Dec 4, 2016 #6

    dlgoff

    User Avatar
    Science Advisor
    Gold Member

    Maybe you could bring an ac/noise signal close to your circuit and check with 1kΩ then 10kΩ to speed up testing.
     
  8. Dec 4, 2016 #7

    lewando

    User Avatar
    Gold Member

    Mr. Borek, are you certain of this? Have you considered removing this input altogether and then perform a stability test?
     
  9. Dec 4, 2016 #8

    Borek

    User Avatar

    Staff: Mentor

    Good question. I have not tried it (and I will definitely do in a few days, after seeing whether changing the resistor helped), but I have reasons to believe it is the noise.

    Initially the button was on the leftmost side of the breadboard, followed by the Arduino. Just left to the clock I have a soldering station, distant just enough to reach the switch squeezing my fingers between the station and the cardboard box on which the clock stands now. At some point I realized the hour was often changed after I used the station (which inevitable meant shaking the wires). Then I rearranged the elements on the breadboard, and it definitely helped (or at least I don't have to correct the clock after soldering ;) ).
     
  10. Dec 4, 2016 #9

    lewando

    User Avatar
    Gold Member

    Some other things to try:
    1) Soldering of contacts is better than breadboarding, for best low-impedance grounds, otherwise double up or triple up your ground connections.
    2) Make sure you have a variety of capacitors on your 5V power supply rails (1uF, 0.1uf, 0.01uf) to handle transients caused by Nixie tube changes of state.
    3) Wiggle your wiring manually--maybe you can isolate a bad contact.
    4) Arduino code-- beef up your debouncing. Make it ridiculous. Only recognize button presses greater than 1 second.
     
  11. Dec 7, 2016 #10

    Borek

    User Avatar

    Staff: Mentor

    So far, so good.

    (I am posting mainly to provoke the clock to misconduct :wink:)
     
    Last edited: Dec 7, 2016
  12. Dec 7, 2016 #11

    Averagesupernova

    User Avatar
    Gold Member

    Interesting. I have seen in the past the Weller stations that are temperature controlled by the tip that is installed would produce enough EMI to trigger one of the channels of the logic analyzer that was hooked the digital system that was on the bench at the time. Just how this EMI propagated I don't know but I thought I would throw it out there. Now, I will be interested to know what soldering station Borek has.
     
  13. Dec 7, 2016 #12

    Borek

    User Avatar

    Staff: Mentor

    Cheap and basic. But it has everything I need.

    pobrany-plik.jpg
     
  14. Dec 10, 2016 #13

    Borek

    User Avatar

    Staff: Mentor

    So, tomorrow it will be a week and it seems like replacing the resistor with a lower one definitely helped - no surprises from the clock.

    However, I have a question:

    What I don't get is what rule would the smaller capacitors play? Isn't the large one enough? If they are in parallel they work as one with a capacitance equal to the sum of capacitances and replacing 1 μF with 1.11 μF doesn't sound like a big deal. Sure, 1 μF is usually electrolytic so adding a smaller ceramic capacitor with a low ESR will help a bit - but if I already add 100 nF ceramic, adding 10 nF ceramic sounds superfluous.

    What am I missing?
     
  15. Dec 10, 2016 #14

    Borek

    User Avatar

    Staff: Mentor

    Sorry, missed your edit.

    nixie_button.png

    At the moment R1 is 1k (it was 10k) and C1 is 0.1 μF, the largest ceramic I have (added as a first attempt to solve the problem, even before asking for help).

    I admit I made the schematics several weeks ago (in other words:I don't remember details) and I am prone to errors (in other words: I don't trust myself, so chances are it is not a correct depiction of the circuit), but at first sight it looks OK to me.
     
  16. Dec 10, 2016 #15

    Baluncore

    User Avatar
    Science Advisor

    ESR is most important in electrolytic caps because it determines the heat generation inside the cap due to ripple current. That is critical in power supplies because electrolytics dry out when hot.

    But the series inductance of a ceramic is much less than an electrolytic. The ceramic is not a long foil tape so it has low ESR. If I want a quiet supply I use an electrolytic cap at the power supply, a tantalum cap on the PCB and a ceramic cap with every switching device or IC.
     
  17. Dec 10, 2016 #16

    Baluncore

    User Avatar
    Science Advisor

    There is a problem with the schematic. Pressing the switch connects a 1k resistor across the power supply.
    Maybe you actually have the R1=1k0 in the Vcc line to C1 = 0u1F, not in the Gnd line.
     
  18. Dec 10, 2016 #17

    lewando

    User Avatar
    Gold Member

    As for the multiple capacitor suggestion on the VCC rail: let me explain... no, there is too much. Let me sum up:

    This is to do power supply bypassing (also called decoupling), as it relates to your processor. By the way, your processor module may already be doing this--I don't know.

    This capacitance, placed between VCC and ground, is located very near to the thing you want to protect.

    What this does is create a local voltage/charge reservoir that helps maintain a constant voltage applied to the digital thing you want to protect.

    For a given capacitor size and construction, it will have a specific frequency response. Generally speaking, the smaller the size of the capacitor, the better it will be at filtering higher frequency noise. Employing a couple of these of various sizes gives you noise rejection at a couple different frequencies.

    Who knows what frequencies of noise your controller VCC rail is being subjected to? I don't, so really this is a precautionary guess.

    Also your implementation of the switch is a little weird. This is a more standard way of doing it:

    switch2_zpssdu6m43w.png
     
  19. Dec 11, 2016 #18

    Borek

    User Avatar

    Staff: Mentor

    Looks to me like it is not different from what happens on the schematics posted by @lewando ?

    My understanding is that my circuit gives HIGH on the pin, and when the button is pressed the signal is grounded, so the pin becomes LOW. It is the change that triggers an interrupt (to be more precise: the interrupt is configured to be generated on the RISING signal, when the button is released, but it doesn't change much).

    Actually I may have screwed up something, I see my code configures the pin to be connected to an internal pullup, which doesn't look necessary. I will tinker with it later.

    I will think about multiple capacitors a bit more. It still doesn't add up for me.
     
  20. Dec 11, 2016 #19
    But it is different, and lewando's is the standard connection method.

    In yours, it appear the switch connects the labeled switch pins 1&2 to 3&4 when pressed. All that does is connect the non-GND side of R1 to Vcc. Pin 5 of U1 is connected to Vcc regardless of the switch position.

    Wire it as lewando shows, and if the pin can be programmed with a pull-up, you don't even need the resistor. I've done exactly that with a ESP8266 board.

    RE: small cap in parallel with large cap - this is done because large caps can have higher series R and series L. So while the large C value shunts signals to ground, and relatively lower freqs than a small cap, the R & L limits how much reduction you can get. The small C, while having less effects at low freq, has lower R & L, and shunts the higher freqs closer to ground. Draw a schematic with the parasitic R & L and you will see this.
     
  21. Dec 11, 2016 #20

    lewando

    User Avatar
    Gold Member

    Schematic for the Arduino Pro Mini:
    https://www.arduino.cc/en/uploads/Main/Arduino-Pro-Mini-schematic.pdf

    Looks like the processor already has 10 uF in parallel with 0.1 uF on its VCC. And the regulator has 10 uF on its input. You probably don't need any extra capacitors.

    Bigger issue:
    In other words, when S1 is closed VCC is still being applied to pin 5. Not sure how this would ever work.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted