My L298 Hbridge attacks my PCA9685 servo board

I'm new to the forum. I'm sorry if my Fritzing image is uploaded incorrectly!

This is for an N-scale train, with four track blocks powered by two L298N
H bridge modules. An Uno R3 automates the movements, sending direction controls to the H bridges via I2C sent to an MCP23017 GPIO chip. The PWM for the H bridges comes from the 12 bit 16 channel servo board by Adafruit, running on a PCA9685 chip, also controlled through I2C from the Uno.
The arrangement works fine for hours then poof, the servoboard produces negligible voltage on the PWM pins. The servos still work, but I'm guessing that's because they care about the microseconds, not the voltage. The servo voltage pin still puts out 6 V.
Replacing the servoboard fixes the problem for a few hours.
Once the Uno also fried and needed replacing.

I'm afraid to use the Uno to send the PWM to the H bridge for fear the same thing will happen to it.

I can only guess the H bridge is sending some juice back where it shouldn't. Do I need resistors? Diodes?
Thanks in advance!!!
Mark.

Forgot to say, I2C resistors are 4.7k

Can you post a schematic instead of the breadboard diagram? It would be much clearer, with the pin names visible and so on, for the forum to check for errors. Switch to Schematic view in Fritzing and re-draw the connections (Fritzing will help you by indicating the connections you already made in Breadboard view). Use lots of GND, 5V, 12V symbols in the schematic to make it easy to follow and avoid criss-crossing connections.

Can't see them in your diagrams...

What's the difference between the two diagrams you posted?

Right. There is a whole lot missing from this post. I think not only a schematic of the digital equipment, but also we should see how it is connected to the tracks (a second diagram, maybe?).

Look at your Fritzing. See the breadboard with the IC? What does the faint identification on it say? What is pin 3? Or, any pin? Where are the servos? How is it powered? See the problem?

None of that would matter, if it worked. But it doesn't.

Hi, @mmollen1
Welcome to the forum.

Can we please have a circuit diagram?
An image of a hand drawn schematic will be fine, include ALL power supplies, component names and pin labels.

Thanks... Tom... :smiley: :+1: :coffee: :australia:

  1. A schematic. For many reasons. Including, some of us are colourblind, so fritzing is even more X^&* useless for us.

  2. The schematic needn't be a thesis - a sketch on an envelope, take a picture of it, post it in a message. That's all it takes. We'll ask supplemental questions if you don't get it all right, but it's a huge step forward.

  3. Posting your code isn't necessary, yet, but it will also serve to demonstrate your level of knowledge to the helpers here, so you'll get much more helpful guidance.

  4. Please do all of the above. However, your problem starts with powering anything with the 5V output from the Uno. If I read the fritzing correctly (see above), you're powering the PCA board from the Uno, including it's servos. No. Don't do that.

Another MR

Thanks all! I appreciate your coaching--I didn't realize somehow that a Fritzing diagram was not a schematic. I hope this helps.

I'll probably need to study the guidelines for formatting code, and figure out which part to send, if it comes to that. i'll wait to hear from you.

Thanks Again!

These are links to the chip datasheets.
The L298 connect to the electrically isolated track blocks via 40cm and 60 cm wires, respectively
Another L298, wired in a similar fashion, is not shown on the schematic.

L295 ground must be connected to your 23017 GND, which must connect to your Uno ground.
Your Uno can be powered from a 5V source, through the 5V pin. Set the Buck that's feeding Vin to 5V. Then you can use that same 5V rail to power the 23017 and PCA9685.

Right. I don't know why i have the Uno power coming in at 9v--why make the voltage regulattor work any harder than it needs to? I'll turn it down to 5V. It already goes to Vin.

I looked at my diagram again. I left off the connection between the 11V buck and the breadboard (and therefore the 2017, the 9685, and the Uno).

The Uno ground goes to the breadboard rail, which feeds the 23017 at pin10 (Vss) per various youtubes and lady_ada's instructions. The 11V buck feeds the 298, and its ground splits between the 298 and the breadboard. The 9685 also gets ground from the breadboard.

Updated to reflect the ground path from 11V 2596 to Uno, decreased voltage in 2596 that feeds the UNO.

No. Do not try to give Vin any less than whatever the min spec is for your Arduino - 7V would be okay. It is upstream of a regulator that outputs 5V, so needs more than that.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.