I am extremely new to this topic. I have never had an arduino. My only coding experience is Pascal. I am coding in that @ school.
I am building a 250w stereo amplifier and i need some guidance regarding the protections. The main power button will switch both the amplifier and the arduino protection module on at the same time.
What i want to control with arduino:
- Power transformer softstart. Pretty much a relay (Relay1) should be switched on after ~ 1 sec after power on;
- Short circuit protection. This will be Relay2 which will switch off if current sensed on a current sensing resistor goes over a value using a comparator (Logic protection. The auxiliary circuit will pull the Sense_pin1 to ground in case of over current; else it's pulled to 5v) + LED1 flash @ 15Hz. This will not recover only after complete amplifier power off.
- Power on mute. Relay2 will only switch on after 5 sec after power on. + LED1 flash @ 1Hz during muting period.
- DC protection. If the auxiliary circuit detects DC in speaker wires then it will pull Sense_pin2 up to ground; else 5v. If there's DC in speaker wires then Relay2 will switch off. + LED1 flash @ 10Hz. This will reset if Sense_pin2 is pulled back to 5v.
- Over temperature protection. This will be done using a thermistor. Analog input. Sense_pin4 to ground at 0*C; to 5V at 70*C. Temperature goes up, Sense_pin4 goes higher. At 4v across Sense_pin4 the arduino should flash LED2 at 0.5Hz indicating high temp. At 5 v across Sense_pin4, Relay2 will turn off. This will reset when Sense_pin4 goes under 3,5v. When the circuit is in over temperature protection the LED2 should stay on.
- AC monitoring. If there is AC then Sense_pin4 will be low. If there isn't any AC then Sense_pin3 will be high. As long as AC is present the arduino should continue normal operation and monitor for DC, Over temperature and Short circuit. LED1 should stay on as long as everything is in normal operation mode. If AC falls and comes back the arduino should reset. When Sense_pin4 is high (5v) then the arduino will switch Relay2 off and when the Sense_pin4 is pulled back low (gnd) the protection should reset.
All protections (DC, over current, over temperature, AC monitoring) should start checking right away and keep on checking until everything is powered off. Everything should function with no delay right from when power is applied.
Is this doable? I think this means multitasking. Can arduino do that? I know something similar to this has been done with a PIC (minus soft start and short circuit) but there's no code available.
If this is doable, i'll buy an arduino uno. And also, could someone please guide me through the process of thinking and coding this?
Thank you very much! Your's sincerely, Radu Matei Birle