(2020-01-11, 08:58 AM)CapnKernel Wrote: [ -> ]The motor driver is a VNH5019 I bought online, which hasn't had any of the problems I found in the VNH20SP30s I've bought. I didn't need to change motor.ino.
I am working on making a pypilot by myself. I don't have any skills in eclectronics so I rely on CapnKernel's wiring diagram that is easier to understand than Sean's ones when you are a beginner
. Tks for that it is really helpful.
I have 2 questions :
first
Something is not clear about VNH5019 wiring.
According to the diagram and pictures, only INA, PWM, INB, VDD and GND are wired.
But if i look at Sean's code in motor.ino (lines 89 to 96) there is the wirerind deccription of the vnh2sp30 to the arduino. If i undestand well vnh2sp30 and VNH5019 are quite the same, at least in terms of code.
So the description is this one :
Code:
vnh2sp30 <-> arduino <-> CPC5001
+5V 5v
GND GND
EN D10
CS A1
INA D2
INB D3
PWM D9
Here it seems that CS INB and EN should be wired too.
Why this différence ?
CS INB and EN are optional ?
What are they suppose to do ?
Second
You said "I didn't need to change
motor.ino." . I guess that you have uncommented the folwing lines at least :
Code:
#define VNH2SP30 // defined if this board is used
#define DISABLE_TEMP_SENSE // if no temp sensors avoid errors
#define DISABLE_VOLTAGE_SENSE // if no voltage sense
#define DISABLE_RUDDER_SENSE // if no rudder sense
- Is the #define DISABLE_VOLTAGE_SENSE shoud really be uncommented ?
- Is there other settings that you had to do in the code ?
I am in a hurry to get my orders to start to work !
CS is current sense and is "optional" but you need some form of end of travel detection to prevent prolonged stalling
the other pins are required
(2020-12-14, 05:07 PM)seandepagnier Wrote: [ -> ]CS is current sense and is "optional" but you need some form of end of travel detection to prevent prolonged stalling
the other pins are required
Ok tks Sean.
And tks also for you geat job and sharing it.