Monday, March 28, 2011

Good Hall-effect Sense


My original plan for the accelerator was to 'borrow' a potentiometer from the pedals that came with the wheel and somehow (I hadn't worked out exactly how) rig it up to the pedal I am making. In the mean time, whilst researching electronic stuff I came across talk of 'Hall Effect Sensors' being used in various home-made joysticks and peripherals.

I couldn't find any 'how to' guide on using a Hall-effect Sensor (here on known as 'HES') in a set of driving gaming pedals but I did find a nice explanation from someone who had used them in a home-made flight sim joystick. Kudos to who ever this was.

I noticed when I was ordering stuff from the 'technobots' website that they had Hall-effect sensor called the 'Allegro A1301'. I took a look at the data sheet for these and thought they might work. Unfortunately these were not available from 'technobots' at the time, but I did get some neodynium magnets (these are much much stronger than the normal 'fridge magnets') to use with the HES. The ones I got are 6.4mm diameter x 4mm

I ordered the Allegro A1301EUA-T (SIP-3 package) from 'Rapid' – one of the big electronic component retailers on the web. This stuff was relatively cheap: The sensors cost £0.63 each (I got two) and small neodynium magnets were £0.70 each (I got two). 

Hall-effect sensor and Neodymium Magnet


I rigged up a test circuit now: the problem is that I did not know how much effect the magnets will have on the sensor at what distance. If the magnets cause the voltage to reach maximum from a metre away, or don't show any effect until 1mm away, then there is a bit of a problem.

I rig up the circuit using a tiny bit of strip board, a 3-way PCB terminals (5.08mm pitch), some individual wires from the left-over 9-core cable I brought, a 0.1uF capacitor and the mighty 'Allegro A1301 Continuous-Time Ratiometric Linear Hall Effect Sensor IC'. I solder in the terminal, solder in a capacitor across the power supply and ground (I have no idea the capacitor is necessary, but I'm using the same thing for the loadcell amplifier circuit so decide to do it here. If its not needed, then a capacitor won't do any harm in a DC circuit).

The thing to understand here, is that the A1301 is an integrated circuit and so any amplifier gubbins is already inside the tiny little sensor – which is only about 4mm wide. To fit it onto the strip board I have to carefully prize the pins apart a little to fit them into the 2.54mm pitch holes. I'm so busy thinking about how small it is as I solder it up, I solder wrong, offsetting each pin one row on the strip board. It's only until I've connected it up to power supply and wonder why the output voltage isn't changing that I realise what I've done. I thought I was being so clever as well, for spotting that one of the end pins is the output and not the pin in the middle, as you might expect.

After a brief resolder, I get the circuit connected up to the wheel. To connect the test circuit up I have plugged the USB connector of the DFGT wheel unit into my PC, then plugged in the d-sub of my custom made cable into the wheel unit. At the other end of this cable I connect the black, red and white wires to the correct contacts in the PCB terminal on the circuit. A short length of wire is also fitted into the terminal so I can easily connect up the multimeter. The circuit will still work even if the power supply isn't connected to the wheel unit as this only powers the force feedback motors anyway.

When I switch on the voltage across the power supply and output shows 2.5V (approximately). From reading the A1301 datasheet this is what I expected: no magnetic field applied causes the output to be half the supply voltage.

With trepidation I take one of my neodynium magnets and move it towards the sensor. At about 2.5cm away the voltage starts to drop, as the magnet is almost touching the sensor the voltage has fallen all the way to 0V. Success! The things work! 

Without Magnet

With Magnet. Voltage would be 0V if the magnet were directly underneath the sensor

I do a bit of experimenting with positioning, twisting the magnets, seeing what effect using two magnets has etc. The best way to get the full range of voltage was to have one magnet behind the sensor and another magnet on top. As the first magnet moves closer the second moves away. As, there are two poles on every magnet, flipping the magnet to the other side causes a voltage increase instead of a voltage drop.

So my plan is: when fixing this up to the actual pedal, I will have one magnet causing a voltage increase close to, almost touching, the sensor when the pedal is at rest. When the pedal is pressed this magnet will move away from the sensor and the second magnet (causing a voltage drop) will move closer. I find the distance of motion should be around 4-5cm from moving from the first magnet to the second. Not sure how linear a response this will give in the game, but on the multimeter it looks fairly good.

I should say that I reckon the sensor will work with just a single magnet, due to the way the pedal output is automatically calibrated to a full range of throttle response in the game. Using one magnet in this 'forwards, back' motion way, means that it is only possible to get a maximum voltage change of 2.5V.

I haven't tried it myself, but I reckon it would be relatively simple to replace the pots in the dfgt pedals with these Hall-effect sensor and magnet set-up. All that would be needed would be to find a way to mount a magnet somewhere on the moving pedal so it moves from about 25mm to almost touching the HES as the pedal is pressed. Wiring the HESs would be easy as they can just be swapped directly with the potentiometers. 



Small Set Back:

One thing I came across when doing this was that the d-sub 'hood' which I used for my custom cable (see last post). The size of the d-sub hood covering the plug - as in its length and thickness, means that it is too large to allow the plug to fit the socket when the wheel is clamped down on a flat surface. Looking at the socket for the d-sub connection on the DFGT wheel unit, it is angled slightly downwards, enough to stop the plug fitting. I hadn't noticed this before when testing with the wheel clamped to my workbench.

Looking at the d-sub hoods in the shop - seems like they will all be too large. As a first attempt at a solution, I hacksaw the d-sub hood in half. This is still too large to fit comfortably. I use just the top half of the sawn-in-half d-sub hood and fix the plug in place using black insulation tape. Rather than being a professional looking d-sub plug, I now have what looks like a ball of black insulation tape. Not quite how I wanted it, but at least it works for now. In the mean time I will keep an eye out for a smaller d-sub hood (like the one on the DFGT pedals).

Friday, March 25, 2011

Wire you doing this


To connect the pedals to the wheel unit a cable and connector is needed – but I also need to know how everything should be wired up. After a bit of searching online, I discover that the type of connector that the DFGT uses is called a 'D-sub' 9 way connector. Called a 9 way because there are nine pins, only there aren't nine pins, there are seven. The two outer most pins have been removed. Not sure why.

I know that the pedals use two potentiometers but I'm not sure how these are wired up and how these signals from the pedals are interpreted in the game.

To test the DFGT with Gran Turismo 5, I connect everything up and start up the game. I have the pedals clamped to my workbench in front of the TV. After a series of experiments, starting and restarting the game and by using cable ties to restrict the movement of the pedals, I discover the following:

The game calibrates the pedals depending on the highest and lowest signals that it gets from the pedal. For example if you only ever press the accelerator pedal half way down and no further the game thinks “a-ha, this is the highest signal I'm getting from the pedals, so this must be the maximum throttle” and calibrates things accordingly. If you start the game up with the pedal pressed halfway down and never release it beyond this point the game thinks “a-ha, this lowest signal I'm getting so this must be the rest point of the pedal”. If at some point – even during gameplay, you would release the pedal back fully, the game thinks “hang-on, this signal is even lower, must recalibrate things” and will recalibrate during gameplay. I guess this was done so the game would work with a range of steering wheel/pedals without the need for calibration screens. It will have implications later on, but will probably make it a lot easier to get custom pedals set up as any signals from the pedals don't have to operate through the full 0 to +5V range.

After that testing I now need to work out how the potentiometers in the pedal set are wired to the d-sub connector that connects them to the steering wheel. Searching online reveals a couple different pin layouts, sadly not all are the same. I pick the most credible looking and will try to test this using my multimeter to verify if it correct. I can do this without having the pedals connected to any power supply. This is how:

I put the DFGT pedals underneath my desk where I can press them. I have the pedals d-sub connector on the desk. Using an couple of self-clamping tweezers that I use for modelling I am able to clamp onto individual pins in the d-sub. I test the values of resistance through various pin connections, by pressing the pedals I can see any resistance change. If I am connected across one potentiometer's Ground to +5V, the multimeter reads a resistance of about 5kohms. If I press the pedal nothing changes. If however, I am connected across the Ground to the wiper (the bit that moves across the resistor inside the pot I call the 'wiper'), then pressing the pedal does cause a resistance change. 

Through this method I can confirm that the pin configuration I had got was correct (so kudos to whoever first worked this out and put it online). I can also deduce that the accelerator pedal is wired “backwards” compared to the brake pedal. What I mean by this is that when the accelerator pedal is in the rest position, the resistance between its output and +5V (V+in) is very low, meaning the voltage of the signal is relatively high (close to 5V). As the accelerator pedal is pressed this resistance increases and the output signal decrease further from 5V. The brake pedal does the opposite – at rest position, it's resistance between output/”wiper” and +5V is high but falls when the pedal is pressed. 

Testing the pedal d-sub pin layout


Final pin layout is:
1. (Pin Removed)
2. Accelerator Out
3. Brake Out
4. +5v
5. (Pin Removed)
6. Gnd
7. Accelerator Out
8. Brake Out
9. +5v

Why the +5v, Accelerator and brake use two pins each I have no idea. Temptation gets the better of me and I open up the DFGT pedals. From seeing inside the DFGT pedals there is only one wire going to each pot. So somewhere they get merged. 



To make the cable and connector I pop down to the local Maplin and buy the following bits:

- 1 D-sub 9 way plug
- 1 D-sub 9 way hood
- 4 meters (very generously measured) of 9 core wire. I was intending to get something called 'Type 7-1-C' 9 way cable. Not sure if it was actually this but it cost ~£1.50/m.

I get the main outer sheath away about an inch down from the end and then carefully the outer sheath away from each inside wire about a cm down. I don't have proper wire strippers to do this, so just use a modelling knife. From the fantasitic kaleidoscope of colours within my 9 core I choose a colour scheme for the pin layout. Having seen inside the DFGT pedals, it makes sense to stick closely to what it uses so I go with the following:

Red = Power +5v
Black = Ground
White = Accelerator Pedal out
Green = Brake Pedal out)

