Author Topic: [R2] OpenGen – OSHW handheld waveform generator  (Read 10953 times)

0 Members and 1 Guest are viewing this topic.

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
[R2] OpenGen – OSHW handheld waveform generator
« on: August 01, 2014, 05:47:10 pm »

EDIT: See the R2 schematic which is on page 2 for the newer version.

I have attached the Rev 0.1 schematic for my handheld waveform generator design (OpenGen on Hackaday Projects). It is supposed to generate any signal from around 2kHz to 42.5MHz, and is based on the common AD9850 modules available on eBay. I would welcome any constructive feedback on the design. I have not yet designed a PCB as there are still a few things I need to implement (physical switches controlling the outputs).

Note that the +13V boost regulator is currently 'broken'; the peak switching current would be more than the MC34063 can handle so I plan to implement either another chip or an external switch.

Some questions I have in mind:
  • I already have separate digital and analog supplies, but should I have separate grounds? The finished design will likely be on a 2-layer PCB with a flood-fill ground.
  • In terms of efficiency would it be better to power the -13V rail from the +13V or the battery (8.4V to 6V)?
  • Should I power the DAC from the digital or the analog supply?
  • Do you think the THS6022 will manage the maximum of a 20V pk-pk sine wave at 42MHz? The datasheet says that it won't at full load (200mA), but although the output does have a 50ohm impedance, I won't be using it with a 50ohm terminator.
If you like it, please give it a skull on the Hackaday project page as I have entered it for the Hackaday Prize! You can find a link to the KiCad design files there too.


This whole project is Public Domain  :) .

~microbug
« Last Edit: August 18, 2014, 09:05:12 pm by microbug »
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 2085
  • Country: sk
Re: OpenGen – OSHW handheld waveform generator
« Reply #1 on: August 01, 2014, 06:08:39 pm »
glad to see my keypad suggestion in the final design !  :-+ ;)

regarding the DAC, i would probably think of a different solution.
you have A0-A3 unused - those pins do have digital circuitry - so i would use those for the AD9850 and free up some PWM capable pins and simply omit the DAC and use the PWM outputs with low-pass filters instead of the DAC - 8 bit resolution should be enough to control the amplitude, DC offset and duty cycle.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #2 on: August 01, 2014, 06:12:07 pm »
I didn't know that A0-3 had digital circuitry too. The question, however, is whether one can use it on the Arduino platform. If it's too much hassle, I might just stick with the DAC- it does have higher resolution and is very cheap.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: OpenGen – OSHW handheld waveform generator
« Reply #3 on: August 01, 2014, 06:16:44 pm »
Looks like you're off to a good start. I'd make a couple suggestions:

First: Dude. Pages. Your schematic is very hard to follow. You can make a hierarchical schematic with multiple pages and actually draw the signal path between them.

The THS6022 is expensive, and it's a dual package with decent power handling. Don't chain them - you're wasting the capacity of the first one. Parallel them instead (each with its own 100 ohm resistor to the output rather than a single 50 ohm termination), which will be much easier on them thermally. If you still need another amplifier for voltage gain, use a cheaper one. I'm not sure about it achieving 20V p-p at 45 MHz**. That's not a trivial task, but it's a pretty good amplifier. I'd just say you should get one and try.

If I were you, I'd be looking into building this on a four-layer PCB. They've become quite affordable lately, and if you want good signal integrity, the good, solid grounding will be a good friend. Power distribution will be much easier too. You could definitely do this on a double-layer board, but I wouldn't find it worth the effort.

As for powering the -13V rail: it's usually going to be less efficient to chain power supplies. However, if you want to support a wide range of input voltages (yes, a discharging battery can count), it could be easier to design just one wide-range DC-DC converter, and then power the rest off the fixed output of that. Your choice.

Quick warning: Watch out, you've got the same pin numbers for both halves of the THS6022.

