Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 10 of 10

Thread: Teensy-based Ondes Martenot controller

  1. #1
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,108

    Teensy-based Ondes Martenot controller

    Introduction
    I'm creating an Ondes Martenot controller which will be used with a 1Volt/octave Eurorack analog synthesizer. This will consist of a five-octave keybed (with ±2 octave switching, so a total range on 9 octaves), a five octave sliding ring (bague) controller (the frequency produced at a given ring position corresponds exactly with the keys on the keyvoard), and a keyboard "shake" for vibrato. A separate controller will provide the intensity button (touche), voltage-controlled waveform mixer, and other features of the original instrument.

    Several aspects of this, such as the continuous pitch part of the controller (bague) and the intensity button (touche) don't fit in the MIDI model so I am not doing this the usual way (MIDI controller followed by MIDI to CV/Gate converter) but instead generating analog voltages directly.

    Currently my plan is to have a Teensy++ 2.0 for the keyboard/bague pitch controller, a Teensy 2.0 (if fast enough) or 3.0 for the intensity button, and a Teensy 2.0 reading voltages from the waveform mixer sliders and generating control voltages for the voltage controlled analog waveform mixer.

    Keyboard/bague pitch controller
    Players of the original instrument report difficulty with tuning drift (over time and over temperature), also drift between the keyboard and bague, which had separate tuning controls and used separate circuits.

    To address that, I plan to use a highly linear, temperature stable 16-bit ADS for both keyboard and bague. The keybed I am using (Fatar TP 8/0 waterfall connects using 24 wires - a matrix of 8 columns x 8 rows of break switches for the start of key travel, and the same columns with 8 rows of make switches for the end of key travel. Due to the number of pins, I decided on a Teensy++ 2.0 for the keyboard/bague controller. The bague position will be read via a Texas Intruments ADS1115 16-bit I2C ADC, which I have used before with teensy-based projects. The pitch CV will be output via an Analog Devices AD5542CRZ SPI DAC which has good linearity: INL of ±0.5 (typ) / ±1.0 (max) LSB, DNL of ±0.5 (typ) / ±1.0 (max) LSB, gain error of +0.5 / ±2 LSB. Stability over temperature is good: gain drift ±0.1 ppm/°C and zero error ±0.2 ppm /°C.

    An external voltage reference is required, I selected Analog Devices AD780BNZ which gives 2.5 or 3.0V selectable, +/- 1mV, 3ppm/°C. The AD5542CRZ can, with a bipolar-suppy op-amp on the output, produce a bipolar output of ±VRef, and to fit with Eurorack pitch CV standards the desired output voltage is -2.0 to +7.0 volts for the 9 octaves. I plan to produce that with several op-amp stages as follows: 2x gain takes ±2.5V to ±5.0V; invert Vref to give -2.5V; inverting adder gives -2.5V to +7.5V. Gain on the 2x stage will be trimmable, to give fine control of the slope of the voltage, and gain on the Vref interter will be trimmable, to give fine control of the intercept.

    For a total voltage range of 10V and a 16bit DAC, 1LSB = 150μV. For op-amps with ultralow input voltage offset and low temperature drift, I selected OPA2277PA = 20μV typ / 50μV max.

    PCB
    Normally my next step would be to breadboard the circuit to verify that it works as expected. However, the chosen DAC (and indeed most modern high performance DACs) is a surface mount part, in this case SOIC14. The connectors from the Fatar keyboard are also not breadbord compatible, being Micromatch connectors with a 0.05inch pitch. So I need to make a PCB. Started to learn KiCAD, gave up, went with Eagle since thast has a lot more parts libraries and seems to be waht most people use.

    After one failed attempt of laying out "everything on one PCB" I have split the task as follows: one PCB for Teensy++ 2.0, micromatch connectors, two sets of SPI (with different chip selects) and one set of I2C. One PCB for the 16bit pitch CV output. That gets me started for testing and code development, and the other parts (I2C ADC and second SPI DAC) can be added later.

    The two PCBs pass electrical rules check (once I ignore some warnings about VCC connected to 5V, GND connected to DGND, etc) and also passes the OSH Park design rules check. However they are my first self-designed PCBs so I would appreciate more experienced eyes than mine giving them a once-over before getting them fabbed.

    DAC board

    Schematic

    Teensy++ board

    Schematic

    Eagle files in github. For some reason Eagle uses a plain rectangular symbol for a dual op-amp rather than the normal two triangles. I'm aware that the silkscreen layer is an overlapping mess; I have not learned how to clean that up yet.

  2. #2
    Senior Member
    Join Date
    Jun 2013
    Location
    Montréal
    Posts
    467
    That's really interesting ! Out of curiosity, are you doing this for yourself or is it for a client ?

  3. #3
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,108
    Last edited by Nantonos; 02-20-2014 at 08:19 PM.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,340
    A simple low-tech check for any PCB involves printing it to scale and then just placing all the components on the paper. For through-hole parts, a piece of foam under the paper lets you poke the parts through the paper so they stay still.

    The most common problems are footprints that don't mechanically match the parts. For example, that first PCB has when looks like two 2K trim pots. Are the pins really in the center on the pots you'll actually use? One some, they are, but others have them offset or in a triangle pattern. It's pretty easy to see these things when you actually poke the parts through the paper.

    The second most common problem is hole sizes too small. The holes on that Teensy++ part look pretty small. If you're using standard headers, the holes should be at least 0.038 inch or 0.97 mm. The holes on those 10 uF capacitors also look tiny.

    Looks like you might have a 10 pin connector that overhangs on top of a mounting hole. In the grand scheme of things, that's a pretty minor issue, but then it's also pretty easy to just move the part over, perhaps rotating that 1.0 uF cap and moving the 10K resistor down to make space?

  5. #5
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,108
    Quote Originally Posted by PaulStoffregen View Post
    A simple low-tech check for any PCB involves printing it to scale and then just placing all the components on the paper. For through-hole parts, a piece of foam under the paper lets you poke the parts through the paper so they stay still.
    Thanks, I will do that.

    Quote Originally Posted by PaulStoffregen View Post
    The most common problems are footprints that don't mechanically match the parts. For example, that first PCB has when looks like two 2K trim pots. Are the pins really in the center on the pots you'll actually use? One some, they are, but others have them offset or in a triangle pattern. It's pretty easy to see these things when you actually poke the parts through the paper.
    The two trimmers are BOURNS - 3296W-1-202LF and I got the Eagle part from Farnell so it should match reality. The Bourns 3296 datasheet confirms the pins are in line for the -W series. They are staggered for the -Y series. I see -Y is less expensive and has the same electrical specification, so will switch to that part and update the PCB.

    Quote Originally Posted by PaulStoffregen View Post
    The second most common problem is hole sizes too small. The holes on that Teensy++ part look pretty small. If you're using standard headers, the holes should be at least 0.038 inch or 0.97 mm. The holes on those 10 uF capacitors also look tiny.
    I found the Teensy++ 2.0 eagle part in a google search. I now see rhe PJRC Eagle page mentions an updated part which "which fixes the hole size problems" so I will use the updated part instead. Hopefully the thin traces which I put between the pins will still fit.
    I will find some 10 μF capacitors at Farnell and check their datasheet rather than relying on the generic footprints from the Sparkfun libraries. Same for all the capacitors, which are generic rather than specific ones.

    Quote Originally Posted by PaulStoffregen View Post
    Looks like you might have a 10 pin connector that overhangs on top of a mounting hole. In the grand scheme of things, that's a pretty minor issue, but then it's also pretty easy to just move the part over, perhaps rotating that 1.0 uF cap and moving the 10K resistor down to make space?
    Good idea. The mounting holes were an afterthought, added last.

    Thanks for the tips!
    Last edited by Nantonos; 02-20-2014 at 08:56 PM.

  6. #6
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    No copper pours?

  7. #7
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,108
    Once I learn how to make them and how to have them clear any other traces on the same side, yes.

  8. #8
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,108
    An update: keyboard matrix board has been updated with the corrected Teensy++ eagle part, mounting holes added, and ordered at OSH Park. Components for the DAC board are ordered and most have arrived, am checking the actual footprints and lead diameters to update the DAC board before ordering it. Some of the capacitor footprints in particular are very different from the eagle parts I originally used, so it will be easy to move the eurorack power connector so it doesn't foul on one of the standoffs.

  9. #9
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,108
    Quote Originally Posted by stevech View Post
    No copper pours?
    I seem to be able to do a ground plane now, it looks fine in eagle and passes DRC for OSH Park but the render on their website has strange horizontal dashing all over the ground plane except for where the original ground traces are. Is that a problem or is this deliberate? I selected solid fill in eagle for the polygon.

    Click image for larger version. 

Name:	large_i_008.png 
Views:	205 
Size:	111.2 KB 
ID:	1610

    I did the printout-on-polystyrene test to check component fit and placing, so this looks good to go except I am worried how the ground plane renders at OSH Park.

  10. #10
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,108
    OSH Park clarified that this is just a bug in their online renderer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •