I have beaten the deadline and produced a fully working Drome4All a week before the deadline (two deadlines in one sentence - terrible grammar but I'm tired and cannot be bothered to do any more thinking). It's been raining and blowing and I haven't been able to get into the garden much recently so I worked on my Dromes4All for the last couple of days and amazingly managed to create a fully working system. Sadly, I have only managed to create one Drome so I think it might be better to call it DromeOne. Additionally, it doesn't have any dome either so a better title is now DroneOne. Still a good title.
I had to create a whole new circuit to create the IR commands to control DroneOne. This was just a Nano, with five push button inputs (forwards, stop, backwards, left and right) and the IR transceiver, see the circuit below:
I soldered all this together using stripboard and ended up with the following, which for me is pretty tidy; and it works.
The programme for this controller is listed below. It is fairly straight forward, when a button is pressed it transmitted the first ASCII character of the command, so G for G, S for stop and so on. The main loop fragment is listed below. I have included the full listing at the end.
button = getbuttonpress();
} /* while */
The Drome itself has been improved with a 126x64 OLED display that I was planning to display a robot face graphic on. Sadly I didn't get around to that but it does show some text just to show it is working. The Robot Faces are only a few hours programming away.
I also added an IR transceiver module to the serial connections (Tx and Rx) with the final circuit for the Drome illustrated below:
I have included the fragment of the Drome programme below. It is a simple while loop that just waits for a command over the IR communication link and then executes it. It is nothing fancy, maybe I might do something more interesting at a later date. Maybe.
Dromecommand = getIRcommand();
IRvalue = getIRcommand();
IRvalue = getIRcommand();
} /* while */
Below is a video of the fully working (?) Drome. The Drome does seem to have some problems. It will go forwards and backwards but when commanded to turn left or right it only completes the command sporadically. It should turn for one second but sometimes it just does a short turn. My suspicion is that the motors are causing a dip in voltage which is creating a brown-out reset. It doesn't seem to happen when going forwards or backwards, so maybe there is a bigger demand on the motors due to inertia or momentum when turning. Who knows. I used a LiPo battery with a buck boost converter to try and overcome this motor inrush current problem but I do not think it has fully worked. Maybe I'll just stick a couple of Supercapacitors into the circuit (The Completely Useless Robot - But with Superca... | element14 | Cheer Us Up) and see if that works.
Having thought about it a bit I realised that when the Drome was lifted off it's wheels for testing purposes it worked correctly for left and right, as well as forwards and backwards so it may be that using metal hex spacers might have made the chassis heavier and hence requiring more motor current to get going. I'll have to try replacing the metal hex spacers with plastics one to see if this fixes the problem. So I just replaced 10 metal hex spacers with nylon ones and - now it doesn't work at all. There is some problem that I am not yet perceiving, most likely to be power supply related, it usually is when motors are involved. Never mind!
This has been a pretty fun project (apart from the frustrations with getting the IR transceiver to work). It is the best packaged project I think I have ever put together,, altohugh I still have some improvement to make in my ability in this area. I made a mobile robot which was almost what I set out to achieve, I learnt a great deal about the NEC IR trnsceiver module and finished before the deadline - well almost anyway.
Now it's time for tea!
PS The Element14 Blog wouldn't let me attach the two Arduino .INO files, not sure why as they are only text. If anyone wants the full listings I will add them to this Blog later.