GoPro Pan and Tilt head Recap – Part 4

Part 4

The new motor controller and one of the motors I was hoping to use on the project arrived the other day.

After the previous issues with the motor controllers there was no doubt that a better design was needed. Revision 2 looked like this

You cant really see it on the photos but each of the motor controllers now has a header socket similar to that on the Arduino board soldered on to the connections at the bottom. This means that should one of them die, all you have to do is slide it off the white socket. You’ll still have to unsolder the wires at the top but this isn’t much of a big deal.

Having all of the white sockets at 90 degrees solves the problem of not being able to adjust the current limiting pots as you can now fit a screwdriver in there. This board is a little bigger than the previous one but still fits alright in the project box.

The motors that I hoped to use are from the same crowd that make the controllers, once again from Robokits. The biggest motor that Robokits stocks has a holding torque of 1400 g-cm but not having done any calculations I had no idea if this would be enough or not. The whole design is going to have to be as balanced as possible but still if the mass of the head is too great then the motors wont be able to move it. I decided to order one, run some tests and if it didn’t work then I’d have to find something else but at least I’d know that before buying all of them.

Mr Test Motor arrived with bare leads so I connected a cable from another project that would slot onto the header pin / DB25 botched dongle I’d mocked up so as to be able to connect the motors to the DB25 port.

I then combined this with another stepper motor kindly donated by Peter and some clear perspex and mounting hubs and mounted the whole thing on the top of a tripod to run some tests.

The tests didn’t quite go as hoped. In 1/4, 1/8 and 1/16 wave step mode the motors turn fine, in 1/2 and 1/1 wave step mode the motors jumped around a bit. Turns out that even this test setup has too great a mass for the motors to step properly at the high step speed built into the manual¬† control section of the program. In the finer resolution stepping modes the smaller stepping angle means that the motor doesn’t need to accelerate and decelerate the mass of the head as much per step, rather the head rotates at a semi constant speed. In the coarser resolutions the motors have to move the mass a greater distance in the same time period and end up throwing the head around. If you grab the whole lot and try to turn it by hand not much force is required before you overcome the holding torque and are able to spin the whole thing freely. Holding Torque Failure!!

I then added the GoPro camera to the rig and tried to get the had to move the camera. This was an abysmal failure with not much really happening, just a lot of unhappy stepper twitching.

All in all it doesn’t look like these motors are going to work like this. By the time the rest of the head is built it looks like there is going to be too much mass to move and even if the whole thing is meticulously balanced I doubt the motors will be able to overcome the moment of inertia and rotate the head.

From here there are several options. At the moment I’m trying to get a larger stepper for Robokits but have yet to receive a reply from them. These larger steppers are the biggest ones that Pololu make and have 3.17 kg-cm of torqueas apposed to 1400 g-cm. If Robokits are able to get these in then Ill give one a go and put it through similar tests to those above. Another option would be to try and find some larger steppers from somewhere else but the problem is that all the motors I’ve managed to find from suppliers in NZ thus far have been a lot more expensive, I would have to also find one that doesn’t draw more than 2A per coil. My final option would be to combine either of the two options above with some form of gearing. This would give me the required torque and would have the bonus of a finer stepping angle but unless I can find some sort of pre-made gearbox for this sized stepper then it would add unwanted complexity to the head design.

Advertisements

GoPro Pan and Tilt head Recap – Part 3

Part 3

Next up was installing the Arduino Mega. This was mounted once again using m3 screws and plastic standoffs. Then soldering pins on the wires for the LCD and the connector for the PS2 controller.

One problem that I did face was finding a way to connect the USB to the Mega whilst it was installed in the case. Nowhere at home or on the internet could I find a USB B connector that had the correct right angle on it or was short enough to plug-in and still fit in the box.

I even tried cutting up USB B cables and trying to cut the connector out but this ended up very messy and still didn’t fit right. I eventually managed to find a USB B connector at Jaycar that wasn’t listed on their website and once cut down with the Dremel and soldered / glued together this worked. At the other end I managed to get hold of a panel mount USB B socket but had to cut the male connector that was on it off and solder / heatshrink the wires together because there seemed to be no female connector available to solder on the lead coming from the Mega.

