Sylonex and Arduino preamp - diyAudio
Go Back   Home > Forums > Source & Line > Analog Line Level
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Analog Line Level Preamplifiers , Passive Pre-amps, Crossovers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Thread Tools Search this Thread
Old 1st February 2011, 11:03 AM   #1
oenboek is offline oenboek  Belgium
diyAudio Member
Join Date: Apr 2005
Location: Sint Katelijne Waver
Default Sylonex and Arduino preamp

I'm working on a Sylonex volume, steered by an Arduino instead of a potentiometer. I want to share my experiences on it here. I will not put everything at once. Iíll write when I have some time, and post it when I have material worth to share.

OK, OK, OK. I agree itís not the same as the basic version from George. I agree that the basic version will sound as good, maybe even better. Iíve also read lots of discussions on the use of a more complicated version then the basic one. But I wanted something different, I explain why:
  • The concept behind the lightspeed to avoid any contact is really great, I wanted to use it. And now Iíve heard it working, it sounds indeed more open then a good pot (I replaced a Panasonic plastic by the lightspeed).
  • It really bothers me to buy 100 optocouplers, match them all and throw most of them to get some OK parts at the end. Working in the industry, I always feel bad when parts need to be thrown away, especially parts that are still working OK. I know that the cost of throwing 96 parts will be cheaper then what I made, but the idea behind remains.
  • My family is very often putting the volume of my amp at zero to play an instrument. And then they forget the amp, leaving it running useless for hours. I want to stop it automatically after some time.
  • My installation is also too complicated for my family. They need to switch on the amp, and eventually the DAC. And the input needs to be chosen on the amp AND on the DAC. This seems really difficult, although I still donít understand why . Therefor I want to change it: they will have to push 1 button to choose 1 source, and then everything will be switched automatically.
  • I want full remote control over amp, PC, CD, tuner. I prefer the remote on a tablet or even better from a mobile phone over wifi or bluetooth.
  • I wanted to use an Arduino since a very long time. The platform looks really great and there is lot of support available.
  • I wanted to develop some new electronics as that is something I really like. And not only microprocessor or digital, but also some analog and the link between all of them.
  • I never worked with I2C, and as a lot of ICs have this as a connection, useable over a long-distance bus, I wanted to try this as well.
  • And lbnl I want to try commands going over bluetooth, usb, coming from html etc. So some programming and communication on top.

Enough excuses? Enough for me anyway to buy an Arduino, to buy some Sylonexs, DACs, ADCs, opamps etc. But not after setting up the concept first. Here the concept:
  • An Arduino (Mega) will manage the complete installation (preamp, DAC, tuner, CD-player, poweramp, user-input, link to PC, link to remote).
  • A human interface on the Arduino, PC and/or tablet, phone etc will make it really easy to manage the whole thing.
  • The Sylonex optocouplers will receive the ďlightĒ from a DAC, steered by the Arduino over I2C.
  • To avoid matching of the optocouplers, there is a calibration loop using a current-source and an ADC. A calibration routine on the Arduino will guarantee linearity over a broad range. I can even change impedance on the fly.
  • Inputrelais are needed as well as I want to connect 3 sources.
  • There is (only) 1 relais in the outputcircuit, other relais are there for calibration of the 4 optocouplers. Later I will have more to start and stop amps, tuner and other devices. Most of it is connected through I2C.
  • Very good stability of power supplies and other circuitry.
  • All components will have their own I2C-ICs to manage I/O to the Arduino. An I2C-bus will connect all.
  • The Arduino will communicate to the outside world (tablet, PC, IR-remote, web).

It looks easy enough to do, doesn't it? Forget it !
At the moment I can control the volume and I can switch inputs. This is enough to have it running and to evaluate the working. But this took me 9 months, although not full-time. I really enjoyed this time, I learned a lot and it's worth it. That's why I want to share my experience.

Next time something on the behaviour of the loop DAC - opamp - Sylonex. This was the hardest part.
  Reply With Quote
Old 3rd February 2011, 11:56 AM   #2
ua100k is offline ua100k  United States
diyAudio Member
ua100k's Avatar
Join Date: Dec 2009
Location: Bernardsville, NJ
Default Arduino and remote control

This is great. I was looking to use Arduino just to control the LDR's and build a remote control using the new Apple Aluminium Control.
I use the Warpspeed LDR design as it allows the volume to go down to zero and have several other benefits of lower noise and better current control. The pot is only 200 ohms and does a good job of limiting the current so the LDR does not burn out at any volume or even when left on. This was the hardest part as you cannot find a motorized remote with this impedance.

I look forward to your build and see how it works. Are you planning to program a chip or keep the whole Arduino controller in the final product?
  Reply With Quote
