Connect with us

Circuit Review (Noise)

Discussion in 'General Electronics Discussion' started by bobdxcool, Jun 3, 2020.

Scroll to continue with content
  1. bobdxcool

    bobdxcool

    98
    0
    Mar 9, 2012
    I am making a automatic water dispenser (schematics attached) using DC motor, solenoid and IR sensor module (https://robokits.co.in/sensors/ir-a...MIjbWz7Krm6QIVVwQrCh1H9gv2EAQYAyABEgJoCPD_BwE).

    Submersible Dc Motor pump: 3-6V DC 100-220mA. Driven by 2NAAAA2 transistor.
    Solenoid Valve water: 12V DC(rated 0.6Amps). Driven by TIP120 transistor.
    5V IR sensor module connected to input pin of arduino.

    The system is powered by 12v DC adapter.

    Now, I want to make sure that the noise from the motor or solenoid doesn't affect the other components in the circuit. What other components (resistors, capacitors, etc) should I add at different points of the circuit to avoid noise ? Is some sort of RC filter needed to be added to the IR sensor output pin going to the arduino input ?

    Also, I am planning to use a bigger 24V DC motor pump (rated 2Amps) in place of existing DC motor pump for another project. What precautions to be taken in this case to avoid noise?

    Or is a two channel relay board (probably the ones with optocouplers) a better option without transistors?


    And I am planning to add a 250V 2Amp glass fuse for overcurrent protection along with a diode (IN4007) for reverse polarity protection between the power supply adapter and the LM7805 IC.

    upload_2020-6-4_7-18-25.png
     
    Last edited by a moderator: Jun 4, 2020
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    10,025
    2,138
    Nov 17, 2011
    Add an LC filter between the power supply and the motor. You can easily find suitable filter modules in RC model accessory stores (or on the internet).

    No. An RC filter will distort the digital signal from the sensor output making reception less reliable (worst case: not working at all).

    The same filter.

    No. Noise issues in this setup are most likely to arise via the power and ground lines. You will not see noise from the motor or solenoid at the arduino's output pins driving the transistors.As long as you use the same power supply following the hints below will protect your circuit as best as possible.
    A relay module makes sense only if you have separate power supplies or the power required by motor or solenoid exceeds the capabilities of your transistors.

    The 7805 is designed for max. 1.5 A, A 2 A fuse will therefore be insufficient to protect the chip. In addition, at 1.5 A and a voltage drop of 7 V power dissipation of the poor 7805 would be 10.5 W! See my hint below for a remedy.
    The diode for reverse polarity protection is useful if your power adapter allows you to swap '+' and '-'. Otherwise it is not required, but doesn't hurt to have it in place.

    Some general hints:
    • Place a capacitor (e.g. 100 nF) with leads as short as possible next to the sensor and also next to the LM7805 between input and gnd and between output and gnd.
    • Keep the ground and power traces between the arduino and sensor on the one side and the motor on the other side separate from each other. They shall meet at the 7805 only (create a "star" connection for ground and power, see e.g. here).
    • Have you considered the power requirements of the 7805? It will drop 7 V so even at a meager 500 mA output current power dissipation will be 3.5 W. Besides being inefficient, the chip will get hot and you will need a heatsink.
      Consider using a switch mode regulator instead. You can get them as modules with screw terminals, same type of module with solder terminals or even as TO220 compatible modules.
    • Check the connection from the sensor to the arduino. It looks as if the sensor output and the driver output to the solenoid share the same pin (pwm D3) on the arduino. My guess is that this will not work as intended. Use separate pins for sensor input and driver output.
     
    bobdxcool likes this.
  3. bobdxcool

    bobdxcool

    98
    0
    Mar 9, 2012
    My requirement for a voltage regulator is to step down 12/24Volts (depending on voltage of solenoid, will either use a 12V or 24V adpater to power the entire system) to 5V for arduino and DC motor. Current required for these 5V electronics is around 300mA (200mA is for the motor). Since LM7805 is not very effiencient, I guess I will go for LM2596 (https://sharvielectronics.com/produ...r-adjustable-step-down-power-supply-module-2/ ).

    I will correct pin3 of arduino as suggested by you (was a schematics mistake).

    You mean I should connect a 100nF ceramic capacitor between the output pin and gnd pin of the sensor on the main PCB where they are connected to.

    The LC filter which you suggested I am finding difficult to get in my place. Can I make one myself using inductors and capacitors? Or any alternatives.
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    10,025
    2,138
    Nov 17, 2011
    This or a similar one are o.k.
    No, definitely not on the output as this will distort your digital signal.
    It is good practice to have a decoupling capacitor between Vcc and GND right next to every IC.
    "Which value" you ask? Welcome to the world of obscure (and not so obscure) circuit and EMC theory. A more or less standard choice is a 100 nF ceramic capacitor here. But depending on the frequencies and the amplitude of the switched current spikes sometimes multiple capacitor values in parallel are used to cover different frequency ranges.
    Anyway, don't worry, 100 nF will be just fine in most cases, definitely here.
    I didn't mean to suggest a singular filter. You can get this type of filter on ebay, amazon, bangood, aliexpress your local rc hobby store etc.
    Of course you can build one yourself, just Google "diy lc motor filter".It is a very simple circuit.
     
  5. bobdxcool

    bobdxcool

    98
    0
    Mar 9, 2012
    Great. Thank you. I will go ahead with the LM2596 buck boost which should convert my 12/24V to 5 V and handle upto 3amps
     
  6. bobdxcool

    bobdxcool

    98
    0
    Mar 9, 2012

    My circuit is working fine and I have followed your suggestions.I am using a transistor (2n2222a) to drive my motor and a mosfet (p90nf03l) to drive my 12V solenoid. Now I intend to drain out water or remove air locks in the tank./pipe using a bypass switch (250V 3 amps push button ) which will run my motor at full speed which is enough to drive out the air out of the pipe in case of air locks. In my regular code, I run the motor at a lower speed in order to control flow of liquid. This speed unfortunately isnt enough to drive the air out of the pipe whenever there is an air lock. So I have to add this bypass switch override.

    Untitled1.png


    The whole system is powered by a 12V adapter which is connected to a LM2596 DC DC booster. The LM2596 converts the 12V to 5V. 12V input is used to power the solenoid and 5V output is used to power arduino and the motor. The 12V- and 5V- are shorted together on the board itself. So can I connect the same switch to run the motor and solenoid together ?

    So, if one end of the switch is connected to 12v- and 5v- pins and other end of the switch is connected to both the negative pins of the motor and solenoid (collector of transistor and drain of mosfet), will it be a problem when I run my normal code (where i turn on/off solenoid and motor) when not using the switch ?
     
    Last edited: Jun 16, 2020
  7. Harald Kapp

    Harald Kapp Moderator Moderator

    10,025
    2,138
    Nov 17, 2011
    Only if you use a double pole switch. One pole is used to connect the motor's pin 2 to gnd, the other pole is used for the solenoid's pin 2.
    Do not make the connection between the two motor pins "2" as indicated in your schematic. This will:
    1. Not bypass the transistors, therefore not run the motor at full speed.
    2. Disable the motor speed control via the Arduino's pin D3 because whenever pin D12 is activated to operate the solenoid, the short circuit via pin 1 of the switch (as shown) will also activate the motor.
    Note: you should learn how to label schematics, especially power supply connections. The symbol you labeled "-5V/-12V" is a "common ground" or "circuit ground", usually abbreviated GND. One could also designate it as 0 V, but GND is more common (for historical reasons, see e.g. here for more details). Labeling it as -5 V/-12 V is irritating and also impossible: a signal cannot have both -5 V and -12 V at the same time.
    In addition, if this signal were at e.g. -5 V (assuming you had only one power supply of 5 V), this would signify a total operating voltage of of 10 V for the motor.
    Why?
    Pin 1 of the motor is at + 5 V. Pin 2 is connected to -5 V by the transistor Q4. The total voltage across the motor is V(pin1) - V(pin2) = +5 V - (-5 V) = +10 V!
     
  8. bobdxcool

    bobdxcool

    98
    0
    Mar 9, 2012
    Will use DPDT switch. And thank you for the corrections in the schematics nomenclature.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-