2. Yellow (kind of like white) For Acc out
3. Blue (kind of like green) For Brake out
4. Orange (kind of like red) For Power

6. Black (same as dfgt) For Ground
7. White (same as dfgt) For Acc out
8. Green (same again) For Brake out
9. Red (same again) For Power

Before I solder these wires in, I must first remove pins 1 & 5 otherwise they will stop me plugging in the connector. I don't know if there is an 'official' way to do this but the way I did it was to take a very small screw-driver (like 2mm) and carefully bend the pin over flat. Then, when carefully levering it back up the metal fatigued and broke off. I tidy up by twizzling the tip of a small file on the pin stump. For good measure I snip off the the sockets on the reverse size with a small pair of clippers.

I'm now ready to solder in the wires. I have drawn myself a little diagram and stuck it infront of my workspace. To avoid confusion however, I make another little diagram showing what coloured wires go where when the d-sub is viewed from the back - which is how I will be viewing it when I solder. Remember that the left-right pin ordering is reversed when viewed from the opposite side. 


My soldering skills leave a lot to be desired but I manage ok. I hadn't done much soldering before so found viewing a few instructional videos on youtube helpful. It also helps if you have four hands - one to hold the soldering iron, one to hold the d-sub, one to hold the wire in place and one to to apply the solder. I don't have four hands so clamp the d-sub to the worktop, and apply the wire into position before picking up the solder - it just about holds in place steady enough. 

