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
Motor controller
#61
(2021-02-23, 06:44 PM)xfactor99 Wrote:
(2021-02-23, 04:48 PM)richarddaneel Wrote: Hi Andreas and CapnKernel

 OK, thanks. I have loaded motor.ino and find the following. When I power up the RPi with no nano all works fine but get error message no controller detected. When I plug in (USB) the nano I get the following error... over current, bad voltage, fault. Any ideas
Cheers
Richard


 I might be a bit naive but somewhere Sean said the motor controller can be connected directly to the TX and RX pins (or, via USB). Does this mean I can connect my motor controller (pololu jrk g2 21v3 and in picture) directly to RX/TX or do I still need to go via arduino nano as TinyPilot keeps saying no motor controller detected?
Many thanks
Richard

Hi Richard,

I use a Pololu (1367) G2 24V19 to drive my autopilot with the Tinypilot.: 

I reported in this thread: 
https://forum.openmarine.net/showthread.php?tid=1734.

So to awnser your question short:
I still use the nano. 
The file motor.ino for the nano  ist compiled/uploded  with the option PWM-Style=RC
The connection btw. nano and pololu is two wires nano Pin 9 (RC-PWM) to Pololu RC 
and Nano GND to Pololu GND.

I don´t remember well if you need to set up the pololu with the software it comes with it.
Maybe you shoud first connect power and motor to the pololu and move it with the software

This should basicly work. If you want you can attach end limit switches (verry recomendet) and volt, current sensors .....

Save sailing
Andreas
Reply
#62
(2021-02-24, 09:02 AM)richarddaneel Wrote:
(2021-02-23, 06:44 PM)xfactor99 Wrote:
(2021-02-23, 04:48 PM)richarddaneel Wrote: Hi Andreas and CapnKernel

 OK, thanks. I have loaded motor.ino and find the following. When I power up the RPi with no nano all works fine but get error message no controller detected. When I plug in (USB) the nano I get the following error... over current, bad voltage, fault. Any ideas
Cheers
Richard



Hi Richard,

that  show up as you have no sensors connected.

agein you can change the code in motor.ino

.......


[color=var(--color-text-primary)][color=var(--color-prettylights-syntax-comment)]//#define DISABLE_TEMP_SENSE    // if no temp sensors avoid errors
[/color]

[color=var(--color-text-primary)][color=var(--color-prettylights-syntax-comment)]//#define DISABLE_VOLTAGE_SENSE // if no voltage sense[/color][/color]

[color=var(--color-text-primary)][color=var(--color-prettylights-syntax-comment)]//#define DISABLE_RUDDER_SENSE  // if no rudder sense

[/color]
[/color]........

just delete the "//" before #define

Somwere there was also comented that you shoud connect the nano pins of the sensors to ground if you
don´t use them. I guess it wil work without grounding, but you should know for your final layout.

Greetings
Andreas


[/color]
Reply
#63
(2021-02-23, 07:39 PM)richarddaneel Wrote:
(2021-02-23, 06:44 PM)xfactor99 Wrote:
(2021-02-23, 04:48 PM)richarddaneel Wrote: Hi Richard,

I use a Pololu (1367) G2 24V19 to drive my autopilot with the Tinypilot.: 

I reported in this thread: 
https://forum.openmarine.net/showthread.php?tid=1734.

So to awnser your question short:
I still use the nano. 
The file motor.ino for the nano  ist compiled/uploded  with the option PWM-Style=RC
The connection btw. nano and pololu is two wires nano Pin 9 (RC-PWM) to Pololu RC 
and Nano GND to Pololu GND.

I don´t remember well if you need to set up the pololu with the software it comes with it.
Maybe you shoud first connect power and motor to the pololu and move it with the software

This should basicly work. If you want you can attach end limit switches (verry recomendet) and volt, current sensors .....

Save sailing
Andreas
Hi Andreas
I now see I have another problem. I have got the older version of Pololu controller with NO RC pin see picture, I might have a problem.
Cheers
Richard


Attached Files Image(s)
   
Reply
#64
(2021-02-24, 09:15 AM)richarddaneel Wrote:
(2021-02-23, 07:39 PM)richarddaneel Wrote:
(2021-02-23, 06:44 PM)xfactor99 Wrote:
(2021-02-23, 04:48 PM)richarddaneel Wrote: Hi Richard,

I use a Pololu (1367) G2 24V19 to drive my autopilot with the Tinypilot.: 

I reported in this thread: 
https://forum.openmarine.net/showthread.php?tid=1734.