**Edit: Yeah, it won't do it. Slew rate is 1900V/µs. The maximum slew rate of a 45 MHz signal at 20 Vp-p is (20/2)*2*pi*(45 MHz) = 2800V/µs. You could get 20Vp-p up to almost 30 MHz though, and maybe just drop off the maximum amplitude to 10Vp-p at 45 MHz. I doubt you'd need such a large amplitude at such a high frequency.
« Last Edit: August 01, 2014, 06:24:37 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: OpenGen – OSHW handheld waveform generator
« Reply #4 on: August 01, 2014, 06:24:16 pm »
I think some 16x2 LCDs do not have current limiting resistors on the backlight, so it wouldn't hurt to add one, even if it ends up at 0 Ohm.

You could take a look at http://www.cypress.com/?rID=92146 . It's way cheaper, faster, the core chip has more functionality (including programmable digital and analog blocks, 2 low-res IDACs etc) and has a *much* better IDE (I would say state-of-the-art) than an arduino.
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 2085
  • Country: sk
Re: OpenGen – OSHW handheld waveform generator
« Reply #5 on: August 01, 2014, 06:27:00 pm »
I didn't know that A0-3 had digital circuitry too. The question, however, is whether one can use it on the Arduino platform. If it's too much hassle, I might just stick with the DAC- it does have higher resolution and is very cheap.

you can use them as any other pins marked as digital pins on arduino - just use the "A0" instead in the digitalwrite or pinmode functions.
it's only the A6 & A7 which are connected to the ADC mux only without digital circuitry inside the atmega chip.

and probably it would make sense to use a LDO regulator for the 5V - it would solve the over-current issue for the +13V boost with 34063 and you should have similar losses with the LDO as with the double conversion battery->boost->buck . if the battery is a 2 cell then you will have something between 5,4V to 6V (empty) and approx 8V(fully charged), so even a battery close to empty will have enough voltage  for the LDO to make the 5V rail.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #6 on: August 01, 2014, 08:09:22 pm »
OK- looks like it's time for rev 0.2!
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #7 on: August 01, 2014, 09:22:05 pm »
@c4757p:
I'll have a go at a hierarchal schematic. This is my first project of this size and my first time using KiCad, so I'll have to look into the details.

With regards to the output voltage, I did think it might not be possible. I'll figure out a more accurate spec later. In the finished design, the user will input frequency before any other parameter, so I might be able to calculate approximate maximum amplitude and adjust the settings in software (i.e., not allowing the user to enter more than the maximum amplitude).

I wondered about a four layer PCB before, although it's still a while off. I will probably go for it and try to have a minimal board area to reduce cost. The fact that all my parts are surface mount (and a couple are in tiny leadless packages) will probably help with that. Alternatively, there could be a multi-board construction with the complex analog stuff on a very small 4 layer PCB. I haven't thought much about it yet.

Thanks for letting me know about that. I may switch to different DC-DC converter chips for the 13V rails; the peak currents are too much for the MC34063 when they are running off the battery.

Thanks for the heads up!


@nuno:
I'll add a current limiting resistor then.

That board does look interesting at first glance. I don't have much time now but I'll look into it- thanks! As a side note, it's not cheaper than a clone Arduino Pro Mini - I got 10 on Aliexpress for $22 with free shipping.


@rob77:
That's useful to know, even if I end up not using the Arduino Pro Mini clone in the final design.

That does make sense; I'll go with it. I'm already using a low noise LDO for the analog 5V, so I'll just find another (cheaper / noisier) one for the digital.
« Last Edit: August 01, 2014, 09:23:46 pm by microbug »
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #8 on: August 01, 2014, 09:36:38 pm »
Since I'm redesigning this fairly drastically now already, should I add in digital / analog grounds while I'm at it?
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 7054
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: OpenGen – OSHW handheld waveform generator
« Reply #9 on: August 01, 2014, 09:37:43 pm »
Don't use the MC34063A please. It's terribly inefficient, has high quiescent current and its switching frequency is not deterministic, which makes filtering output ripple very difficult, this will add noise to your output. Instead use something like LT3471 for dual plus/minus, or another boost chip which has a fixed frequency mode, like LT1306.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #10 on: August 01, 2014, 09:42:29 pm »
The LT3471 looks very nice for my 12V rails; pain that it is in a DFN! A few of the components in this are of a similar nature, so I suppose I'll get a stencil or just do it all with a syringe, solder paste and my hot air gun. I might have a look to see if there is anything in a more manageable package though...


