Page 1 of 2

#1 signal generator - 2nd generation

Posted: Thu Nov 19, 2020 10:56 am
by ed
This last week I are mostly doing......

Finally getting round to putting together the original signal generator replacement.

The original attempt: http://www.vitalstates.org/diy/amplifie ... siggen.htm

I’ve seen the light and abandoned the hair shirt methods of native atmel chips and assembler and embraced the luxury of arduino and it’s comprehensive C++ libraries.

I’m in the process of mapping out a pcb, but in the meantime here is the barebones without the opamp buffer stage:
1k sin
siggen3-1k.jpg
1k square
siggen3-1ksq.jpg
10k square
siggen3-10ksq.jpg

#2 Re: signal generator - 2nd generation

Posted: Thu Nov 19, 2020 10:59 am
by ed
and the distortion:

1k
siggen3-thd-1k.jpg
10k
siggen3-thd-10k.jpg
these are much as expected, not quite as good as the wien bridge, but I'm sure fit for purpose.
I will obviously do the measurements again with the buffer in circuit.

#3 Re: signal generator - 2nd generation

Posted: Thu Nov 19, 2020 11:10 am
by ed
the circuit so far....I've discovered with designspark there is no need to draw a schematic and then convert to pcb layout...it's possible just to draw the pcb layout to begin with:
siggen-pcb.jpg

#4 Re: signal generator - 2nd generation

Posted: Sun Nov 22, 2020 5:52 pm
by ed
an alternative. Uses an 18v 2a wall wart to dispense with the transformer, bridge and 2 x 9v voltage regs. All I have to do now is make up my mind which one. Any suggestions that might sway the decision?
siggen-alt.jpg

#5 Re: signal generator - 2nd generation

Posted: Mon Nov 23, 2020 11:36 am
by Mike H
Have you bread-boarded the new PSU idea to prove it works? With the loads it will 'see'. (Can be 'dummy loads', resistors.) Before getting too deep into PCB design. Guess how I know!

I looked up e.g. 3904 datasheet – hFE seems a mite low for my liking. But might be OK. Only one way to find out! Bear in mind hFE falls as Ic increases, in other words, the more you want it to turn on, the less gain it's got – and you should design for the minimum hFE it says on the datasheet – again, guess how I know ...

:)

#6 Re: signal generator - 2nd generation

Posted: Mon Nov 23, 2020 12:21 pm
by Nick

#7 Re: signal generator - 2nd generation

Posted: Mon Nov 23, 2020 12:47 pm
by ed
Mike H wrote: Mon Nov 23, 2020 11:36 am Have you bread-boarded the new PSU idea to prove it works? With the loads it will 'see'. (Can be 'dummy loads', resistors.) Before getting too deep into PCB design. Guess how I know!

I looked up e.g. 3904 datasheet – hFE seems a mite low for my liking. But might be OK. Only one way to find out! Bear in mind hFE falls as Ic increases, in other words, the more you want it to turn on, the less gain it's got – and you should design for the minimum hFE it says on the datasheet – again, guess how I know ...

:)
I haven't breadboarded the power side yet but I did do the spice thing down to 18R, i.e 0.5 amps without any drop showing. I started at 36R(0.25A) but thought I'd stretch it. If the whole thing takes more than 100ma I will be surprised.

I will deffo live test it before sending the pcb order off, but I don't have an 18v wall wart at the mo so it's on hold at the moment.

@Nick...thanks for the alternative. I must confess I don't fully understand how the circuit works in the first place(yet) so comparisons are beyond me at the moment. I must point out that I have zillions of 39xx and diodes in the box so it enticed me down this route.

#8 Re: signal generator - 2nd generation

Posted: Mon Nov 23, 2020 1:16 pm
by Mike H
I haven't breadboarded the power side yet but I did do the spice thing down to 18R, i.e 0.5 amps without any drop showing. I started at 36R(0.25A) but thought I'd stretch it. If the whole thing takes more than 100ma I will be surprised.
Fairy nuff! :D

#9 Re: signal generator - 2nd generation

Posted: Mon Nov 23, 2020 1:20 pm
by Nick
Mike H wrote: Mon Nov 23, 2020 1:16 pm
I haven't breadboarded the power side yet but I did do the spice thing down to 18R, i.e 0.5 amps without any drop showing. I started at 36R(0.25A) but thought I'd stretch it. If the whole thing takes more than 100ma I will be surprised.
Fairy nuff! :D
Was thinking about the worst case, I guess that is when you need a DC offset on the output signal or a non symmetric wave.

#10 Re: signal generator - 2nd generation

Posted: Sun Dec 05, 2021 3:18 pm
by ed
I think I mentioned that life is full of unfinished projects at the mo.....
well....
I've just discovered this in an ice cream tub in the corner of the work room....the boards were made 12 months ago but not stuffed..and there it stayed.

On revisiting I tried to understand what I'd done and realised a senior moment had resulted in some major oversight...to wit I'd fed back the amplified ac signal to the cpu thinking I would just measure the value.....all well and good but the anticipated level would overcook the input as I hadn't included a divider on the board and on further thought the assumption that the ac signal would be perfect enough to just measure one side/polarity was just that, an assumption.

also the repeated measurement of an ac signal is nowhere near as accurate as an ac to rms chip so all in all that pcb was trash.

so I reworked with an RMS to DC chip with a divider.

Now the question......
I just love the splitter circuit:
bal_ps.jpg
bal_ps.jpg (60.84 KiB) Viewed 6529 times
but how to take off the 5v for the cpu?. If I put a 7805 in 1 leg of the 9v/12v supply it unbalances the feed to the opamp, which leads to distortion in the signal amplification.
Can anybody suggest how to take 5v in isolation off the 18/24v smps before it gets to the splitter circuit?

ironically I don't need a signal generator as the existing one works perfectly, it's just an unfinished project and a challenge to sort out my stupid error.

#11 Re: signal generator - 2nd generation

Posted: Sun Dec 05, 2021 3:38 pm
by Nick

#12 Re: signal generator - 2nd generation

Posted: Sun Dec 05, 2021 7:37 pm
by ed
many thanks for that...

I'm still pondering about how the 2 grounds will play together...the opamp is referenced from the splitter centre ground and the ad9850 signal emerges reference to the 5v ground...when I had a 7805 in a 9v leg of the splitter then ground was ground but.......I vaguely remember this stuff used to be straightforward

#13 Re: signal generator - 2nd generation

Posted: Sun Dec 05, 2021 10:05 pm
by Nick
I'm still pondering about how the 2 grounds will play together..
Which two grounds? Using that DC DC converter will solver that problem.

#14 Re: signal generator - 2nd generation

Posted: Mon Dec 06, 2021 11:07 am
by ed
I think it's nearly time to give up this electronics malarky. I've made 2 cups of tea this morning, and abandoned them half finished, only to rediscover them some 1/2 hour later without milk.....not sure if it's distraction or absent mindedness....or something more sinister

what I was pondering was whether 0vA and 0vB were at the same potential and should/could I join them for referencing the signal out of the opamp...it still may or may not go through an ad737 before measuring.
sg.jpeg
sg.jpeg (58.11 KiB) Viewed 6437 times
I'm pretty sure this is a non-question so I apologise for the lack of focus/clarity....

#15 Re: signal generator - 2nd generation

Posted: Mon Dec 06, 2021 11:10 am
by Nick
Why not just join 0va and 0vb and just use a buffer in the output.