Evening all
For some years now I have been trying to get into robotics as I have always wanted to build an autobot. Was recently shown some automated lawn mowers which are contained inside a wired perimeter and wander around constantly and haphazardly. Couldn't help but think that a digital system could do the job much more cheaply (a decent sized auto mower can cost in excess of £10,000), more efficiently and more quickly.
From what I've read, the Arduino would be the ideal solution for this.
However, I'm a complete newcomer to robotics and the C family of languages, and when I sat down and drew this out, the project seemed quite daunting:
- Get (or build) some kind of small ATV capable of maintaining a reasonable straight line over reasonably rough terrain.
- Use an electric motor attached to a PWM to control speed.
- Another motor to control steering
- GPS system (inaccurate, I know, but this can be improved on)
- Google maps integration if poss
Whilst doing some reading on GPS, I've come across AOG (https://agopengps.jimdosite.com/) which seems to offer everything I need in one package. This guys has built a full automation system for tractors and it seems to tick all the boxes:
- Has relay controls so that you can turn motors on and off
- Motor control via PWM
- Simple GPS integration
- Full google maps integration so that you can draw a polygon around a field in google maps and import that into his software, thereby defining boundaries
- Autosteer
The problem I am having is that the help files and youtube videos, whilst good, all relate to different iterations of the software and I'm getting lost.
Is anyone here able to help?
Project design (right now)
- Chassis: a modified electric scooter
- Microprocessor: Arduino Uno (got a MEGA 2560 as a backup because I've already blown about £100 of boards experimenting with voltage)
- Both a Cytron MD10C motor controller and HN motor controller shield
- 12VDC UPS battery (22ah, plenty of juice)
- Car windscreen wiper motor (12VDC) to drive the steering
I've attached a basic schematic and the code for the autosteer which I am trying to get working first, but I cannot get the motor to run.
Just trying to bend my head around the code and , looking at this section:
//////////////////// *********** Motor drive connections **************888
//Connect ground only for cytron, Connect Ground and +5v for IBT2
//Dir1 for Cytron Dir, Both L and R enable for IBT2
#define DIR1_RL_ENABLE 4 //PD4
//PWM1 for Cytron PWM, Left PWM for IBT2
#define PWM1_LPWM 3 //PD3
//Not Connected for Cytron, Right PWM for IBT2
#define PWM2_RPWM 9 //D9
//--------------------------- Switch Input Pins ------------------------
#define STEERSW_PIN 6 //PD6
#define WORKSW_PIN 7 //PD7
#define REMOTE_PIN 8 //PB0
Does "PD" refer to Pin (digital?). I have attached PWM on the MC10C to Digital Pin ~3 and DIR to DP4. Can anything verify if this is correct?
Would really appreciate a couple of pointers, I have been banging my head off this for weeks!
Cheers ![]()
AutosteerPCBv2.ino (24.5 KB)



