Help. Noise at power up.

Software questions and issues with the FV-1

Moderator: frank

Post Reply
DrAlx
Posts: 25
Joined: Wed Feb 20, 2019 11:01 am
Location: Surrey, UK

Help. Noise at power up.

Post by DrAlx »

I have an FV-1 build with my own EEPROM program.
When I switch on power (after power has been off for over 10 seconds) I get
a big reverberated crash sound (presumably down to spike at ADC input).
I don't have that problem when switching to the program with the selector switches,
or if I power down and then quickly back on (say less than 1 second). It suggests
a problam with a capacitor somewhere (either near the regulator, or near the FV-1 input)
but I have had no luck fixing things in hardware.

So I am trying to fix this in software by muting the input for a second or so at start up.
Here's some test code showing the basic idea, which is to periodically increment
a register until it turns positive (indicating "mute period is over").

Code: Select all

mem	delay	30000	; To stage periodic increases to "level" register
equ	level	REG0	; If "level" is negative ==> Muted

;-------------- Initialize  -------------------
; To mute the input at start-up, we set the "level" register to -1.
; The delay line will periodically increase "level" until
; it turns positive, meaning "mute off".
skp	run,end_init
sof	0,-1
wrax	level,-0.34	; Set "level" to -1
wra 	delay#,0 	; Write +0.34 to delay line output
end_init:
;-------------------------------------------------

;------------ Handle muting period ---------------
rdax	level,1		; Read level
skp	gez,read_inputs		; If level >=0, jump to "read_inputs", else...
rda	delay#,1
wrax	level,1			; .. increment level by output of delay line (i.e. either 0 or 0.34)
skp	gez,read_inputs		; If level >= 0, jump to "read_inputs", else...
clr
rda	delay#,1			; ... read delay line output (Should be either 0 or 0.34)
wra	delay,0				; ... write to delay line input
skp	zro,end_read_inputs	; Jump to "end_read_inputs"
;-------------------------------------------------

read_inputs:
rdax	ADCL,0.5
rdax	ADCR,0.5
end_read_inputs:

wrax	DACL,1
wrax	DACR,0
This idea works fine if I switch to that program, or if I turn power off and then quickly back on.
However if I power down for over 10 seconds and then power on, then it is permanently muted and
I never see an output.
That leads me to the conclusion that my assumption about delay memory being populated with
zeros at program start-up was not correct, and that the problematic power ups are somehow
leading to garbage in the delay memory. Is my understanding here correct, as I can not
think of another explanation?


Has anyone else experienced a problem with noise like this at power up and how was this fixed.
BTW, I am using a LDO regulator (LP2950_3.3) for the supply (which is 5.5V).
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: Help. Noise at power up.

Post by frank »

This is usually one of 2 issues:

1. Crystal is not stable at power up, adjust cap on crystal (try larger value first) and maybe add one to the other leg. It may be starting at an harmonic then dropping to the proper frequency but the noise is already there.

2. Power supply is slow to come up or stabilize.

99% of the time it is #1, crystals are really sensitive to capacitor values, length of trace to pins, etc.

Delay memory is always cleared at start up or program change but if the crystal is running too fast it may cause internal timing to be violated and that will cause problems.
Frank Thomson
Experimental Noize
DrAlx
Posts: 25
Joined: Wed Feb 20, 2019 11:01 am
Location: Surrey, UK

Re: Help. Noise at power up.

Post by DrAlx »

Thanks, I'll give those a try. I have 15pF on the crystal already.
I will try stick more in parallel with it, although I am suspecting power supply
now because the power switch is turning on not just the 3.3V regulator (which powers the FV1)
but also another board with a class-D amp on it.

My suspicion about garbage memory seemed correct. Following code doesn't assume memory is zero
and instead checks when the "magic number" of -0.5 appears at the end of the delay line.
This muting works OK in all situations I tried. I would rather fix things in hardware though.

Code: Select all

mem	delay	15000	; To stage periodic increases to "level" register
equ	level	REG0	; Negative ==> Muted

;-------------- Initialize  -------------------
; To mute the input at start-up, we set the "level" to -1
; and will use the delay line to update "level" periodically
; by seeing when the magic number "-0.5" appears at its end
skp	run,end_init
sof	0,-1
wrax	level,0.5	; Set "level" to -1
wra 	delay#,0 	; Write -0.5 to delay line output
end_init:
;-------------------------------------------------

;----------------- Handle muting ---- --------------
rdax	level,1		; Read level
skp	gez,read_inputs	; If level >=0, jump to "read_inputs", else...
clr
rda	delay#,1		; Read delay line output (i.e. either 0 or -0.5 or garbage)
sof 	1,0.5			; Add 0.5
skp	zro,update_level	; delay# must have been -0.5 (or a fluke)
clr				; else delay# was 0 or garbage
skp 	zro,end_read_inputs
update_level:
rdax	level,1
sof	1,0.034
wrax	level,1			; level = level + 0.034
skp	gez,read_inputs		; If level >= 0, jump to "read_inputs", else...
sof	0,-0.5
wra	delay,0			; ... write -0.5 to delay line input
skp	zro,end_read_inputs	; Jump to "end_read_inputs"
;-------------------------------------------------

read_inputs:
rdax	ADCL,0.5
rdax	ADCR,0.5
end_read_inputs:

wrax	DACL,1
wrax	DACR,0
DrAlx
Posts: 25
Joined: Wed Feb 20, 2019 11:01 am
Location: Surrey, UK

Re: Help. Noise at power up.

Post by DrAlx »

I tried all of the following with no luck.

Larger caps on the crystal.

Decoupled the circuit from the class-D amp, and found it made no difference regardless of the order the two boards were powered up.

Added larger electrolytics on input and output of the 3.3V regulator.
That sometimes seemed to work but I think I was just seeing the effect of the larger electrolytics keeping charge longer when switched off.
Wait long enough before power up and I still get the noise.

I think I will live with the workaround of turning the board on-off-on. (My software based hack wasn't feasible due to lack of program space).
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Re: Help. Noise at power up.

Post by frank »

Try a different crystal manufacturer, we have used the Seiko cans with great success.
Frank Thomson
Experimental Noize
ice-nine
Posts: 192
Joined: Thu May 24, 2012 9:03 am

Re: Help. Noise at power up.

Post by ice-nine »

Use a 33pf cap on the crystal or a different crystal. It is a well known issue which will be cured be one or the other solution.
www.stanleyfx.co.uk
"It's fairly straight forward, if you want to start it press start, you can work out the rest of the controls yourself."
DrAlx
Posts: 25
Joined: Wed Feb 20, 2019 11:01 am
Location: Surrey, UK

Re: Help. Noise at power up.

Post by DrAlx »

Increasing cap to 33pF solved it. Thanks.
When I first tried increasing the cap value I didn't increase it by a large enough value.
30pF didn't solve the problem but 33pF did.
Post Reply