Pédale Vite v2 — Building instructions

Table of content

  1. Introduction
  2. Required materials
    1. Drawings
    2. Materials
    3. Tools
  3. Step-by-step building
    1. Enclosure
    2. Electronics
    3. Assembly
  4. Software setup
    1. Preparing the system
    2. Startup and system update
    3. Basic configuration
    4. Boot time optimisation
    5. Software dependencies
    6. Installing Clang (optional)
    7. Installing Pédale Vite
    8. Pédale Vite autostart
    9. Read-only operating system and other optimisations
  5. Maintenance
    1. Tests and troubleshooting
    2. Source code
  6. Possible improvements and variations
  7. Version history

I. Introduction

Pédale Vite is a DIY (“do it yourself”) multi-effect pedalboard for guitar and bass. This manual decribes how to build it and install all required components.

I want to make it clear, this project is quite complex moderately difficult but within reach of everyone. One does not need to be a DIY genius. One does not need to be dexterous. No specific ability is required. All used skills (soldering, drilling…) are not trivial but they are easy and quick to learn.

However the realisation requires a significant amount of work, count about ten days of work. This is approximately the time I’ve spend to build Pédale Vite. And I’m far from being well organised and dexterous. I’m pretty sure seasoned people could halve this time without hassle.

It is advised to start by reading the full instructions before beginning, in order to have a better view of the operations.

II. Required materials

The project’s GitLab repository contains all the required files.

Some documents have been exported to .png or .pdf for convenience.


Drawings are in the doc folder in the repository.

These drawings are not exhaustive. For example, cables for the Pi powering or power cords are missing. However these parts are quite simple and don’t need detailed instructions.


The bill of materials is in doc/bom.ods on the repository. It shows quantity, quality and physical constraints, as well as an indicative price without tax (from the shop where each component was bought). It’s possible to cut down the price on several components. Some of the parts I used are leftovers from other projects or were bought in unnecessary large quantities here. It is possible to optimise this point. It’s also possible to use other materials, as long as they are compatible or adjustable to the existing design.

For your information, all the resistors are ¼ W, mostly because of their size on the board.


Tools alone can be expensive. Don’t hesitate to borrow them, steal them or buy them collectively.

III. Step-by-step building



First, don’t forget to protect yourself with goggles, respirator and gloves, and possibly some noise reducer depending on your cutting and drilling tools.

Cut the plate with a cutting disc mounted on the multi-usage handheld tool. Use a plank as a guide for the tool so you can cut as straight as possible. Spray cutting oil on the line to avoid heating and save the cutting discs. If you’ve never done it before, it’s recommended to practice on a scrape before.

Cut the following panels :

Note : front and bottom panels can be made of aluminium instead of steel.

Once the panels are cut, deburr with a file and slightly round the corners.

Important : operations are done on the inside of each panel. The drawings are all inside views.

Draw some marks for the drilling and cutting, referring to the drawings (Panels layer). Mark the centers with the center punch. Use the compass to delimit the holes which will be drilled with the reamer. Drill these ones first, with cutting oil. Stop drilling when the reamer reaches the hole outline. Get the component and try to fit it in the hole, and drill slightly more if required.

Deburr the hole with a dedicated reamer or use a cutting disc to eliminate the excess of metal.

Cut two 520 mm pieces from the corner piece. They will join the top panel with the bottom and front pannels. The smallest part of the L will be on top and the longest will be vertical. If required, file the top part of one of the pieces to make room for the display screws.

More room for the screws. Actually it wasn’t really necessary.

Cut two 250 mm corner pieces that will be used as lining for the panel. One of them is stepped over by the audio board; make sure there will be no contact when everything is in place. If so, remove some matter off the corner piece with a file or a cutting disc.

Clamp the latter corner pieces with the plate and drill their common holes simultaneously.

Drill the remaining holes and deburr if necessary. The small holes without indicated diameters one the drawings are 3mm wide. The position and diameter of some holes depend on the actual material you could gather (power socket and switch, connectors, etc.) Don’t blindly follow the drawings, check what you really need and adjust if required.

The LED holes have a 5 mm diameter. It is possible to enlarge them slightly to 6 mm while shifting down the center from half a millimeter. This allows the LEDs to be brought down to the enclosure surface while being still visible even at high incidence.

My LED holes are pushed even further and are slightly oval.

Nota bene : the holes to screws the side stands and pillars are slighty shifted at the corners so the screws can cross without colliding.

Screws unalignment, front panel.

It may be easier to leave aside the holes going through the long corner pieces. They will be drilled once these pieces are put on the assembly.

Cut the rectangle zone. Start drilling the corners with a small bit (3 mm is OK, at 1.5 mm from each corner), this will ease joining the cuts. Then cut the lines with a small disc. Deburr and square the angles with a rectangular file.

Side stands

Take a 18- to 20 mm-thick plank (max). Cut two trapezoidal shapes, 250 mm on the side with both right angles, and 30 and 70 mm on the adjacent sides. You can check that the opposite side is about 253 mm. The right angles are on the top. Please refer to the drawings (Structure layer) for the dimensions and locations.

With a wood saw and a chisel, cut the windows for the Pi connectors and the gain controls of the audio board.

Window for the Pi connectors.

Then drill and screw the metal plates on the inside.

Screw the front, back and top panels on these wood pieces. Use 3 mm screws, not too long.

Put the long corner piece on the angles and hold them tight. Drill the holes through the corner pieces, the panels and the wood pieces with a 2 mm drill. Then drill the metal parts only with a 3 mm drill.

It is possible to drill all the holes through the corner pieces, even the pillar ones. Add the last side stand screws. Add short metal screws (8–10 mm) with nuts and washers to hold the corner piece against the top panel.

Center pillars

The center pillars will support the linings made with the corner pieces. First, screw the latters to the plate if it is not already done. Then cut the pillars of 20 mm square section in wood, preferably a strong variety. One can take the offcut from the previous planks.

