Uno R4 Wifi and Seeed Grove Motor Controller Compatibility?

I’ve got a Uno R4 Wifi and a Grove I2C Motor Controller.

No matter what I do, I can’t seem to get the motor to output anything else than roughly 11-12V DC. I can successfully reverse the polarity of the motor (ie. pass a negative speed value) and see the LED on the board indicate that change, but the output voltage remains at a constant 11-12V regardless.

My understanding was that the voltage output would drop as I passed a lower integer value to the speed parameter on the Motor.speed() call. I’ve also tried calling Motor.stop(MOTOR1) and still see a voltage across the output.

A friend suggested that there might be a compatibility problem between the Motor Controller and the Uno R4 (as opposed to an earlier Uno eg R3) but it was a bit of a stab in the dark and I don’t have any earlier hardware to test with.

I’m using the library recommended and the source code in the guide on the Seeed wiki linked to above.

Hi James
Welcome.

How are you measuring this. This output should be pulses of full DC motor voltage, constant period but varying duty cycle or width. measuring with a DMM should in theory I suppose read the AVERAGE DC volts but depending on the actual meter could be anything. The only real way would be to use an oscilloscope which you probably don’t have.

Have you actually tried a DC motor?? You could be pleasantly surprised to find it may work.
Cheers Bob

Hi Bob,
I thought this board wasn’t PWM but did actually adjust the voltage on the outputs, so I was using a multimeter in DC mode.

I also would have thought that the board would cease to put out any voltage at all if I’ve called Motor.stop(MOTOR1).

I have tried a DC motor - two different model trains, both of which run at full speed on the track with the Motor output leads connected, regardless of the coded state of the Motor (stopped, an integer of 1, or an integer of 100, or anywhere in between).

Hi James
As I said I THINK you should read the AVERAGE DC value of a PWM signal.

I believe the output would be PWM but without actual looking I could not be certain. Unfortunately the product Wiki does not go into detail and all the work seems to be done in the library. All your UNO is doing is providing speed and direction information probably to the library thence via I2C to the driver board. Just where and how the signal conditioning is done I don’t know. Probably in the library. What is actually in the I2C signal I would not try to guess. You would have to sniff samples and decode the result to find out.

When you ask for a direction change does the output actually reverse polarity or is it unchanged. That would indicate the I2C bit is OK.

A bit I note and is only my opinion is the use of 4148 flyback diodes. That seems a bit light to me. The 4148 is rated as a small signal diode and has been around for centuries (formally 1N914) and is only rated reverse V 75 and forward current repetitive in the couple of hundred milliamp region.
I stress this is only my opinion.
Cheers Bob

1 Like

Hi James
Another thought. Check those flywheel diodes. There are 4 for each motor output, total 8. If one or more of these has failed short circuit this could give you the result you see. Do this with nothing connected to the driver board, no power UNO or motors.
Cheers Bob

Hi @James273910 ,

The L298P driver used on this board outputs a PWM signal to control the motor. This means to achieve an output voltage of say 6V from 12V input, it will pulse the 12V input on and off so that the average voltage over time is 6V. If you are able to record the voltage for a given instance of time, it would be either full voltage or nothing, as Bob has explained in his responses.

I would be doubtful that the differences between the Uno R4 and R3 would contribute to the issue you are experiencing. Could you share more details, if you know them, about the motors that you tested this with?

Hi Samuel

Also requires a PWM input. The device is a power H bridge controlled internally by gates.

Each channel has 3 inputs, Enable A (Enable B), IN 1 (3) and IN 2 (4). Inputs can be PWM or direction control with PWM applied to the Enable pin. The latter (PWM on Enable pin) is the usual. This method has disadvantages if very slow creeping of a motor is required from standstill. Can’t be done. Some years ago I submitted a post regarding this complete with explanatory oscilloscope screen shots but received very little interest so Ileft everyone to scratch their head over this themselves. It would be of interest if you can find it.

Looking at the Arduino demo sketch for this board it looks like everything is done in the library including I2C communication. All the user has to do is provide a speed number between 0 and 100 or 0 and -100 (for reverse) and somehow the magic happens. Not sure I like that idea somehow… BUT I am not the one going to use it.
Cheers Bob