Actions

Difference between revisions of "Digital FD-8 pedal"

From Just in Time

m (Added picture)
m
Line 6: Line 6:
 
* auto-calibration, i.e. no need for pots to set the trigger points.
 
* auto-calibration, i.e. no need for pots to set the trigger points.
  
[[File:fd8.jpg|none|800px|frame|Roland FD-8 pedal showing a temporary flat cable for programming new firmware versions]]
+
[[File:fd8.jpg|none|800px|frame|Roland FD-8 pedal showing a temporary ICSP cable for programming new firmware versions]]
  
 
== Hardware design ==
 
== Hardware design ==

Revision as of 00:07, 18 February 2014

Work in Progress
This page describes a work in progress. All specifications may change and the final product may significantly deviate from what we describe here. It is very well possible that there will be no final product at all.
Warning.png

[[Revision timestamp::20140218000705|]] In Roland FD-8 Issues: Hall Sensor Modification we described how a ratiometric hall sensor could replace the resistor film to repair the Roland FD-8 high hat pedals. Even though that Hall Sensor implementation works, an MCU based approach might have some additional advantages:

  • complete variable resistance to be compatible with other drum modules
  • adjustable sensitivity curve
  • more than 3 resistor levels, allowing true detection of foot-down velocity.
  • auto-calibration, i.e. no need for pots to set the trigger points.
Roland FD-8 pedal showing a temporary ICSP cable for programming new firmware versions

Hardware design

Fd8-top.jpg
Single-sided PCB routing is fun!
click here for traces as SVG

Work-in-progress schematic

The microcontroller-based version offers 256 different pedal positions at a BOM cost that is still much lower than $10. The components used are:

  • One SMT attiny13 MCU (ebay, datasheet), an 8-pin AVR with effectively 5 io pins and 10-bit ADC;
  • Two MCP41010 digital potentiometers (ebay, datasheet) in series to emulate the film resistor in the FD-8. We need a range of approximately 0-20K and while the 10K MCP41010 is readily available on ebay, we had trouble finding a cost-effective 20K or 50K digital pot. Hence the two pots in series;
  • One Honeywell SS490 ratiometric hall effect sensor as in the non-MCU version, or alternatively an Allegro A1302 (Just ordered a pair on ebay). The latter should be comparable to the Honeywell if used in a 5V setup, but this hasn't been tested yet;
  • Any old 78L05 that we can get our hands on;
  • an SMT resistor and several SMT capacitors.

Pin PB4 is currently not used, but is connected to a header on the print, so that a (momentary) switch could be connected. The idea is that currently the pedal will have to calibrate every time it switches on (determining the range of the pedal), but it would be possible to write the calibrated values to eeprom. The switch can then be used to trigger a reset of the calibrated values. Alternatively, the switch could be used to set set the 'half-closed' point of the pedal.

Because this is a prototype, there is still a 6-pin header on the PCB to reflash firmware. The PCB is designed in such a way that the header can be removed (sawn off) without re-routing. If at some point a single potmeter version would be feasible (using for instance an MCP41050), the second potmeter can also be removed with minimal re-routing. This would result in a much smaller PCB.

An svg-file of the PCB traces that is ready for toner transfer can be found here.

Software

The software for this device is available on GitHub.

The basic mode of operation is as follows:

  1. Measure the output voltage of the hall sensor using the ADC.
  2. Determine a corresponding resistance and program that resistance value in the digital pots.
  3. Repeat

There are two complexities that the firmware resolves as it performs the above two steps:

  • Range. Depending on the strength of the magnet and its distance from the sensor, the Hall effect sensor will report only a limited range of values that don't span the complete possible range. The firmware will detect the minimum and maximum values and use those to map that range to the full range of 0—255 that should be given to the potentiometer;
  • Polarity. Ratiometric Hall effect sensors typically output a voltage range of either ½Vcc—Vcc or Vss—½Vcc, depending on the orientation of the magnet, where ½Vcc is the value that is output when no magnetic field is measured. The firmware will determine the median value of the range of input values. If that median is above ½Vcc, it will conclude that higher voltages mean that the pedal is moved down (magnet is moved towards the sensor). Otherwise it will conclude that decreasing voltages mean downwards motion.

All of that is contained in one single source file.