Monday 15 October 2018

Robot Wars, Level Up!

On to the next crazy project!

I suppose I should begin this post with an update on Gigaton Handshake: Optional Ultimatum (Giga to its friends). The last post saw the completion of the CAD design and I can happily report that is has now been built, wired, tester, rewired and is looking forward to its final tests/fixes a full two months before the next competition here at the uni. Does this mean that we are going to sit on our hands for a full two months waiting for action? Of course not, and unfortunately that means we shall start with a digression.
Gigaton Handshake
Evil cat time, high backed chair slowly rotating... flash of lighting!
"MWAHAHAHA"
"Sit on our hands! Sit ... on ... our ... handssssss??"

Long story short my fellow roboteers and I have decided to try and design/build/program our own robot control system/board. Hopefully this will end up being lighter and more compact than the current menagerie of various commercial boards we use. The plan is to use them to put together a three bot cluster (three robots in the same entry), as well as allow us to build many, many more normal bots.

As a project this has been rather interesting so far, it took us ages to come up with the correct design requirements but once we had them the rest of the design has gone quite well. We broke down our requirements as follows: 

The board was determined to have to be able to:
  • Be powered from a lithium polymer cell with an input voltage range of 3.5V to 14V to allow 1-3 cell li-po batteries to be used.
  • Control 2 DC brushed motors directly with 2V/Vbatt continuous current draw
  • Supply control signals and power to two servos with 200mA/5V current draw.
  • Receive and process human commands into servo/motor outputs.
  • Human must be remote from board (commands must be transmitted wirelessly)
  • Wireless communication must be able to penetrate 5mm polycarbonate
  • The board must have an interface to allow its firmware to be updated
  • There were a bunch of size requirements too to ensure that we were actually getting an improvement with the new board.
The next step was to determine the system architecture and hardware that could realise these aims. Initially the plan was to use a discrete micro-controller, RF transceiver, motor controller, and power regulator however after much discussion we managed to address the functionality of the first two with an ESP32 board.

The selection of the ESP32 was quite an interesting process as initially we had lined up to use two chips, an ATMega328p micro-controller and Si4463 sub-GHz RF tranciever. Our reasoning was that the AtMega chip met all of our requirements and could be programmed with the Arduino bootloader, allowing us to use the Arduino IDE and libraries which makes the embedded code much easier to develop. Additionally the Si4463 was similar to the CC110Ls used during the Blake Project, and at sub 1-GHz we were going to run into RF weirdness during PCB design, but not too much.
My group member had got to a late stage in the PCB design before we swapped over to the ESP deivce, partially due to both our dawning horror at what the AtMega and Si4463 would require to get working. My group member was having serious concerns about the challenge in routing all of the signals between the two devices and to the transceiver's antenna while keeping to board to a reasonable size. I was having second thoughts having done some preliminary work designing a wireless protocol as an improvement on my naive effort during the Blake project (one specific improvement being not crashing whenever a single packet was lost). The work I had put together in preparation had already filled many sheets of paper with flow charts but I was still unsure of its effectiveness, or even its ability to be implemented. Finally both of us had realised that we were going to have issues with the Si4463 as we would need to create another device from scratch to allow a human to generate the RF transmissions.

The ESP32 device we chose had several major features that fixed most of these issues. Firstly it combined the transceiver and micro-controller and implemented all of the RF circuitry, making the PCB design much easier. It also has the ability to communicate via Bluetooth (classic and low energy). This means that we get a full communications stack given to us with all interactions happening at the application layer, much less of a headache than the PHY level interface the Si4463 was offering! Using Bluetooth also means that we can use the transceivers in our phones to communicate rather than having to build new hardware ... once we learn how to build Android applications ...


Gathering mist and darkness, spooky castle fades into the background, maniacal laughter slowly dying away...