The vertical shape of each pillar is a trapeze (side view). The angle (9°) is located at the bottom. The length difference is about 3 mm. Cut a pair of pillars of 30 and 33 mm for the front, and another pair of 67 and 70 mm for the back. Subtract the corner piece thickness from these lengths. Anyway you can also add about half a millimeter which will be trimmed later with a file.

Hold the pillars on the assembly, drill the holes and add screws. Put the assembly on the floor, and check it is not wobbly. If it is, trim the pillar excess with a file.

Then, the baptism of fire : put the assembled enclosure on the floor and stay on it. It should not bend nor give any sign of weakness.


The boards

The main board, audio board and 2×15 V AC to DC converter boards are PCBs that you can make manufacture with the Gerber files contained in the doc/boards subfolders.

The other boards are obtained by cutting the following rectangles in the prototyping boards :

Standard prototyping boards contain 61×38 holes. Therefore it’s possible to extract all the boards from the same board. It is possible to use a veroboard or a matrix board, the latter being easier for the circuits to be implemented here.

To cut the board, a metal saw does the job well. Fasten the board on a workbench with a vice or a clamp, between two wood boards to avoid damaging it. Cut it following the middle of a row of pads, of holes, to take advantage of the existing holes.

Drill the mounting holes at the four corners with a 3 mm drill. Without drill press, it’s better to use an existing hole as a guide. Locate each drilled hole at the middle of a 3×3 pad square, free of any conductive function (check doc/boards/misc-boards/misc-boards.kicad_pcb).

When the LED board is cut, build its mounting device before soldering the components. Just see below.

Soldering the PCBs

Main board

Solder the components in order of height. First the flat resistors, then all the ceramic capacitors located out of IC sockets.

Then check that the internal capacitors can fit inside the sockets without any problems. If necessary, file the plastic of the sockets so that everything fits in correctly without forcing. It is possible to tilt the capacitors or slightly offset them, up to a certain limit.

Then solder the sockets, then the internal capacitors. Then the vertical resistors, then the transistors. Finally, the HE10, Dupont and NSK254 connectors.

Do not immediately place the IC in their holders, there are checks to be done beforehand, see below.

Audio board

This board requires some attention. Indeed, there are two surface mounted technology (SMT) components, the CS4272 codec and the MK2703 clock. The CS4272 is particularly delicate since it is a TSSOP, with very thin legs (0.63 mm pitch). These two components must be soldered first. You will need thin soldering wire (0.5 mm), and depending on your visual acuity, perhaps a magnifying glass or a microscope. Very good lighting is necessary in all cases.

There are various soldering techniques for this type of component, generally involving first soldering two legs to immobilize the part, then soldering the rest. There are many photo or video tutorials for manual soldering of SMT chips. The solder flood technique works relatively well, but requires a minimum of practice to be executed cleanly and efficiently. Feel free to practice beforehand on adapter boards with cheap IC that can be sacrificed without regret. Otherwise, go back to the simplest technique, leg by leg. The biggest risk is to pour solder under the chip, behind the legs and bridge them without possibility of going back. In case of a problem, it is almost impossible to unsolder the chip without damaging it (mechanically or thermally) and start again, unless you have a suitable hot air gun.

If you do not feel confident enough for the operation, entrust it to an experienced or professional person. However, it is not that difficult, this board was my first TSSOP chip soldering experience and it works very well.

The audio board.

After soldering the SMT chips, the components are soldered in their order of height : small 1N4448-like diodes, resistors, larger Schottky-like diodes, ceramic capacitors, integrated circuit holders, film capacitors, Dupont connectors and sockets for transistors and regulators, inductors, choke, and finally, in no predefined order, electrolytic capacitors, 5 V regulator, NSK254 power supply connector.

The Q1-Q3 transistors, D9 voltage reference and IC4 regulator are mounted on a single-row round-pin socket rather than soldered directly (this is optional).

Put the quartz in this list according to its actual size, but before soldering it, make sure there is a gap between the component and the PCB. You can insert a piece of cardboard to ensure the gap and remove it once the soldering is complete. Be careful not to overheat it, it could burn.

Tilt the inductors of each channel to form a mutual right angle.

When everything is soldered, fasten the thermal dissipator to IC3.

Finally, insert a jumper on JP1 to select the least significant bit of the board I²C address. Put it between pins 2 et 3 for the address 0, expected by the software part.

I²C address selection with JP1.

As with the main board, do not place the chips in their sockets immediately.

15V AC to DC board

Nothing much to say about this board supplying power for the audio board. Don’t forget to fasten the thermal dissipators on the voltage regulators. L1 and L2 coils have to be bent to form a mutual right angle.

±15 V rectification and filtering. Ignore the model of the diodes in the bridge, it’s not the same as the one in the BOM list.

Soldering the prototyping boards

For all the boards : on the component side, first place the main components without soldering them, with the help of the PCB drawings. Draw their outline with a lead pencil. This will ease the placing of the other components.

Making tracks

To connect the components on a matrix board, it may be necessary to create tracks on the copper side. These tracks appear in green on the drawings (B.Cu, back copper layer in KiCAD/Pcbnew). To help, capture a screenshot of the diagram (seen from the component side) and mirror it horizontally with a graphic software (Gimp, Photoshop…) This gives a wiring diagram with the correct orientation.

To create a circuit wire, unroll some non-insulated tinned wire. Pull it with a plier in one hand and the reel in the other hand until you feel it has slightly stretched. Stop immediately to avoid breaking it. Then the wire has become straight. Cut it to the desired length (a large segment that will be reused, or a bit more than strictly required for a single connection).

To place it, start from the first free pad. Avoid starting on a pad filled with a component leg, use the next one on the path. With a plier, bend the end of the wire on 1 or 2 mm in order to make a small hook, which will go in the selected pad. Then bend the wire with the plier to make the desired path. You can use a pattern to help measuring the sections, for example with some offcut of the boards. With complex paths, control the wire from time to time by placing it on the circuit and correcting if required. When you’re done, make another hook, control the path and cut the end.