EDIT: If you haven't already worked it out (I'll forgive you based on the state of my schematic  ;) ) I plan to power down the analog circuitry when it is not being used (i.e., during parameter entry) as it consumes the majority of the power in this thing. The ADL5931 has a 130mA quiescent current but unfortunately it is the only chip that will do the job. Therefore, I'm using regulators / DC-DC converters with a 'soft start' function to let the MCU bring the power on when needed.


EDIT 2: It's proving very easy to find some suitable chips using the design tools on the LT website (I'll try a couple of other websites too).
« Last Edit: August 01, 2014, 09:48:02 pm by microbug »
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 7054
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: OpenGen – OSHW handheld waveform generator
« Reply #11 on: August 01, 2014, 10:06:01 pm »
If rail regulation isn't critical and you can guarantee similar loads on both rails, consider using a charge-pump to generate the negative rail from the positive switching voltage. Here's one I designed into another product, it requires 5V @ 800mA and an auxiliary negative voltage at about 75mA. The negative voltage is generated using a charge-pump with the AC source coming from the switching node of the buck converter. This produces approx -11V which is then regulated to -5V using a normal linear regulator. It will also work with a boost converter, the output voltage will be approx Vswpeak-1.5V, which for a 13V boost will be about -12V varying with load current. Only thing to be aware of is you need load on the positive rail to keep the negative in regulation. If your ADL5931 is on whenever the negative rail is needed that's fine, as the 130mA will be more than sufficient.  Size the coupling capacitor to set the impedance at Fsw to 1/5 or lower than the expected load impedance.
« Last Edit: August 01, 2014, 10:07:46 pm by tom66 »
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #12 on: August 01, 2014, 10:08:57 pm »
The loads could be very different; up to 225mA on 12V with nothing on -12V. I'm not sure that this will work under these circumstances! I'm currently playing with TI's WEBENCH for some solutions.
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 7054
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: OpenGen – OSHW handheld waveform generator
« Reply #13 on: August 01, 2014, 10:11:01 pm »
Is that for very low frequencies? That circuit really does require approx equal loads to work. LT3471 is ideal in that it regulates both loads independently, and is an integrated solution. I really liked the performance I got out of it. It will do well beyond what the datasheet says. I got 500mA out on two 6V channels from 3V in.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #14 on: August 01, 2014, 10:14:03 pm »
The output has a user-adjustable amplitude of up to 10V (AC) and an adjustable DC offset of up to 10V, although not both at once. Nevertheless, it is quite possible that the positive rail will be doing all the work.


EDIT: RE the LT3471- £5.69 seems like a lot for a DC-DC converter IC! Nice as it would be, it is also DFN so I'll find something else. WEBENCH has given me a design using the LMR62014 for the 12V rail, and I'm working through the other rails.
« Last Edit: August 01, 2014, 10:16:39 pm by microbug »
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #15 on: August 01, 2014, 10:30:58 pm »
What about analog / digital grounds? Should I bother?
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 7054
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: OpenGen – OSHW handheld waveform generator
« Reply #16 on: August 01, 2014, 10:45:07 pm »
LT sure is pricey! However in all my research I never came across an IC with similar capabilities. If you've space, design in two ICs.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #17 on: August 01, 2014, 10:46:43 pm »
Although it's early on, I am thinking of doing some of the simpler stuff (including power supplies) on a cheaper 2-layer board. This would give me more space for this sort of stuff.
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 7054
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: OpenGen – OSHW handheld waveform generator
« Reply #18 on: August 01, 2014, 10:48:50 pm »
What about analog / digital grounds? Should I bother?