D-sub wiring
 

When I am done soldering I apply the hood to the d-sub. There is a small problem here as the hood I brought has a small lip holding the plug in place which is just big enough to stop me plugging it into the dfgt. I quick hack saw sorts this out and I only need to do it for the upper half of the hood. I fix the hood up and now have the dfgt end of the connector and cable ready for my pedals.

Faux UPDATE!!!

I have doubts about soldering up the top three wires. This means that I didn't need to buy 9-core cable at all. All I needed was 4-core. Somewhere between the connector and the pedals the wires in the dfgt cable are connected so there is only one wire for the accelerator, brake and +5V respectively. To save me having to join the wires at the pedal end I resolder my d-sub connector. To do this, basically I just take a small length of wire (say around 1cm) and short out the connections between:

pin 2 and pin 7
pin 3 and pin 8
pin 4 and pin 9

I can now ignore any blue, orange or yellow wires when fixing up the pedals. The colouring scheme is completely consistent with the original DFGT wires. 

The final d-sub wiring


For the record here are the final connections.

1. (Pin Removed)
2. Accelerator Out (Short connection to Pin 7)
3. Brake Out (Short connection to Pin 8)
4. +5v (Short connection to Pin 9)
5. (Pin Removed)
6. Gnd (Black wire)
7. Accelerator Out (White wire)
8. Brake Out (Green wire)
9. +5v (Red wire)

It may be that some of these short connections are not needed, but it is easier for me to solder up the d-sub connector like this then try to work it out by sticking probes in to the d-sub socket on the wheel. So that is it. The cable, and one end of it, is ready.