Check carefully what will be soldered on the path. It can be necessary to move aside from the center of the pads to make room for the component legs.

Solder at the ends and at the angles. Add soldering joints on the longest segments, to consolidate.

When soldering components, you will have to add a small bridge to link the track to the component leg.

Wires on the components sides

Some boards require wires on the component side. Strip the insulation on 2–3 mm. Wedge it in the hole with a crocodile clip. Don’t bite the wire near the soldering point. Instead, make a kind of reversed U by holding the wire a few centimeters further and by entering the hole perpendicularly to the board. When the wire is heated, the insulation will probably retract and the pressure will make the wire move forward, keeping the insulation as close to the board as possible. This is necessary to avoid short circuits with several wires close to each other.

5V power board

Solder the terminals and then the power supply unit. Connect the legs by soldering bare copper wires or by laying large solder bridges. Refer to the PCB diagram to place these tracks.

Some tracks and pins (J501 and pins 1 and 2 of the power block) carry mains voltages. It will be necessary to carefully scrape the copper around these tracks over at least one pad (2.5mm wide) to avoid any possibility of short circuiting. A mini drill with a small rounded cutter is perfect for this job. Bonus : cover these tracks and pins with varnish.

Also, pay attention to the mounting holes. Ensure that nuts, washers and spacers remain far enough away from the mains tracks.

Navigation switch board

On this board, the switches are on the copper side and the connector on the component side. There are two possible approaches. The first is to use the copper on the board to make certain connections, such as ground. This option is relatively simple if you use a Veroboard instead of a matrix board; just cut the tracks in the right places. This is the solution I chose because I had got rests of Veroboard. In the case of a matrix board, tracks must be formed by adding bare copper wires or solder bridges. These conductive elements will then lie under the switches. Ensure that the switches, once in place, rest in a stable and horizontal position on the tracks. In addition, care should be taken to leave open holes to insert the legs of these switches, which can be complicated.

The second option is to wire everything on the component side with insulated wires. In this case, start with the elements near the connector, as the wiring will become quite dense there.

Solder the switches row by row, one by one, from the above. Soldering between two switches can be a little tricky, be careful not to melt the plastic while walking around with the iron. Make sure that the switches are firmly attached to the board when soldering. Indeed, they will have to cope with high and regular pressures, and this must not stress the solder joints.

It is not necessary to connect all the legs. Each switch has four legs, they are connected two by two internally, constituting two unique poles. You can solder and connect just one leg of each pole. Depending on the connection solution chosen, solder the cables as you go along, or after soldering all the switches. It is up to you to evaluate what will be the most practical to do. On the connector, there are only two ground legs for the six switches, so you will need to make derivations.

Navigation switch board, component side.
Here, a strip board (Veroboard) has been used to simplify the wiring.
Wires are soldered on both side for practical reasons.
Rotary encoder boards

Like the navigation switches, encoders are solered on the copper side. Ideally, the encoders should be fastened first on the front panel then soldered on the board. However the gap between the encoders and the panel is small, which is not handy.

If it’s too complicated, solder the component as best as you can, check with the panel and fix them if necessary. You can even enlarge slightly the holes with a round file.

Connect the connectors to the encoders using solder bridges. For the two navigation encoders with switches, add insulated wires on the component side to connect the connector legs to both terminals of the switch.

Rotary encoders for parameters
Rotary encoders for navigation
LED board

The LED board is somewhat special because it has component on both sides and requires a stand.

The stand supports the LEDs. It lies just under the front panel. Because of the LED size I used (compact ones), my board was about 2mm thick. For higher, standard LEDs, 3–5 mm is fine. It can be in wood, plastic or any other material. There is no specific size for the stand, just fully cover the circuit board, but don’t hesitate to make it larger. Just watch it will not collide with other items in the enclosure.

When the stand is ready, tie the board to it with a clamp, on the copper size. Drill the mounting holes on both elements, so they are correctly aligned. Mark the LED positions on the stand with a pencil through the circuit board holes receiving the LED legs.

Detach the stand and mark the center of the LEDs. Drill the LED holes (⌀ 5 mm). This requires accuracy because the smallest error becomes visible, in an aesthetic point of view.

Put the LEDs on the circuit board without soldering them and assemble everything : the stand wedging the LED heads, the circuit board maintaining the LED legs, the nuts, bolts and struts holding both parts far enough from each other.

The struts must be big enough to leave a couple of millimeters between the circuit board and the LED heads. Indead, LEDs are mounted on the copper side, and will be solered on this side. One-centimeter high struts should be good. If required, use washer to add missing millimeters. Make sure the screws are long enough, counting the panel thickness, nuts and washers.

Make sure the LED are aligned before solering them. Once done, disassemble the board to solder the other components.

Assembly made for a Pédale Vite prototype
LED board, mounted.

Connection checks

Before attaching the ICs, the connections must be checked. Use a multimeter in diode test mode or ohm-meter mode. It’s important to do it before mounting the IC on their sockets, because these IC may have internal contacts which will distort the results. Or worse, they could be damaged by the test.

You need a table summing up all the pins of all the connectors. For each of them, check the following :

These tests don’t guarantee that things will be running smoothly, however they help to detect a lot of potential short circuits.

Once the check is done, ICs can be fit into their supports.


To connect the Pi and the main board, an old IDE cable does the job well; it is basically a 40-pin HE10 cable. Sometimes the connection is keyed and one of the hole is sealed. Just drill it with the tip of a knife or scissors, the female part of the connector should be there. Check it with a multimeter. Make sure that the cable is a 40-wires one and not a more recent 80-wire Ultra-DMA cable, their layouts are not compatible. Regarding the orientation, the wire which is on the SD-card side on the Pi must land on the left side on the main card.