All the wires for the LCD and the PS2 controller were soldered to a section of PCB and joined to a row of header pins next to them. This was then flipped upside down so the cables entered from the bottom and plugged in. If anyone knows of a better way of doing this then Id been keen to hear it. The problem is that the Arduino boards all have header sockets on them instead of male pins which means that any of the clip on connectors that you get on IDE HDD cables for example don’t work. I haven’t been able to find any clip on connectors that have male pins, they all seem to be female. I could have soldered the wires directly to a st of header pins but this would have been messy.

Next part was installing the cooling fan for the motor controllers and the connectors to plug into them. The motor controllers used are Pololu A4988 boards, a breakout for the Allegro controllers, rated for 2A per coil. I chose the ones without the onboard voltage regulators as the PSU already gave the correct voltages and so to have them there would have been a waste of space and money. These offer full wave through to 16th wave stepping as well as current limiting. The spec sheet says that for loads above 1A per coil you should use either a heat sink or cooling fan. I opted for both as a backup due to long runtimes and a thus far unconfirmed working current.

Outside of case, top left switch is power, bottom right is reset. DB9 is for connection to PS2 controller with the DB25 going to the Pan etc head.

I managed to grab a new LCD from Surplustronics to replace the old Renesas one, 20×4 White on Blue which should give me enough space to display all the information required. The next step above this would be to get a Graphical LCD although this would just step up the complexity without actually giving much benefit in this application. They’re also a bit more expensive.

A couple of days after doing all this the motor controllers arrived from Robokits in Christchurch. These then got hooked up and mounted on their PCB as per the photo below. The idea was to mount them vertically and try make a channel for the airflow from the cooling fan. Concept great, application not so good.

First problem came when I found that this design covered up rather effectively the pots that control the current limiting, making it rather hard to set up the motors. You can just make out one of the pots on the left hand side of the right hand controller. This photo doesn’t really show it but the white connector blocks a screw driver from getting in there.

The only solution was to try to push the pots around by using a screw driver from above. Whilst troublesome this did work and I figured that I’d only have to do this once during setup. Next problem came however when I went to set up the last controller, regardless of the setting of the pot the motor would only get about 50mA, not the 700mA that it needed.

A check with a multimeter confirmed that the pot was dud. My next problem came when I went to remove the board to swap it out. I had used right angle connectors to attached the controllers to the PCB and unsoldering this proved to be a right pain in the ass. In addition to this I had put drops of superglue on the top edge of the board to back up the “not very sticky” thermal sticky tape. So… not only were the boards near impossible to remove from the PCB but they were also glued together.

I ended up ripping the whole thing apart with side cutters, salvaging the working boards and deciding that a better design was needed.

Peter at Robokits was great and offered to replace the board when I contacted him and explained the issue. Fastway Couriers were not so great and succeeded in losing the board on its return trip to Christchurch. Eightish weeks later, many many calls to CS and my claim for lost goods is still being processed. JT’s Consumer Advice. STAY AWAY FROM FASTWAY.

Part 4 up next

GoPro Pan and Tilt head Recap – Part 2

Part 2

Whilst looking through the various libraries available I came across one that allows you to hook a PS2 controller up to an Arduino board. Just perchance I happened to have one of these that had been attacked by the cat and had its cable severely munched. Unfortunately the cat had decided the end of the cable that goes into the actual controller as opposed to the end that goes into the PS2 tasted better so both ends of the cable needed to be cut off, one end resoldered into the controller and the other onto a DB9 connector.

In testing this I found that only sporadically would commands get through, I’m guessing this was because the controller runs on 3.3v (yay,¬† once again available on the PSU) and the Arduino on 5v so the data lines were getting mixed. Pulling the data line up to 5v with a resistor solved this problem anyway.

This worked out great in that not only does it give me a plethora of buttons but also two joysticks that can be used to control motion in manual mode.

It should be noted at this point a minor problem that developed with the power supply…

Here it is with all the cables loomed into bunches ready to go to the right place. The next step I don’t have a picture of but basically…

