Anyone successfully tried the Coda Effects relay switching?

Stompboxes circuits published in magazines, books or on DIY electronics websites.

Anyone successfully tried the Coda Effects relay switching?

Postby The Rotagilla » 22 Jan 2017, 14:51

DISCLAIMER - PROGRAMMING IS NOT MY STRONGEST SKILL

Link to the article - http://www.coda-effects.com/2016/08/relay-bypass-with-anti-pop-system.html

Benoit's article uses the C programming language to program the PIC and even though he step by steps it, I've run in to issues. The first time I tried to program the PIC the circuit and LED would turn on but not off, so I erased the PIC and started over. Now nothing happens and the only way I can get the relay to switch states is by connecting pins one and two of the 12F675.

Here is the layout I used - http://effectslayouts.blogspot.com/2016 ... chive.html

I have tried...

1) Copying and pasting the code into MPLab.

2) Typing the code line by line into MPLab.

3) Erasing and re-coding the 12F675 several times.

I'm not a coder but I'm guessing that brackets ("{}") are used to start and stop commands and it seems that in this part of the code the bracket in red is throwing things off.

if (state == 1) { // effect on
GP0 = 1; // LED on
GP5 = 1; // relay on
GP4 = 0; }
else { // effect off
GP0 = 0; // LED off
GP5 = 0; // relay off
GP4 = 0;
}
}
__delay_ms(10);
}

In MPLab if you click on any bracket, it will highlight the start and stop of that command and the bracket in bold red does not correspond to any command start. In fact if it's left in the code, it causes an error and you can't compile the code but if you remove the extra bracket so the code will compile but the PIC doesn't work. Any ideas?

Also, are photoFET's overly sensitive to heat? Could I have fried the photoFET while soldering it in and should I be socketing them?

Thanks in advance.
The television will not be revolutionized.
User avatar
The Rotagilla
Diode Debunker
 
Posts: 722
Joined: 20 Aug 2007, 19:24
Has thanked: 6 times
Have thanks: 49 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby koch1010 » 25 Jan 2017, 11:00

I think it would be helpful if you would upload your complete code/project. The red bracket is actually wrong and should not be there.
I think the circuit should work even if you fried the photomos.
koch1010
 
Posts: 3
Joined: 01 Jul 2015, 13:27
Has thanked: 0 time
Have thanks: 0 time

Re: Anyone successfully tried the Coda Effects relay switchi

Postby The Rotagilla » 29 Jan 2017, 21:24

So I modified the code to this and got it working but with a lot of switching noise.

void main(void) {
ANSEL = 0; // No analog GPIOs
CMCON = 0x07; // comparator off
ADCON0 = 0; // AD ND converter off
TRISIO0 = 0; // output LED
TRISIO1 = 1; // input footswtich
TRISIO2 = 0; // output TGP222A photo FET
TRISIO5 = 0; // output activated relay
TRISIO4 = 0; // output ground connection of the relay

GPIO = 0; // set outputs as low level (0V)

uint8_t state; // set the on or off state of the pedal
state=0; // pedal off at the beginning

uint8_t changestate; // changing state
changestate=0;

while(1) { // main loop

if(GP1 == 0) { // if the switch is pressed
__delay_ms(15); // debounce
if(GP1 == 0) {
__delay_ms(200); // switch is off
if(GP1 == 1) {
changestate = 1; // changestate = 1
}
else {
changestate = 0;
}
}
}
__delay_ms(10);

if(changestate == 1) {
__delay_ms(20);
if(state == 0) { // if the pedal is off
GP2 = 1; // activates the photoFET (step 1)
__delay_ms(10);
GP0 = 1; // LED on
GP5 = 1; // relay on (step 2)
GP4 = 0;
__delay_ms(30); // wait for the pop to go to ground (step 3)
GP2 = 0; // photoFET off (step 4)
state = 1; } // pedal is on
else { // if the pedal is on, same steps
GP2 = 1;
__delay_ms(10);
GP0 = 0; // LED off
GP5 = 0; // relay off
GP4 = 0;
__delay_ms(40);
GP2 = 0;
state = 0;
}
__delay_ms(20);
changestate=0; // reset changestate to 0 (otherwise it will switch continuously)
}

if (state == 1) { // effect on
GP0 = 1; // LED on
GP5 = 1; // relay on
GP4 = 0; }
else { // effect off
GP0 = 0; // LED off
GP5 = 0; // relay off
GP4 = 0;
}
}
__delay_ms(10);
}
The television will not be revolutionized.
User avatar
The Rotagilla
Diode Debunker
 
Posts: 722
Joined: 20 Aug 2007, 19:24
Has thanked: 6 times
Have thanks: 49 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby koch1010 » 01 Feb 2017, 17:19