For the other cables, check the spreadsheet indicating the connections (each letter identifies a wire), the connector types, and the cable lengths. Some cables have crossed wires.

You can twist the cables, this is handy and sometimes makes them more immunte to noise. However, the more the cable is twisted, the shorter it becomes.

Some connectors are keyed, make sure that the female part has the same orientation as the male part. On the other hand, Dupont connectors are not keyed. You must be careful during the connection. You can put a painted mark on both male and female parts to match them more easily.

Buttons and footswitches share a few ground wires. Prepare the cables by crimping them on one side only. They will be soldered and connected later.

Audio wiring and ground

All the audio connections should be done with shielded cables, the shield being tied to the ground. Cables with two wires but not shielded (like the gain pot or pads) should be twisted. More generally, use as shortest wire as possible, to minimise exposure to noise.

To prevent ground loops and their induced buzz, the ground should be wired in a star topology, and at worst, in a tree. The links between different ground sections should be unique, otherwise a ground loop is formed.

In Pédale Vite, ground is arranged in the following manner :

All these considerations should give a loop-free ground.

Ground map (bold lines).
Audio input (left) and output (right) connectors.
Please ignore the resistors soldered here for an experiment.
Connection of the analogue and digital grounds with JP2 on the audio board.

Interconnection of the enclosure plates.
Expression pedal connectors.
Mounting holes isolated from the ground on the display board.
Pi power supply

Raspberry Pi 4 can be powered by a USB-C plug or the GPIO port. We will power it with the USB-C, the ribbon cable connected to the GPIO being not strong enough to convey the required 3 A.

Because it is very difficult to find a naked USB-C plug, we are going to use a USB-A to USB-C powering cord and cut it. We just need about 15cm from the USB-C plug.

Now we should identify the wires. Get the other part of the cable, ending with the USB-A plug, because this plug is bigger and it will be easier to check its pins. From the front, the connector pins being turned upwards, the negative power pin is located at the far left, and the positive one at the far right. Also, it is very likely that the shield is connected to the negative pin. For the +5 V pin, check the continuity between each wire and the pin. Do not trust the insulation colors.

One both wires are found, strip the insulator on 3 mm. If you got the tools, crimp them with small cylindrical terminals, because these wires are thin and may move in the terminal blocks. If not, strip more insulator and fold the copper in order to get more material. Fold the other wires against the main cable and attach them with insulated adhesive tape.

Finally, connect the cable to the terminal blocks according to the polarity.

Pi power supply. The 5 V cable is the white one.


First assembly

Most parts can now be screwed to the enclosure : boards, plugs, switches… Because the Pi is very close to the top panel and its PCB is quite flexible, it will be necessary to cut the legs from the USB and RJ45 connectors, which are longer than the other through-hole components. The micro-SD card drive is quite high too. It is connected to the ground so it is not a real problem, but we want to avoid ground loops. To be safe, line the Pi location on the panel with insulating adhesive tape.

Enclosure inside, no cables, no Pi.

Put some insulating tape on the corner piece below the audio board, too.

Also, it will be necessary to put some insulating tape on the bottom metal sheet, in front of the transformer screw. Indeed, if there were a conductive loop going through the torus, it would be equivalent to a short-circuited turn, and would endanger the transformer.

Insulation to protect the transformer screw on the bottom plate.

Speaking about the transformer, I estimated necessary to add a large washer on its mounting screw, to avoid plate deformation under the transformer weight.

Washer stiffening the plate part holding the transformer.

Heights of the struts for each board :

At this step, it is probably advised to mount the Pi only temporarily. Indeed, access to the SD card will be required when installing the software. When everything will be mounted, it will be difficult to access it.

Mains cables

First, insert a fuse in its support, along with a spare one in the second slot. Check with a multimeter how the C14 socket and the switch are wired.

Use stranded wires designed for power supply. Before soldering anything, don’t forget to pass the wires through the insulated sleeves protecting the plugs. Use enough cable to make sure that these sleeves can be moved back when soldering.

There are several cables to build : two for the line and neutral between the socket and the switch, one between the earth and the enclosure, and two between the switch and the 5V module. The 15V transformer has its own wires, which should be connected at the output of the switch too. Therefore the switch lugs should connect two wires each, one going to the 5V module, the other one to the 15V transformer.

If you have got the tools to crimp Faston terminals, cut the wires to the required size and crimp them. Don’t forget to crimp both cables on the same terminal for the switch lugs.

Once the terminals are crimped, add a insulating box. It may be necessary to slightly bend the male lugs on the C14 and switch block to prevent any contact with the bottom part of the enclosure.

Mains wiring using insulated Faston terminals.

Without Faston terminals, the wires should be soldered. Before soldering, don’t forget to put two or three heat-shrinkable tubes per solder joint to avoid letting conductive parts exposed (with the exception of the earth wire).

Fasten both outputs from the transformer in the terminal blocks of the 15V board. These two outputs should be wired in series with the same polarity. On the board, both central terminal blocks are wired together. In case of doubt, check the transformer with a multimeter. If the voltage in series is very small, invert one of the transformer outputs.

2×15 V transformer secundary connected to the AC to DC board

Soldering the footswitches

There is less ground wires out of the connectors than signal wires. Four for the footswitches. Just solder the ground wires to the closest switches and daisy-chain it to the switches nearby.

Footswitches requires some attention, if xPDT are used. First, the contact position is unique per switch (there is no reliable mark on the enclosure). The common pin (for the ground) is on the center, that’s all we know. Check with a multimeter what is the pin shored when the switch is held down.

The footswitch model included in the list is a robust one. However, depending on the model you got, the plastic box may be quite sensitive to heat and could melt easily. If one of the pin just slightly moves during soldering, the contact may be damaged. If it happens on DPDT switches, you can desolder it and try the other path. Always check the contact with a multimeter once both pins are soldered.

When all footswitch wires are soldered, they can be grouped by connector.

Connecting the footswitches.