Old 3rd February 2011, 03:40 PM   #3
Blues is offline Blues  United States
diyAudio Member
Blues's Avatar
Join Date: Sep 2003
Location: The Milky Way
There are some out there, can be a custom job, in the $300-$400 price range. The question is, should we push the art into the obscenely expensive Picasso range?
Life simplified! Leap into the Warpspeed wormhole...
  Reply With Quote
Old 3rd February 2011, 04:29 PM   #4
maxw is offline maxw  United Kingdom
diyAudio Member
maxw's Avatar
Join Date: Jun 2004
Location: London
If you can design a modular system to control the LDRs with an ADC and calibration then I'm sure it will be popular!
  Reply With Quote
Old 3rd February 2011, 05:00 PM   #5
ua100k is offline ua100k  United States
diyAudio Member
ua100k's Avatar
Join Date: Dec 2009
Location: Bernardsville, NJ
Originally Posted by Blues View Post
There are some out there, can be a custom job, in the $300-$400 price range. The question is, should we push the art into the obscenely expensive Picasso range?
I was thinking it was cheaper to down low to microcontrollers that are cheaper the the whole control unit. The Microcontrollers being in the $10 range.

Let me do some research to see what I come up with.

Using the ADC is a very interesting idea. Getting a voltage out to a VCCS that is adjusted for each LDR will be ideal.
  Reply With Quote
Old 3rd February 2011, 05:55 PM   #6
oenboek is offline oenboek  Belgium
diyAudio Member
Join Date: Apr 2005
Location: Sint Katelijne Waver
I plan to keep the Arduino in. A small Arduino board is very cheap. I have the Mega which costed me about 30Ä, small ones go down to 12Ä. I prefered it for the easy programming and interfacing, and there are lots and lots of libraries available that save days of (sometimes boring) programming time.
The Arduino will not only do volume-control. Later it must also switch PC, DAC, CD-player, Tuner and Power-amp. And it needs to connect to the remote that will be a tablet or mobile phone. Therefor I think it's an easy platform to do this job.
I agree it has a cost. Each hobby has a cost. Part of the cost is to improve the sound. But there the Georgehifi solution is the best value for money one can find for a Sylonex solution, I would have bought that if it was for the sound only. But part of the cost is for fun, I really like to work out and develop this stuff. For 100Ä you can select enough parts to get a big box you can play with for months. The hourly cost soldering (and desoldering) parts is a lot lower then the hourly cost listening to CDs, counting the cost for a CD. And I saved some money by buying 20 optocouplers instead of the 100 needed to match .
The approach is indeed modular. I have an analog board, 5 voltage to current boards from which 1 works as resistance measurement interface to ADC, a power distribution board and I connect selfmade and Jeelab-modules for I2C-interfacing. It's a 3D-design. I try to make a decent picture to show it working. And I urgently need to make a blockdiagram to explain.
  Reply With Quote
Old 3rd February 2011, 06:16 PM   #7
glt is offline glt  United States
diyAudio Member
Join Date: Oct 2004
Nice to see another Arduino project. Feel free to reuse the Apple Aluminum Remote code from my project.

Using Arduino to calibrate the ldr every time you turn it on is the best way to keep linearity in the device. You can even use the built in analog inputs and outputs to do 256 levels of calibration (not as good as a ADC, but maybe good enough).
  Reply With Quote
Old 3rd February 2011, 06:29 PM   #8
oenboek is offline oenboek  Belgium
diyAudio Member
Join Date: Apr 2005
Location: Sint Katelijne Waver
The DAC-Opamp-Sylonex link
Or more clearly: how to control the current through the LED to have good control of the resistance. It took me ages to have some fine control of the optocoupler resistance. The optocoupler is far from linear, even far from logarithmic.

1. Linear
A direct connection to a DAC with an opamp converting voltage to current (see schematic 1) is not giving enough resolution to have good volume-control at the low end. See graph 1 showing the relation between current on the X-axis and resistance on the Y-axis (not on scale). The axis is logarithmic. It is clear itís impossible to control the resistance this way.

2. Exponential
I tried with an exponential amp between the DAC and the optocoupler (see schematic 2, examples can be found in VCOs for synthesizers). It took a while to have it working in a very basic way (without exotic parts and without temp adjust), but also that didnít work. See graph 2. It looks a lot better, the result is linear on a logarithmic scale. Still the control is not good enough. I stopped working on this quite fast as there were several problems. First the relation was still NOK. Second you need a lot of parts to compensate for temperature drift. I would have had far too complex and expensive electronics to control the LED. And third I had to go from the DAC that has a positive voltage out only, to a voltage swing from negative to positive. It was really interesting to search for schematics and to work it out, but I stopped even before linking it to a real DAC. The graph is made with manual measurements.

