Voltage Issue with Dual L298 ICs wired to Raspberry Pi

Steve Peart

Sep 16, 2015
53
Joined
Sep 16, 2015
Messages
53
Hello people,

This is my first post here, so bear with me as I don't know the protocols and things you might need from me in order to get help with my circuit.

Project:
I am building an RC Tank with a turret that will fire nerf bullets. It uses a Raspberry Pi with a WiFi dongle in the USB port. The raspberry pi is configured to be a wifi hotspot, running a nodejs app that will deliver a web page to my phone with the controls to operate the tank. The controls use a socket.io connection to deliver the position of the controls in order to calculate the relative percentages of drive on both sides of the tank, as well as turret rotation, pitch, and firing the gun.

Problem:
In order to drive the motors with enough current (that the RPi cannot deliver on it's own), I needed a motor controller board. I originally purchased an L298N Board online, which I got wired up properly and the tank was able to drive around just fine.

When I got to the turret, I realized that I needed another motor controller for the turret rotation motor, given that the board I had was completely used up because it supports only two motor outputs, now I needed 3 outputs.

Due to space limitations on the tank, there was just no place to fit another one of the controller boards I bought online, So I decided to just buy the chips and a proto-board and wire them together the way I needed it with the same amount of space as just one of the other controller boards. I got in deep with the L298 data sheet and made sure I was wiring things up to spec.

The Voltage Supply I am using is a LiPo 7.4 volt 2100mah hobby battery, which is wired in parallel to both motor controllers. I wired the 3.3V pin out of the RPi directly to the 3 enable pins I need from the 2 L298s so as to have them just enabled at all times. I have tested continuity between all parts of the circuit and it's fine there.

The main problem is that when I hooked things up and enabled the pin that should make the motor start spinning, nothing happened. I measured the voltage coming out of the pin when enabled and it's correct at 3.3V, but when I measure the voltage coming through the RC Battery to the circuit, it comes in around 2.5V instead of the expected 7.4V.

I am not sure how to debug this since I'm pretty new to the electronics game, coming from a software background. What could be causing this battery voltage drop? Does each L298 need it's own battery source? There are no motors currently plugged in to the other 2 connectors so I wouldn't think it would be drawing and current/voltage away from the circuit like this.

Any clues from this description of what I might be doing wrong?

Sorry for the long story, but any help would be awesome, let me know as well if you would like to know anything else about the setup.

Thanks!
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Hi Steve. A few things to start with. If the battery can supply enough energy for two motors and when you disconnect them and try your new circuit with one motor it fails then either:

1) The motor is too powerful for the driver (You didn't say it was the same motor as the others).
2) The motor load is too great which is loading the battery too much.
3) You have too much resistance between the drive and motor.
4) You have a wiring fault somewhere
5) The battery is flat.
6) The motor is faulty.

Things to try. Try driving one of the other motors with the new circuit. Disconnect the turret motor and connect a low value resistor say 10R 10W or similar load across the drive output and measure the voltage and see if it's any higher.

Post some pictures of the circuit and connections you have made.
Thanks
Adam
 

Steve Peart

Sep 16, 2015
53
Joined
Sep 16, 2015
Messages
53
Here are the photos of the board I took, I also re-constructed this circuit on my breadboard and it worked fine, re-tested that the voltages from the RPi matched what was expected. Pardon the really bad soldering job, I screwed it up three times and took it apart before I ordered the copper tape that made making the connections much easier.

This is the board from the front:
20150917_132850.jpg

Here's the board from the back, for orientation, the RPi ribbon connector pins are the 2 rows at the top:
20150917_132905.jpg
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Last edited by a moderator:

Steve Peart

Sep 16, 2015
53
Joined
Sep 16, 2015
Messages
53
Nooooooo! I am saddened. I thought I was really close. I do have some protoboard from another project that has no metal, just holes, which I could use with the copper tape creating a pretty clean looking board, but it's a lot of work for me given my n00b level. I guess I'll have to poke at this a bit more and resolve to re-doing it if nothing else works.
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Nooooooo! I am saddened. I thought I was really close. I do have some protoboard from another project that has no metal, just holes, which I could use with the copper tape creating a pretty clean looking board, but it's a lot of work for me given my n00b level. I guess I'll have to poke at this a bit more and resolve to re-doing it if nothing else works.

Sorry Steve, I didn't mean to upset you. I personally find Veroboard better for me. Perhaps other beginners can give their opinion on this rather than an old grouch like me :)
Adam
 
Last edited by a moderator:

Old Steve

Jul 23, 2015
734
Joined
Jul 23, 2015
Messages
734
Hi Steve, I'm with Adam, I'm afraid. I don't think that type of board is very suitable either. That copper tape is a recipe for disaster, too. I'd also recommend Veroboard. Besides other considerations, it's better to work with and the tracks won't lift off the board while soldering, as I can see has happened to the pads with your current board.

Also, have you considered plug-in breadboards for prototyping? Once you have a circuit working exactly how you want it to, it's then easy to build the final version on the Veroboard, working from your breadboard prototype.

Breadboard.JPG


... Another grouch
 
Last edited:

Steve Peart

Sep 16, 2015
53
Joined
Sep 16, 2015
Messages
53
I do have that and did prototype the circuit with a breadboard, and everything worked. The problem is that I started with that board using wires to make the connections, but it didn't work, and became a nightmare to debug because of the flurry of wires all over the place and relatively poor soldering skills. That failing, I removed all the wires and gave the copper tape a try. It went MUCH more smoothly with the tape, and my continuity checks all went fine, but it still didn't work. After this post I have since re-prototyped the circuit on the breadboard and it worked again. I'm pretty tight on cash so since I have the blank protoboard left over from another project, and it actually has no metal on it, just holes, that I will lay it out with the copper tape. With this it can be flat and not wrinkled on top of old solder bubbles, and not run the chance of overlapping the copper tape over some other connection and causing these issues.

I actually started this last night with the de-soldering of some of the components I need from the other board, primarily the raspberry pi cable connector, so perhaps this weekend I can get it going. I will report back though, once I have a new thing going.

I appreciate your guys' help on this. Next time I will likely purchase the Veroboard you are recommending. Since you're saying it should be a lot easier.
 
Top