Last adjustments and enclosure closing

Add the remaining cables. All of them.

Main board, hyperconnected.
Don’t pay attention to the inversion of the blue and green wires on the audio board connector. There was a mistake in this board version.
Output connectors on the audio board. The balanced output is on the 1–2–3 part.

Personnally, I haven’t included the gain potentiometer and switches for the audio board because I don’t need it at the moment. Instead, I used jumpers to select the microphone level instead of the line level at the XLR input and set the global gain with a simple resistor.

Lazyness wins. No controls for the gains (yet).

For a given input gain, the resistance in ohms is given by the following formula :

R = 2000 / (Glin − 1) = 2000 / (10GdB/20 − 1)

Where Glin is the linear gain and GdB the same gain expressed in decibels. To obtain a unit gain, an infinite resistance is needed, so the Gain pot connectors should be left empty. Practically, it is probably more advised not to go over 10 kΩ to avoid brining too much thermal noise in.

To hold the resistor, crimp its two legs in Dupont female terminals, put them in a box and use it as a jumper.

Resistor in a Dupont box.
Input connectors on the audio board. Mic level is selected with two jumpers, some switch slots have been left empty and a resistor replaces the gain pot on the first input.
Enclosure content is ready. Anyway on this version, the touchscreen wiring is missing.

When everything is ready and the enclosure can be closed, adjust the ground terminal for the bottom plate so it lies just on the plliar screew hole. Put the plate. Insert 40 mm screws in the rubber legs and screw them in the pillars and side stands without forcing. The rubber legs just should stop spinning freely, don’t tighten the screws more. Be careful with the screws (ore more exactly the screw treads in the holes) because it is possible that you will have to open and close the enclosure many times for final adjustments and later, maintenance. Actually I advise not to close the enclosure until the pedalboard is fully operational, and to remove the Pi for software install.

Eight legs for a single enclosure.
Pédale Vite from the back.

During your tests, if you realize that you inverted some footswitches, switches, rotary encoder directions or other things, it is still possible to invert them back. Either on the hardware side by swapping some wires within a connector, either on the software.

Note : The Pi 4 is known to overheat easily. When the load is important, the clock speed is reduced to thermally protect the CPU. However Pédale Vite does not use all the available processing power. The internal temperature stays always below 65 °C, given tests done at a 17 °C ambient temperature and an important load, reaching the stability limit (90 %). One can extrapolate that there is no risk of thermal throttling up to 40 °C. So no additional cooling system (active or passive) is required.

IV. Software setup

This part is easy but a bit laborious because it requires a lot of manipulations. However most of them can be scripted. I will try later to do it to simplify the task.

Preparing the system

Minimum recommended version for Raspberry Pi OS is Buster (listed as Legacy) from 2019-09-26. Prefer a 64-bit OS, but 32-bit ones work too. Whatever OS you pick, make sure it is a Lite version.

Bullseye (2022), Bookworm (2023) and later

Using the Raspberry Pi Imager is preferred in order to customize the system image with a default user account on which you can log on with SSH. Download and install the Imager. As Operating System, select “Raspberry Pi OS (other)” then “Raspberry Pi OS Lite (64-bit)”, or “Use custom” at the very end of the list if you previously downloaded a specific version.

Click on the gear icon (Avanced Options), check Enable SSH while allowing the password mode, check Set username and password and fill both fields just below. Save.

In Choose storage, select the drive where the micro-SD card will be written. Finally, click on Write to start the operation.

Buster (2019)

Download Raspberry Pi OS. Unpack somewhere the .img file contained in the archive.

First format the card, if not previously done :

On Windows, download Win32DiskImager (ImageWriter), install and run it. Select the unpacked Raspberry Pi OS image (the .img file). Make sure that Device points on the right drive. Click on Write, confirm and wait for the image to be copied on the card.

Then allow SSH accès during the first boot. To do so, go to the partition root named boot and create an empty file (its content doesn’t care) named ssh.

Commmon instructions

The system is now ready to be run for the first time. Remove the micro-SD car from the computer and insert it in the Pi socket. This can be tricky if your Pi is already in the enclosure, because the SD-card reader is not accessed easily. In this case, hold the card at the very end of small pliers and introduce it gently below the Pi board.

Plug the Pi to the network and to the power supply if it is not mounted yet.

Startup and system update

Start up the Pi, wait for the system to load and SSH to run. Normally, the Pi is allocated an IP address with DHCP. Check this address with your network devices. If not possible, you must plug a display and a keyboard before the first start up and use the local terminal.

Log in with the default identifiers (pi / raspberry) or the user specified during installation.

If required, you can set your language and keyboard preferences (optional) :

sudo raspi-config

Select 5. Localisation Options and set your language and keyboard preferences. Finally, hit the left arrow to select Finish. No need to reboot once it is done, we’ll do it a bit later.

Important : from there and until the end of the software setup, the Pi will require an internet access. Make sure it is available.

Now, update the system :

sudo apt-get -y update
sudo apt-get -y dist-upgrade

This will take a while. Sometimes, a information message will block the operation. Scroll down and quit the text viewing program to continue.

We can reboot now :

sudo shutdown -r now

Basic configuration

Let’s begin with some settings. We’ll need to activate the SPI and I²C interfaces to communicate with our components.

sudo nano /boot/config.txt

Modify the following lines by commenting or uncommenting them, as follows :


Therefore the default audio device is removed. The last line is written in different locations, make sure to comment them all. Add the following lines in the [all] section at the end :

# Disable rainbow image at boot

# No delay at boot

# Waveshare 4 inch HDMI LCD
hdmi_timings=480 0 40 10 80 800 0 13 3 32 0 0 0 60 0 32000000 3
# Looks like the touchscreen driver uses the SPI interface exclusively

# No Bluetooth, no WiFi

Beware, the instruction dtoverlay=ads7846…ymax=3900 fits on a single line. Ctrl+X to save and quit. Then, we ask to load the I2C module during boot :

