This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pypilot wont turn left
#1
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?
Reply
#2
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.
Reply
#3
(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
Reply
#4
i think its normally d9 and d10 that have pwm outputs
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)