Monday, March 21, 2011

More holes than a mole infested golf course

This post is more about assembly technique rather than the pedals themselves (just sayin' like).

Punch it


I start with two side pieces each with a single 10mm diameter hole near the corner (the “pedal axle” hole I am calling it), drilled according to the plans. The front support, main/spring support and rear support pieces need to be fitted to the side pieces. To do this I need to drill holes for the M4 bolts in all these pieces. It is highly desireable that these holes should be drilled in such a way as the two side pieces match in alignment ab-so-lu-te-ly per-fect-ly.

To do this through measuring the position of each individual hole on each piece would be quite time consuming. Instead I developed an alternative method, which is still quite time consuming. For this I use the plan drawings that I have already made on the comp-pute-ter. I will try to post these, or post a link, later on but they need a bit of tidying up to remove artifacts from earlier unused variations on the design.

The first stage is to print out the plan. These are printed to the correct scale – which should be obvious because the plan should fit the actual piece in size. I cut out the plans outline of the side piece and carefully tape it in position on top of one of the side piece (I'm doing all this of course twice for the two pedals – but will only describe it as though I'm making one). Where I have marked the bolts to fit on the plan, I centre punch holes. Of course the centre punch passes through the paper and makes an indent in the metal – marking out where to drill. After all holes have been centre punched I remove the plan from the metal and grab hold of the other side piece.

I take the two side pieces and I carefully line them up one on top of the other - the most important bit is to line up is the 10mm pedal axle holes. I messed up drilling one of these holes originally so had a second go drilling in the corner below. 

The hard part here is getting the two pieces clamped together without disturbing their position with the tightening of the first clamp (tends to rotate the top piece as the clamp starts to grip but hasn't quite got them 'clamped down' yet). To help I use one of the shaft bearings through the 10 mm hole - these bearings are slightly longer than the 1/4" thickness of the side piece, and so a few mm sticks through into the second piece making pretty sure these two holes line up. Also of use is some repair tape which seems to hold the pieces together well as I tighten up the 'big G' clamps. 

With the holes on one side all ready centre punched, once the pieces are clamped together and the whole thing clamped to the workbench I am ready to drill. The important thing here is to drill vertically down at a right angle to the piece. 

The next part is a little bit trickier. I need to drill the centre pieces (front support, spring support, and pulley/rear support) through making sure that a) the multiple holes in each piece match exactly with the holes already in the side pieces and b) the pieces are in the correct position. After a little head scratching, this is the technique I used to do it; the results came out pretty well, but only I think because I took the time and tried to be meticulous with it.
I take the printed plans I used to position the centre punch for the holes, checking that the lines on the paper are an exact match in size for the pieces on the workbench. I retape the plan to the one side of the side piece. Only one side piece can be used with the paper plan as it is - if I wanted to do the opposite side piece the same way, I'd need to print out a 'horizontally flipped' version of the plan. As it turns out I don't need to do this. 

Anyway, once the plan is as perfectly placed and taped onto the metal as I can get (the holes I just drilled help here), it is time to mark out where the pieces fit. To do this I take my modelling knife and ruler and cut the lines on the plan marking each piece. The knife passes through the paper and cuts into the aluminium. I don't cut completely the way along each line because I don't want to slice up the paper too much and risk it coming loose from the metal. 

Cut it
 
After removing the plan, I can see where the centre pieces should go by the cuts in the aluminium. The plan now is to clamp the centre piece in position and then pass through the recently drilled holes in the side piece, into and through the centre piece. The holes in the side piece should mean that everything lines up 'ab-so-lu-te-ly per-fect-ly' . Again this is made slightly tricky for the rear supports and spring supports due to the clamp tending to twist slightly before it fully grips. But it is do-able. Smaller clamps help here. The bigger the clamp the less room it tends to leave for the drill to get in. I couldn't manage to get every hole first time due to this, but by drilling one or two holes then fastening with a nut and bolt, I could reposition the clamps to get access to other holes. 

I say slightly tricky for the rear supports and spring supports, for the front support/pedal stop I found it nigh-on impossible. Small clamps can't get in because the piece is set away from the edges, and my 'big G' 4" clamps are right on the limit of reach, and then they block the drill space. In the end I gave up and did a hybrid method, clamping the piece, then marking through the side holes with a pencil, then drilling. The first attempt at this didn't go quite so well, and I recall having to file out a slightly 'oval' shaped hole in order to get the piece to fit exactly to the knife-drawn outline. Second attempt was better, so m'eh. 