sudo nano /etc/modules

Add the following lines at the end of the file :


Prepare a mounting point for a USB drive :

sudo mkdir /mnt/sda1
sudo chmod 775 /mnt/sda1

Boot time optimisation

Edit the file :

sudo nano /etc/modprobe.d/raspi-blacklist.conf

Add the following lines to deactivate WiFi and Bluetooth :

blacklist brcmfmac
blacklist brcmutil
blacklist btbcm
blacklist hci_uart

Then type :

sudo apt-get remove -y --purge pi-bluetooth

And we reboot again :

sudo shutdown -r now

Software dependencies

Install git, Jack2, ALSA and autoconf :

sudo apt-get -y install libjack-jackd2-dev libasound2-dev \
   git autoconf raspberrypi-kernel raspberrypi-kernel-headers

Clang installation (optional)

It is possible to install a recent version of the Clang compilation suite. This step is optional, but Clang allows a significant speed-up (about +25 %) of the Pédale Vite application, relative to the default GCC compiler. Here, we’re going to install Clang 17.0.2, the latest version at the time of writing, but more recent versions may exist. If so, you can replace the 17.0.2 in the first of the following lines with the newer version identifiers. Anyway you could also keep Clang 17.0.2 which does perfectly the job.

Note : 14.0.6 is the latest version working on Buster. Subsequent versions require a more recent libc6 version which is not available as an update.

Note also that Clang requires about 3 GB on the drive. Make sure you’re not going to run short on space.

In the second script line, possibly change the architecture type :

cd ~
wget $llvmbaseurl/llvmorg-$clangv/clang+llvm-$clangv-$clanga.tar.xz
tar -xvf clang+llvm-$clangv-$clanga.tar.xz
rm clang+llvm-$clangv-$clanga.tar.xz
mv clang+llvm-$clangv-$clanga clang_$clangv
sudo mv clang_$clangv /usr/local
echo 'export PATH=/usr/local/clang_'$clangv'/bin:$PATH' >> .bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/clang_'$clangv'/lib:$LD_LIBRARY_PATH' \
    >> .bashrc
. .bashrc
clang++ --version

Theoretically, everything should work well, however I encountered some issues when running executable files using the bundled libc++, which was not found. The following lines will fix the problem :

echo '/usr/local/clang_'$clangv'/lib/' > ./clang.conf
sudo mv ./clang.conf /etc/ld.so.conf.d/
find /usr/local/clang_$clangv/lib/ -maxdepth 1 -type d \
    -name "*-unknown-linux-gnu*" > ./libc.conf
sudo mv ./libc.conf /etc/ld.so.conf.d/
sudo ldconfig

It seems that updating libc.conf is only required from Clang 15.

Installing Pédale Vite

First, download the code in ~/Documents.

cd ~
mkdir Documents
cd Documents
git clone https://gitlab.com/EleonoreMizo/pedalevite.git

Setup the project configuration :

cd pedalevite/build/unix

To select Clang as compiler (installed at the previous step or with the package manager), replace the last line with :

./configure-v2-release CXX='clang++' CC='clang'

Finally (for all versions), compile it :

make -j4

Check that everything succeeded and that there is an executable file pedalevite in the current directory. Then install the software in its dedicated folder, as well as some other files :