I needed a way to mount the power supply to the case. If you have a look at the picture above you’ll see that the PSU case is essentially 2 U shapes joined together, with one of them making up the front, bottom and back and the other making the two sides and the top. The two parts of the case are held together with four screws from the top. Inside the case the main circuit board is mounted with spacers approx 3mm high off the bottom of the case. The idea was to open the case, remove the main circuit board, drill 4 holes in the bottom of the PSU case and mount it to the Project case using 5mm plastic standoffs and m3 screws. Then reinstall the plastic insulation under the PSU circuit board, re mount the circuit board and close up the PSU. DONE!

The problem came however when I went to switch the PSU on. Sizzling noise, smoke, melted wires and acrid smell. Turns out that when reinstalling the circuit board the cutoff leads on one of the capacitors still had enough length to puncture the plastic insulating sheet and contact the head of one of the mounting screws. Needless to say it never worked again.

http://www.ascent.co.nz provided the replacement PSU, seen below installed

The case on this one went together a bit differently so I had to first mount it on a perspex sheet and then mount the whole thing in the case. You’ll also notice that this PSU, whilst being from the same family is a slightly different shape to the original. In particular a bit thinner and with a recessed as opposed to top mounted fan. Luckily the holes in the back still matched up, In the end to get the top looking good I just cut the whole top of the box out, mounted a perspex panel on the top and stuck a fan grill on the whole lot

Part 3 to come…

GoPro Pan and Tilt head Recap – Part 1

Part 1

So get ready for a long one. Basically this is going to be a multi part saga covering everything that has been done so far on this project.

Inspiration for this project came from a video on the net that some guy called Jason Brandon (more info and video of his time-lapse here http://vimeo.com/jbproductions) made using a SLR and motorised dolly. I figured that the actual construction of something like this couldn’t be too bad and decided to give it a shot.

A bit of a brainstorm resulted in a Pan / Tilt / Roll head designed around a GOPro HD Hero 2 camera that was mounted on a motorised slide. A MCU would control 4 stepper motors that would create the motion.

First off I needed to decide on what I would use to control the actual motors. I needed something that would be able to support 4 steppers, a LCD and some form of input device to program the motion as well as allow for random modifications and add-on extras. Initially I was thinking that all movement through the menu would have to be controlled by Up / Down / Left / Right buttons etc. Adding all that to the number of pins req’d for a parallel LCD and the motors meant that whatever microcontroller was used it would have to have a lot of I/O pins.

Now previous experience with this type of thing has been limited to Picaxe and a small amount of stuff done with a Renesas Starterkit. The larger Picaxe chips may have been suitable in regards to number of I/O’s but I was unsure whether the programming language would be powerful enough to not only do what I had in mind initially but also in case any other random ideas / modifications popped up as the build progressed. The Renesas on the other hand had plenty of I/O’s but the whole programming / compiling side of things seemed to be too complicated, add to that the fact that the Renesas MCU that I had didn’t work and that a new one was >$400 and that was quickly ruled out.

A Google search brought to light the Arduino platform, more research into this as well as a bit of a browse through the language made this very appealing as an option. In the end I settled on a MEGA 2560 (the largest option), this was duly purchased from Robotronic NZ.

Next step was to work out what to mount the controller in. Recently I picked up an old computer case that had an SFX PSU in it. Up to this point it had been sitting on my desk acting as a power supply for testing various kits and circuits. The great thing about this is that you not only get 5v, 12v and 3.3v but the whole thing is smaller than a large sandwich. Using this worked well as I could use the 12v for the motors, the 5v for the logic and not have to worry about a poorly designed PSU toasting the whole lot.

Obviously one requirement for the case was that it would have to fit this PSU as well as the MCU, screen and associated cabling. A quick trip to Jaycar resulted in this

which after 30mins with a Dremel looked like this

(Note holes in far end for D-Sub connectors for lead to Pan Head and for Controller. Holes in this end are for the IEC lead for the PSU and a cooling vent)

After cutting all of this out and creating a hell of a mess the next thing that I did was have a play around with the Mega to get an idea of how the language worked in general but also with a LCD attached.

Enter old 8×2 rescued from broked Renesas MCU. The great thing about the Arduino platform is that there seems to be a library for anything and everything, simply call the library, define the pins and everything becomes stupidly easy. Initially it didnt work but this just turned out to be a cooked pot controlling the contrast.

Part 2 to come soon