OpenMarine

Full Version: pypilot wont turn left
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all

Im using Timo Birnscheins motor.ino to drive an IBT_2 with two 12V lamps connected to the  motor output. 

R_EN and L_EN are connected direct to 5vdc

When I rotate my compass cw one of the lights goes on, when I rotate the compass ccw the other lamp never goes on.

I can drive the ccw channel on the IBT-2 with the cw pwm wire, so I think the IBT-2 is ok

I can see on the scope that no pwm is being generated for the CCW turn.

There is no rudder sense input and I notice that MIN_RUDDER_FAULT shows in the flags a lot of the time.

How can I look at the pwm being sent from the pi to the nano?
hi, you might be wiring it wrong.

Could you use the latest motor.ino from github
https://github.com/pypilot/pypilot/blob/.../motor.ino

You probably should uncomment:
//#define VNH2SP30 // defined if this board is used

You would have to post your exact wiring to make sense of what is going on.
(2024-03-14, 01:51 AM)seandepagnier Wrote: [ -> ]hi,  you might be wiring it wrong.

Could you use the latest motor.ino from github
https://github.com/pypilot/pypilot/blob/.../motor.ino

You probably should uncomment:
//#define VNH2SP30 // defined if this board is used

You would have to post your exact wiring to make sense of what is going on.

I'll try the github code next.

I have

PI              NANO
8 TxD        0 Rx0
10 RxD      1 Tx1

NANO       IBT-2
D7             RPWM
D8             LPWM
5VDC        R_EN and L_EN

I have edited pins.h to ensure the original gpio pins werent damaged
  #define RPWM_PIN 8      // First PWM input to BTS7960 // Drives CCW
  #define LPWM_PIN 7      // Second PWM input to BTS7960 // Drives CW

I have edited config.h to disable all sensors
#define DISABLE_TEMP_SENSE    // if no temp sensors avoid errors
#define DISABLE_VOLTAGE_SENSE // if no voltage sense
#define DISABLE_CURRENT_SENSE // if no motor current sensor is installed or used
#define DISABLE_RUDDER_SENSE  // if no rudder sense
#define DISABLE_ENDSTOPS // if no endstops are installed we won't have a forward and reverse faults

Will try your original motor control code now
 Thanks for your time
Steve
i think its normally d9 and d10 that have pwm outputs