Pump control with TIP 120 & LCD button shield [solved]

Hey y'all, so recently I made the exciting jump from a breadboard push button control of a 12V pump to using a LCD&button shield from Adafruit. I adapted the code to use with the LCD&button shield finally, and now I've been using the serial monitor and digitalRead to see that my button action is sending a digital signal out of the shield before hooking it up to my circuitry powering the pump. Obviously, it returns a 1 when a signal is going out of digital pin 5 whenever I push the "right" button, as I coded it. However, when I put that signal wire into my circuit (before the TIP120) which worked previously using push buttons on a breadboard, it doesn't work, and returns a 0 in the serial monitor.

I've ruled out any problems in the external circuitry (i.e. receiving the wall power in a barrel jack, transistor, etc).
I don't see how it could be a programming issue.

Any ideas? I'm away from home right now but I can upload some pictures soon. I'll make a quick fritzing diagram and upload that as well.

Quick edit/note: Fritzing diagram included of my previous set up used a Mega2560 board. The shield is obviously mounted on an Uno, but the fundamentals of the set up are unchanged, i just have incorporated the buttons and LCD in a shield on top of an Uno instead.

I've attached my code below and the fritzing diagram of my original working setup, but my question is really just how come it sends a signal when nothing is hooked up, but when I put it before the transistor like I had my set up going previous with standalone buttons and an lcd display, it worked?

You do not appear to have the output pin set to Output by Pinmode, so it defaults to input.

Holy cow that's an embarassing oversight.

I love this place.

Thank you so much, I'll try it and get back to you!

You might kill the TIP120 without a kickback diode across the motor.
A 100n ceramic cap across the motor, to kill commutator hash, is also wise.
Leo…

I've got a diode across the motor/TIP!

Also, setting the pinmode as output didn't work out, unfortunately.

parker_adam:
Also, setting the pinmode as output didn’t work out, unfortunately.

Back to basics then, just do a sketch to simply turn that port/transistor on, delay , off etc and then add the button and lcd in stages until you find the bug.

parker_adam:
I've got a diode across the motor/TIP!

The motor (ok) or the TIP (wrong).
Does not show any diode in your Fritzing diagram.
Leo..

Wawa:
The motor (ok) or the TIP (wrong).
Does not show any diode in your Fritzing diagram.
Leo…

I have a 1N4001 diode right above the barrel jack in line with the motor.

ricky101:
Back to basics then, just do a sketch to simply turn that port/transistor on, delay , off etc and then add the button and lcd in stages until you find the bug.

I’ll keep fitzing around and double checking, I can’t really take apart the soldered together shield at this point, thanks!

The Fritzing doesn't seem to show a connection from the TIP120 emitter to Arduino's ground.

groundfungus:
The Fritzing doesn't seem to show a connection from the TIP120 emitter to Arduino's ground.

Oops, my bad. There is one in real life.
I need to remove that image, it's misleading as that is not the set up I'm using anymore.

Here is an updated fritzing and real life image, as well as updated code:

nvc_suite_v2_shield.ino (4.32 KB)

diode needs to go across the motor terminals.
motor-transistor-driver.jpg

Thanks, I'm poor at reading those diagrams, any suggestions on where exactly it would fit into my design?

CrossRoads:
diode needs to go across the motor terminals.

the OP showed it across the motor terminals in the first post.... Fritzing.... sigh.....

Alright, that did it! Only issue now is that I have to hold the "go" button to make the pump work.
I'm going to try to dive back into my code and figure that out.
Thank you!

parker_adam:
Thanks, I'm poor at reading those diagrams, any suggestions on where exactly it would fit into my design?

the diode is connected to the wires to the motor.
those wires connect to other things, but the diode goes on the motor or the motor wires,

Alright, I won't bore you with too much of the details, but I've changed my code to use analogWrite and integers 0 to 255 to change the pump speed (I was beginning to wonder why speeds of 1000,5000,10000 all were the same, it's because you can only write 0-255 using PWM on the Arduino Uno) and I've achieved a pump that runs at different speeds based on the integer in the analogWrite command. Stoked! Thanks for of your guys' help!