2019-06-17, 05:26 PM
(This post was last modified: 2019-06-17, 05:29 PM by beholder77.)
(2019-06-17, 01:41 PM)skyeyedoc Wrote: Hello!
I'm really glad to read your notes, as I'm at the point where I need to find a motor-controller. The IBT_2 looks very promising! I just ordered one from Amazon for $12. I'd really like to know what modifications you made to motor.ino to make it work. And it would be great if you take notes and share them as you go through the debugging work.
My IMU is mounted on an AIS receiver hat, which in turn is on an RPi3B+. I'm thinking of positioning the motor controller mounted dry in the binnacle, and commanding it remotely via wifi. The RPi will be very dry, mounted at the pilot's station below decks.
I don't have a plan yet for how to command the motorcontroller, except that it will entail some kind of serial network tunnel via a discrete port with no other traffic on it. Also, some kind of handheld remote at the binnacle to bump it left or right: maybe a 315mHz type 4-button generic.
My motor is from an old Autohelm 3000, which this system will replace.
You are indeed a very salty sailor, and your English is fine. Thank you for sharing!
Thank you for kind words!
I've attached my motor.ino
https://drive.google.com/file/d/1DTk2Tne...sp=sharing
Most of changes was made in "position" function and was some kind of intuitive...
Here it is picture from IBT_2 description:
which means that IBT_2 needs R_EN and L_EN both HIGH level to make motor working.
and has sepparate PWM channels for each direction.
So, my wiring in accordance with changed motor.ino sketch:
IBT_2 ARDUINO
+5V 5v
GND GND
R_EN+L_EN D2
R_IS+L_IS A1 (with voltage divider)
L_PWM D9
R_PWM D10
One important note - according to BTS7960 datasheet CS (current sense) voltage in case of maximum values of current could be up to 7 volts, which is can be deadly for arduino, so i used voltage divider with 50k and 10k resitors
I am a not any kind of electronics pro, so please double check my solutions... They could be incorrect or not optimal at least.
Sorry, not able to attach motor.ino here, so i uploaded to google drive
https://drive.google.com/file/d/1DTk2Tne...sp=sharing