It is now over half way through the 24 hours for my Tiny Mobile Robot and I have a sort of working prototype.
I 3D printed a cylinder slightly wider than the widest part of the two motors which also had a mounting bar at the bottom. I very carefully used self-tapping screws to fix the motor unit to the mounting bar. It is stable but could easily break if knocked - so hopefully I will not knock it. I have programmed the Arduino Nano to simply move both wheels together so that the whole mobile robot moves backwards and forwards in a straight line as I need repeatability while I stuff everything inside the cylinder. As it is a mobile robot it needed to have some sort of sensor and as I had a HC-SR04 ultrasonic distance sensor I decided to use that. The HC-SR04 is a simple to use sensor as all you need to do is to add power, a trigger signal of at least 10 microseconds length and then measure the length in time of the echo pulse detected. Dividing the length of the detected echo by 58 converts time into distance in centimetres. At the moment it is not making use of the data from the sensor but it is all working, see below:
There is a great deal of wheel slip as the batteries are quite heavy and it really needs elastic bands for tyres, but unfortunately I do not have any. I will see about using AAA instead of AA batteries later and see about fitting everything into the cylinder. I have also 3D printed a top for the cylinder so that I should be able to mount the ultrasonic rangefinder to that. I don't think it is going to look as good as I had hoped, nor is it going to be as tiny as I originally planned. Maybe I should call it the not quite so tiny mobile robot.
Well, it is late now so I'm going to bed soon. There is still time for a couple of hours work tomorrow morning before my 24 hours is up.