Weekend of code enhancements

The temperature is getting low, and after spending most of saturday getting numb fingers and feet whilst working on R2’s center foot, I decided to do some much warmer work in the office and do some code enhancements.

  1. Telegram Bot
  2. i2c Monitoring
  3. Drinks Mixer

Telegram Bot

Telegram is a communication system that I already use for my home automation, so figured it might be handy for R2 to use it to. Not many functions added yet, just some simple volume and sound commands, but the main function is the /status command.

Current Status
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Uptime: 14:26:25.870000
Main Battery: 24.865 (balance: 0.011)
Remote Battery: 
Wifi: 
Internet: True 
Location: 
Volume: 0.296875
--------------
Scripts Running:

Still some clean up needed, but gives a good way of checking various stats.

i2c Monitoring

This is something I’ve been wanting to add for a while, and have had the circuit and basic arduino code done already. It is all now tied into r2_control and so current draw and battery status (current voltage and max cell difference) can now be queried. Not only that, if logging is enabled then it will also log to a file twice a second (configurable) as a csv. This means it can be imported into a spreadsheet and graphed so I can see power draw throughout the day.

As can be seen above, the details can also be retrieved using the telegram bot and /status.

Drinks Mixer

Not so much part of R2 exactly, but it will be going into him. The plan is to have a few reservoirs, some pumps, and some control circuit to allow drinks to be mixed and poured.

A base outline of code is now done, which will take in an array of substances and amounts, and turn a set of i2c controlled motors on and off for the desired duration. Still lots to do on this, not least of which is to get a working circuit done, and a decent web interface, etc. But its a start.

Summary

So, all in all I’m rather happy with a mega weekend of hacking at R2. May try to get out to the garage one evening this week to do some more work on his center foot. I’d like to have it ready for the midnight premier of The Last Jedi that I’m attending. Trouble is, the garage is currently sat at around 4.5C.

Working on the new center foot

The main issue R2 has at the moment is a rather dodgy center foot. For a start off, the shell is actually structural which I don’t like. The shell is also not the best, with no easy access to remove the center foot without a full dismantle which isn’t easy.

So R2 got some new foot shells made up, and I started work on a new set of wheels to fit in them.

Based on a design by another builder (Youtube video of them in action), the chassis for the wheels is made out of plates of aluminium with some square tubing for spacing. The wheels going into them are 4″ Vex Omni Pro ones, which allow movement in all directions, not just forwards and back. Much better than a caster as it doesn’t have to swivel when changing direction. Also allows for larger diameter wheels which helps getting over bumps.

Center foot chassis
Center foot chassis

This chassis will be bolted directly to the center ankle, and the foot shell will more or less just be floating on top. This, coupled with a few other modifications and tweaks, should make for a much more steady ride with less rattles.

 

Birmingham MCM, MOT, and Tier 2.

This weekend was R2’s first official outing with the UK R2 Builders. We were invited to attend Birmingham MCM Comic Con with the UK Garrison, an arm of the 501st cosplay group.

I loaded R2 into the car on Friday after work, and drove down to a hotel near the Birmingham NEC. Due to late booking of the hotel, I wasn’t really left much choice, and it showed.  Saturday was an early start so I tried for an early night so I was all set for a 7am start. That didn’t go quite to plan, nor did the hotel room shower. Still, fun and games at the hotel were just a blip on what promised to be a great weekend.

After driving round and getting lost in the maze that is the NEC, I finally saw a few other builders who were also trying to figure out where to go and its always better to be lost in a group than on your own.

Eventually we did find where to park, and where we were unloading and after a quick registration we started getting the droids into the building and set up on our stand.

First order of business was to get my droid a pass on his MOT. To be allowed at official events, and to get some Public Liability Insurance (you know, just incase I ‘accidentally’ run over a little darling who is poking R2 too much), R2 has to pass a club MOT and I have to show I can drive him. Its a really good idea, and adds a great level of professionalism to the whole event.

Thankfully, R2 passed, which meant he was free to roam around and entertain.