I think the last Part should be:

if (state == 1) { // effect on
GP0 = 1; // LED on
GP5 = 1; // relay on
GP4 = 0; }
else { // effect off
GP0 = 0; // LED off
GP5 = 0; // relay off
GP4 = 0;
}
__delay_ms(10);
}
}

But I am not sure if you really need the last if - statement. What kind of switching noise is there?
koch1010
 
Posts: 3
Joined: 01 Jul 2015, 13:27
Has thanked: 0 time
Have thanks: 0 time

Re: Anyone successfully tried the Coda Effects relay switchi

Postby The Rotagilla » 01 Feb 2017, 17:52

koch1010 wrote:What kind of switching noise is there?


A loud pop on both the engage and disengage, the photoFET doesn't seem to matter.
The television will not be revolutionized.
User avatar
The Rotagilla
Diode Debunker
 
Posts: 722
Joined: 20 Aug 2007, 19:24
Has thanked: 6 times
Have thanks: 49 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby koch1010 » 05 Feb 2017, 20:12

Maybe your photofet relais is broken. Did you try to increase the delay times?
koch1010
 
Posts: 3
Joined: 01 Jul 2015, 13:27
Has thanked: 0 time
Have thanks: 0 time

Re: Anyone successfully tried the Coda Effects relay switchi

Postby The Rotagilla » 06 Feb 2017, 15:59

koch1010 wrote:Maybe your photofet relais is broken. Did you try to increase the delay times?


That's why I asked if photoFETs were heat sensitive, I'll order another and try it. Yes, I did try increasing the delay times but it did not make a difference.
The television will not be revolutionized.
User avatar
The Rotagilla
Diode Debunker
 
Posts: 722
Joined: 20 Aug 2007, 19:24
Has thanked: 6 times
Have thanks: 49 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby plush » 25 Feb 2017, 17:55

Guess this needs a bump.

I'm working on the similar project and it seems that Coda's code has some issues in it.
IMO the timings are set wrong so the photofet is almost useless.
User avatar
plush
 
Posts: 46
Joined: 08 Dec 2015, 10:29
Has thanked: 17 times
Have thanks: 12 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby The Rotagilla » 26 Feb 2017, 14:28

plush wrote:Guess this needs a bump.

I'm working on the similar project and it seems that Coda's code has some issues in it.
IMO the timings are set wrong so the photofet is almost useless.


Agreed. I swapped the photoFET out in case I might have damaged it but the popping is still there.
The television will not be revolutionized.
User avatar
The Rotagilla
Diode Debunker
 
Posts: 722
Joined: 20 Aug 2007, 19:24
Has thanked: 6 times
Have thanks: 49 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby Zokk » 27 Feb 2017, 09:48

Hello

I'm also interested in relay bypass tricks...
I wonder if you used the "latest" code provided by Benoit?
Look at the schematic on this page, you'll see a 1K5 resistor to pin1 of IC2, it doesn't appears on previous schematics, maybe this causes your problem?
http://www.coda-effects.com/2017/02/relay-bypass-final-code.html

I'm not a code guy, so I can't say whether the pop is due to a wrong timing in the code, bad relay (?), or wrong schematic, but on the paper those timing setups seem quite reasonable, no?
User avatar
Zokk
Solder Soldier
 
Posts: 225
Joined: 05 Jul 2010, 21:00
Location: tantalum shortcut area
Has thanked: 142 times
Have thanks: 54 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby plush » 27 Feb 2017, 10:34

Zokk wrote:I wonder if you used the "latest" code provided by Benoit?


Hi!

Unfortunately, my last experiment took place prior Coda's latest release.
I'm going to try both new schematic and code today. Hope they'll work.

I'm also learning C because of this relay and microcontroller stuff, so i hope to contribute someday, somehow.
User avatar
plush
 
Posts: 46
Joined: 08 Dec 2015, 10:29
Has thanked: 17 times
Have thanks: 12 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby The Rotagilla » 27 Feb 2017, 14:34

plush wrote:Unfortunately, my last experiment took place prior Coda's latest release.
I'm going to try both new schematic and code today.


I'm in the same boat. This new code definitely has some changes to it. I'll see if I can fire it up tonight with the changes and we should both report back.
The television will not be revolutionized.
User avatar
The Rotagilla
Diode Debunker
 
Posts: 722
Joined: 20 Aug 2007, 19:24
Has thanked: 6 times
Have thanks: 49 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby The Rotagilla » 28 Feb 2017, 01:18

Loaded up the new code and it's a definite improvement. Here's my list of small issues.

1) By default the PIC is in momentary mode, I need to figure out what part of the code needs to be edited or deleted to remove this option.