Once all the holes are drilled, I use my 20mm M4 bolts and washers and nuts to fasten all the pieces to the side piece. I am well chuffed at how sturdy the whole thing feels. 

Rear support, main support and front support pieces all bolted up to one side piece
Only one side of the story


Next up is fitting the opposite side piece. I keep everything bolted together for this. My plan is to clamp the side piece to the unit and then drill through into the centre pieces using the holes in the side piece as the guide, again making sure all the holes line up 'ab-so-lu-te-ly per-fect-ly' . The most important thing here, and it is critical - if i get this badly wrong I will mess up the whole pedal unit, is to get the alignment between the two pedal axle holes on each side 'ab-so-lu-te-ly per-fect'. If I don't the pedal could jam or swing off to one side when it's pressed. 

To do this i lightly clamp the pieces together, fit the bearings to the 10mm holes and place a length of 8mm shaft through the hole. With the pedal box lying side down on the workbench, I place my protractor on the inside of the side piece and try to eye up the 8mm shaft to check its exactly at 90 degreees. I do this at both the front and underneath sides of the pedal box. If the shaft ain't quite right I find I can gently use it as a lever to pull the loose side piece into position. I check everything with my square before subjecting the metal to the drill bit. 

Once a few holes are drilled, I drop in a few bolts as extra protection against pieces coming out of alignment. Tighten a few nuts, reposition some clamps and drill the holes I couldn't get to the first time. 

In other news...
I have changed the position of the front support piece (which also acts as the pedal stop) to make the pedals in floor mount configuration. I decided to do this because if I make the pedals in 'overhang' configuration I won't be able to test them until I have built a suitable wheel stand. Based on my current build rate this could be months down the line. Instead I will build them in floor mount configuration and knock together a quick(er) wheel stand - although I don't have a final design, or even concept sketch for this yet.

Wednesday, March 16, 2011

Spring is Here

The springs have arrived from 'ondrives'. They also sent me a couple of nice thick catologues detailing all the stuff they sell.
Springs are approximately 30mm outer diameter and from 80-120 mm in length. Spring constants go (approximately) 40Nmm-1, 25Nmm-1, 4.7Nmm-1 and 1.7Nmm-1.

As I mentioned in a previous post, I will only end up using two of the four springs. I got four because I wanted to be able to experiment with what worked best. All the springs meet my requirement of being able to fit the M8 stud and nuts through the centre. They have been nicely grounded at the ends to give a flat surface.

I have brought some 38mm diameter M8 washers which will act as the stops on the end of the springs. Think I might use a couple of these for the stronger springs – the 40Nmm-1 one feels pretty solid when I try to squash it with my hands.

Finished the Load-cell Bracket
The load-cell bracket has been completed. When it is installed in the pedal there will be a spring on the bottom which gets squashed down onto the bracket by a shaft running up through the hole in the bracket and through the centre of the spring. To ease the motion of this shaft there are polymer plain bearings fitted at both ends of the hole. 
 
The metal 'L' piece is bolted to the rectangle section using five M4 bolts. These have been very carefully positioned to; (a) allow room to be tightened and untightened, whilst (b) not obstructing the base of the M8 eye nut which fits onto the shaft – this was quite tricky as the M8 eye nuts are quite large and there is only just room inside the pedal box for them to fit. In fact I had to tweak the design of the accelerator pedal to make sure of enough room between the pulley and main support.
The metal shaft on the load-cell bracket acting as the axle is 8mm diameter steel. This is resting on two polymer 'plain bearings'. The shaft is held in place with a 'shaft collar' on each end, I got both of these items from a place online called 'motionco'. Whilst the bracket won't actually rotate at all during use, it is important that the mechanism is smooth otherwise it could interfere with the force being transmitted to the load-cell.

Sunday, March 13, 2011

The Missing Link


Ok so the link between the pedal and the spring will be a length of wire rope. For this to work I also need something to fasten the wire to the pedal arm, to the spring assembly and something to stop everything coming undone.

My plan is to have two strands of rope coming from the spring assembly, over the pulleys, both passing through an eye bolt on the pedal arm, doubling back over and then being fastened.

