Audio Input Selector, or Water Level

by Istvan Kabai in Circuits > Arduino

1105 Views, 2 Favorites, 0 Comments

Audio Input Selector, or Water Level

kapcsrajz.jpg

My friend asked me, can I build for him a simple input channel selector, with relays for DIY amplifier?
Important, when the amlifier powered off, the device can remember the last selected channel!!!

Yes of course!

The projects:
4 push button

4 input channel switched by 4 relay

Supplies

Items:

1x Arduino nano Atmel mega 328P

4x C945 NPN transistor

4x LED

5x 1K resistor

1x 330R

3x 3K3

1x 4K7

Test

input selector

push putton cheap edition a GND wire ;)

Program

#include 
#include 

 #define chanel1 2
 #define chanel2 4
 #define chanel3 7
 #define chanel4 8
 #define measure 14 //A0
 #define monitor 13 //nano led
 int sensorValue;
bool firstrun=true;
int addr=1;
  
uint8_t memoria=1;

void Chanel1(){
//channel1
 if((0

Downloads

Alternate Use Water Level?

water.jpg

If you change the push button to wire, maybe usable water level indicator? Of course change the values in "if" statements. In example, SW1 wire switch on water pump.

You can use insulated wire, but due to direct current solid 1.5 copper is recommended, clean the end at least 5 cm.