0

I bought 2 new VNH2SP30 Motor Drivers because i thought the first one was broken but they are both giving me the same issue, they run in forward direction but not reverse...

When the motor is unplugged the forward led is bright green, when the code executes the reverse direction, the reverse led is lit very dimly and multi meter measures no voltage.

I have tried:

  • changing power source and voltage

  • using different cables and pins

  • using different motors

  • using different code

  • using different VNH2SP30 Motor Driver

  • using different arduino

here is the code:

  #define INA 5 // outputs arduino
 #define INB 7 
 #define EN 8
 #define PWM 11

 int motorSpeed = 255 ;  // motor speed

 void setup ( ) {
  pinMode ( INA , OUTPUT ) ; 
  pinMode ( INB , OUTPUT ) ; 
  pinMode ( EN , OUTPUT ) ; 

  digitalWrite ( EN , HIGH ) ;
 }

 void loop ( )
 {
  digitalWrite ( INA , LOW ) ;  // turn the motor in one direction
  digitalWrite ( INB , HIGH ) ; 
  analogWrite ( PWM , motorSpeed ) ; 
  delay ( 1000 ) ;

  digitalWrite ( INA , HIGH ) ;  // turn the engine in the opposite direction
  digitalWrite ( INB , LOW ) ;
  analogWrite ( PWM , motorSpeed ) ; 
  delay ( 1000 ) ;

  digitalWrite ( EN , LOW ) ;  // turn off
  delay ( 1000 ) ;
  digitalWrite ( EN , HIGH ) ;

 } 

Heres the wire diagram but my outputs are just on different pins.

enter image description here

  • posting an incorrect wiring diagram is pointless – jsotola Mar 15 at 6:20
  • documentation on the web indicates that there are two EN pins – jsotola Mar 15 at 6:24
  • there are two variations of this driver, there is another that drivers 2 motors, this drives only one – Mark Markrowave Charlton Mar 15 at 6:48
0

There appears to be quite a few faulty drivers such as this one currently on Aliexpress. Of the 4 I have bought, only one works - the other three function exactly as you described. Same program, same motor, same control wiring as the one which works. I can only suggest try to buy from a different seller on ebay or ali; or of course pay top dollar for a chip from a reputable source.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.