Arduino based LDR volume and source selection controller

Hello Ken,

The resistors around the mosfet are calculated for this model, so using another type may result in lower precision.
The characteristics we want here is a low Vgs(th).

5LN01SP are available at Mouser, who can ship globally.

Cheers,
Vincent

Thanks Vincent I may go for RS for 50 pcs as Wineds mentioned and with free delivery in Hong Kong.

I got another question though. Does it matter if I use 4.5V non-latching and latching relays with matching power supply?

Thanks,

Ken
 
Thanks Vincent I may go for RS for 50 pcs as Wineds mentioned and with free delivery in Hong Kong.

I got another question though. Does it matter if I use 4.5V non-latching and latching relays with matching power supply?

Thanks,

Ken
I don't see why it would be a problem. It obviously removes the circuitry to drive the latching aspect. As long as the PS can manage driving the constant load of the relays, it should be fine.

FYI, I bought the latching Panasonic AGQ relays from RS - they stock them too and were the cheapest I could find, at least in the UK. At RS, the 12V latching type are product no. 6995904.

edit: ouch, they're over twice the price in HKD :(
 
Last edited:
Thanks Vincent I may go for RS for 50 pcs as Wineds mentioned and with free delivery in Hong Kong.

I got another question though. Does it matter if I use 4.5V non-latching and latching relays with matching power supply?

Thanks,

Ken

Hello,

For the controller board, you can use any non-latching relay you want, with the proper matching power supply (about 0.7V - 1V is lost in the driving circuit).
But remember that they must be designed for "small signal" and the contact material must be very high quality (like silver-palladium). Some people say they can hear differences between different kinds of relay contacts, there are some discussions on this board about it.

For the I/O boards, I only recommend high quality latching relays - because with normal relays, you have constantly powered noisy coils very close to the audio signal path.
 
Last edited:
Hello,

For the controller board, you can use any non-latching relay you want, with the proper matching power supply (about 0.7V - 1V is lost in the driving circuit).
But remember that they must be designed for "small signal" and the contact material must be very high quality (like silver-palladium). Some people say they can hear differences between different kinds of relay contacts, there are some discussions on this board about it.

For the I/O boards, I only recommend high quality latching relays - because with normal relays, you have constantly powered noisy coils very close to the audio signal path.

Thank so much Vincent. I asked because I had few pcs of 4.5V AGQ2104 latching relays left from my previous project. So glad I can use it.

Ken
 
Hi Vincent,

OK, I've realised that my stability issues are related in fact to some interference somewhere.

The problem is strange: often, when I turn the encoder, nothing happens (volume / input don't change). But as soon as I move my finger and place it on / just above (without touching) the atmel chip, my volume changes are then registered. So the rotations from the encoder were seen, just not applied and only applied when I touch the nano pcb.

If I'm the only one with this issue - and it sounds like it as no one else has posted any issues like this - then, I don't know what it is. Logic would suggest it's the PCB as that's different - I changed the layout slightly on mine. But I used the same parts, same decoupling caps and the code hasn't changed (other than defining number of inputs, changing LDR values, etc).

I did post on the arduino forums for help as it sounded very arduino specific and didn't want to post here, but, as I should have expected, the helpful people over there would like to see the code for any potential causes. Do you have any idea what could be the problem? Would you mind if I posted the sketch code?
 
Doesn't seem to make any difference. Also, it's not the rotations of the encoder that are hit or missed. They appear to be registered OK. It's only when I get my finger physically near the atmel chip on the nano that the encoder turns are actually shown on the screen even though I did them a few seconds beforehand.
 
Doesn't seem to make any difference. Also, it's not the rotations of the encoder that are hit or missed. They appear to be registered OK. It's only when I get my finger physically near the atmel chip on the nano that the encoder turns are actually shown on the screen even though I did them a few seconds beforehand.

Sounds like it is not changing states for some reason. Maybe try debug mode to shed some light on it.
 
Last edited:
Hmm I thought of that :) I get the output during calibration, but after that, nothing in normal operation however, I get even stranger results. When resetting, I get a volume count down from 30 to 0. But it doesn't actually vary the resistance. The countdown rate is 1 per second. When it reaches zero, it then goes to 4 (which is neither the preset volume or volume it was last set at). Maybe this is normal and a function of debug?
 
OK, ignore my previous post. The 30 second was because I had inadvertently uncommented the delay section.

I've put together another build with another arduino on another PCB and this one is behaving fine with the same source code.

So I have something strange with the first one.
 
Vincent, great looking design! I'm looking to get some boards fabbed to start a build. Looking at the I/O layouts, I am assuming the jumper silkscreens on the tPlace layer can be moved to top copper if a 2 layer board is being produced?

Hello!
Yes, you can replace the jumpers by top layer copper traces, but in this case it will be probably impossible to desolder the relays from the board because of the plated-through holes.
 
Hello!
Yes, you can replace the jumpers by top layer copper traces, but in this case it will be probably impossible to desolder the relays from the board because of the plated-through holes.

Cool, thanks for the clarification. Also, can you confirm the loads for the different PSU voltages? From the schematic you show:

  • 8v digital - 50mA
  • 12v analog - 20mA
  • 12v relays - 100mA

Given these requirements, is there any reason 1A regs were used and could a regulator with less current handling be used instead?
 
Cool, thanks for the clarification. Also, can you confirm the loads for the different PSU voltages? From the schematic you show:

  • 8v digital - 50mA
  • 12v analog - 20mA
  • 12v relays - 100mA

Given these requirements, is there any reason 1A regs were used and could a regulator with less current handling be used instead?
As I hadn't yet built linear PSUs for this, I was driving the circuits from my regulated bench power supplies.

In my case:
  • 8v digital: this goes to around 70mA. A large part of that is the LCD screen at maximum brightness. Without the screen, it's around 25mA. Current varies a bit depending on LDR, but the vast majority is the screen. So I would allow for 100mA.
  • 12v relays: This never seems to be constantly over 40mA. It might peak during switching inputs / outputs, but as those are latching, it's a momentary current pull. The 40mA comes from the main relays.
I haven't measured current draw on the analogue side.
 
As I hadn't yet built linear PSUs for this, I was driving the circuits from my regulated bench power supplies.

In my case:
  • 8v digital: this goes to around 70mA. A large part of that is the LCD screen at maximum brightness. Without the screen, it's around 25mA. Current varies a bit depending on LDR, but the vast majority is the screen. So I would allow for 100mA.
  • 12v relays: This never seems to be constantly over 40mA. It might peak during switching inputs / outputs, but as those are latching, it's a momentary current pull. The 40mA comes from the main relays.
I haven't measured current draw on the analogue side.

tfboy, thanks for the details!