ArduRover basic config (GPS and L298N brushed motor driver)

You aren’t using my script. That’s the output from the old one.

Hi Yuri

You are absolutely correct.I do not know how that happened.
Does it matter what the name of the LUA file is?

The one I uploaded is from here ``` ardupilot/libraries/AP_Scripting/applets/rover-l298n.lua at rover-l298n-driver · yuri-rage/ardupilot · GitHub ``

And named rover-l298n.lua

Can I connect with USB if the LiPo battery is connected? I could not do that with the Pixhawk as I was told that the Pixhawk will fry itself if you do that?

Can the Metaksys autopilot be synchronized with the GPS time?

I have checked all the parameters and they are all correct.
I have also checked the wiring and it is fine

There is a 3D GPS Fix

The autopilot is armed but the motors do not want to respond

I went out to receive a parcel from the couriers and when I came back in the motors were running, I left everything on

Okay this is all weird now. The motors start running on their own. If I click on test all motors they stop for a second or 2 and then start up again. If I click on Stop all motors the start up again. When I click on any of the individual Test motor buttons there is no response from the motors but the blue LED flashes

My apologies but I have no answers

Thank you

Hello Yuri

Everything has been reset to default and the parameters redone from scratch. Reformatted the SD card and reloaded your script file rover-l298n-driver.lua.

Relay and Servo parameters are according to your parameters as described in your document Rover L298N Motor Driver, with the only exception the pin numbers for the relays which are 56, 57, 58 and 59 respectively for relays 1, 2, 3 and 4 that relates to Servo’s 7, 8, 9 and 10

The accelerometer and compass were re-calibrated

An additional earth from the autopilot to the L298n was installed as well as the 4v5 from the Matek to the L298N

Modes can be changed from Manual to Auto or Guided.

It is creating LOGS

There are no fail safe messages and the autopilot can be armed and disarmed without any problem.

There are only two issues now is that it is not possible to test the motors using the motor test function and secondly the telemetry radios do not want to connect. The telemetry radio is connected to TELEM1 with RX to TX, TX to RX, CTS to CTS, RTS to RTS, GND to GND and then 5V from the autopilot to the 5V pin on the radio. The other radio is connected to the PC using USB

The autopilot is armed and there is a GPS 3D lock.

The autopilot was rebooted and now the motors startup when I arm the autopilot and stop when I disarm

Thank you again for everything you have done

Good day Geo

If the autopilot is powered from a LiPo battery, could I connect to it using a USB cable?

I was warned not to do so with the Pixhawk as it apparently get fried when you have it connected via USB and the connect the LiPo battery, the same when you connect the USB after connecting the LiPo battery.

I just want to make sure and don’t want to fry the new autopilot.

Thank you in advance

It should be fine, the 4.5v rail is behind a diode. The only thing you have to watch out for with the h743 chips is that if you undervolt them or have the voltage come up too slowly like if you added a big capacitor on the 5v rail it can cause the memory to get corrupted. So I normally connect the battery first to make sure the power is stable then connect the USB so I wasn’t trying to run the flight controller/GPS/receiver just from the USB port potentially causing an undervolt situation if it had a bad connection or long cable.

Thank you very much, I still have a lot to learn about autopilots.

One of the problems are that when you do initial research the de-facto autopilot in the Ardupilot documentation is the Pixhawk.

I now have a different view and will come here and ask my questions before reading the documentation that just leads to confusion. The replies and advise received here you cannot get reading the documentation.

Everything is also aimed at RC which is not what I am interested in. When the project was started everything purchased was RC and besides being costly was not easily obtainable locally.

Due to the expensive and somewhat restrictive nature of RC binding you to specific makes and protocols the decision was made to steer away from RC.

At one stage I used a Beagle Bone Blue and a Raspberry Pi with Ardopilot installed but could not get them to work properly.

This led to the purchase of the first Pixhawk and eventually to the Matek autopilot.

The knowledge of people like Yuri, yourself and others on here is what people like myself need to make projects like mine a success.

Gone are the days when all we had was a library, the internet is extremely powerful in this respect

Thank you again for your advise, not always fully understood until someone points out what to look for

Hi Geo

Is it possible to upload a mission to the autopilot and automatically have it started after powering up the rover and autopilot?

I think the issue is your servo reverse settings. The script makes use of that parameter to control motor direction. That’s why you see it sometimes on the servo output screen.

Boot the autopilot. Do not arm. Change the SERVO1 and SERVO3 reverse parameters back to zero using the full parameter list. Reboot.

No, the script filename doesn’t matter (other than that it ends in .lua). But if you’re using the wrong one, I can’t help you. Also be sure that the old one is deleted from the scripts directory.

Your questions first, documentation later philosophy is backwards.

While you may be disinterested in RC control, you really ought to have it as a backup and for configuration. You seem to be of a mindset that as soon as you get a GPS fix and operational motors, you’ll be able to just upload waypoints and send it on its way. I’ve mentioned multiple times that you need to tune first. RC is extremely helpful during the tuning process (and frankly, almost required for a new user, since the alternative requires some experience).

Thank you

The reverse setting are both zero

I am not disinterested in radio. The situation is that the rover must not be radio controlled.

I have bought a couple of radios and have a Spektrum SLT 3 with a SR315 that I can use for tuning. I just have never used a radio and could not get it to work with the Pixhawk.

I could get it to work on the Matek if it will work on it, do you think it will be helpful to tune as you are suggesting?

The biggest problem with the whole RC thing is if you go and chat to one of the RC shop people around here they want to sell you something else and don’t offer any real solutions. The first thing they tell you as that you need ESC’s and brush-less motors with hectic LiPo batteries. After speaking to a few of them I just gave up on the local RC crowd

The most to the point advise I have received is on here from you and the people here.

A 3 channel radio is all but useless for this application, and Spektrum receivers require the SRXL2 protocol (or a satellite telemetry receiver, with a single DSM/DSM2 3-wire connection) which I don’t see in the manual for your chosen receiver.

Okay makes sense

What radio do you suggest? I bought this one on the advise of one of the RC shop owners
What I cannot understand is that every time I access the autopilot it has a different message, now after having looked at the Servo reverse settings and rebooting it, it says Unhealthy AHRS and EKF variance with a EKF fail safe

I do have a set of 3DR telemetry radios but for some reason they connect but then disconnect with a " no heartbeat" message

If your shop deals in Spektrum hardware, the DX6e and a satellite receiver are the easiest path forward. I have similar and use it on small projects sometimes.

Hopefully you can return what you have for credit.


As to the rest of your latest questions, deal with one problem at a time. Right now you need to get the motors working.

Thank you

Had a look at the radio you are suggesting and it is out of my price range

Could you possibly suggest an alternative?

I don’t think they will give me credit for the radio, I will find somebody who will be able to use it and donate it to them

When i arm the autopilot now the motors start running by themselves

Will this one work?

FlySky FS-i6X Transmitter and Receiver Set

The cheapest radios I can recommend are the Radiomaster Pocket or Zorro with the ExpressLRS protocol built in. Compatible ExpressLRS receivers are about $20 US.

Yes. It looks like that receiver supports PPM/S.Bus on Ch1, so that should do, and it’s cheaper than my recommendation.

I can’t fully recommend that hardware for someone looking to really explore this hobby/profession, but it’s good for a temporary solution and low budget. It SHOULD hopefully be a little easier to configure than my ExpressLRS recommendation above.

Thank you very much

I am not looking at exploring this as a hobby or profession.

All I want to do is to get the rover working, navigate 3 different courses. The first one where I reside consisting of 9 survey markers and the 2 at the university campus each consisting of 6 markers.

Once that is done successfully there might be other uses for something like this and as I mentioned the brief is that the vehicle must be autonomous and not radio controlled.

There are no SLAM or any other sensors on the rover and the areas it is supposed to navigate for the experiment are flat and have no obstructions

If that makes sense.

I think that RC rig will work for what you need.

Okay let me order it

I have ordered the radio

I armed the autopilot but the motors does not want to respond

It disarms itself after a few seconds