BradTPT's Hexy build

My wife was nice enough to suprise me this Christmas with a picture of a Hexy. No Hexy, just a picture :confused:

She ordered it on the 17th of November and quite a few weeks passed before it was shipped so I guess there were some manufacturing holdups. We’re in Australia too which doesn’t help considering it would have been shipped internationally right around Christmas time. None of this stopped me from suggesting that she’d forgotten to get me something and printed a pic of one out on Christmas eve though! Anyway it did turn up on the 3rd of Jan 2013 and was worth the wait in my opinion! :smiley:

I had a ton of fun putting it together, even went to the trouble of grabbing a pin vise from work so I could drill the servo horn mounting holes out to 2mm which made for what I think was much nicer assembly of that part of the build. I even stuck a little vid up on youtube showing the process and how it improves the fitment over the “just force the screw in” method.

For the most part the build went together quite well, there was a “H” section from one of the legs which looks appears to have been cut out of 1mm thicker material than the others and wouldn’t fit, but the 7th leg bag of spares provided me with a replacement piece of the correct size (thankyou!). One of the body upgrights needed some time spent on it with a needle file so the slots which extend from the piece under the Servotor32 board would key into it. I’m not sure how runout like that happens on a laser cutter but it seems to have occured on a couple of pieces. :confused: Nothing to worry about though, this is a kit and getting everything to “work” is part of the experience.

I did run into a problem when I went to power the unit up using 5 x AA NiCad batteries though… Can anyone spot the problem with this next picture? :laughing:

For the time being it’s 4 x AA cells for me :unamused: If it’s not obvious to you, the leftmost battery holder has been manufactured with two springs and the rightmost one has none, meaning that the AA cells simply won’t make contact, rendering this part unusable.

Anyway here it is all put together.

To start with I followed the guide and set it up under Window 7 x64 with no problems. I spent some time and zero’d all my servo positions and saved the offsets. Hexy managed all of the moves in PyMoCo on my desk, but when placed on the carpet floor and performing a belly flop one of the legs caught the floor and it broke the lower leg servo. Oh well I know not to do that again… I replaced it with the spare servo but then noticed that an upper thigh servo on the other side had failed also :confused: That was disappointing; it’s a shame about the servo quality, but on a kit where there are twenty servos, even a modest increase in servo price would equate to twenty times that added to the total kit price so I understand the decision which had to be made here to keep the kit at a competitive price point. I hope there’s something on the horizon with respect to the metal or carbon gear servos I read about in some other threads on here.

[size=150]Bluetooth + Linux = a late night[/size]
Hexy is fun, but a tethered Hexy is boring, it can only live on or near my desk so I took it upon myself to get the bluetooth working. Not having BT on my desktop pc and not wanting to use my tuning (work) laptop for the task as it normally lives next to my dyno at work I decieded I’d give the other laptop I have here at home a go with it. It’s running Ubuntu 12.10 which I only installed because FreeBSD doesn’t play well with ext4 and I was tasked with recovering about 300Gb of data from from an ext4 partition on a drive which was half dead.

To start with, I had to work out where and how to connect the BT module to Hexy. Thankfully the wiki proved invaluable here and gave me a very clear picture of where to plug it in plus some basic setup information. Nothing about linux unfortunately…

The first little hurdle to jump is that Ubuntu’s standard installed bluetooth manager WILL NOT allow you to pair to a device with a fixed pin, this is a bug (in the GUI) which apparently has been around for several years and I find remarkable that it hasn’t been dealt with. The “fix” or rather workaround I discovered is to open the Ubuntu Software Centre and search for “Blueman bluetooth manager” and install it. Upon running the newly installed BT manager I am able to connect to and pair with the BT device. After connecting to the ArcBotics device, if you click setup and specify “serial port” and hit Forward you should be greeted with the message that the device is now available at /dev/rfcomm0

The next hurdle is PoMoCo will not find the device when paired via bluetooth. I was able to successfully perform the baud rate setting to 9600 of the BT module via the servotor using my windows box and code posted on the wiki page. I had to modify the code in the 9600 baud file as per the wiki for the baud change to be successful. I hacked around with the code a bit and made python display a list of all the ports it was querying in the shell window and /dev/rfcomm0 wasn’t among the list. Ok I thought, I’ll just cheat the system and hardcode the BT device address into the servotorComm.py file. That didn’t work either. Hmm, ok time to look a bit deeper. I installed putty and tried connecting as a serial terminal to /dev/rfcomm0 and got a permission denied error… There’s a clue, this time I ran putty as root (sudo putty) and tried the connection again. Success! Closed python IDLE and ran “sudo idle-python2.7”, opened PoMoCo.py with my modified servotorComm.py file with the hardcoded /dev/rfcomm0 address and Hexy sprang to life - with no wires and under Linux no less! I think I’ve earnt myself the right to go to bed now it’s after 3:00am!!

I will come back to this post / thread and hopefully update the linux connection instructions in some detail with screenshots, or possibly do a youtube vid if it’s going to be of any use to anyone. My linux skills are basic and as for programming; if I told you the last time I wrote code was about 18 years ago and it was using Borland’s Turbo Pascal I’m sure the reader can fill in the gaps… It something I hope to address this year :wink:

Hope this post hasn’t been too boring or off topic. I know there will be a better way of achieving the result under Linux and I’d be happy to read and/or learn how.