So to awnser your question short:
I still use the nano. 
The file motor.ino for the nano  ist compiled/uploded  with the option PWM-Style=RC
The connection btw. nano and pololu is two wires nano Pin 9 (RC-PWM) to Pololu RC 
and Nano GND to Pololu GND.

I don´t remember well if you need to set up the pololu with the software it comes with it.
Maybe you shoud first connect power and motor to the pololu and move it with the software

This should basicly work. If you want you can attach end limit switches (verry recomendet) and volt, current sensors .....

Save sailing
Andreas
Hi Andreas
I now see I have another problem. I have got the older version of Pololu controller with NO RC pin see picture, I might have a problem.
Cheers
Richard

Hi Richard, 

sorry about that.
so I don´t know about that pololu and how to drive it. 
In the first picture you posted there was an RC pin ....

In my first test setup I worked first with LED. 
and after with a simple h-Bridge consisting of cheap chinese relay .... to move the motor. (changing motor.ino and the correct pins as described in the comments of the code)

Save sailing
Andreas
Reply
#65
(2021-02-24, 09:31 AM)xfactor99 Wrote:
(2021-02-24, 09:15 AM)richarddaneel Wrote:
(2021-02-23, 07:39 PM)richarddaneel Wrote:
(2021-02-23, 06:44 PM)xfactor99 Wrote:
(2021-02-23, 04:48 PM)richarddaneel Wrote: Hi Richard,

I use a Pololu (1367) G2 24V19 to drive my autopilot with the Tinypilot.: 

I reported in this thread: 
https://forum.openmarine.net/showthread.php?tid=1734.

So to awnser your question short:
I still use the nano. 
The file motor.ino for the nano  ist compiled/uploded  with the option PWM-Style=RC
The connection btw. nano and pololu is two wires nano Pin 9 (RC-PWM) to Pololu RC 
and Nano GND to Pololu GND.

I don´t remember well if you need to set up the pololu with the software it comes with it.
Maybe you shoud first connect power and motor to the pololu and move it with the software

This should basicly work. If you want you can attach end limit switches (verry recomendet) and volt, current sensors .....

Save sailing
Andreas
Hi Andreas
I now see I have another problem. I have got the older version of Pololu controller with NO RC pin see picture, I might have a problem.
Cheers
Richard

Hi Richard, 

sorry about that.
so I don´t know about that pololu and how to drive it. 
In the first picture you posted there was an RC pin ....

In my first test setup I worked first with LED. 
and after with a simple h-Bridge consisting of cheap chinese relay .... to move the motor. (changing motor.ino and the correct pins as described in the comments of the code)

Save sailing
Andreas
Thanks Andreas, I will have to buy the correct unit (VNH5019) and try with that. Can I ask you, when the IMU is flat on my table it is very accurate however, if I pitch and roll the IMU while keeping the direction constant the direction changes a lot. So if I am in a rolling sea the values will change a lot, is this normal?
cheers Richard
Reply
#66
Hi Guys and Sean
 
Sean in your youtube video you connected your IMU and motor controller directly to RPi and it worked so my question is, if I have Openplotter running on RPi4 and have the IMU set-up and I have the pololu (picture) motor controller with TX/RX (USB) do I still need the nano with motor.ino


Attached Files Image(s)
   
Reply
#67
You need an arduino or a driver because pypilot does not speak the protocol on the uart of this particular motor controller device whatever it uses.
Reply
#68
(2021-02-24, 02:52 PM)richarddaneel Wrote: Hi Guys and Sean
 
Sean in your youtube video you connected your IMU and motor controller directly to RPi and it worked so my question is, if I have Openplotter running on RPi4 and have the IMU set-up and I have the pololu (picture) motor controller with TX/RX (USB) do I still need the nano with motor.ino

Just my take on this.  Why not just buy a motor controller from sean? Start with a working system and if you want to experiment with other options no worries you’ve got one working.
Reply
#69
Hi CapnKernel
Sorry for the hassle but please help. How do I get my system to lock onto a bearing. The IMU bearing changes as I rotate the unit but How do I get it to actually lock onto the bearing I want to travel in. Also, in the picture (attached) you have your unit in Standby mode how did you get this as I can not seem to find this. Lastly, how do I get my system to make use of the GPS bearing. When I choose GPS mode I get a G symbol in a box on my screen but when I turn the IMU the bearing changes which means it has not locked onto the GPS bearing. Cheers
Richard


Attached Files Image(s)
   
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)