I’m using a pair of Arduino UNO’s for this project. For power, I’ve been using wall adaptors for both the transmitter and receiver boards. On the receiver side, I’m also using a 2A DC motor driver shield. What’s frustrating me is that this setup will work partially - I can engage / disengage the motors and get them to turn on / off (somewhat - read below). The stepper motor will work just fine, unless I start using the DC motors as well.
What’s going wrong:
I’ve been running into some problems with the unit just dropping radio communications if all 3 motors are in use at the same time. I’m assuming this is a power problem. Also, if I’m running the 2 DC motors (I’ve had a pair of 6V motors on for testing - I can’t get the 12V motors to work with the wall adaptor for power) sometimes they won’t start turning until I give them a little touch. Maybe I’m just doing something wrong with the coding to cause the glitch, but as I’m fairly new to this I was hoping someone could potentially point me in the right direction.
Once the radio communication has stopped, I can’t get it back. The goal of this is to drive a boat with a winch on it, and I’d hate to put all of this time and money into something only to watch it float away.
What I’m trying to get it to do:
- Use 2 x 12V DC motors to drive the unit forwards / reverse (Banebots RS-540 12V 16800 RPM 39.48 oz-in Brushed DC Motor)
- Have a 12V unipolar stepper motor act as a winch to raise / lower a weight (12V 0.4A 36oz-in Unipolar stepper motor)
- Communicate wirelessly via a pair of 2.4 ghz nRF24l01 + PA + LNA
On the transmitter side, I’m using 2 push buttons to engage / disengage the Left and Right DC motor to turn facilitate turning. I’m using 1 ps2 joystick to control both forward / reverse for the DC motors and to raise / lower the weight via the stepper motor via the X and Y values. Additionally, I have a 16x2 LCD screen hooked up to display information to the user.
I’ve read that soldering a capacitor to the nRF24l01 modules can help with power issues, but I still have yet to do this. Could this be the biggest cause of my issues? I tried to do it, but found out I’ll definitely need a stand to do this. First timer problems, I suppose.
This is my first project, and I’m fairly new to coding with Arduino boards (I’m a Chef by trade).
Thank you very much in advance!!
transmitterSketch_final.ino (3.63 KB)
receiverSketch_final.ino (5.25 KB)