The FloorBoard - a Foot Operated PC Button Pad

by Wingletang in Circuits > Assistive Tech

3959 Views, 35 Favorites, 0 Comments

The FloorBoard - a Foot Operated PC Button Pad

20240805_172020.jpg

After many years of service my plastic footrest finally split in two. I ordered a (stronger) replacement manufactured by Wedo. This is the 'Relax' Tilting Footrest model 2751 available from Amazon (see supplies list).

It is a strong, well designed unit with a large range of adjustment.

It features a small compartment at the rear designed to accommodate the foot switches used by audio typists.

I realised the compartment could be adapted to take a number of button footswitches and a microcontroller to emulate useful PC keys such as CTRL, ALT and SHIFT. It could be programmed to emulate any desired sequences of keystrokes.

The FloorBoard would be useful for people with limited use of their hands hence the inclusion in the Assistive Tech channel. For example, using the foot button for 'Control' means that just one finger is required for 'Copy' (Ctrl C). This avoids the necessity of using Sticky Keys (an accessibility feature in Windows designed to assist users who may have difficulty holding down multiple keys simultaneously).

It may even appeal to gamers where it could emulate foot controls such as car and aircraft pedals.

Supplies

Footrest - Wedo Relax Footrest Tilting with Small Compartment Rear H70-210mm Platform 450x350mm Ref 2751 : Amazon.co.uk: Home & Kitchen

3D Printer - I use an Original Prusa i3 MK2 - no longer available but the current version can be found here: Prusa 3D

PLA Filament - I used black filament available here: Geeetech Black Filament

Arduino Micro - must be ATmega32U4 based to allow full USB communication with the PC.

3 x Button Foot Switches - 3Pcs Electric Guitar Effect Pedal Box Momentary Push Button Stamping Foot Switch: Amazon.co.uk: Musical Instruments & DJ

3 x Footswitch Toppers - Wresetly 5PCS Footswitch Toppers Effect Foot Nail Cap Aluminium Pedal Protection Cap with Multi Colors : Amazon.co.uk: Musical Instruments & DJ

Stripboard: 64x95mm - Rk Education Copper Veroboard/Stripboard for PCB Prototyping - Medium 64x95mm, Pack of 5 : Amazon.co.uk: Business, Industry & Science

1 x USB Lead of sufficient length to connect FloorBoard to computer. Plugs to fit the Arduino Micro and the computer.

2 x 12mm self tapping screws.

1 x 2.5mm rubber grommet.

The Compartment Enclosure

FCENS5ELZH05DTH.jpg
20221228_194905.jpg
F171K55LZH05BS1.jpg

The footrest is supplied with a cover / enclosure for the compartment - first picture. My first thought was to simply drill this cover to accommodate the button footswitches and fit the microcontroller and wiring to the underside.

I decided, however, to duplicate the enclosure using 3D printing as this would allow me to include mounting pillars for the circuit board and add some simple wire management - second and third pictures.

This approach would also allow the creation of multiple enclosures with different switch arrangements for different applications (e.g. 'Work', Flight Simulator, NASCAR, Music). The enclosures are easily interchangeable.

3D Printing the Enclosure

20221229_170552.jpg
20221228_194824.jpg
3D Builer Image Main and Clamp Bottom View.png
3D Builer Image Main and Clamp Top View.png

Making multiple measurements of the enclosure supplied with the footrest, a 3D model was produced using Microsoft 3D Builder. The case in in two parts: Main and Cable Clamp.

The two parts were printed in the orientations in the .3mf files using the following settings:

Main: 0.15mm Layer height, 20% infill, Support Material On

Clamp: 0.05mm Layer height, 100% infill, Support Material Off

Circuit Schematic

Circuit Schematic.png

The circuit schematic diagram is shown in the picture. It is very simple consisting of the connections from the button foot switches to the Arduino Micro Pro.

The circuit is powered through the USB cable that also carries the data to the PC.

Circuit Board

Circuit Board.png
20221229_170636.jpg
20221229_170756.jpg

The circuit board is shown in the pictures.

Suggested construction order:

1. Drill 4 mounting holes (3.5mm diameter).

2. Cut copper strips where indicated - I use this tool: Brimal Cutter

3. Solder the two onboard jumper wires.

4. Solder the connection block.

5. Solder the Arduino Micro into position.

I only soldered the 4 corner pins (for stability) and the four used pins GND, D3, D7 and D11.

Preparing the Foot Switch Wires

Switch Lead Lengths.png

I had some twin core wire in my stocks. This was coloured black and yellow - useful to show the cable connections in the pictures.

Cut the wires to the lengths shown in the picture.

Solder the wires to the foot switches and tin the other ends ready for insertion into the screw connection block.

Fitting the Switches and Routing the Wires

Switch Wiring - Annotated.jpg
20221229_172100.jpg
20221229_172222.jpg
20221229_172349.jpg
20221229_173202.jpg

Remove the nuts and washers from the switches.

Push the switches into the correct positions, routing the wires through the holes in the channels as shown in the first picture.

The channels / holes act as a simple system to prevent the wires moving or dropping down when the enclosure is in use. There is no base to the enclosure hence the need to keep the wires in place.

Fix the switches in place using the washers and nuts. Do not overtighten as the PLA may crack.


Connecting the Wires to the Circuit Board