Back to Gigaton Handshake which went together fairly well, the uni's student workshop had some brilliant metal cutting tools for the front armour plate which meant I was able to cut a couple of spares, just in case. The 3D print went well, the new uni printers work like a dream. Initial construction was surprisingly painless (amazing how good things can get when you actually plan them) and only required one revision after initial testing.
The issue was, in true what-can-go-wrong style, electrical. When I had wired up the robot initially it had both the drive motors and radio receiver powered from a couple of power regulators on the brushless motor controller board. This worked really well until the motors tried to draw a lot of current, for example trying to turn really fast from a standstill. This drew all of the available current (about 3A) from the power regulators and starved the receiver, which promptly crashed. Luckily this was a problem with a quick fix and the motors are now powered directly from the battery, which has a larger possible current output of ~20A, before exploding.

The brushless motor works with relatively little fuss, the blade needed to be roughly balanced before I was happy using 100% throttle, this was done with a piece of string and a file.
Giga, a view of the other side a bit emptier as it usually holds the battery
(which is currently staying in its lipo safe)
 This robot is now roughly finished, with only a couple of improvements. The first is to add the now distinctive drinks can blade to the front to increase scoopiness. The second will be to take a file to a couple of the edges to try and get the maximum dimensions down a bit. The third, possibly more important step will be to hot glue all of the components down to the chassis, with about 50g space weight I am hoping that I can use enough glue to almost act as impact softeners shielding the electronics from sharp blows when the robot is thrown about. The final step will be to upgrade the wheels.
Given I have lots of spare mass to play around with the wheels are going to be triple layered with alternating MDF and Perspex pieces. The idea is that putting MDF on the ends of the wheel will allow it to absorb spinner hits while the central perspex layer will provide a bit of rigidity. The final innovation is to add teeth to the outside of the wheel, these are not to grip the arena floor themselves, but to grip a layer of rubbery plastic that will be added later which should increase the wheel grip dramatically. Like all good 2D components these will be cut on the laser cutter at Uni.
Cad rendering of the wheel design, blue will be MDF, red will be perspex.

Thursday 11 October 2018

200mm Scope: Drinking Straw Successor

The Drinking Straw successor is complete! which means,  I actually completed a project I set out to do ... in a reasonable time.
Complete!


Mandatory down the barrel shot

The ingenious 'double eyepiece location' - which hopefully will mean that I never have to pull off a feat of gymnastics to reach the eyepiece!


Please, hide your surprise.

As a recap, I have wanted to upgrade my smaller 76mm scope (the drinking straw) for a while since it became obvious that I had reached the limits of its capabilities. A couple of Ebay trips later and this step up had defined itself as a 200mm Newtonian reflector (given that I had a 200mm parabolic mirror).

One of the trickiest things to do with the drinking straw was keep it stable and non-shakey. This was largely due to the equatorial mount I opted for, firstly my own hideous creation, and then due to the properly made one being very, very heavy. The mount did have its benefits, like allowing for simple RA/Dec pointing and target tracking, and I enjoy using it. The thought of trying to replicate/use something similar, but scaled up for the 8 inch mirror, made my inner engineer very happy - but would not have been feasible in a device I could use in a reasonable timeframe, and also move around. Next time, next time. Instead I opted to follow the instructions from Stellafane on 'How to build a Dobsonian' given that I had already read the guide several times, it was easy to read with lots of information, and it seemed to be a bombproof way of getting a usable instrument.

So, onto a brief summary of the build - including interesting happenings, blinding insights and banal construction descriptions. In my previous post I talked about the design process which should have made it clear that I was deviating from the standard concrete pouring tube Dobsonian somewhat. Experiences with getting the length and balance point of the Drinking Straw wrong, repeatedly meant that I wanted to keep these properties of the tube as adjustable as possible. My solution was to have the optical tube made of three boxes all sliding along a set of poles. The three boxes held the mirror, interfaced with the mount, and held the secondary mirror/focusser/eyepiece respectively.
The design, with three boxes.
The build began with the mirror cell - which went together beautifully after I had managed to find all the bits (the springs were hard to track down, I ended up using RS having tried at least a dozen different hardware stores). At this point I think it would be good to add that I was beyond the range of the lovely laser cutter and its friends, but I did have access to my Dad's tool collection including a brilliant jigsaw.
The mirror cell, part of the way through construction (the pole holes are yet to be cut and the side mirror supports have not yet been added.)
The next step was to start building the boxes. My initial plan was to have boards perpendicular to the optical axis (with holes cut in them) as structural braces/imitation baffles, the box would then be made of four rectangles of plywood on the sides, held together primarily by the braces. This did not quite work out, which I will talk about later.