3. Feedback with 2nd Sylonex
Finally I used a 2nd optocoupler in the feedback loop of the opamp to have good control (see schematic 3, thanks Gootee for the idea). But even then control of the very low volumes is critical.
As the optocouplers are reacting really slow, it also took some time to have the circuit around the opamp stable, I had to slow down the opamp quite a lot to avoid oscillation, thatís what C3 is doing. I discovered this late, thatís why I had to solder it at the bottom of the PCB. What you donít see on the schematics is that Opto+& - are going to 2 optocouplers in series. The resistor of 1 of the optocouplers goes to LDR+&- for the feedback loop. For the results see graphs 3 and 4 that were taken on the final volumecontrol. The 0 of the axis is at the 0 of the DAC and thatís where the maximum current goes through the LED. The graph is showing the digital values from both DAC and ADC. Full range is around 50kR.
As you can see, this is linear, nearly over the whole range. Only at the bottom it is far from linear due to the saturation of the LEDs. And the zero is not really at zero as the DAC is not linear at all around zero (this is depending on the DAC used). I had to put an offset to be able to get the maximum current in the LEDs. Both deviations are easily compensated in software.

Still needed is very high resolution to have good control and small steps in volume together with coherence between left and right. A very stable power-supply of the DACs and ADC is mandatory, as is the PS for the opamps. I'll come back to this. First I'll make a block-diagram and some pictures, unfortunately I have to work this WE.
Attached Images
File Type: jpg VoltToCurrent_Lin.JPG (15.9 KB, 1212 views)
File Type: jpg Graph_RvsDAC_Linear.JPG (41.2 KB, 1200 views)
File Type: jpg VoltToCurrent_Exp.JPG (44.6 KB, 1184 views)
File Type: jpg Graph_RvsVolt_Exponential.JPG (108.5 KB, 1176 views)
File Type: jpg VoltToCurrent_Feedback.JPG (83.6 KB, 1176 views)
File Type: jpg Graph_ADCvsDAC.JPG (60.3 KB, 367 views)
  Reply With Quote
Old 5th February 2011, 05:20 PM   #9
diyAudio Member
linuxworks's Avatar
Join Date: Jul 2008
Location: Santa Clara, CA
hello fellow arduino 'avrdudes' (lol)

I also had the thought of using a cpu (arduino) to help keep an LDR honest, so to speak. I had posted about it, here:

Arduino based passive analogue input selection & volume control - Page 2 - Community

there was discussion on that thread and on others, but it never went to the level of actual breadboarding.

a good calibration and control loop would be the value-add to the 'simple' ldr concept.

I have some non sylonex ldr's that I found at a local surplus store. if the ldr itself can be taken out of the equation (or make it matter very little) that makes the project so much more useful - if any old ldr type device can be made to work as long as there is a software driver to keep it honest.
My Photostream:
  Reply With Quote
Old 6th February 2011, 05:30 AM   #10
oenboek is offline oenboek  Belgium
diyAudio Member
Join Date: Apr 2005
Location: Sint Katelijne Waver
I have some non sylonex ldr's that I found at a local surplus store. if the ldr itself can be taken out of the equation (or make it matter very little) that makes the project so much more useful - if any old ldr type device can be made to work as long as there is a software driver to keep it honest.
In the system I made it's easy enough to change the ranges (of current through the LED and resistance of the LDR) by changing 1 resistor in each DAC, see the schematics for the calculation. That makes it possible to use other parts then the Sylonex-ones. The only limit is the maximum current through the LEDs the opamp can deliver which is 35mA for an OPA277. BTW, I've chosen this opamp because of the very low offset-voltage it has.
For the software it makes no difference which part is used. The software takes into account the low reaction of the optocouplers at very low resistance. For each calibration step, it waits till the resistance has stabilised. It means slow reacting optocouplers can be used as well.
A matter of importance is to have the optocoupler in the feedback loop not too much different from the optocoupler it is linked to. The more they are different, the more the slope of the curve DAC/ADC will be different from the ideal case. It's not a problem for the software as it is compensated, but in extreme cases it could make the control of the resistance less precise.
  Reply With Quote


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
My Preamp Project: Arduino, I2C, relay selector+attenuator, tube stage maxw Analog Line Level 63 31st March 2015 06:33 PM
Arduino controled HIFI Preamp ialpha Parts 22 9th November 2014 10:35 PM
Arduino for audio projects? glt Parts 5 9th March 2011 05:28 PM
Arduino based Input Selector for preamp _atari_ Analog Line Level 5 30th June 2010 02:42 PM
Can DIY audio be like Arduino glt Everything Else 1 3rd April 2009 03:57 PM

New To Site? Need Help?

All times are GMT. The time now is 12:28 AM.

vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Copyright ©1999-2017 diyAudio

Content Relevant URLs by vBSEO 3.3.2