Can't get two L298 modules to work on one Spider

The last big feature of the vehicle I’m working on requires another motor, and I’m attempting to do this with a second L298 module. Unfortunately, when I tell the module to drive the motor the appropriate LEDs light up but nothing happens. I have tried this both with the L298s having separate power sources (preferred) and with a single shared 9.6V power source. There’s voltage across the power-in pins, and there is a voltage change when the module is told to drive the motors but it’s only around 0.2V. Both of the two L298s work fine separately, as do the motors when I hook them directly to a power source

Any ideas what might be causing this? An old thread mentioned a known issue with FEZ only having two PWM timers but no resolution was given.

can you confirm in the scenario where you have multiple power sources that you have GNDs tied together? Can you also confirm you have tested the code, unchanged, on two different Gadgeteer sockets, one connected at each time, and they behave as you desire?

Tried using common ground, no difference, the meter registers only about 0.5V as before. Physically unplugging one of the L298s without changing code doesn’t make a difference, but disconnecting one in code (and disabling the relevant lines) seemingly does. I’ll try switching the sockets in code this weekend and see if that makes a difference.

One thing I forgot to clarify is that it’s only the second, new L298 I just added that won’t work; the first one still responds as expected. Swapping the two modules didn’t change things, i.e. socket 8 still worked and socket 11 didn’t.

Finally got a chance to do some more tests. I’ve created a sample project to make testing easier, it just spins all four motors in sequence. Changing which module connects to which port in code and physically swapping the two L298 boards made no difference–it’s always the same logical controller that refuses to behave. I hate leaving a problem unsolved but if there’s just nothing that would work I can get by with a relay module as the third motor only cares about on/off state, not speed. Retailers still have some of the 4-relay modules in stock.

You can find my test project here if you want to experiment: http://bogus.wswarren.com/games/MotorSequence.zip

Note that it’s NETMF 4.1 as that’s what my vehicle project is and I wanted to keep as close to that as possible. Incidentally, what’s the procedure for sharing code that leverages RLP? Just pull out the unlock key and throw an explicit exception saying your own key is needed? I do want to share my work when I’m through but array processing required some native code.

RLP in 4.2 doesn’t have unlock key so you minimise the risk of sharing something - but yes, sanitise it first so you aren’t losing that and post away.

I don’t have one of these modules so I can’t test, perhaps others are in a position to but I can’t sorry :frowning:

I played around with it some more, tried some more configurations, and wasn’t able to get anything to work. I wound up getting a 4x relay module which does what I need. Maybe I just have a bad Spider or L298.

When I tried these code, I did debug step by step and it is working fine, 4 motors is running as we wanted in our code.
Tested on SDK 4.1 - both 9.6V and 12V