So I have a project that requires a 16x2 LCD, a DHT11, a servo, and a 3V DC motor. When I connect all components except for the dc motor, it all works just fine. Although, when the dc motor gets in the mix, the LCD screen stops starts behaving weirdly.
I guess that it's a current problem. My power source can output 1A.
Is that too low for these components or is it something else?
What voltage is your "power source" and where is it connected? How is everything else connected, particularly the servo and the motor? A simple wiring diagram would be useful and the code might also help.
I have a 12V 1A power source connected to the barrel connector.
EDIT 1: I don't think it's a current problem now since I just tried with 6A and the LCD started going crazy when I connected the DC motor to 5V.
I don't know any apps to do the diagram of the circuit so I will try to describe it:
I just fixed the issue, the motor was killing the circuit because I was connecting it directly to 5V since I was assuming that it would be a quicker way to test than using a pin on HIGH.
When connecting the motor said pin the problem gets fixed.
Sorry for wasting your time with such a silly problem.
frizd:
I just fixed the issue, the motor was killing the circuit because I was connecting it directly to 5V since I was assuming that it would be a quicker way to test than using a pin on HIGH.
When connecting the motor said pin the problem gets fixed.
I hope I am wrong but that gives me the impression that you are drawing power for a motor from a digital I/O pin. If so you will be very lucky if you have not damaged your Arduino.
I/O pins are intended for very low signal currents - up to about 20mA. Under no circumstances should a motor be connected directly to an I/O pin.
In general you should not draw power for a motor through the Arduino board. Give the motor a separate power supply with the GND connected to the Arduino GND
You need to power the motor separately from the Arduino, sharing the grounds.
You need a motor driver, either an H-bridge for two-way control, or a single MOSFET for one-way
control.
Trying to connect a motor direct to an Arduino pin will cause damage to the Arduino and the motor will
be severely limited in current as the Arduino chip is overheating and failing.