hi @all
i get a problem which i didn't understand. I attached the shield by stack it into the Arduino.
The Code is (i think the code is not the problem but only to show whats going on) from here:
http://www.x-sim.de/forum/viewtopic.php?f=37&t=943 (look for "Arduino Code")
So in simple words i have two potentiometer and if i draw them the lights for the direction change and everything is ok. But test the output voltage with a voltmeter and find that the input voltage is 12.84V and the output on both outputs 12.80V and if i change the direction its -12.80V (so plus and minus are changed which is correct) but on the other output pins its only -10.63V. Is this the normal way this Chips work or is there a problem with a resistor or something else which i didn't recognize.
Any suggestions before i buy a second one would be very nich.
thx in advance
hape
Can't understand your negative voltages - please measure w.r.t. ground or its confusing.
You don't indicate what load(s) you have.
Your shield has 2 large chips on board.
According to the schematics of the shield, there's not much between the Arduino and those chips.
There's a few resistors, but of course both sides are rated equally.
They should behave the same if controlled the same.
To test this, you could take the shield off the Arduino, and use wires to reconnect it.
Now test to see you get the same results.
If so, interchange the wires to D7 and D8.
And interchange the wires to D4 and D9 at the same time.
Now, if you try to control the direction of motor 1, you are actually controlling motor 2 and vice versa.
Does your problem still exist ?
You can also interchange the wires to D5 and D6, these are the speed control lines.
Does your problem still exist ?
And is it at the same output, or has it jumped to the other output ?
If the problem still exists and at the same output, then there might be something off with the shield.
If the problem shifts to an other output in either of the above tests, you've got a problem in either the sketch or the hardware of your Arduino.
When you are doing your measurements, is the multimeter the only connected device, or do you actually have some motors connected at the same time ?
If there are motors, are they the same build ?
hi @all
thx to Mas3. I have done what you said. That are the results:
MAS3:
If so, interchange the wires to D7 and D8.
And interchange the wires to D4 and D9 at the same time.Now, if you try to control the direction of motor 1, you are actually controlling motor 2 and vice versa.
Does your problem still exist ?
After that the behavior is exactly the same. So the motors are changed but on physically the same side is still the problem.
MAS3:
You can also interchange the wires to D5 and D6, these are the speed control lines.Does your problem still exist ?
And is it at the same output, or has it jumped to the other output ?If the problem still exists and at the same output, then there might be something off with the shield.
If the problem shifts to an other output in either of the above tests, you've got a problem in either the sketch or the hardware of your Arduino.
I have also done this (in the Arduino Code i have a small change to check the potentiometers by putting the results out to the serial monitor and they exactly change from 0 to 1023 which is correct) so there is also no change on behavior.
MAS3:
When you are doing your measurements, is the multimeter the only connected device, or do you actually have some motors connected at the same time ?
If there are motors, are they the same build ?
No there are no motors connected because i want to check it before i get errors which are complicated to search. So your and my conclusion is that there is a small damage of the shield. Do you agree?
thx for your help
hape
Don't try to measure voltage. The Arduino is outputting PWM which is a square wave. If you have a "duty cycle" option on your multimeter, you will get a better indication of the output. An oscilloscope can do this too.
Plug a load into it - an LED with resistor, a lamp or a motor. Then you will see the result you expect.
Voltages can be meaningless without a realistic load, as part of the time the outputs may be floating
and at the whim of the output device leakage current.
That's why i asked.
The above two answers are correct: you shouldn't measure voltage to PWM outputs (which is what the motor shields do, controlled by your Arduino), without a load.
You wanted to prevent additional components to complicate fault searching, but that is exactly what happens because you aren't putting a load to the outputs.
So put a load to the output, and then measure again.
Preferably two equal loads, so you can expect very similar or equal measurements.
MAS3:
That's why i asked.
The above two answers are correct: you shouldn't measure voltage to PWM outputs (which is what the motor shields do, controlled by your Arduino), without a load.
You wanted to prevent additional components to complicate fault searching, but that is exactly what happens because you aren't putting a load to the outputs.
So put a load to the output, and then measure again.
Preferably two equal loads, so you can expect very similar or equal measurements.
hi @all
as MAS3 says i will solder two dc motor (which are from same type etc. so almost the same) two the output and measure 1. the Volt again and 2. i take a look at the rotation speed which has to be almost the same at the same input. These i will do tomorrow so than i post the results. The thought which makes me sceptical is that there are 3 values out of 4 are correct and only 1 incorrect. But i give it a try and we will see what happens.
thx for your very nice help so far
hape
Any luck with this? I bought two units - one from a UK seller and one from the far east. Neither function correctly.
I faced exactly the same problem @hape did. Exactly the same voltages, one channel in CCW only about 10.6V.
I got my moto shield via eBay/from china. After a few emails with their technical support they send another one to me. I didn't arrived by now, if it's here I give a response if that one works.
HI, got the new one, but do not work either.
With that one I have problems on BOTH channels in CCW diretion (PWM=255, VCC=12,6V)
One channel is at 8V, the other one at 4V, no motor attached.
I think they got a faulty delivery of that VNH2SP30 chips.
I ordered it from a diferent store now, waiting to come.
sude:
...no motor attached.
What DID you connect ?
Did you read the comments about measuring voltage on an open terminal of such devices (meaning a PWM output) ?
Hi,
the problem is also present with load (1A DC motor).
Lower voltage in CCW direction.
Almost all MM's from cheap china shops are faulty, you have to order quite a few, get refund if broken ones. Never had a completely working one yet.
After i got my refund, i repaired them, usually bad chips and really bad solder jobs.
If i got 4 of them i usually end up with at least 2 working ones.