To get all the parts I need I have ordered from a place called 'tecni-cable'. How to fasten the wire rope is an important question as you can't simply 'tie a knot in it' like you can with string. The rope needs to be able to support a load of 90kg (on the safe side) from my calcs.

From the tecni-cable site I order 3m of 2mm diameter stainless steel 7x19 wire rope. I think the '7x19' refers to how the strands of steel that make up the cable are arranged. Apparently 7x19 is supposed to be quite flexible.

To secure the rope to the pedal arm I order a couple of M6 eye bolts. To secure it to the spring assembly I order a couple of M8 eye nuts (not bolts). These must be M8 because I have already brought the M8 threaded rod to use. To tie/fix the rope I order four 'duplex wire rope grips'. I hope these will work: I spent ages looking into something called 'swageless terminals' to use instead, but decided that the fixings themselves are too large to be used inside the pedal box, which will be quite tight on space.

Saturday, March 12, 2011

Making The Pedals


Pieces cut to size ready for assembly
I have finished making the actual pedals, but putting this stuff together takes a lot more time than it may seem. The pedals themselves are made from 2” wide 1/8” thick aluminium flat plate.


I have made the accelerator pedal about 160mm long and the brake pedal is 75mm long. These sizes are based on the measurements I made of my real car.

The pedals are attached to the pedal arm via a small length of aluminium rectangle section – cut from the same piece I used to make the load-cell bracket for the brake. To keep the surface of the pedal flat, it is attached using M4 countersunk allen bolts, 16mm in length. I got the bolts off ebay as they are a bit hard to find in regular hardware shops.

 
Each pedal uses four bolts to attach but the accelerator pedals have a pair of 'dummy' holes which will allow me to fix the pedal higher or lower on the attachment point if needed later on.

The attachment piece is fixed to the pedal arm by two standard M4 nut and bolts*. I drill more holes than needed to give me the possibility of repositioning higher or lower on the pedal arm later on. Drilling holes in metal requires the use of a centre punch. I mark out the positions in the metal using a square, marking lines with the point of a compass. I then centre punch the point where the centre of the hole will be. I drill a small (about 2mm diameter) pilot hole before re-drilling with the size drill bit that I need. I find that with this method the drill goes through the metal in barely a few seconds and is no trouble really at all.



Marking out is probably the most important, especially when you need holes in two different pieces to match exactly. I always take a lot of care and time over marking out the holes, although I still don't get it 100% right and sometimes find the process slow and frustrating. But, if I rushed ahead and made a mistake ruining the piece, it would mean all the time spent cutting/drilling that piece so far is wasted.

Marking out holes on the pedal arm

*As a side note on the standard M4 bolts – I brought some of these off ebay also, got a job lot of 20mm long ones, although in retrospect 16mm would've looked better and given a little more room to fasten up. Trying to get a spanner down inside the pedal arm to fasten up turned out to be a right PITA. I would've been better off with shorter allen bolts. 

Also got a job lot of M4 nuts from a site called technobots – along with some other interesting bits and bobs which I will talk about later.

Tuesday, March 8, 2011

'Spring is in the mail'


The 'spring assembly' as I am calling it, consists of an eye bolt on the end of an M8 threaded rod (sometimes called 'stud' or 'studding' (as I've learnt it's called)). The rod passes up through a hole in the support piece which is firmly bolted to the main pedal box. The rod carries on up through the centre of the spring, through a large diameter washer sitting on top of the spring before a nut is fitted to the top of the rod thereby sandwiching the spring between the large washer and the main support piece. The eye bolt at the other end is attached to the wire rope which is of course attached to the pedal arm. As the pedal is pressed, the pedal arm rotates causing the wire rope to pull down on the eye bolt. This causes the threaded rod to be pulled down through the inside of the spring, because a large washer secured by a nut is on top of the spring, then the spring is compressed by this action. Sorry this is a bit wordy but I can't show a photo because I haven't built it yet. A some point on the threaded rod inside the spring, a nut will be fitted which stops further compression of  the spring – I'm calling this nut the 'stop nut'.

Rough concept sketch





Ok, so I have been trying to (a) calculate what springs I will need and (b) find somewhere where I can buy these springs.

For the calculations of the brake pedal spring I have made some assumptions about, how high up the pedal arm the pedal will be mounted, how much angle the pedal will move through, how much angle the pedal will have to start with, how much force the pedal will be pressed with etc etc