The Braces were my first attempt at cutting circles with the Jigsaw which I knew was going to be critical to making the Altitude bearings later on. I did my late night research into how people generally cut circles with a jigsaw and came up with a very useful jig-saw jig which constrained the blade to a circular path. Unfortunately for the first few boards to have their holes cut it took me a while to figure out how to keep the Jigsaw blade straight.

Jig saw circle jig, idea scooped from a random YouTube video

A not so successful circle cut.

After cutting the braces out it was time for the far simpler sides of the box - these were just rectangles with some pre-drilled holes to guide the various screws and nails that held the box together.

The next step involved a bit of improvisation. I may have mentioned before that I did not really know hoe I was going to secure the poles in place when I initially designed the telescope. Eventually I cam the the plan of using hose clips secured around a plank of wood (itself secured to the box) that could be used to keep the poles still relative to the box, while still allowing the poles to be released for taking the telescope apart. It turned out that this was a brilliant idea, not because it held the poles securely, it turned out that friction against the braces and sides did a good enough job of that, but because the planks of wood did a far better job of holding the boxes together than the braces!

The first box constructed (which would turn into the pivot box)
Another thing that developed during construction was the finish of the wood used. I knew I wanted to use some sort of wood-stain on the wooden elements of the telescope to weatherproof it, and because I did not like the idea of paint. The final wood-stain used was one I found at the back of a shelf in the garage, supposedly a 'natural oak' colour. So far it has worked quite well.

Next up was throwing together a secondary mirror spider/holder, here I just drilled some holes in an 18mm thick scrap of Plywood for push/pull bolts to go through to tilt the mirror. the spider was a set of steel bracket strips that I bent into shape. The entire assembly manages to stay behind the secondary mirror (from the perspective of the primary mirror) and the steel strips are edge on to the light path while still being quite thick. It is a solution that works well enough for the moment and holds the secondary mirror dead still, but will probably require upgrading in the future. as it is not particularly easy to use the push pull bolts.
The secondary mirror spider, with nice curved vanes. The mirror holder was just a block of wood with some holes drilled in it. I sandwiched some nuts on one side of the wood using a 5mm wood scrap to give each bolt hole a durable thread.

Another view.
The rocker box, altitude bearings and ground plate went together in a couple of days (surprisingly quickly). The altitude bearings took all of my skill at cutting round objects with a jig saw to the limit, but they came out spookily well. The biggest improvement came after I changed to a slightly thicker blade which seemed to wander less easily.

One of the trickiest bits about this last stage was deciding on different wood thicknesses, the process of choosing the other dimensions already has a lot of guidance on the internet. In the end I used:

  • 18mm for the bearings and sides (to maximise the bearing contact area), 
  • 5mm for the front (to save weight, the front does not have to take much concentrated force that would require thicker wood), 
  • 9mm for the bottom of the rocker box and ground board (as it was the only material I had left in sufficient quantity)
  • 12mm for reinforcement on the bottom of the ground board.
To protect the ground board from excess moisture and also to give a good set of contact points I screwed three cheap plastic castor dishes (turned upside down) to the bottom of the ground board too, so far these have worked really well.

Test fitting everything in the bearing/rocker box/ground board assembly before coating with wood stain.

Finally there were a couple of later improvements, I added braces to keep the altitude bearings straight and added nonstick pads and laminate to each of the bearings to improve the movement action. The work with the bearings would have been included as part of the rocker box assembly but I was initially quite happy with the simple wood on wood bearing, it took a couple of evenings for my mind to change.
The rocker box all finished, you can just about make out the altitude bearing braces.
Overall this has been an enjoyable project with a concrete outcome, it was a matter of minutes before the 200mm scope was showing things invisible to the 76mm scope on the first night of viewing. Unfortunately it will be staying at home while I travel to Uni but I can still continue to work on bits and pieces for it, I already have my sights set on making a finder of some sort to help navigate around the sky. Additionally eagle eyed readers may have noticed the somewhat gargantuan secondary mirror, which is almost two cm to wide (across the minor axis). At some point I will get around to replacing it with a more appropriate mirror.