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)