A big thanks to Joe for starting something which I think is just fantastic. It was really nice to open an electronic product and not have the instructions in broken English and “Made in China” written all over it. Keep up the good work!

Lastly - I can’t wait till you guys are listing a quadrotor under the products tab of your website! :sunglasses:

I also drilled out the holes in the horns, but only to about a diameter of 1.4 mm. None of the horns cracked as others have mentioned. Another trick I used was a a little glue from a hot glue gun in any holes in the acrylic pieces that seemed a little to large. The hot glue holds well and yet is easy to drive a screw into.

Thanks for the putting a name to a tool (pin vise). Went to Amazon.com and ordered a set. I accomplished something similar with pinched fingers in the process. :angry:

Now that’s a really good idea, I had a couple of screws which wouldn’t nip up as the base hole must have been a little larger than most, thanks. The first size I tried was 1.5mm but still found a bit of deformation once the screw was done up when continuing to tighten; I went to 2mm and was happy with the result. As you can see from my vid it is possible to screw it in without pre-drilling the hole up at all, in fact the example I show in the video was much neater than the first one I screwed in without dilling which is what prompted me to open them up in the first place. Either way I’m not a fan of what it does to the servo horn without clearancing. Given the delicate nature of the servos I’d read about before assembling mine I figured I’d do everything I could to ensure durability and a quality build.

:wink: Glad I could help and yep; I did the first hole with my fingers and said to myself “I’ve got just the tool for this” and went into work and got it, much easier!

Here’s hexy operating untethered via bluetooth trying to torment my wife’s dog. I only have 4 x NiMH cells powering it with no independent power for the logic board. I have found when operating in this config the BT will drop out very easily, usually either before I issue a command or within one to two commands. I suspect it’s voltage drop induced by the current draw of all the servos when doing the more demanding moves, as when I power the logic board via the USB input from a power supply the comms remains stable.

I have also noted you can concurrently issue control commands from BT and the pc which has a live USB connection to the board too.

Anyway here it is taking commands via bluetooth from my linux laptop!

Got sick of the bluetooth dropouts caused by voltage sags during high current transients so I managed to repair the dodgy 5 x AA battery tray.
I was then able to run hexy around with no problems on bluetooth by running the logic board from four AA Nicads and the servos from five NiMH cells. Unfortunately I only got about 6 moves in and another servo went! :imp: That’s three down now so hexy is out of commission for a while. I pinched the head servo when #2 failed but this leaves me stuck :confused:
A servo upgrade is definitely my next requisite, does anyone know of a direct fit replacement? Somebody in another thread mentioned Hitec servos. I’d be happy to order but I’d like to know which models will fit with little or no modification.

i think that if you add your Linux user to the uucp, bleutooth and dialout groups (and login/logout again) you will not need to do a sudo

Brad,

What did you change in the servotorComm.py to get it to work? Maybe you can add a copy of the file :slight_smile:

Thanks

[quote=“gielium”]Brad,
What did you change in the servotorComm.py to get it to work? Maybe you can add a copy of the file :slight_smile:
Thanks[/quote]
Search for the line containingser = serial.Serial(port, baudrate= BAUD_RATE, timeout=2) and change it to read ser = serial.Serial("/dev/rfcomm0", baudrate= BAUD_RATE, timeout=2)
That worked for me. When I added the bluetooth device it told me it was available at /dev/rfcomm0. If I disconnected and reconnected the bluetooth sometimes it would come back at /dev/rfcomm1 which naturally would break the connection. I haven’t had a chance yet to develop a more elegant solution which auto detects the port as I’m back at work and robot play time is pretty much done for at the moment… Or at least until my replacement metal gear servos arrive.

Thanks i wanted to try, but was lazy and decided to ask since i had other Hexy problems to worry about first :slight_smile:

The autodetect doesnt seem to work with python-serial, i read that using bluetooth it’s better to use the phython-bluez library, but that’s proberbly a change that should be made by arcbotics.

Thanks for the tip, I hadn’t seen PyBluez before, I’ll have to play with it a bit. This might help someone who’s had problems getting a com port assigned under win7.

Brad,

I’ve tried to follow your steps for getting Bluetooth control under Ubuntu. So far I’ve used the Blueman Bluetooth manager to pair with the Arcbotics module, and assigned it to /dev/rfcomm0. Modification to the servotorComm.py code as mentioned in one of the previous posts, but still not able to connect to Hexy (even running python as root).

Bluetooth module has a solid red light, which from the documentation suggests that the connection is made and working. I can control Hexy via USB.

Thanks,
Rob

rpcook, when time allows I’ll revisit this and go step by step. Hopefully it will help you manage that elusive wireless connection :slight_smile: Have been back at work and unfortunately have had no time for playing with hexy…

Very happy, my box full of metal gear servos and replacement gear sets arrived today:

The information as per HobbyKing’s website with regards size appears to be spot on also. These are a direct fit replacement!

You will have to change the servo horns over if you choose to use the machine screws supplied with the servos to fasten the horns though as the small heads will fall right through the horns supplied with the SG92 servos. I wasn’t about to try and butcher a self tapping screw into the metal head which means the reassembly of my hexy will have to wait for another day as my pin vise etc is back at work :angry:

There was a little tip in another BT based post that appeared to fix it (along with your servotorComm.py tweak). Answer was to push the Servotor reset button with the BT module plugged in. Now I has a wireless Hexy! (this got a lot of giggling at first)