The Saturday of the event was extremely busy, with so many extra people showing up that we pretty much didn’t leave the stand. Not only that, but the UK Garrison couldn’t do their usual parade due to safety worries. Still, it didn’t really put a damper on things as people were constantly coming to the stand and being entertained by the droids.

It really is fantastic seeing the interactions that people of all ages have with R2. He isn’t just a remote controlled robot, he is an actual person to a lot of them, and I’m less of a driver and more of a puppeteer.

Then there are the Jawas. Damn things get everywhere!

Only kidding, the UK Garrison have a few Jawas in their midst, and they certainly get into character. It was so much fun getting R2 to play along with them and everyone around absolutely loved it. Even better when their wrangler started jangling keys to distract them and move them along. Bringing out the play in cosplay.

The day passed all too quickly, and we were soon packing up for the day and making our way back to our hotels. A few of us went out for a meal that night at a local hotel, and surprisingly the conversation wasn’t just about droids. Well, not quite anyway.

Another attempt at an early night and a bit more sleep was had, ready for a not quite so early morning on Sunday. The doors were opened for us at about 8:30am, and we wandered in to make sure the droids hadn’t got out over night.

Sunday was a little bit quieter, so a few of us managed to roam about the convention a bit more. I took R2 out on a number of jaunts through the day along the concourse infront of the halls where MCM was running. It was a great area to roll around, lots of people but not as packed as it was around the stalls and other areas.

It did take quite a long time to get from one end to the other, not because of the distance but because he was getting stopped every meter or so for photos, or to chat with me about him. R2 really does like his picture taken, much more so than I do.

We had a few more encounters with the Jawas, and some sneaky avoiding of imperial troops looking for droids but I managed to convince them that these weren’t the ones they were looking for. There was also a group of large feline types who seemed to take a great interest in R2 and got a little curious.

The UK Garrison do a troop on each day if possible, and thankfully they were able to do one on Sunday, not only that but R2 was allowed to join in. At 2pm sharp, we waited outside the UKG changing room, ready to tag onto the end of the parade. There were a lot of the UKG there, I thought the line coming out was never going to end, but it eventually did and R2 joined in. We did a basic loop of the event which took about 20 minutes, it was great fun even for someone like me who doesn’t like to be in the center of attention. Of course, R2 takes a lot of it off me.

So, you’d think that was the highlight of the weekend? Nope, as the event was drawing to an end, I noticed a load of rebel pilots gathering around at the stand next to us. Next thing I know, Anthony Daniels asked if he could borrow my droid for a photo shoot. Not really going to say no now, am I? He stuck around afterwards too and had a few other photos with some of the other droids too.

Sadly, the event drew to an end. We were rather tired by this point, me, the other builders, and even poor R2’s battery was starting to show some signs of tiredness. R2 got loaded back into my car (I really need a van!), and I set off on the 2 1/2 hour drive home. A quick take out once I was in, and then bed became too tempting.

Now that I’ve recovered however, I’m planning the next steps with R2. As well as the MOT to get insurance coverage, there is also a tier 2 option. Tier 2 means that your droid is effectively screen ready (maybe not screen accurate, R2 changes too much between the films and even between scenes in the same film!) and can be used in official Lucas/Disney functions.

This is another great thing about the R2 Builders club, we have tight bonds with Lucasfilm, and now Disney, and occasionally get asked to do some official events. Anyone who is active in the club and has a tier 2 droid can get the chance to do one of these events.

To this end, there is now a long list of issues on my github page that needs sorting to get tier 2 approval. After a weekend with other droids, and seeing what is possible, it has pushed my motivation up a level to improve the droid, and also given me direction. I’m going to stop going for the fancy stuff, and instead concentrate on getting R2 as solid as possible, and looking the part.

Python code to control an R2D2 (or other astromech) from a Raspberry Pi over i2c
Milestone: Tier 2
Issues: 2 open, 11 closed.

Make R2 more solid for shows, and aim for that Tier 2 classification (ready for LucasFilm)

So all in all, it was a really fun weekend. I don’t think the smile left my face during the entire event. I really can’t wait for the next big event with the builders.