I determine that if I push the pedal with 300N of force, through an angle of 10 degrees, from a starting angle of 45 degrees then the wire rope, which in turn is compressing the spring, will move 9.95 mm. This means that to go from a 0N load on the load-cell at rest position to 150N (about half rated load) at full pedal down, there should be a spring with spring constant ~49Nmm-1. This is quite a substantial spring, definitely not something I'm going to be able to scanvage out of an old bicycle pump.

Of course, recognising that I have made quite a lot of assumptions here and things could change in the design for any number of reasons, I am hedging my bets and buying four different springs. The most important parameters for my springs are:

  1. Spring constant (a measure of how hard to compress the spring is).

    And

  2. Spring outer and inner diameter. I need it to be big enough inside to fit my shaft and nuts (ooh-err matron). The outside diameter should be small enough so that I can fit some kind of washer on top.
Now for finding somewhere to buy the springs, this has been quite frustrating. I have found plenty of places online that sell compression springs of this type, but a lot of them are totally set up to deal with large volume trade orders and either implicitly state 'minimum order' quotas or don't indicate whether they sell to the hobbyist guy wanting just a couple of springs. Perhaps if spring manufacturers/retailers could be more implicit on their websites about what type of customer they are gracious enough to exchange goods for cash with, then I might've got an order in a little quicker.

I eventually found a place called 'ondrives' which I found through a links page on this site – which has some pretty cool projects on. I have sent in an order to ondrives.

I'm getting four springs – two for each pedal. They are all around 30mm outer diameter and 60-80 mm in length. Spring constants go (approximately) 40Nmm-1, 25Nmm-1, 4.7Nmm-1 and 1.7Nmm-1.

Monday, March 7, 2011

'L' of a job

Brake 'L' Bracket and main support

One of the complicated bits of the design was working out how to make the L bracket for the load-cell. The L needs to be pivoted somehow. To achieve this I decided to use a rectangle 'tube' piece of aluminium with the pivot point going through the side and the L bracket bolted to the top. For this I will use M4 nuts and bolts.
I have cut a piece of rectangle to length and started drilling out some of the holes. The 'big' holes are 10 mm in diameter. I will be using an 8mm diameter stainless steel (SS) shaft as the axle which will fit inside 'flanged plain bearings' that are 10mm external diameter, 8mm internal. 

I had a lot of trouble finding the plain bearings – not because there isn't anywhere that sells them, but mainly because I had no idea what they were called before now. I spent a good few hours searching for 'plastic axle sleeves' and 'you know those things that...' until I found some. I'm still not sure 'flanged plain bearings' is a standardised term but I got mine from a website called motionco.

They seem quite expensive for what they are but they will do the job. I didn't want to go without these bearings because I'd be worried getting everything to fit and rotate smoothly would not be possible, also that over time, the soft aluminium would get worn down by the steel. I will use the same size shaft and bearings for the pedal arms but the pulley axle will just be metal against metal. I'm hoping this will be ok because the pulley itself should rotate and there is no need for the shaft to do so. Also the pulley axle will be slightly smaller diameter at 1/4” (about 6.35mm in proper money*), this is due to me struggling to find any 'idler pulleys' (as I learnt they are called) for sale. I eventually found some from the place I got the plain bearings from. They are 25mm diameter plastic pulleys to fit a 3mm cable. I am bit worried that the diameter might be too small as I will be using 'wire rope' (as I learnt it is called – not steel cable) that will go around the pulley and if the wire rope is not flexible enough to round it then it may cause problems.
*I try to work in metric for everything but had to make some concessions due to the availability of parts.

Rear Support Pieces with holes for Pulley axle
Anyway, I have made progress on the pulley bracket/rear support pieces. They are each 50mm long cut from the aluminium 1/4” thick channel section. I drilled 6mm holes and filed them out until the 1/4” steel shaft would fit. I will cut the steel shaft to the same width as these piece so that when this rear support is bolted between the two side pieces, the shaft will not be able to slide out. This method saves a bit on 'shaft collars' (as I learnt they are called) which I will be using to keep things in place on the peddle arm axle. 

I am finding marking out on the aluminium quite easy by scoring my lines with the point of an old compass. 