20221229_175430.jpg
20221229_175453.jpg
20221229_175605.jpg

Push the wires into the correct holes in the connecting block (as shown in the pictures) and tighten the screws to make firm connections.

Routing the USB Cable

20221229_180134.jpg
20221229_180153.jpg
  1. Wind the USB in a figure of eight around the two pillars of the board mount, leaving enough cable to allow connection to the microcontroller. This arrangement helps to prevent the USB cable being pulled out of the socket.
  2. Route the cable through the exit slot in the enclosure.

Mounting the Circuit Board

20221229_180802.jpg
  1. Carefully rotate the board forwards and fit it onto the mounting pillars.
  2. Fix the board in place with two 3mm screws - do not overtighten or the PLA may break. The other two pillars have protruding pegs.
  3. Insert the USB connector into the Arduino Micro.

Fitting the Cable Clamp and Footswitch Toppers

20230102_180114.jpg
20230102_180847.jpg
20230102_183255.jpg
20240805_171921.jpg
  1. Cut the grommet on one side and push it over the USB cable and down into the slot in the case where the cable emerges.
  2. Push the cable clamp down into the slot. Use a small amount of super glue to keep the clamp in place.
  3. Put the footswitch toppers on the buttons and tighten the grub screws.
  4. Fit the completed unit into the footrest.
  5. Place the FloorBoard on the floor under your desk and run the cable to your computer.

Code

The code is shown below and the Arduino .ino file is attached.

One library is used:

  1. HID-Project - Extended HID (Human Interface Device) Functions for Arduino: https://www.arduino.cc/reference/en/libraries/hid-project/

The Library and full documentation can be found via the link.

The listing below includes comments to explain the operation of the code.


Notes:

The Main Loop polls the state of the key switches - if any are pressed the required actions are dealt with by functions at the end of the code.


The strings of characters to be sent to the PC are included in the functions at the end of the listing:


Emulate CTRL key press:

Keyboard.press(KEY_LEFT_CTRL);

Emulate ALT key press:

Keyboard.press(KEY_LEFT_ALT);

Emulate SHIFT key press:

Keyboard.press(KEY_LEFT_SHIFT);

To change to different functions, replace the line or lines with the desired key codes.


Code:


//FloorBoard - Foot Operated 3 Button Board


// Libraries

#include <HID-Project.h> // https://www.arduino.cc/reference/en/libraries/hid-project/


// constants won't change. They're used here to

// set pin numbers:

const int button1Pin = 3; // the number of the pushbutton pin CTRL

const int button2Pin = 7; // the number of the pushbutton pin ALT

const int button3Pin = 11; // the number of the pushbutton pin SHIFT


// variables will change:

int button1State = 0; // variable for reading the pushbutton 1 status

int button2State = 0; // variable for reading the pushbutton 2 status

int button3State = 0; // variable for reading the pushbutton 3 status


void setup() {


// initialize the pushbutton pin as an input:

pinMode(button1Pin, INPUT_PULLUP);

pinMode(button2Pin, INPUT_PULLUP);

pinMode(button3Pin, INPUT_PULLUP);

}


void loop() {


// read the state of the pushbutton value:

button1State = digitalRead(button1Pin);

button2State = digitalRead(button2Pin);

button3State = digitalRead(button3Pin);


// check if pushbutton 1 is pressed.

// if it is, the buttonState is LOW:

if(button1State == LOW)

{

Keyboard.press(KEY_LEFT_CTRL); //Emulate CTRL key press

}


// check if pushbutton 2 is pressed.

// if it is, the buttonState is LOW:

if(button2State == LOW)

{

Keyboard.press(KEY_LEFT_ALT); //Emulate ALT key press

}


// check if pushbutton 3 is pressed.

// if it is, the buttonState is LOW:

if(button3State == LOW)

{

Keyboard.press(KEY_LEFT_SHIFT); //Emulate SHIFT key press

}


// If all three buttons are not pressed, reset keyboard commands

if((button1State != LOW) && (button2State != LOW) && (button3State != LOW))

{

Keyboard.releaseAll();

}


}


Connect the FloorBoard to the PC using the USB cable.

Upload the code using the Arduino IDE or your favourite alternative.

Test the functioning of the FloorBoard. For example highlight some text in a word processor and then try Copy and Paste using the left foot button to emulate pressing the control key and tapping C (to copy) and V (to paste).

If there are problems, the Serial Monitor in the Arduino IDE can be used to check the operation of the FloorBoard. Be aware, however, that as the FloorBoard is emulating keystrokes unexpected actions can occur while debugging!

Final Thoughts

20240805_171921.jpg
20240805_172208.jpg

The use of the 'Relax' Tilting Footrest model 2751 gives a solid foundation to this project in both senses!

The FloorBoard has definitely increased my productivity while using programs such as AutoCAD and Word.

Which commands would you assign to the foot switches in the FloorBoard?

I hope that you have found this Instructable interesting. I look forward to your feedback and seeing your versions of this project including alternative button layouts for specific applications such as games and simulators.

I will be especially interested in seeing if this device has proved useful to anyone with problems using two hands.

I use the FloorBoard in conjunction with the MacroMitt - a five key, one handed keyboard for frequently used functions in AutoCAD. See my Instructable for details: AutoCAD MacroMitt : 10 Steps (with Pictures) - Instructables