|
|
|||||||
| Home | Forums | Rules | Articles | Store | Gallery | Blogs | Register | Donations | FAQ | Calendar | Search | Today's Posts | Mark Forums Read | Search |
| Parts Where to get, and how to make the best bits. PCB's, caps, transformers, 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 |
|
|
#1 |
|
diyAudio Member
Join Date: Oct 2002
Location: Cape Town
|
I plan to use the following circuit to power-up my Hi-Fi sytem. Can anybody please suggest any improvements/corrections to the circuit and software. Please take into account that I've just learned PIC's and Basic (self taught) - so the software are not optimised or the best way, but it does the job - so far.
The idee is that when I switch on the sequencer, my equipment will power-up, in sequence: CD, Pre-amp, Monoblock-1, Monoblock-2, Sub-amp and when I switch off sequencer, power down in reverse order with delays. Monoblock's are valve amps. I also want to use manual switches for switching anything on/off individually. To do this, I will 1st switch the auto/man. switch on the 12v line. NEITHER THE CIRCUIT NOR THE SOFTWARE ARE TESTED IN REAL LIFE !!
__________________
"Be carefull who's advice you buy, but be patient with those who supply it." From Baz Luhrmann's - Everybody’s Free (To Wear Sunscreen) |
|
|
|
|
#2 |
|
diyAudio Member
Join Date: Oct 2002
Location: Cape Town
|
The software:
__________________
"Be carefull who's advice you buy, but be patient with those who supply it." From Baz Luhrmann's - Everybody’s Free (To Wear Sunscreen) |
|
|
|
|
#3 |
|
Banned
|
This looks like a neat Project. Would be good for people that have to turn the system off but also have active xovers in tehre system that have to be turned off at certian timing's..
|
|
|
|
|
#4 | ||
|
diyAudio Member
|
Instead of using the manual switches to switch power to the relays, hook them up to the micro. Also hook up the auto/man switch to the micro. Then, do all the switching in software. Your software would look something like this:
Code:
'auto_man is the auto/manual control switch main: if auto_man = 1 goto auto if auto_man = 0 goto manual auto: all the sequencing stuff manual: if sw1 = 1 then cd = 1 pause 3000 else cd = 0 endif if sw2 = 1 then something else = 1 pause some more else something else endif and so on... Quote:
You don't even need this: Code:
If psu_on = 0 Then Goto start If psu_on = 1 Then Goto stop Something that will not work: Quote:
I'm pretty sure that you meant those to be the other way around: Code:
If psu_on = 1 Then Goto start If psu_on = 0 Then Goto stop You could also have some fun with this and add a relay on the mains, so when the micro switches off all of your equipment, it will shut its own power off. If you need more info about any of this stuff, feel free to ask. |
||
|
|
|
|
#5 | |
|
diyAudio Member
Join Date: Oct 2002
Location: Cape Town
|
Quote:
Thanx for all advice. I actually want to keep the manual switches as is, since I am an electrican, I like to have some kind of "self control" Here are corrected circuit and improved software: ****************************************** '*************************** ' Power Sequenser: Ver.1.1 ' ----------------------------------------- ' PIC16F628 ' JdeV 20-12-2004 '*************************** ' Control Lines '-------------- Symbol psq_on = PORTA.0 ' Take this pin HIGH to START sequencer Symbol cd = PORTB.0 ' Output - switch CD ON Symbol preamp = PORTB.1 ' Pre-amp Symbol amp1 = PORTB.2 ' Amp1 Symbol amp2 = PORTB.3 ' Amp2 Symbol subamp = PORTB.4 ' Sub-Amp ' ' Software Defines '----------------- CMCON = 7 ' Turn comparators off TRISA = %11111111 ' Set PORTA pins as digital inputs TRISB = %00000000 ' Set PORTB pins as digital outputs OPTION_REG.7 = 0 ' Enable PORTB internal pullup resistors ' ' Initialise all ports '--------------------- psq_on = 0 preamp = 0 cd = 0 amp1 = 0 amp2 = 0 subamp = 0 ' ' Main '----- main: If psq_on = 1 Then Goto powerup If psq_on = 0 Then Goto powerdown ' powerup: cd = 1 WaitMs 3000 preamp = 1 WaitMs 3000 amp1 = 1 WaitMs 3000 amp2 = 1 WaitMs 3000 subamp = 1 Goto main ' powerdown: subamp = 0 WaitMs 3000 amp2 = 0 WaitMs 3000 amp1 = 0 WaitMs 12000 preamp = 0 WaitMs 2000 cd = 0 Goto main End ' 'End '--- ******************************************
__________________
"Be carefull who's advice you buy, but be patient with those who supply it." From Baz Luhrmann's - Everybody’s Free (To Wear Sunscreen) |
|
|
|
|
|
#6 | |
|
diyAudio Member
|
Quote:
You would need to modify the code like this: Code:
'power (relay) would be pin RB5 ' Initialise all ports '--------------------- power = 1 'turns on mains relay Main: power = 1 'to make sure its on 'your other code powerup: power = 1 'just to be safe 'your code... powerdown: 'your code... power = 0 End |
|
|
|
|
|
#7 | |
|
diyAudio Member
Join Date: Oct 2002
Location: Cape Town
|
Quote:
That's actually also a good idee. I initially planned on using a "centre off" switch for "auto/man" because I also want to incorporate a remote control later when I get to learn more on programming IR stuff with the PIC. For that I would need permanent power for the IR receiver and whatever when in "standby" mode.
__________________
"Be carefull who's advice you buy, but be patient with those who supply it." From Baz Luhrmann's - Everybody’s Free (To Wear Sunscreen) |
|
|
|
|
|
#8 |
|
diyAudio Member
Join Date: May 2004
Location: Toronto, ON
|
I've been kicking around a similar idea for my system when I happened upon this thread. Would love to hear about your progress and hopefully success!
I haven't programmed in Basic for nearly 18 years, but as the name implies it is basic and reading this thread was enough to get my brain running. Since I am pretty much a DIY newbie, the idea of PICs always seemed elusion and scary, but this together with the schematic makes me what to build it! |
|
|
|
|
#9 | |
|
diyAudio Member
Join Date: Oct 2002
Location: Cape Town
|
Quote:
![]() Got sidetracked with other project, so must also still develop the IR remote control section. PIC's are great fun and got endless applications. I also used them for a digital volume control with the PGA2310 + LCD display on pre-amp.
__________________
"Be carefull who's advice you buy, but be patient with those who supply it." From Baz Luhrmann's - Everybody’s Free (To Wear Sunscreen) |
|
|
|
|
|
#10 |
|
diyAudio Member
Join Date: May 2004
Location: Toronto, ON
|
OK, stupid newbie quesiton but how do you upload the code to the PIC or controller?
|
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 40A 250V Schottky Power Diodes- Has anyone use in Power Amp to replace Diode Bridge? | dtm1962 | Solid State | 10 | 15th September 2011 07:38 PM |
| LTspice tool for power amp power supply component evaluation | andy_c | Software Tools | 2 | 23rd August 2009 05:10 PM |
| Power transformers versus amplifier output power..what is your option? | destroyer X | Solid State | 38 | 9th May 2009 05:23 PM |
| Amplifier 3000 Wats Rms Power + Smps Higcht Power Bestiality | MARAVILLASAUDIO | Class D | 1 | 5th November 2004 04:06 PM |
| power output calculations, rated power and required power output | metebalci | Tubes / Valves | 7 | 22nd February 2004 05:49 PM |
| New To Site? | Need Help? |
| Page generated in 0.13761 seconds (82.54% PHP - 17.46% MySQL) with 11 queries |