If you want anyone to use it, yes! Make sure also to keep the switcher on its own ground, that's going to be the worst offender. Exact technique varies but it is good practice to tie your signal ground to only one point such as the negative of the output capacitors. Try to design both switchers so the capacitor grounds meet. Also, keep switching currents well away from sensitive traces and use shielded inductors for the switchers.
« Last Edit: August 01, 2014, 10:55:05 pm by tom66 »
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #19 on: August 01, 2014, 11:11:29 pm »
OK, having looked into other solutions which are equally expensive and take up more space, I might as well go for the LT3471.
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: OpenGen – OSHW handheld waveform generator
« Reply #20 on: August 02, 2014, 04:01:34 am »
As a side note, it's not cheaper than a clone Arduino Pro Mini - I got 10 on Aliexpress for $22 with free shipping.

No USB interface.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #21 on: August 02, 2014, 01:55:57 pm »
Ok, I think I will go with the PSoC because of the large number of IO (allows me to program the AD9850 in parallel to get faster update when doing a frequency sweep) and the increased speed. It's impressive how cheap those chips (and dev boards) are for the functionality! Thanks for pointing them out.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #22 on: August 04, 2014, 06:07:00 pm »
Rev 2 is now well underway. I have another question: should the high speed (square wave output) comparator be connected to DGND or AGND? It would be easier for it to be on AGND because then I only need to have AGND on the board-to-board interconnect (there will be one very small (cheap) analog 4-layer board and one larger 2-layer board with digital stuff and peripherals), but I am concerned about the possibility that it will disturb the analog stuff. The comparator does need to be on the analog board because it takes the output from the sine AGC circuit which I don't want to route across the interconnect. It will be well decoupled (something like 100pF ceramic, 100nF ceramic, 10uF tantalum).
 

Offline nightmechanic

  • Contributor
  • Posts: 28
  • Country: il
Re: OpenGen – OSHW handheld waveform generator
« Reply #23 on: August 04, 2014, 08:24:45 pm »
Hi,
Thanks for sharing!

I have some questions / comments if it is ok: (excuse me of those were raised before - I did not find them)

1. I could not find a battery voltage monitor / connection to enable a monitor (e.g. to the micro controller) I would consider adding it as it is a Li-Ion battery (that may or may not have over-discharge protection). you can indicate it on your LCD and shut down the analog circuitry etc.
2. what is the reason for not having a power (on/off) switch?
3.It seems that you are connecting the USB's VBUS directly to the 5V switcher output, why is that? I think that when both the battery and the USB are connected,  you may have a lot of (unnecessary...) current flowing there.
4. Relating to the above I would recommend using the "self powered" configuration of the FTDI and avoiding the VBUS, that is unless you want to be able to program the MCU when the battery is low/missing, if this is the case, then you should consider series diodes etc.
5. Why are you feeding the 5V dig switcher form the 13V one? are you concerned of dropout voltage? how low do you want your battery to go? (see item 1) I think you can find a switcher that can be used directly from +BATT (e.g. TPS62173) so you can win back some efficiency and relax the requirements of the +13V switcher
6. I am concerned that your sine wave output switch (TS5A4624) will not be able to handle your output swing, it  is rated from 0V to V+ (5V) am I missing something? (are you changing it to a mechanical switch?)
6.a. if you want to stay with the MC34063 for the 5V I think you need to change its connection topology - it seems to me it is in step-up (boost) topology rather than a step-down one (?)

I hope this may help a little (at least help me understand your design better!)

Ran
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 568
  • Country: gb
  • Electronics Enthusiast
Re: OpenGen – OSHW handheld waveform generator
« Reply #24 on: August 04, 2014, 08:32:16 pm »
1: Yes, I do need to add something like that. I'll wire the battery divided by two to a spare ADC pin.
2: I forgot!
3 & 4: I just copied the FTDI configuration from the Arduino Pro Mini FTDI board schematic which may be best suited for a slightly different scenario. If the 5V line and VBUS are at the same voltage I do not see how current will be going anywhere!
5 & 6a: I'm no longer using the MC34063 due to efficiency problems (I'll post the R2 schematic in a few days).
6: Well spotted! I'll change it to a latching relay.


Thanks for helping!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf