0
\$\begingroup\$

I am trying to build a capacitive touchless sensor with an MSP430G2553 to control a small DC motor. When the chip is on the Launchpad, everything goes well. The sensor works, it sends a signal to the MOSFET and it activates the motor (and deactivates it after 1 second as it supposed to). However, I don't want to use the chip on the Launchpad (I want to operate it on a breadboard first then a PCB later when things work).

I found a way to connect the chip on the breadboard. It seems to work well except the the motor won't turn off once it starts spinning for the first time(it spins non-stop until I remove the power). When I use a LED instead of the motor, it works fine. It detects proximity, activates the transistor and the LED for 1 second then it turns off.

On the breadboard, the chip is connected to the source (batteries) and the reset is linked to the positive supply rail with a resistor.

So, I don't know why this problem appears only when the chip is not on the Launchpad. Do you have any idea why this happens? Are there any components that are missing? I tried many different way to fix the problem. What bothers me is that it works perfectly fine when the chip is on the Launchpad. It also works on the breadboard if I use a LED instead of a motor.

Thanks a lot for your help

An overview of the circuit

\$\endgroup\$
2
  • \$\begingroup\$ how is your circuit different from the launchpad? .... possibly, you have a missing component. ....... try a separate power supply for the motor ...... maybe the breadboard bus bar has a break in the middle, so that the motor gets no power .... move the power connection at the transistor to the other 1/2 of the breadboard \$\endgroup\$
    – jsotola
    Mar 17, 2018 at 2:22
  • \$\begingroup\$ I can't see your decoupling capacitors. \$\endgroup\$
    – user16324
    Mar 17, 2018 at 10:21

1 Answer 1

1
\$\begingroup\$

I found a way to connect the chip on the breadboard. It seems to work well except the the motor won't turn off once it starts spinning for the first time(it spins non-stop until I remove the power). When I use a LED instead of the motor, it works fine. It detects proximity, activates the transistor and the LED for 1 second then it turns off.

The part of your story which I have emphasised, is giving a big clue.

One difference between using an LED as the load (which works correctly) and using a motor as the load (which doesn't work correctly) is the much greater current required by the motor. Your diagram shows no decoupling capacitors.

Another difference is the back-EMF generated by the motor on power-off, but your diagram shows a freewheeling diode, so that seems less likely to be the main problem.

Is there any components that is missing?

Returning to the subject of capacitors, a plausible reason why your design works with the MSP430 on the Launchpad, is because the Launchpad already has power supply decoupling capacitors included in its design, but they are missing from your design. When the motor turns on, the extra current required could cause a brief dip in the voltage supplied to the MSP430, causing it to misbehave and so not continue running the code and so not turn-off the motor.

I don't know what components you have, and I assume you don't have an oscilloscope to measure the voltage at the MSP430 power pins. In general, I recommend you to:

  • add a relatively "large" (e.g. 50 uF up to 100s of uF) capacitor across the power rails immediately adjacent to the motor (observe correct capacitor polarity, as capacitors of that value are likely to be electrolytic); and

  • add a smaller (e.g. 0.1 uF up to 1 uF) capacitor across the power pins of the MSP430, with the shortest possible leads, immediately adjacent to the IC.

Then retry your test and report back.

\$\endgroup\$
4
  • \$\begingroup\$ !The new circuit(click on the link to see the circuit). Thanks for the answer. Is that what you had in mind? I just want to make sure that I understood it right before I text it. \$\endgroup\$
    – user526403
    Mar 17, 2018 at 13:38
  • \$\begingroup\$ Also, if I just have a 10uF capacitor as a «Smaller» capacitor, is it too big? Any chance that it will damage the circuit? \$\endgroup\$
    – user526403
    Mar 17, 2018 at 13:56
  • \$\begingroup\$ @user526403 - I'm on mobile so can't draw you a schematic at the moment. Re: "if I just have a 10uF capacitor as a «Smaller» capacitor, is it too big?" That won't cause damage (again, use correct polarity if it's a polarised cap) but due to higher ESR it won't be as effective as a lower value. Try that first; it may be enough. Your new image shows correct location for that. But for the higher value cap across motor power, the new Fritzing image appears wrong; in fact even the old Fritzing image appears wrong - I don't see a path for motor to the -ve supply rail; it has 2 paths to the +ve! \$\endgroup\$
    – SamGibson
    Mar 17, 2018 at 15:10
  • \$\begingroup\$ [cont'd] I meant to point out the problem with the original Fritzing, but since you say that your circuit works when using an LED, that suggests your circuit is subtly different from your image (which I think cannot work, as drawn). This is why those Fritzing layout diagrams are discouraged here on EE.SE; they are difficult to interpret. I'm told that the Fritzing software can output a conventional schematic diagram in addition to that layout, so please do that if you can. Regarding the location of the larger cap - it should be across the power rails, physically close to the motor. \$\endgroup\$
    – SamGibson
    Mar 17, 2018 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.