2) Switching on is fairly quiet but there's still a "thwip" sound when switching the effect off.

3) Using MPLAB in free mode results in these errors but I do not think they impact this project -
:: warning: (1273) Omniscient Code Generation not available in Free mode
Warning: xclm.conf did not indicate a license directory
Using current working directory to look for and create licenses
Warning: xclm.conf did not indicate a license directory
Using current working directory to look for and create licenses

That's all I have to report at this time, getting rid of the momentary mode and "thwip" would turn this into a very nice switching system.
The television will not be revolutionized.
User avatar
The Rotagilla
Diode Debunker
 
Posts: 722
Joined: 20 Aug 2007, 19:24
Has thanked: 6 times
Have thanks: 49 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby plush » 28 Feb 2017, 11:34

The Rotagilla wrote:Loaded up the new code and it's a definite improvement.


I wonder if you've used it with the old layout or the new one.
User avatar
plush
 
Posts: 46
Joined: 08 Dec 2015, 10:29
Has thanked: 17 times
Have thanks: 12 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby The Rotagilla » 28 Feb 2017, 14:30

plush wrote:
The Rotagilla wrote:Loaded up the new code and it's a definite improvement.


I wonder if you've used it with the old layout or the new one.


Ha! I realized that about 20 minutes after posting!

The new code works with the old layout. I quick-soldered the 1K5 resistor in place and it didn't do anything for the "thwip" sound when turning the pedal off. The new layout removes the diode and 47µF electrolytic but I'm not sure how (if at all) they would impact the performance of the circuit.
The television will not be revolutionized.
User avatar
The Rotagilla
Diode Debunker
 
Posts: 722
Joined: 20 Aug 2007, 19:24
Has thanked: 6 times
Have thanks: 49 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby plush » 28 Feb 2017, 20:31

The Rotagilla wrote:
plush wrote:
The Rotagilla wrote:Loaded up the new code and it's a definite improvement.


I wonder if you've used it with the old layout or the new one.


Ha! I realized that about 20 minutes after posting!

The new code works with the old layout. I quick-soldered the 1K5 resistor in place and it didn't do anything for the "thwip" sound when turning the pedal off. The new layout removes the diode and 47µF electrolytic but I'm not sure how (if at all) they would impact the performance of the circuit.



I've made it w new layout.

Works like a charm, no noise and stuff.

Layout and components placement in the attacment
Jumper the Link pads if you don't want the scheme to act as normal bypass (latching on press)

I'll post eagle file later

Link to author's article: http://www.coda-effects.com/2017/02/rel ... -code.html
You do not have the required permissions to view the files attached to this post.

For this message the author plush has received thanks:
Zokk (02 Mar 2017, 09:20)
User avatar
plush
 
Posts: 46
Joined: 08 Dec 2015, 10:29
Has thanked: 17 times
Have thanks: 12 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby The Rotagilla » 28 Feb 2017, 22:05

Awesome!

Any noise at all when you switch the circuit off?
The television will not be revolutionized.
User avatar
The Rotagilla
Diode Debunker
 
Posts: 722
Joined: 20 Aug 2007, 19:24
Has thanked: 6 times
Have thanks: 49 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby plush » 01 Mar 2017, 08:12

The Rotagilla wrote:Awesome!

Any noise at all when you switch the circuit off?
No noice at all.

Btw i've made a mistake, you should jumper "link" pads if you want it to work as intended. Or place on-off dip switch.
User avatar
plush
 
Posts: 46
Joined: 08 Dec 2015, 10:29
Has thanked: 17 times
Have thanks: 12 times

Re: Anyone successfully tried the Coda Effects relay switchi

Postby CodaEffects » 18 Oct 2017, 07:34

Hey everyone, just a small update to say that I released a PCB with preprogrammed PIC that might be of your interest :
http://www.coda-effects.fr/p/pcb-relay-bypass.html
I know that programming PICs is not that easy and requires a bit of investment if you just want to make a few pedals with it, so I decided to make it available.
CodaEffects
 
Posts: 1
Joined: 18 Oct 2017, 07:20
Has thanked: 0 time
Have thanks: 0 time

Re: Anyone successfully tried the Coda Effects relay switchi

Postby Zokk » 18 Oct 2017, 09:42

Hello

please could you explain why you've removed the freewheel diode on the relay?
Usually this diode is mandatory to protect the relay against feedback voltage.

Thanks.
User avatar
Zokk
Solder Soldier
 
Posts: 225
Joined: 05 Jul 2010, 21:00
Location: tantalum shortcut area
Has thanked: 142 times
Have thanks: 54 times


Return to DIY Stompbox designs

Who is online

Users browsing this forum: radiogaga and 4 guests