Home Contents Start Prev 1 2 3 4 5 6 7 8 9 Next

Test Runs

The batteryMonitoring part of the code was disabled (as some hardware had yet to be built) and the mower was taken into the garden for a test run. My 5 year old is very excited building this robot and has suggested it needs painting and must have googley eyes. Obviously these are of upmost importance so I need to get the basic structure working first or it will be very disappointing!

I had removed the switch debouncing from the code as it added latency and I wanted the mower to react the moment when it hit something. I thought this was a safer option although it might mean false triggering in long grass.

The first test was to make sure the navigation was working as expected. I disabled the cutting motor for these tests and found it worked very well, chugging along and turning away whenever it hit an obstacle. The mower did not seem to get caught up in any corners as I thought it may so there may be no need to add any further randomness to its movement. It did get stuck in some large holes left over from some overzealous weeding but there is not really much I can do about that. So all looked good but I did think I may need a higher bump sensor in case it scoots under something. I may see about utilizing the googley eyes for this.

The cutting motor was then switched on and the test repeated. The mower then took on a different personality, spending a lot of time in reverse and randomly turning when on open ground. It was not behaving at all as expected and I put this down to voltage spikes on the power supply. The arduino and motors do share the same 12V supply, and more importantly, the earth. Although I have suppression capacitors across the motor terminals, I think it will be necessary to take some extra precautions.

Back to the Lab

Test run #1 showed I had more work to do. I need to isolate what is causing the arduino to lose its mind. Things to try:

  • Extra capacitors between motor terminals and case.
  • Replace all motor wires by twisted pairs.
  • Add extra reservoir capacitors across the supply.
  • Reroute and/or shorten any wires. Maybe use screened wire.
  • Try and isolate electronics supply from motor drive supply.
  • Possibly screen the cutting motor.

Some of these measures are a quick hit, some involve radical redesign and moving of modules around which I would rather avoid. I tried to route all the wires into the waterproof enclosure through one opening (sensors + driver motors) in order to minimize water ingress and make the hinging of the enclosure simple. However, I think the extra lengths of some cables to reach the opening may be acting as aerials to pick up the cutter mower noise. I'll try and clean the supply up first and then deal with any RF pickup.

I tried most of the measures above with little success. Eventually I started taking parts of the system away until I isolated the problem. Interestingly, it appeared that it was not a power supply problem, but RF pickup. Once I had stripped most of the wiring away, and even used a separate supply to the arduino, I still found I was having false triggering. It appeared that the wires from the microswitches were picking up noise and passing that into the arduino inputs which cause it to go haywire. I was using 10k pulldown resistors so I tried reducing these to 1k so they were a 'stiffer' ground. No joy. I then found that putting a capacitor across the microswitch contacts did not solve the problem but helped considerably. So in the end I straddled the 10k pulldown resistors with 0.1uF capacitors which removed the offending pickup. I think the lesson learned here is that inputs from sensors need to come in via screened wire but as I did not have any, the capacitor solution would have to do. While I was in there with a soldering iron, I added a 100uF capacitor across the 5v line as well as extra suppression capacitors on the motor itself. The extra capacitors are shown in the photo of the distribution board. Note also the potential divider used to bring the battery voltage range down within the 5v range of the arduino.

dist2

Test Run #2

With this hurdle behind me, it is time for another 'field' test, this time with the blades turning. Once this is successful, I'll add the relay switch for the blades and then build the battery monitoring circuit. I've left this until last as it will contain the on/off switch and charging inputs and I need the structure of the mower to be finalized first.

It works ! On short grass, it trundles around as planned. On slightly longer grass, it pushes through and occasionally stops and turns as it hits a grassy tuft. This is still acceptable, the mow pattern just becomes different.


Home Contents Start Prev 1 2 3 4 5 6 7 8 9 Next