OpenMarine

Full Version: vnh20sp30
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
If I define VNH2SP30 in the latest motor.ino from github, the measured controller voltage goes down by a factor 4.7 (resulting in BAD VOLTAGE), but the controller temp goes up by a factor 2.6. If I undefine VNH2SP30, I get correct readings for both measures. My question: how can I use the pwm_style=2 modus without messing up or disabling my readings? Thx!

Background:
D4/shunt_sense is pulled low, D5/low_current and D12/voltage_sense are left open.

When I switched to the new motor.ino I had to set DIV_BOARD to 1 otherwise I would get a NO MOTOR CONTROLLER message (I could see RxD light but no TxD light on the nano). I don't think this is relevant but it might be anyway.
EDIT: as per 09-APR-2020 this is no longer a variable that needs to be set.


It also occurred to me that D10/enable_pin, while giving an output signal, was high-impedance when engaged. Changing line 627 of motor.ino to pinMode(enable_pin, OUTPUT); now gives me a nice 5V signal when engaged, not depending on the load. I think you might want to change this one.
This might come in useful when building your own motor controller https://youtu.be/kpq53e9755s
(2020-04-01, 08:42 PM)ironman Wrote: [ -> ]My question: how can I use the pwm_style=2 modus without messing up or disabling my readings? Thx!

Figured it out, I think: changing line 387*) of motor.ino to 

Quote:if(ratiometric_mode)

that is, dropping the 'pwm_style == 2' clause, returns the correct readings of controller_temp and controller voltage. I also checked controller current and that is ok as well.

*) EDIT: in the 09-APR-2020 version of motor.init this is line 430
Pages: 1 2 3 4