sudo mkdir -p /opt/pedalevite/bin
sudo mkdir -p /opt/pedalevite/etc/config
sudo mkdir -p /opt/pedalevite/etc/font
sudo mkdir -p /opt/pedalevite/var/audiodump
sudo cp ./pedalevite /opt/pedalevite/bin/pedalevite
sudo cp ../../bin/cmd_rofs.sh /opt/pedalevite/bin/cmd_rofs.sh
sudo cp ../../etc/font/* /opt/pedalevite/etc/font

The Pi can possibly be connected to all the required cards and peripherals (see the building instructions). Once done, run Pédale Vite for a quick check :

sudo /opt/pedalevite/bin/pedalevite

The program should run normally. Ctrl+C to stop it, or quit it from the user interface menus.

Pédale Vite autostart

Create this file :

sudo nano /etc/init.d/pedalevite

Modify the file the following way :

# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
    set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
# Provides:          pedalevite
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts and stops Pedale Vite
# Description:       This service is used to process the sound from a guitar

case "$1" in
        echo "Mounting Pedale Vite directory as R/W..."
	mount --bind /opt/pedalevite/ /opt/pedalevite/
	mount -o remount,rw /opt/pedalevite/
        echo "Starting Pedale Vite..."
        /opt/pedalevite/bin/pedalevite &
        echo -n performance | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor > /dev/null
        echo -1 | sudo tee /proc/sys/kernel/sched_rt_runtime_us > /dev/null
        systemctl stop getty@tty1.service
        echo "Stopping Pedale Vite..."
        killall pedalevite
        umount /opt/pedalevite/
        echo "Usage: /etc/init.d/pedalevite start|stop"
        exit 1

exit 0

Then :

sudo chmod +x /etc/init.d/pedalevite
sudo update-rc.d pedalevite defaults

Pédale Vite will run automatically at the next reboot. It can be run immediately, too :

sudo /etc/init.d/pedalevite start

Read-only operating system and other optimisations

This part should be done with care in order not to let the system enter an inconsistent state.

Script to enable the write mode back

First, add a little helper script to switch the filesystem back in read-write mode. You will need to manually execute this script each time you need to update something, compile or any other operation requiring disk write.

cd ~
nano fs-rw.sh

Add to this new file :

sudo mount -o remount,rw /
sudo mount -o remount,rw /boot

Give it the execution permissions :

chmod +x ./fs-rw.sh

Main course

Let’s remove tasks that are not required nor adapted to read-only operations :

sudo apt-get remove -y --purge triggerhappy logrotate dphys-swapfile fake-hwclock
sudo apt-get -y autoremove --purge

Replace log management with busybox (use logread if needed) :

sudo apt-get -y install busybox-syslogd
sudo dpkg --purge rsyslog

Edit the boot parameters :

sudo nano /boot/cmdline.txt

Add fsck.mode=skip ro logo.nologo at the very end of the line :

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait fsck.mode=skip ro logo.nologo

Replace some var subfolders with symbolic links on the RAM-disk :

sudo rm -rf /var/spool
sudo ln -s /tmp /var/spool
sudo rm -rf /var/lib/lightdm /var/cache/lightdm
sudo ln -s /tmp /var/lib/lightdm
sudo ln -s /tmp /var/cache/lightdm

Edit var.conf :

sudo nano /usr/lib/tmpfiles.d/var.conf

Replace the spool permission 0755 with 1777 :

d /var/spool 1777 - - -

Edit fstab :

sudo nano /etc/fstab

Add ,ro after the defaults for the disk patitions :

proc            /proc           proc    defaults             0       0
/dev/mmcblk0p1  /boot/firmware  vfat    defaults,ro          0       2
/dev/mmcblk0p2  /               ext4    defaults,ro,noatime  0       1

These lines may also start with PARTUUID= or the first partition may be mounted directly on /boot. Also add the lines :

tmpfs           /tmp            tmpfs   nosuid,nodev         0       0
tmpfs           /var/lib/systemd/timesync tmpfs   nosuid,nodev         0       0
tmpfs           /var/log        tmpfs   nosuid,nodev         0       0
tmpfs           /var/tmp        tmpfs   nosuid,nodev         0       0

Edit rc.local :

sudo nano /etc/rc.local

Add the chmod before the exit 0 :

  printf "My IP address is %s\n" "$_IP"

chmod g+w,o+w /tmp
exit 0

Prevent the automatic system updates :

sudo systemctl disable apt-daily.timer
sudo systemctl disable apt-daily-upgrade.timer
sudo systemctl disable man-db.timer

Important note : The /etc/resolv.conf file is being set to write only, like all others. This file contains DNS adresses which are generally automatically attributed at the DHCP stage. From now, they won’t be updated during a connection to the network. This could be a problem or not, depending on the network environment.

Optional : to automatically switch to read-only mode when logging off, edit or create the bash.bash_logout file :

sudo nano /etc/bash.bash_logout

Add the following lines at the end :

mount -o remount,ro /
mount -o remount,ro `(mount | grep "/boot" | awk '{print $3}')`

Reboot. Pédale Vite is now functional.

At this point, it is recommended to check if the system date is updated correctly when connected to the internet. If it isn’t, check the troubleshooting section.

A few handy scripts

Optional. Watch out for the linebreaks.

cd ~
echo '#!/bin/sh'$'\n\n''sudo mount -o remount,rw /'$'\n''sudo mount -o remount,rw '`(mount | grep "/boot" | awk '{print $3}')`$'\n''sudo systemctl daemon-reload' ; chmod +x fs-rw.sh
echo '#!/bin/sh'$'\n\n''sudo timedatectl set-ntp 1' > updatedate.sh ; chmod +x updatedate.sh
cd ~/Documents/pedalevite/build/unix
echo '#!/bin/sh'$'\n\n''sudo cp /opt/pedalevite/etc/config/current /opt/pedalevite/etc/config/current.bak-`date --utc +%Y-%m-%d-%H%M`' > backup-config.sh ; chmod +x backup-config.sh
echo '#!/bin/sh'$'\n\n''sudo jackd -P70 -p16 -t2000 -dalsa -p64 -n3 -r44100 -s &' > run-jack.sh ; chmod +x run-jack.sh
echo '#!/bin/sh'$'\n\n''sudo mount -t vfat /dev/sda1 /mnt/sda1' > usb-mount.sh ; chmod +x usb-mount.sh
echo '#!/bin/sh'$'\n\n''sudo umount /mnt/sda1' > usb-umount.sh ; chmod +x usb-umount.sh

V. Maintenance

Tests and troubleshooting

To do…

Known issues

Network not available

For some reason, the system cannot connect to the network during startup. Generally, rebooting is enough to fix this issue.

Pédale Vite program refuses to start again after a crash

When Pédale Vite starts, it creates a temporary file indicating that an instance of the program is already running, preventing other instances to run concurrently. This file is deleted when Pédale Vite stops, normally or with Ctrl + C. However the file is not deleted in case of a crash, and Pédale Vite immediately terminates, displaying :

Pedale Vite is already running!

Just manually delete the file :

sudo rm /var/lock/pedalevite-unique
The RPi4 EEPROM update fails during startup

This issue could occuring during the startups following a system update. The cause is the read-only mode of the filesystem. To fix it, just set the filesystem in read-write mode and force the EEPROM update :

sudo mount -o remount,ro /
sudo mount -o remount,ro /boot
sudo systemctl restart rpi-eeprom-update.service

One can check everything worked fine :

sudo systemctl status rpi-eeprom-update.service
When connected to the Internet, the date is not updated even if timesyncd is active

Sometimes the timesyncd services cannot synchronise to NTP servers. Check with :

timedatectl status

NTP service shoud be active but System clock synchronized may be set to no. In this case, check :

timedatectl timesync-status

Reports :

       Server: (null) (3.debian.pool.ntp.org)
Poll interval: 0 (min: 32s; max 34min 8s)
 Packet count: 0

This may be an issue with the DNS server, which does not resolve the NTP servers for some reason. Try by setting explicitely the DNS :

sudo mount -o remount,rw /
sudo rm /etc/resolv.conf
sudo nano /etc/resolv.conf

Add the following lines (you can put here any working DNS server address) :

domain home

Reboot or restart the services.

The audio clicks or channels are swapped very frequently

This is likely a scheduling issue with real-time threads. Type the following commands and check the results :

cat /proc/sys/kernel/sched_rt_period_us
cat /proc/sys/kernel/sched_rt_runtime_us

The runtime value should be equal to the period, or -1. If this is not the case, type the following :

echo -1 | sudo tee /proc/sys/kernel/sched_rt_runtime_us > /dev/null

Source code

Despite the hardware being important in Pédale Vite, this is primarily a software project. This part describes briefly the program architecture and what is required to know to adapt it easily to hardware modifications. To update the code from the Git repository :

cd ~/Documents/pedalevite
git pull

Don’t forget beforehand to set the filesystem as read-write :



The software is written in C++. The compiler should support at least C++14. Project files are located in the pedalevite/build folder.


The unix subfolder contains what is required to to compile on the Pi and for the Pi. Makefile.am is the file to be modified to add source files. configure-v2-debug and configure-v2-release define the compilation configuration. Running make -j4 compiles the project. See also the software part from the building instructions.


win contains the projects for Visual Studio 2013. Source code is organized according to seveal categories :

These three projects are bundled into the pedalevite.sln solution.

If your computer’s soundcard does not support navite ASIO drivers, it’s possible run it with ASIO4ALL. By default, the Pédale Vite input channels are number 3 and 4 (these are the instrument inputs for my card). You may have to change them by setting the chn_idx_in value, near the end of pedalevite/src/main.cpp :

	mfx::adrv::DAsio  snd_drv;
	chn_idx_in = 2;

The emulation uses the following keys :

A Z E R T Y or Q W E R T YPedals 0 to 5, upper row
Q S D F G H or A S D F G HPedals 6 to 11, lower row
0 1 28 9 on the numeric keypadSeveral values for the expression pedal #0
1 2,
3 4,
… …,
9 0
−1 and +1 from the 5 generic incremental encoders
W X C or Z X C et
−1, +1 and button for the 2 incremental encoders used for navigation
ReturnSelect from the user interface
EscEsc from the user interface
ArrowsArrows from the user interface



The program uses 3 main threads :

Thread are communicating with a lock-free queue. Most of these information are centralized by the main thread. However, there are some direct communications between the input thread and the audio thread, in order to maximise the audio processing reactivity to external stimulis.

MVC paradigm

The architecture follows the MVC paradigm (mfx::Model model drives a low-level layer to command the mfx::cmd::Central audio engine. There, data are perpared (always in the main thread) and transactionnally sent to the audio thread, mainly located in mfx::WorldAudio.

The document structure (banks, programs, settings…) is described in mfx::doc. The etc/config/current save file is directly generated and read by the serialising interface.

The audio drivers are located in mfx::adrv. The main part of the platform-specific code is located in mfx::hw. Switch polarty, order, GPIO pin numbers, speed of the communication protocols and all other hardware details can be changed in these classes.

The user interface is made of pages in mfx::uitk::pg. They are activated depending on the user navigation. They are registered as views and act as controllers, in the MVC meaning. They use a rudimentary system of GUI tree implemented in mfx::uitk, allowing placing controls, receiving user events and navigating easily through these elements.

Effects are organized in mfx::pi in a plug-in logic, despite not being deployed as such. The common interface is in mfx::piapi. Each effect is actually made of two processors : the actual effect plug-in and a mixer plug-in implementing bypass, volume and dry/wet mix.

All these piece are put together in pedalevite/src/mfx/main.cpp which still has a rough state. Most of the program parameters is located in mfx::Cst.

There is so much to talk about the code architecture and implementation details, it’s an endless job. This section might be expanded later.

File tree

The file tree in pedalevite/src follows more or less closely the namespace tree. The classes are implemented in files having their names, as they does in Java. Please note the following namespaces :

pedalevite/etc/config contains the pedalboard user configurations (mainly current). This folder is copied in the install location /opt/pedalevite on the Pi and used in-situ by the Windows emulator.

VI. Possible improvements and variations

For people afraid by the complexity or the price, there are a lot of ways to cut down the price or simplify the building. Here are a few topics I could imagine.

External USB audio interface

There would be some advantages to put the audio interface out of the perdalboard :

For the cons :

Simplification of the internal audio board

It is possible to get rid of the mic preamps if they aren’t needed at all. It is even possible to get rid of the second input channel. This reduce significantly the amount of components on the board.

Cheaper parts

Price can be optimized by choosing cheaper part suppliers. It requires spending more time and energy comparing prices and part specifications.

For example the audio connectors could use cheaper TR jacks instead of Neutrik jack-XLR combos and TRS jacks.

However I think it would be clumsy to try to save on the footwitches. Robustness of these parts is essential.

Rotary encoder removal

In the current configuration, I use them not as often as I imagined it. I think we can do without them. This is less connections and less costs.

Pull-up resistors

The RPi and the 23017 port expander have internal pull-up resistors. One can use them instead of all the 10 kΩ external resistors and remove the associated filtering capacitors too. This will be less clean on an electrical point of view, but it should do the job. The code to change to activate these internal resistors is negligible. Debouncing is already doubled in software and this shouldn’t require any change.

Cost cut is small but building simplification is significant.

Reducing the number of connectors

Most of the links between the boards and the main parts are done with cables and connectors at both ends. One can remove some of the connectors and just solder the wires. However I discourage soldering the cables at both ends, this would make control and maintenance more complicated.

Secondly, because a lot of wires follow the same way, it is possible to cut pieces of a ribbon cable. A meter (or slightly more) of 40-wire multicoloured ribbon should be enough for the whole pedalboard. Be careful with the wires which may be a bit too thin for the Dupont connectors, they probably should be replaced with more suitable connectors.

VII. Version history

r14, 2023-10-15

r13, 2023-04-29

r12, 2023-02-11

r11, 2022-11-15

r10, 2022-05-24

r9, 2021-03-26

r8, 2020-10-02

r7, 2020-03-03

r6, 2020-01-16

r5, 2019-12-20

r4, 2019-11-09

r3, 2019-11-07

r2, 2019-11-02

r1, 2017-09-24

r0, 2016-12-31