The pedal arms have also had some drilling done to them. As a rough guide the centre of the hole is 85 mm from (what will be) the bottom of the pedal arm – where the wire rope will be, and 250mm from where the pedal itself will be mounted to the pedal arm. Here is one with 'plain flanged bearing' fitted and one without.
"Pedal Arms"


Thursday, March 3, 2011

The metal

So I have a final-ish design for the pedals and have ordered some metal for the job. I know nothing about buying bits of metal, but I discovered that it is possible to order it from the internet. I found several suppliers on ebay and made some enquires. The metal arrived today in a hefty cardboard tube wrapped with bundles of heavy duty parcel tape.

The peddle is split into two parts, the first I am calling the 'peddle box' and is the basic base structure. The second part is the what I am calling the 'peddle arm' and consists of the actual peddle itself mounted, the arm/lever it is mounted on.

The peddle box will be made of five basic pieces; two side pieces made from 1/4” thick aluminium flat, three support pieces which are again 1/4” aluminium but this time aluminium channel/'u' section.

The main reason for choosing aluminium was the availability of the metal and the fact that it should be easier to drill/cut through than using steel. I have not done any metal working before so I am not sure quite how easy drilling/cutting will be before now.

The picture shows the side view of the design. The front support piece acts as a stop for the pedal – the pedal arm will rest against this piece when it is the rest position. The main support piece is where the 'spring assembly' will go. The rear support piece will double as the mounting for the pulley axle.

Accelerator Pedal Box Plan Side View

Now I have the actual metal in my hands, I am not sure if the 1/4” thick stuff is overkill as this is really sturdy stuff. Anyway, the main support piece differs slightly for the brake and accelerator. In that the main support for the brake will be mounted horizontally allowing space for the 'L' bracket – which transfers force from the pedal to the load-cell.

Brake Pedal Box Plan Side View



The relative lengths of 'going-upy' bit of the L and the 'going-acrossy' bit of the L are important by the way. The load-cell I brought is rated at 30kg so I want the maximum force the load-cell gets to be approaching 30kg (~300N) but not over. If the across bit is set, then a really long up bit would mean not much force gets to the load-cell; a really short up bit would mean too much force gets to the load-cell.

To work out how much force I am likely to press the pedal with, I go to my gym and get on the 'seated leg press' machine. Using just my left foot I do a bit of exercise. I guesstimate that with a fairly firm but not excessive 'standing on the pedal' braking manoeuvre the force on the pedal is about 300N (lifting 30kg).

Because the pedal arm acts as a 'first class lever' the 300N applied at the pedal is translated to a greater force at the opposite end. The wire rope pulling the spring would therefore be exerting a force greater than 300N when I apply a force of 300N to the pedal. Anyway, I have a spreadsheet working all this out which helped me set the size of the 'L' bracket.

The pedal arm assembly is made from thinner aluminium pieces (I say 'aluminium' but this is actually an aluminium alloy, 6082 T6 I think – but it is not important). To start with the actual pedals (as in the bit in contact with the foot) will be very basic looking but functional pieces made from 50mm wide aluminium flat.

Oops
I try today to start making the thing. I have purchased a new hacksaw and some HSS 24TPI blades special for the job. I am still a bit unsure how easy it will be to cut through 1/4" thick Al. Turns out not too bad. But... Getting a straight cut is a bit tricky. The photo shows my first and second attempts. Was too impatient on the first cut, saw it was going awry but kept hacking away anyway. Second cut took a fair bit longer but I was pleased at the improvement over the first. The crooked cut in the first piece is now an 'extra design feature'.

Here is a list of the metal I got. I actually ordered enough for three pedals on the basis that; if I want to make a clutch pedal later on, I can do so. And/or if I mess up somewhere making the first set of pedals (quite likely) I'll have some spare pieces in stock ready to use.

* (6x) Al Flat Bar 4"x 1/4" cut to length=200 mm
* (3x) Al Square Tube. 1" Sq x 10 SWG, cut to length=380 mm
* (1x) Al round tube, 10mm OD, 1mm thick, length=250 mm
* (1x) Al flat bar, 2" wide, 1/8" thick, length=250 mm
* (1x) Al Rectangle Tube. 1.1/2" x 1" x 10 SWG, (3.25mm) length = 250 mm
* (1x) Al Unequal Angle. 4"x 2" x 1/4" length=30 mm
* (3x) Al channel/'U' section. 2"(base) x 1.1/2"(sides) x 1/4", length= 200 mm 

Bits and pieces