Controlling QuadVol with the Raspberry Pi

QuadVol can also be controlled from the Raspberry Pi. You can use 3 GPIO Ports and a small Python script.

Hardware setup

We need 4 Pins from the Raspberry Pi GPIO connector P1:

  • GND: Pin 6, connected to all “-” inputs of the volume control
  • GPIO3: Pin 15, connected to “CLOCK+”
  • GPIO4: Pin 16, connected to “DATA+”
  • GPIO5: Pin 18, connected to “CS+”

You can use other GPIO pins, just modify the source accordingly.

If you need to connect additional devices to the IO ports, it might be better to use the P5 connector. Unfortunately you have to solder this connector by yourself. Then you will get 2 GND connectors and 4 GPIO ports – one more then necessary

Check out this page for pin assignments of the Raspberry Pi IO ports.

Software

#!/usr/bin/env python
import RPi.GPIO as GPIO
import time
import sys

cs=18
clock=15
data=16

tt=0.001

def initialize():
global cs
global clock
global data

GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(cs,GPIO.OUT)
GPIO.setup(clock,GPIO.OUT)
GPIO.setup(data,GPIO.OUT)

def set_volume(vol):

global tt
global cs
global clock
global data

# enable CS
GPIO.output(cs,1)
time.sleep(tt)

# set volume 4 times
for i in range(0,4):
b=vol;
for bit in range (8,0,-1):
GPIO.output(clock,1)
if (b & (1<

One thought on “Controlling QuadVol with the Raspberry Pi

Leave a Reply