DIY Modular Test Equipment Project - Page 1
Forum section: electronics / projects

author: void_error
author_rank: Frequent Contributor
timestamp: June 02, 2016, 02:07:10 pm
content: Oh, hi there!If you scroll down you might realize I've been consistently biting off slightly more than I can chew.What started off with me trying to design and build myself a proper bench power supply has grown into a small collection of bits of test equipment being designed as functional modules sharing a common communication bus which is yet to be named.There is no set date for completion of anything as I'm doing this in my spare time and don't expect regular updates. Since I'm stubborn and I've put a lot of time and effort into this I'm not going to abandon it and I've learned a lot so far.Enjoy!Almost forgot... UPDATES below.UPDATES2018.02.25First draft of the UI is now on GitHub. Check the draft branch of therepo.2018.02.26First draft of the Waveform Generator + Frequency Counter module is up on GitHub. Repohere.2018.02.27First draft of the Regulator for the Digital part is also on GitHub.Linkto the repo.2018.02.28First draft of the Regulator for the Analog part is also on GitHub.Here's the link to the repo. Damn, too many firsts2018.03.04Finished the PCB layout for the UI and yes, it's rev.0 again. Some MCU pins were moved around. It probably won't be the final version as some tweaking is still required.2018.11.25Updated everything. Switched to STM32F101 MCUs.2019.12.27Waveform Generator is now almost finished.

author: void_error
author_rank: Frequent Contributor
timestamp: June 02, 2016, 02:11:40 pm
content: User InterfaceThis is the control panel shared by all the different modules. I tried to keep it as basic as possible, as well as easy to use. Nothing too fancy here.User accessible features:128x64 2.8 inch monochrome LCD display -ERC12864-6554 square push buttons, backlit, function displayed on LCD -Omron B3W-92 pushable quadrature encoding switchesBuzzer, in case you want those annoying beeps, can be turned offUSB connectivity via a USB-UART module, initially as USB-serial device, planning to include SCPI commandsBootloader for relatively easy firmware updatesSpecs:DC input: 5V (3.3V onboard LDO)Optional fan control/monitoring pinsMicrocontroller generated synchronization signal, used to synchronize DC-DC converters (SYNC)Microcontroller clock output (BUS_CLKR)Off-board connector (2x10 pin IDC) for communication with other modules via 1-wire, I2C, UARTHardware:STM32F101VCEEPROM for saving calibration data and presetsmore details coming soonTMUSB-UART moduleNo idea anymore, could be anythingSiLabs digital isolators on the UART side

author: void_error
author_rank: Frequent Contributor
timestamp: June 02, 2016, 02:13:25 pm
content: These two are going to share the same PCBWaveform GeneratorFeatures/Specs:Sine wave / Triangle wave output - 0.1Hz - 10MHz for sine, 0.1Hz - 250kHz for triangleAdjustable amplitude (up to 10VPP@ 50ohm) and DC offset (-5V...+5V)Square wave (uses DDS chip) / PWM output (from UI MCU or local MCU) adjustable output level, frequency values for the PWM are limited by the capabilities of the User Interface MCU or local MCUOutput driver with adjustable current limit for Sine / TriangleHardware:AD9834DDS waveform generator chipAD603Variable Gain AmplifierLMH6321output driver (sine/triangle only), adjustable output current limitREF2041dual output voltage reference[https://www.analog.com/media/en/technical-documentation/data-sheets/ad5761_5721.pdf]AD5721 12-bit DACs for setting offset & amplitudeFrequency CounterFeatures/Specs:100MHz maximum input frequencyAdjustable input trigger levelSelectable divide by 10 or by 1prescalerExternal 10MHz clock reference inputHardware:STM32F101RCLMV7219 high speed comparatorMCP41050 digital potentiometersglue logic

author: void_error
author_rank: Frequent Contributor
timestamp: June 02, 2016, 02:15:11 pm
content: Modular DC Electronic LoadFeatures/Specs:200W maximum continuous power dissipation per module depending on the cooling used, calculations were done using one cheap desktop CPU heatsink for each two MOSFETsTwo ranges: 50V maximum @ 4 A or 12.5V @ 16A - not a final spec, subject to changeFan Control via the Aux Digital Power BoardOvertemperature protectionOvervoltage protectionOvercurrent protectionOptional on-board microcontroller for the "smart" load configurationTwo modules can be connected together to make a 400W load - subject to change (it's quite tricky to implement)Hardware:DAC: AD5662ADCs: AD7683LM56 temperature sensors in thermal contact with each MOSFETLM4132-4.14.096V reference for DAC and the ADCs2IRFP460N-channel MOSFETs as current sinksA bunch of op amps (see schematic)PIC16F1619 optional microcontroller for the "smart" load configuration, will use the PID loop of the Math Accelerator module for Constant Voltage/Resistance/Power functionsDirt cheap AMD CPU cooler

author: void_error
author_rank: Frequent Contributor
timestamp: June 02, 2016, 02:18:04 pm
content: Bench Power SupplyFeatures/Specs:Configurable for different output voltages, output currents and number of channelsTwo current rangesOvertemperature protectionOvervoltage protectionOvercurrent protectionHardware:DACs: AD5662ADCs: AD7683LM56 temperature sensors in thermal contact with each post-regulator BJTsLM4132-4.14.096V reference for DACs, ADCs and OTP circuitA bunch of op ampsIt can be built with or without digital control

author: void_error
author_rank: Frequent Contributor
timestamp: June 02, 2016, 02:20:17 pm
content: Aux Power SuppliesProvide the required supply voltages for the User Interface / Waveform Generator / DC Electronic Load ModulesVoltages required by each module:User Interface: +12V or +7.5VWaveform Generator:Digital: +7.5VAnalog: +5V, -5V, +15V, -15VThe digital supply rails use switching regulators, while the analog supply rails use linear regulators.DC Electronic Load Module: +12V, +3.3V provided by the User Interface via the IDC ribbon cableLab Power Supply: +3.3V provided by the User Interface via the IDC ribbon cable, powering the digital isolatorsAux Analog Power Board:+/-15V& +/-5V (maximum current limited by the maximum allowable power dissipation)uses 78xx/79xx and 78Lxx/79Lxx linear regulatorsAux Digital Power Board:+7.5V or +12V @ 2Auses an LT3680 step-down DC-DC switching regulator

author: void_error
author_rank: Frequent Contributor
timestamp: June 02, 2016, 02:22:51 pm
content: [reserved for future use]

author: BFX
author_rank: Frequent Contributor
timestamp: June 02, 2016, 07:23:31 pm
content: I have similar idea for such 15 yearsBut never was time to startLooking forward to progress

author: void_error
author_rank: Frequent Contributor
timestamp: June 02, 2016, 07:49:42 pm
content: Quote from: EmmanuelFaure on June 02, 2016, 07:34:23 pmTotally worth it. It's not even that complicated and most things are almost complete as far as the simulations and schematics go.I'm doing this to learn a few more things, I could have bought all the test equipment.Quote from: EmmanuelFaure on June 02, 2016, 07:34:23 pmWhere's the fun in buying?

author: SaabFAN
author_rank: Frequent Contributor
timestamp: June 02, 2016, 08:09:28 pm
content: Quote from: EmmanuelFaure on June 02, 2016, 07:34:23 pmNothing hard about building an AWG. In the simplest form, it's just a N-Bit counter, an SRAM and a R2R-Ladder as a DAC with an amplifier behind it.Can be easily assembled on a euro-card, or put inside a CPLD (the cheap chinese Signal-Generators are proof that the hardware is simple and easy to make).What's a little bit more difficult is the software, but nothing one can't handle by smashing together some already made pieces of software - The hardest part is probably the software that runs on the PC to create and upload the waveform.The other modules are excellent beginner-projects and provide good learning-experience.

author: German_EE
author_rank: Super Contributor
timestamp: June 02, 2016, 08:11:45 pm
content: You would spend thousands of hours of work to complete this project. Is it really worth it?Hell yeah! Why? Because it's FUN.Rightnow I have a home made DC Power Supply, DC Dummy Load, 10 MHz Frequency Standard and RF Power Meter. On the ham bench there's also a home made DC Supply, home made Antenna Tuner and a home made transceiver that is a continuous work in progress. Only the scope, multimeter and VNA were made in a factory.

author: TiN
author_rank: Super Contributor
timestamp: June 03, 2016, 01:50:00 am
content: Subbed.I'd suggest 14-bit DAC for DC load. That will allow to set current in 1mA steps with some wiggle for calibration. Sometimes it's nice to have.Or at least two ranges (low current, high current) like in some production DC loads.

author: void_error
author_rank: Frequent Contributor
timestamp: June 03, 2016, 08:22:28 am
content: Quote from: TiN on June 03, 2016, 01:50:00 amMost likely going for the higher resolution DAC. 12-bit should do, that's 4096 steps and a suitable candidate is theDAC121C085. Same pinout as the DAC081C085, just more bits. Same 12-bit DAC will be used for the Lab Power Supply.There's also a 10-bit variant, the DAC101C085.

author: spudboy488
author_rank: Regular Contributor
timestamp: June 03, 2016, 11:42:13 am
content: Quote from: void_error on June 02, 2016, 02:11:40 pmLook at the MCP2200 if all you're using the PIC16LF1455 for is a UART. IC plus 12 MHz resonator is all you need. No programming of the part required.

author: void_error
author_rank: Frequent Contributor
timestamp: June 03, 2016, 02:06:01 pm
content: Quote from: spudboy488 on June 03, 2016, 11:42:13 amI intend to keep the micro for USB-UART, offers more versatility which might come in handy later. Maybe I drag a friend of mine who's a programmer, to write the PC software to control things, he's pretty good with C#. That would mean programming the micro as a USB HID device, not too complicated since it's going to be based on one of Microchip USB examples / demos, porting the code from the 16(L)F1459 to the 1455 isn't too difficult as I've already ported USB stuff from the 16F45K50 (used in the microchip demo code) to the 25K50 and added my own stuff on top of it with o problems.I probably haven't mentioned it before or at least not too clearly, but the User Interface board is also designed to be used as development board. For example, since it has both SPI and I2C it can be used to test code for different peripherals with the LCD providing debug data... and then there's the alarm clock. I'll actually program one for that sole purpose, just for fun, it already has buttons, a buzzer , RTCC and a display.

author: JPortici
author_rank: Super Contributor
timestamp: June 03, 2016, 04:47:32 pm
content: Why use two pics and not directly a usb capable one?Keep posting. I think i am in a rather simillar situation (on the verge to design an electronic load because i'll soon need one.. and i have to keep my mind occupied these days)

author: void_error
author_rank: Frequent Contributor
timestamp: June 03, 2016, 06:22:25 pm
content: Quote from: JPortici on June 03, 2016, 04:47:32 pmTime and money.I did look into some 16-bit PICs with USB, they're only slightly more expensive. However, what I looked at didn't have as many peripherals and/or relocatable pins which would have made both firmware and PCB layout a bit more difficult.There's also the 18F series with USB, but they don't have a PPS module or as many peripherals (which work independently of the core by the way). Initially I wanted to use those, having previously used them.The USB capable micro I mentioned is an optional extra and can be left out.Another reason is the "smart" version of the DC Electronic Load which will use the same 16F18857 micro as the User Interface, also sharing some bits of code like the fan control and I2C code (not too much but it's less work so it takes less time).

author: JPortici
author_rank: Super Contributor
timestamp: June 03, 2016, 07:48:17 pm
content: Yes. Those pic24 are more like glorified pic18.. I never liked to use those.and the dspic with usb is much, much, much more expensive.I also gave another quick look at the catalog and usb pic16 are only up to 20 pins. Too small, i agree with you. A 28 pin smart pic16 with usb would have been the best.

author: void_error
author_rank: Frequent Contributor
timestamp: June 03, 2016, 07:49:14 pm
content: Ran into a small problem:The User Interface uses 3.3V logic while the Waveform Generator uses 5V. Logic level shifting is required.There's a level shifting circuit using a small N-channel MOSFET which is quite popular and it'll do the job for I2C although I think it adds a singificant amount of capacitive loading. I don't plan to go anywhere above the 400kHz I2C fast mode so I think signal integrity won't suffer too much but correct me if I'm wrong.SPI is going to run at the highest speed supported by the slowest device on the bus - the MCP3201 - which is 1.6MHz, so the simple circuit used for I2C won't do the job.The Waveform Generator already uses a level shifting buffer for the square wave / PWM output, a74LVC1T45so I could go that route.Since I have both SPI and I2C I'm using an I2C I/O expander for the SPI chip select on the Waveform Generator board so the SPI connector only has SCK, SDI and SDO.There's going to be a +5V rail available on the Aux Digital Supply, sharing the same connector that goes to the User Interface board so I could do the level shifting there.What's the best choice for level shifting on the SPI bus? I could post an unfinished schematic if it helps more.

author: hans
author_rank: Super Contributor
timestamp: June 03, 2016, 10:19:47 pm
content: Quote from: JPortici on June 03, 2016, 07:48:17 pmPIC18 and PIC16 architectures are very similar. And I don't mean that in a positive way. The architecture is clearly not optimized for todays complex programs written in C and accessing 4K of RAM (that PIC in particular has 64 banks!). It will probably run and do it's job, but given it's limits.PIC24 is completely different architecture. The instruction set is tailored to C which results in much faster code, it has a vectorized interrupts, proper software stack, etc.dsPIC shares the same PIC24 basic CPU core, but has DSP instructions you specifically have to use. They are nice for higher throughput systems, but not a necessity for general purpose stuff.Personally the only reason I would choose a PIC16 is if I can save 1-2 chips using an (unique) onboard peripherals (like the 24-bit measurement timer). However if that is not the case, I would always start searching at PIC24 or ARM.I can understand bringing out the USB UART chip for a different reason; so you can isolate the UART to PC (this is test equipment after all). This is possible with USB but likely more complex/more expensive.However for a 28-pin PIC24 my go-to chip is the PIC24FJ64GB002. Sure it has a few less I/O and PPS pins than the PIC16F18857, but if that's a problem I would opt for the PIC24FJ64GB004.

author: void_error
author_rank: Frequent Contributor
timestamp: June 03, 2016, 11:18:43 pm
content: Is it really necessary to isolate the UART? I know it can be done with 2 optocouplers for less than $1... H11L1 comes to mind.The Waveform Generator will be mains earth referenced, the DC Load modules will be isolated from the UI, same thing with the Lab Power Supply.Actually... changing* from a 16LF1455 to a 16F1455 and powering it off the USB +5V and adding two optos with some resistors would do the job.*so no 3.3V regulator would be requiredI did use some (actually quite a lot) of H11L1s in a design, if resistors are chosen carefully you can easily reach 230.4k BAUD with a small but almost symmetrical delay between input and output rising and falling edges.Quote from: hans on June 03, 2016, 10:19:47 pmYup, they're almost the same, the only thing I noticed on the PIC18s that PIC16s don't seem to have is the 8-bit x 8-bit hardware mutiplier. Most 18F also support higher clock speeds.Quote from: hans on June 03, 2016, 10:19:47 pmAt some point I thought about using a PIC24 for the UI but after looking confused at the datasheet and thinking about how much code would be required to make it work since it doesn't have the onboard peripherals the 16F18857 has I gave up on the idea.Two relatively uncommon peripherals the drove my decision to use the 16F18857 are the Signal Measurement Timer, makes reading the fan RPM a piece of cake, just spits out the period between pulses, and the Numerically Controlled Oscillator which will be the Waveform Generator's square wave source. Haven't completely understood how to use it so I've got some reading to do.

author: JPortici
author_rank: Super Contributor
timestamp: June 03, 2016, 11:45:19 pm
content: Older PIC24 are very close to pic18 in both the core and the peripherals.. the pic24hv family for example. The FJ is a much different beast, nearer to dspics but with no dsp core. still, I have no real use for most pic24 (if i need 16 bit arithmetics i also need the dsp... and dspics have nicer peripherals.)Void Error has a point: the power of the modern PIC16 lies in its peripherals. with these new chips i mostly just have to move bytes around, call tables and the software is done.(And they have had linear memory access, along bank switching, for a very very long time.)

author: SaabFAN
author_rank: Frequent Contributor
timestamp: June 04, 2016, 12:59:36 am
content: Quote from: TiN on June 03, 2016, 01:50:00 amJust a little note here: Using old components bought on ebay, or from Grandpas part-box is often really worth it.I have an almost finished (Haven't built a case yet) DC-Load flying around somewhere that uses a Ferranti 8-Bit DAC, a 4066 to switch between 2 current-ranges and an LM324 as the controlling Op-Amp on a Euro-Card. It's quite a mess because of the parallel data-bus, but you can debug the circuit with a Multimeter instead of a digital scope with Serial Bus-Decoding.Also it looks kinda cool having some ceramic DIP-Package with a golden cap on itAnd you can build it on Vero-Board in an afternoon instead of waiting for 3 weeks until the boards arrive.

author: TiN
author_rank: Super Contributor
timestamp: June 04, 2016, 02:31:54 am
content: You can get away with a NFET and pullup resistor on SPI if speeds are slow or use more expensive Silabs digital isolators or AD ADUMs if you wish.As of ebay parts. Its often a good way to get fancy parts, but also a non-zero chance to get remarked fakes. I got fake AD7534 DAC and even fake LM339s one time.

author: void_error
author_rank: Frequent Contributor
timestamp: June 04, 2016, 11:50:59 am
content: Quote from: TiN on June 04, 2016, 02:31:54 amI'm going to choose the safe route and go with some proper buffers for SPI.The USB micro is going to be electrically isolated.The User Interface will be mains earth referenced, same thing applies to the Waveform Generator. They're going to share the same transformer.The DC Electronic Load modules will be isolated from the User Interface via ADuM1251 I2C isolators and probably powered off a different transformer or winding, haven't decided yet.Right now I'm focusing on finalizing the schematics for the UI and Waveform Generator, I might post them this weekend.One of the goals is to have as few different parts across all of the boards as possible, at least for the glue logic.

author: void_error
author_rank: Frequent Contributor
timestamp: June 04, 2016, 09:44:09 pm
content: The User Interface schematic is almost finished but I thought I'd ask for a few more opinions before I call it finished.A few component values still have to be calculated.

author: Mastrofski
author_rank: Contributor
timestamp: June 05, 2016, 01:15:18 am
content: Quote from: SaabFAN on June 04, 2016, 12:59:36 amI think for one-off pieces of equipment, using odds and ends is fine, but for something going into production, or something designed to be recreated by others(such as this project), sourcing components begins to become an issue.Love the idea though! I'll definitely be following along.

author: timofonic
author_rank: Frequent Contributor
timestamp: June 05, 2016, 04:59:26 am
content: Amazing project!! Are you going to release as Open Hardware and Open Software at GitHub?There's already a lab power supply project. Maybe a colaboraron would be possible of some kind.Thanks.

author: void_error
author_rank: Frequent Contributor
timestamp: June 05, 2016, 08:40:54 am
content: Quote from: timofonic on June 05, 2016, 04:59:26 amYou meanthis?Not sure yet if I'm going to make it open source, will decide after I build it.I still have to make some changes, thinking of moving the USB micro of the UI to a separate board and have an off-board connector for UART. USB connectivity was something I don't plan to add before I have the UI board built and tested and I'll need some separate USB-UART modules anyway.

author: void_error
author_rank: Frequent Contributor
timestamp: June 05, 2016, 11:23:37 am
content: If you're all wondering why I didn't use a SPI connection directly to the LCD and instead went for I/O expanders it's because SPI doesn't allow reading the LCD data (see UC1701 datasheet) such as BUSY status.Modifications to the Waveform Generator have been completed, it's now time to switch from I2C I/O expanders to SPI ones for the UI as the Waveform Generator already contains one.

author: SaabFAN
author_rank: Frequent Contributor
timestamp: June 05, 2016, 11:29:08 am
content: Quote from: Mastrofski on June 05, 2016, 01:15:18 amDidn't realize that this one is intended as a (maybe commercial) product. In that case, only Components that at least "Active" or "Recommended for new Designs" should be used.For standard-parts like diodes or transistors, there's normally a pin-compatible replacement, but ICs can become a pain real quick.Btw. how are you planning to implement the Modularity?- Mainframe-Style: One device with a backplane and Plug-In Modules- Modular Construction: Complete devices that look different on the inside, but always have the same front-panel and case

author: bktemp
author_rank: Super Contributor
timestamp: June 05, 2016, 11:43:47 am
content: Quote from: void_error on June 05, 2016, 11:23:37 amDo you need to read the data back?I generally avoid connecting GLCDs using I2C, because it is slow. Especially in your case, because you need to send many I2C bytes for writing a single byte to the LCD (setup data byte, toggle WRITE. It looks like you need 3 I2C bytes for each write to the ouputs, so thats 9 bytes for each data byte).The same applies for the rotary encoder. Depending on the encoder, you may need to sample the levels 100-1000 time per second otherwise it misses steps or gets the direction wrong.

author: void_error
author_rank: Frequent Contributor
timestamp: June 05, 2016, 12:10:01 pm
content: Quote from: Mastrofski on June 05, 2016, 01:15:18 amLuckily for me there's a local distributor about 1km (actually same neighborhood) from where I live and they can get pretty much any part I want from the large distributors like Digikey and Mouser at a slightly higher price but without the $50+ shipping that I would have to pay if I got the parts straight from the overseas distributors.I usually try to avoid sourcing parts from outside Europe, most of the stuff I order from TME. I think the Waveform Generator has all the parts available there, I'll have to double-check to be sure.Quote from: SaabFAN on June 05, 2016, 11:29:08 amIt's going to a combination of both Mainframe-Style and Modular Construction.The case won't be the same but the front panel is always going to be the User Interface board.For Waveform Generator I intend to make it a plug-in board with the BNC connectors on the front panel, whule the Aux Power Supply modules being separate boards or even stackable, that depends on how the PCB layouts turn out.For the Lab Power Supply there are going to be several modules, with the digital isolator board plugging into the back of the User Interface board just like the Waveform Generator. I'm going to stick to 0.1 inch pitch connectors so I maintain some sort of compatibility with breadboards/arduino boards/etc.Quote from: bktemp on June 05, 2016, 11:43:47 amI could get away without reading the data back but I might as well have the option to do it for example just updating a certain portion of the screen instead of the whole screen.I did suspect I2C would be quite slow so I replaced the I2C I/O expanders with SPI ones.The MCP23S08 expanders used have an interrupt output pin with programmable polarity, which is triggered depending on how the input pin interrupt registers are set. In other words, all the micro has to do when the expander's INT pin changes state is transfer the data. With SPI that would be really fast, up to 10Mbits/s, depending on the UI micro's clock. With the USB-UART micro moved off-board the UI micro can run off an 8MHz oscillator (I had to use 16MHz when the clock was shared because the USB micro had x3 or x4 PLL to achieve the 48MHz clock required for USB operation), add x4 PLL and SPI can go up to 8MHz (Fosc/4).The UI code will be heavily based on interrupts, taking advantage of all the core independent peripherals the PIC16F18857 has.

author: prasimix
author_rank: Unknown
timestamp: June 05, 2016, 03:24:20 pm
content: Quote from: void_error on June 05, 2016, 12:10:01 pmGlad to see that you decided to define multi-modular solution with Mainframe-style possibility. That is ambitious project and hopefully more people will be attracted soon and decide to join you. If I "dream" about something then it's interoperability of what I made with other people designs. I don't have a problem to adopt everything that is already created to share the same "DIY-instrumentation-bus" and works under same software framework and successfully communicate with commercial instruments.Like timofonic I vote for GitHub/Bitbucket openness in one moment because it could make a whole thing more interesting in the long run (and hopefully you are already aware of how looooooong could takes to make something in correct/usable way).From my side I'm looking forward to see if your design could become a potential "target" for firmware that we are developing. Not sure for now, but if currently developed code could be ported to PIC that can save literally hundreds of hours for you.One more thing because I been there: it's a LCD display or better to say its 128 x 64 (and monochrome) resolution. TFT LCD becomes really dirty cheap and they are not of equally dirty quality! Even if you hate "touch screen" you don't need to rely completely on it: there is no reason why encoders shouldn't be on your front panel together with touch-screen.Finally something that I should mention on the beginning: I'm suggest to not take mechanical aspects too lightly! That can really generate a lots of frustration: because you realized that something is not accessible, cannot be mounted, have EMC or heating issue, etc. Of course today's 3D modeling, thermal modeling, etc. could help you to avoid such mistakes that will push you into another revision, but remember that you are still alone and even with 96 working hours day that will consume all your time (again I'm talking about something that will be usable for you and eventually many others). So, mind the mechanics! Define boundaries within everything will happen first.

author: JPortici
author_rank: Super Contributor
timestamp: June 05, 2016, 04:21:59 pm
content: +1 on the tft screen. nowadays they are much cheaper than GLCDs.One thing i wanted to try on a new project is going old school: encode the framebuffer in 4 bit per pixel and use a palette. a 320x240 screen would then need "only" 37.5 kB of ram for the framebuffer (and 16 colours are more than enough for my application.. and yours)

author: void_error
author_rank: Frequent Contributor
timestamp: June 05, 2016, 04:41:24 pm
content: Quote from: prasimix on June 05, 2016, 03:24:20 pmThere's still a long way until I start coding. Planning on ordering a few ERC12864-655 displays this month, it'll take another month for them to arrive so that's when work starts. They're about $10 a piece.My general habit is to write modular code and reusing already written code, which I have a lot of, at least for peripherals, so only the display is something I might run into difficulties with.Quote from: prasimix on June 05, 2016, 03:24:20 pmLCD description updated.I don't hate touchscreens, I just like knobs and buttons more. I'm not using a touch screen because it would add more complexity to the firmware and it'll take me more time, and I've never worked with touch screens. I did look into using TFT color LCDs but I decided to go the simple way, again, because of the limited amount of time I have for this project, I also have a full-time job.Quote from: prasimix on June 05, 2016, 03:24:20 pmFor the User interface at least, I found all the 3D models that weren't already in the DipTrace library, except for the display.Starting next week I'm back to work at my full-time job, had this week off, so don't expect much progress on this project. I may have 3-4 hours of free time every weekday which I could use and a bit more during the weekends.

author: void_error
author_rank: Frequent Contributor
timestamp: June 06, 2016, 08:16:27 pm
content: Having changed the I/O expanders going to the UI dispay from I2C to SPI I have another decision to make.The MCP23S08 is addressable, up to 4 devices on the same bus using the same chip select. The User Interface uses two which means I have 2 addresses unused, so I can hook up 2 more chips on the same bus. Another board that uses an I/O expander is the Waveform Generator so it could share the CS pin with the ones on the UI if the address is set different from the other two.I'm inclined towards sharing the chip select pin as it frees up an I/O pin on the UI micro. What do you think?

author: void_error
author_rank: Frequent Contributor
timestamp: June 09, 2016, 09:11:22 pm
content: Made a few more changes to the UI. Replaced the I2C I/O expanders with SPI ones (MCP23S08), both share the Chip Select pin and SPI lines. For the Chip Select that goes to the off-board SPI connector there's a separate pin.I actually used up ALL the pins on the micro except for MCLR/Vpp (input-only and high voltage programming).Pull-downs (33k) are ok with the programming pins, the two XOR gate inputs' capacitances are very unlikely affect programming. With the buzzer being driven by the ICSPDAT pin signal during programming I'm prepared to hear some weird noises.PCB layout is progressing well, about two to three hours a day this week, all except one of the traces are laid out, they only need some tweaking.Before I finish laying out the PCB I thought I'd ask for opinions/advice, just in case I missed something or made a stupid mistake on the schematic below. Feel free to ask any questions.

author: void_error
author_rank: Frequent Contributor
timestamp: June 11, 2016, 12:29:21 pm
content: The UI board layout is almost compete, some small tweaks and via stitching are still required.Found the 3D models for almost all the parts so here's a sneak peek of the board. It's going to be the front panel for almost everything I build from now on.The dual row connectors on top will either be regular pin headers for connecting to piggy-back boards or shrouded headers for using IDC ribbon cables.The power connectors on the side can be either straight or angled.

author: void_error
author_rank: Frequent Contributor
timestamp: June 14, 2016, 12:14:50 am
content: Moved the mounting holes and the 6-pin UART connector on the UI board so I can make the Waveform Generator PCB narrower.Speaking of the Waveform Generator, the schematic is almost complete, I only have to sort a few details out, spent most of the evening looking through datasheets and I still have a few questions unanswered, like the following:If I use MLCCs for decoupling on the AD9835, do I still have to use a 10uF || 100nF pair or can I get away with just one cap? Same question for the LMH6321 output buffer.While looking for MLCC characteristics I ran intothis nice selection tool...An unfinished Waveform Generator schematic can be found below. As always, suggestions are welcome.

author: void_error
author_rank: Frequent Contributor
timestamp: June 16, 2016, 07:00:44 pm
content: Realized the digital output driving solution is dumb just because I can get away with using MOSFETs. Oh, and I'm at the 500 pin limit of my DipTrace Lite license, that's another reason using 74AHC125s is dumb, and yes, I was too lazy to come up with something else. I guess I just can't get away from DipTrace because I've been using it for a long time and I didn't need any tutorials to figure it out. Eagle would be another option, but the free version has a 80x100mm board limit, useless. KiCAD is a pain in the ass to use, installed it for the third time and then uninstalled it after 10 minutes, Circuit Maker has the annoying thing of having to be always online... anyway, rant over.Mounting holes might cause me some problems, mainly because everything has to be stackable. The UI board is quite crowded, as you can see in one of the previous posts, but the 80(H)x100(W)mm size is pretty much what I'd like to stick with, or if it's not possible, something with nice round numbers. The main problem with the size comes from the fact that the Waveform Generator board has to be at least 70mm wide because of the locations of the mounting holes on the UI board and has to extend about 20mm below it because of the BNC connectors. So far it's 100(H)x80(W)mm.On top of that there are going to be 2 Aux Power Supply boards, one with the Analog supply rails, the other one with the Digital supply rails. They'll have to be supported mechanically by the Waveform Generator board, that means 4 extra holes. No room for 4 mounting holes on the UI board but I won't need them there anyway.Another plug-in board would be the digital isolation module for the Lab Power Supply, that will require only +5V which will be provided by the same board that powers the digital part of the Waveform Generator. I'll have to keep that in mind then I design the Aux Power Supply modules.An alternative to the boards directly plugging into each other is to use angled pin headers and a pieces of stripboard (soldered or with connectrors) linking them together. Not very elegant but it would do the job. In any case spacers will still be required to keep everything from falling apart.Finally,I've decided to make this Open Source, and I'll probably do some (rather amateur-ish) YouTube videos if I have enough time after I assemble and test the first boards. GitHub stuff coming after that. Stay tuned for more.Oh, one more thing, does anyone know anyfree3D modelling program that accepts .step or .wrl models and it's to use so I can check if everything fits together perfectly?

author: altaic
author_rank: Unknown
timestamp: June 16, 2016, 09:25:09 pm
content: Quote from: void_error on June 16, 2016, 07:00:44 pmVery cool, thanks!On the open source CAD front, I've used FreeCAD and BRL-CAD, both of which have matured quite a bit in the last few years. The easiest option in this case, though, is probably Autodesk Fusion 360, which is "free for students, enthusiasts, hobbyists, and startups."

author: void_error
author_rank: Frequent Contributor
timestamp: June 17, 2016, 10:54:02 pm
content: FreeCAD seems to do the job, if I export a .wrl model of the board. Easy enough to use for basic stuff like adding boards on top of each other which is all I need to do.With that said, having the BNC connectors of the Waveform Generator sticking out right below the UI board seems to be a bad idea so I'll move them to the left side. That implies rotating the Waveform Generator board 90 degrees and relocating a few connectors.The result will look like this: (from left to right) BNC connectors -> Display -> Encoders. Buttons right under the display as seen in one of the previous posts.I'll start working on it after my badly needed 12 hours of sleep...

author: void_error
author_rank: Frequent Contributor
timestamp: June 18, 2016, 10:53:56 am
content: Had a few 3D models for the pin header corresponding sockets used to interconnect the boards and started looking around. TE Connectivity seemed to have all the 3D models I needed.Unfortunately their servers give me this after a few attempts."(error 21)  CoreApi(allocate) A predetermined resource limit has been exceeded. Further connection attempts will be refused until sufficient resources are available. Your patience is appreciated. Please try again later."

author: void_error
author_rank: Frequent Contributor
timestamp: June 18, 2016, 11:42:07 am
content: Found the 3D models elsewhere but had to register to be able to download.Anyway, problem solved which means I can post a nice 3D preview of two of the nearly completed boards, the UI and the Waveform Generator.

author: void_error
author_rank: Frequent Contributor
timestamp: June 18, 2016, 10:37:07 pm
content: I was doing thermal calculations for the different components which are going to heat up, like the linear voltage regulators for the +/-15V rails on the Aux Analog Power Supply module and the sine/triangle output driver of the Waveform Generator, the LMH6321.Since the LMH6321 comes in a surface mount package there's a limit of how much power it can dissipate with only the PCB as a heatsink and also trying to stay away from the SMT heatsinks.The datasheet says 300mA maximum output current, that's 15V into a 50 ohm load, assuming a dead short on the output. The output of the buffer doesn't swing to the supply rails so it's not really going to have to output more than 250mA. Worst case is outputting half the supply voltage - 7.5V - and that's 1.125W.If the using the PCB as a heatsink doesn't do the trick I've got another solution which is already implemented in hardware. I can set the output current limit depending on the set output voltage, all in the micro on the UI board.

author: void_error
author_rank: Frequent Contributor
timestamp: June 20, 2016, 02:22:14 pm
content: Connectors, connectors, connectors... and some more connectors.This is when the 3D preview comes in really handy. I'm trying to make the boards as versatile as possible which means they must accept both straight and angled connectors. For the whole modular assembly of boards straight 0.1 inch headers will do the job just fine, no drama here. Angled PCB headers are not a problem either, unfortunately they're not keyed and you can plug stuff into them the wrong way around and we all know what happens afterwards.Messing around with connector placement over the past two days trying to make the boards accept different types of 0.1 inch pitch connectors I found that the best placement for the connectors is at the top and bottom, with none going off to the sides.This allows using both angled and straight pin headers as well as the keyed KK 2.54 connectors from Molex pictured below. Just making sure I don't plug the power connectors in backwards...

author: void_error
author_rank: Frequent Contributor
timestamp: July 05, 2016, 11:56:35 am
content: Looks like the first layout pass for the UI board wasn't good enough and it also made the Waveform Generator board layout not to easy so it was back to almost square one. I wasn't expecting everything to be perfect first try anyway. Not even second try but I'm on the right track.Being a modular design implies the use of a lot of mounting holes and a lot of boards that have to stack up.Since the UI is actually the front panel it'll most likely be the only board which has connections on only one side (back side, the front side is the front panel). Most of the other boards will have connectors to both sides.I managed to stuff a lot of components in a small space for cost reasons but I realized that for more flexibility I'd need more mounting holes, 8 just wouldn't cut it.This would allow for extra combinations between modules stacking up in more ways, like this: : [Waveform Generator] : [Aux Digital Supply][Aux Analog supply]or : [Aux Digital Supply][USB - UART]or : [Digital Isolators] : [Aux Digital Supply]For the bigger modules like the DC Electronic Load or the Lab Power Supply the data connections (SPI/I2C) will be made using ribbon cables. I'm trying to keep the off-board wiring to a minimum.

author: void_error
author_rank: Frequent Contributor
timestamp: July 12, 2016, 07:58:12 pm
content: Took a small but needed break from this project and it seems to have paid off.The UI board seems to be sorted out, only a few more minor tweaks required... maybe(*)... wait, did I say that before?Anyway, I moved on to another board that has to fit on the back of the UI board and that's the USB-UART module.It's nothing fancy, just a PIC16F1454 with a few connectors and some optocouples so I thought why don't I make it more versatile, able to support some add-on modules such as RS-232 or RS-485 outputs.Back to the Waveform Generator board again, I'll have another go at it this weekend probably. The tricky part is getting everything correct, both mechanically and electrically. In more detail, that boils down to BNC connector and other component placement relative to the LMH6321 output buffer while keeping the analog and digital signal paths clear of each other and at the same time have enough room to fit two power supply boards on top of that which will have to share a few components in some configurations (don't want to go into more details, it's a bit hard to explain).(*) If you look below you might notice U5 (EEPROM) can be moved and J5 (Fan Connector) taking its place. Also, I color-coded a few traces as follows:YELLOW:+12VORANGE:+3.3VPINK:UARTGREEN:I2CBLUE:SPIHere's the UI board as viewed from the back, the display and controls along with the buzzer are on the other side:And in 3D, with an example of the possible connector configurations:

author: pmc
author_rank: Contributor
timestamp: July 13, 2016, 04:15:41 am
content: I just registered, and read this topic. So here goes the n00bish first post...A couple of things:1. You were looking for an alternative to DipTrace and free 3D modeling.For schematics & layout, check out EasyEDA. From the little I've played with it, it seems to work. And it's free.For 3D, check out OnShape -- a relative newcomer offering no-apologies parametric CAD for free. They claim to import step. Free accounts limit *private* documents. I like it, for what that's worth.2. Maybe I'm just not understanding what you're doing. It sounds like a UI front panel, some stackable modules and a framework for making arbitrary other stackable modules. Then I imagine that means a UI panel can manage a mixed stack behind it. Is that the idea, or did I get lost?If I'm not completely lost, then here's a thought: (assume easy answers to fab questions and) arrange modules to launch their real-world connectors/terminals from one side (both?) and angled ~45deg forward. The result would be stacks with a UI panel on the "front" face, and behind that along the "side" of a stack, all the external connectors facing front-ish.(You're placing connectors at top and bottom not sides - but maybe the constraints that lead that way apply more to stacking connections than to external connections?)Or more simply just go straight out the side - at cost of requiring more directly perpendicular access to the side of a stack.Something kinda like this, but with the knobs on the front and connections down the side:http://w140.com/tekwiki/wiki/File:Tek_211_front.JPG

author: void_error
author_rank: Frequent Contributor
timestamp: July 13, 2016, 09:29:44 am
content: Quote from: pmc on July 13, 2016, 04:15:41 amLooked at EasyEDA too but it's online which kinda sucks.For 3D modelling I'm using FreeCAD, and download the 3D models for parts from tracepartsonline.Quote from: pmc on July 13, 2016, 04:15:41 amYes, the UI board is the front panel and you can stack other modules on top of it, on the opposite side of the front panel, see older posts, I have an example of how two modules stack up in 3D.Quote from: pmc on July 13, 2016, 04:15:41 amThought about having boards plug in at a right angle but mounting everything in an off the shelf enclosure would be more difficult, so all the boards are going to be parallel to the front panel. That way if the stack becomes too heavy to be supported by the front panel only two L-shaped brackets bolted to the bottom of the enclosure would be required.

author: pmc
author_rank: Contributor
timestamp: July 13, 2016, 09:06:26 pm
content: Quote from: void_error on July 13, 2016, 09:29:44 amUnderstood. I'm not understanding how boards will expose terminal connections. I do see the function gen arrangement with BNCs next to the UI/display - but that only works for the one board directly behind the UI. How would you connect stuff to a module further down the stack? Or did you have in mind just one _function_ per assembly, with one interface board directly behind the UI exposing terminals adjacent to the display, plus whatever stack of add'l boards that function requires?

author: void_error
author_rank: Frequent Contributor
timestamp: July 14, 2016, 06:54:01 am
content: Initially I wanted to use ribbon cables to connect the modules to the UI, that's the reason for the shrouded headers, but I figured out shortly after that the waveform gen can be strapped to the back of the UI after finding those BNC connectors that stick out.One function per assembly is the general idea I'm sticking with but there will still be the possibility to add more functions which comes with a few small drawbacks like having to use some extra wiring if the board is located further down the stack requires connections to the front panel or if the board is physically too large.As an example, say we have the Lab Power Supply configuration. The connections will look like this:[UI board] : [Digital Isolator board] - [A/D & D/A board] : [Lab Power Supply board]":" means stacked"-" means wires/cables are usedThe main goal is to keep wiring to a minimum, I don't like things that have so much wiring they look like a spaghetti bowl.In some configurations it's difficult or not practical or too expensive to avoid using wires/cables for some configurations.Other options I was thinking about as far as add-on boards are concerned are the possibility to add a second display (for a dual channel lab power supply) and a keypad (quite handy for a waveform gen) but I haven't decided how they will connect to the UI.For the waveform gen at least the third layer of the stack (first one being the UI) will consist of the power supply modules for the different voltage rails required.

author: prasimix
author_rank: Unknown
timestamp: July 14, 2016, 08:42:31 am
content: Hi void_error, this is a great step towards defining modular lab equipments "environment". Do you have in mind housing? I think that enclosure has to be added in the picture very early.

author: void_error
author_rank: Frequent Contributor
timestamp: July 15, 2016, 08:42:34 pm
content: I actually do have housing in mind. I've been following your lab power supply thread and I'm probably going to use one found on modushop.biz, Economica series, 80mm tall. Shipping to Romania is quite expensive though so if anyone knows about any other places in Europe where I can find similar enclosures please let me know.

author: prasimix
author_rank: Unknown
timestamp: July 15, 2016, 09:04:25 pm
content: I'll let you know what Varisom from Portugal could offer. Their initial price for customized solution was really appealing but lately our communication became slow (maybe we should take into account EURO 2016 factor

author: pmc
author_rank: Contributor
timestamp: July 21, 2016, 05:28:16 am
content: Quote from: void_error on July 14, 2016, 06:54:01 amOk, stacked packaging was never a driver for the project. Got it.QuoteThat's what puzzled me on first reading -- stacking functions behind a flexible UI sounds interesting, but then extra wiring and loss of generality for front panel arrangement sound less interesting.So, the idea thrown out for your consideration was basically: keep the UI in the front panel of some box and stick the T&M connections out one side of the box, directly off the edge of each module PCB. More modules -> deeper box/longer side behind the same front panel. (thinking one side to avoid locking in other dimensions/board area)That said...Requiring a lot of clearance for that side -- to see, reach and push/twist/pull whatever connector on the 4th card back -- seems like a strike against. Aiming each card's connectors ~45deg toward the front might make side connections more usable. So that side would be, um, louvered. And you could see connectors/jacks/sockets/whatever without clearance for your skull + near point distance alongside the unit. Plausibility requires some design idea for simple construction -- IFF you think the result would be desirable. (have half an idea. or just short wires.)And...Out-the-front is still attractive for a single-function assembly like the freq gen arrangement you've modeled. PCB pads arranged for attaching either "vertical" or right-angle connectors (or angle adaptificator) would give the option to build a first/only module either way.Makes sense?Just some thoughts. Your ball.

author: void_error
author_rank: Frequent Contributor
timestamp: July 21, 2016, 05:33:47 pm
content: Quote from: pmc on July 21, 2016, 05:28:16 amI think I get what you mean.Say you're looking at the front panel on the Z axis, perpendicular to the plane formed by the X (horizontal) and Y (vertical) axis.Say you want the connectors on the right side, so you take the connector which would normally be on the X axis (sticking out to the side) and twist it clockwise on the Z axis by 45 degrees.That would be quite neat but on mechanical side of things there's going to be more work... and wires.Let me know if I really get it.Quote from: pmc on July 21, 2016, 05:28:16 amThe UI can also work as an (expensive) alarm clock or a development board. Some other modules I have in mind are a mains Watt Meter and a Frequency Counter.If you use right-angle connectors you could use stripboards for board interconnects as all the signal/power connectors are aligned to a 0.1 inch grid - breadboard/protoboard compatibility.Trying to keep it quite simple, mostly for time reasons. I want to have something done by the end of this year.Quote from: void_error on July 15, 2016, 08:42:34 pmDifferent enclosures for different functions. As long as it has an easy to drill front panel.

author: rollingstone
author_rank: Contributor
timestamp: July 25, 2016, 08:35:27 pm
content: Hi, Nice project. Sorry, I didn't followed Your post from the begginning. Just remembered I did once something like this. It was 8 HF generator modules and 8 HF amplifier modules using standardised EUROCARD subracks. What case you going to use for modular design? I used this one :http://lt.farnell.com/schroff/24563-191/subrack-3u-175mm-84hp/dp/1455794http://www.farnell.com/datasheets/95177.pdf?_ga=1.224072792.2973774.1448267837Only 40 eur and does it's job. Then you can use plug in units to slide in:http://www.farnell.com/datasheets/95306.pdf?_ga=1.216596437.2973774.1448267837or shielded module:http://lt.farnell.com/schroff/20809-537/card-frame-3u-227mm-10hp/dp/1370403You just need to drill or to cnc front plate to make holes for indicator LEDS, switches and BNC connectors and stuff like that.You can make one universal power with many regulated voltages (3.3, 5, +12, -12, 24 volts etc.) as plug in unit for entire rack, and then many other modules that you can plug in and plug out into rack and make it configurable and very universal.I don't have any photos but it looks something like this:http://dinrackis.com/euro-card-racks.htmlhttp://mulogic.com/UCF-3HE-rack.html(immages from internet).

author: void_error
author_rank: Frequent Contributor
timestamp: July 26, 2016, 05:33:09 pm
content: You got it a bit wrong, it's not the case that's going to be modular, it's the stuff inside the case.Those rack-mount frames do look nice but the plug-in units are bloody expensive. I've already decided what kind of enclosures I'm going to use and I won't have anything standardized across all the different bits of test equipment I'm making, the decision to have everything share a common front panel was made mostly because of time available for this project.As far as progress goes it seems that I've reached that part where I tweak stuff - quite happy with that.Another change to be made to the UI is replacing the 74HC4094 shift register used for driving the backlight LEDs of the pushbuttons with a 74HC595 as it's also used for multiplexing the Chip Selects and other things on the Waveform Generator speaking of which... the PCB is quite a pain in the a$$ to route, taking longer than expected, and I want the whole assembly to mount into a 100mm tall enclosure - that makes the Waveform Generator board size have a limit of 90mm. There's the option to make the board physically larger at the cost of... well... cost. It'll take some time until I figure out the best compromise although I've got quite a few ideas... stay tuned.

author: void_error
author_rank: Frequent Contributor
timestamp: July 30, 2016, 11:50:28 am
content: Finally managed to find the best component placement for the waveform gen board, final dimensions are 60mm wide by 90mm tall, front view.All that's left to route is the power traces and tweak everything (tedious), which means I'll leave that for another day and work on another module - the USB - UART board... and it's going to be modular too, it will be able to plug into the UI board or accept a plug-in board with RS-232 and/or RS-485 (half duplex or full duplex). Some changes are required though, since the PIC16F1454 doesn't have enough pins for all the control lines, so I'm replacing it with its bigger brother, the 16F1459, which is also used on Microchip's Low Pin Count USB Development Kit so it's just a matter of modifying the USB CDC Emulator demo code as far as firmware goes.Power Supply boards are next on the list. No big deal there, see first page. A 3D model of the Waveform Generator assembly will follow soon after.After all of the above are completed it'll be PCB ordering time, I'm going with PCBWay, they seem decent and cheap.Since the waveform gen is almost finished, I'm posting the schematic just in case anyone notices anything wrong, call it revision 1. The posts on the first page will be updated with schematics as soon as I have them built and tested.

author: void_error
author_rank: Frequent Contributor
timestamp: August 03, 2016, 08:00:36 pm
content: The USB-UART module is almost finished. I only have to figure out what I can do with the two free pins I have left on the PIC16F1459... any ideas? Already have RX/TX/USB LEDs. What else can I do with with two extra I/O pins? Monitor USB voltage with one of them? RS-232 flow control lines * and RS-485 direction control are already in place.* do I even need those? if not then I might as well get rid of them and use the 16F1454 but it would require porting the USB CDC Emulator demo rather than just modifying it and that would take more time which I have very little of.Other than that, I wanted to cheap out on the UI board and ditch those two MCP23S08 I/O expanders by using the PIC16F18857's bigger brother, the PIC16F18877 but haven't managed to assign all the peripherals to pins while maintaining an easy-to-do PCB layout even with all the flexibility the PPS has to offer so nothing changed there.I'm starting to dislike the idea of the Aux Power Supply modules being held only by two screws on one side so I might have another go at making everything fit together with nothing "flapping in the breeze". I might end up with more mounting holes than you can poke a stick at... but if it works...All that while trying to keep the 0.1 inch headers on an imperial grid while everything that's going to poke through the front panel (buttons, encoders, display) is going to be metric.

author: void_error
author_rank: Frequent Contributor
timestamp: August 11, 2016, 05:34:55 am
content: Quote from: void_error on August 03, 2016, 08:00:36 pmWrong. It can be easily done. Found a way around to allocating some pin functions to locations not supported, through the CLC module. I've been looking into that lately and if I use one of the CLC modules I can move some PWM outputs to PORTA. Only CCP5 can be assigned to PORTA but also CLC1OUT and CLC2OUT and they can accept inputs from other CCP/PWM modules.The control pins on the display are input-only so they can be driven by a 74HC595. There's already one driving LEDs, it's just a matter of daisy-chaining the second one.I've also had a look at the NCO module for square wave generation. The MCC comes in handy here for checking stuff, removes the need for spreadsheets to calculate NCO output frequency. Using Timer0 as a clock source for lower frequencies gives quite accurate results. Accuracy should be less than 1% +/- clock generator accuracy. The square wave / PWM output was never intended to be high precision anyway.So it's almost back to square one... but at least I won't have to write code for the MCP23S08 anymore.

author: void_error
author_rank: Frequent Contributor
timestamp: August 13, 2016, 10:13:15 am
content: It's looking good so far. There's one MCU pin available which is going to be used for something eventually.Board size will be increased from 120x70mm to 130x70mm to make room for extra mounting holes. This is actually a good thing since the waveform gen board could use some extra width.EDIT: Got it slightly wrong. I actually have two free pins. I'll find a use for them.

author: void_error
author_rank: Frequent Contributor
timestamp: August 24, 2016, 05:00:03 am
content: Looks like I ended up with 16 mounting holes on the UI board.Got some work done on the Aux Power Supply modules and ran into some issues again because of the board size limitations, both modules are going to be 34x70mm in size.On the analog supply board the space issues were dealt with by moving the SMD parts (diodes, resistors, MLCCs) to the bottom side of the board, the top side being occupies by connectors, bulk filter caps and the +/-15V linear regulators mounted horizontally on heatsinks (no TO-220s flapping in the breeze here).The digital supply board had a few changes. Initially I wanted to use LTC3824s but there wasn't any room for all the external components needed so I ditched the chip and went on to look for something else. Found theTPS54360which comes with a really handy spreadsheet which does all the math for you. Now I can fit both regulators on one board quite easily.

author: void_error
author_rank: Frequent Contributor
timestamp: August 28, 2016, 05:54:23 pm
content: Quote from: void_error on August 24, 2016, 05:00:03 amNope... even more changes. The way I want to sync the two regulators, one with an inverted sync signal, was a bit tricky with the TPS54360 as the timing resistor pin also serves as a sync pin and needed more parts than I had board space so it was back to suitable part hunting.LT3680 seems to do the job - 12V @ 2A for one of the regulators and 5V @ 3A for the other one. And everything fits. (Note: @ means at up to here)A dedicated sync pin makes life much easier.Of course, the component values can be recalculated for different voltages, who knows where else I might need one of these boards. The sync logic runs off a separate 3.3V LDO (LM3480) and you might be wondering why I chose to run it off the 12V rail. Here's why: 12V also powers the fans on the DC Load and on the Lab Power Supply and those two don't need a 5V rail.I'll be playing with these a bit more in LTspice to find the proper values for the compensation network components. Would have been easier if LT just made a spreadsheet like TI did.Back to the dreadful-to-route waveform gen board... nothing changed there except for the LDO for the 50MHz oscillator which was a MCP1700, now it's a LM3480. Once I finish moving component groups around to get the best possible placement and finish the layout I'll have a 3D model of the whole assembly. Finally.The other power supply board required by the waveform gen is not really worth talking about too much as it's just a pair of 7815/7915 linear regulators, a pair of 78L05/79L05, a bunch of filter caps and some diodes. Oh, and two small heatsinks.Should I add some PTC fuses (where?) just to be on the safe side or is it a bad idea?

author: void_error
author_rank: Frequent Contributor
timestamp: August 29, 2016, 05:29:14 pm
content: Eye candy time!Although I can't call anything finished yet I'm close enough. Lots of minor tweaks and some double-checking is still required for every single PCB but I finally got as far as being able to slap everything together in 3D with all the connectors in place. There's still a long way to go.Color coded for visibility reasons:The white board is the front panel user interface. The waveform generator board is the blue one with the BNC connectors sticking out.The 5-pin connector on the green board (USB-UART module) goes to a USB panel mounted connector. One side of the optoisolators is powered by USB +5V while the other gets power from the 3.3V rail on the user interface board.The purple board provides the analog supply rails: +/-15V and +/-5V. The two TO-220 regulators will have some small heatsinks between them and the board. Filter caps placed below the heatsinks. There's still room for a frequency counter moduleThere's more than enough space for those bulky inductors.The two black connectors on the top accept terminal block headers(?). The wires will be coming from a 18V center-tapped transformer. I managed to keep wiring to a minimumConnectors on top for easy probing and firmware upgrade. Might include a serial bootloader at some point...

author: void_error
author_rank: Frequent Contributor
timestamp: September 03, 2016, 04:51:43 pm
content: Haven't worked on any part of this project at all for a few days and that's when ideas start coming and it's time to start tweaking.I was looking for parts on Farnell/element14 website and found out they have a lot of quadrature rotary encoders to offer which made me want to change things a bit, forget the Bourns PEC11-L which is available at distributors which have high shipping cost to my country. Alps seem to have some nice encoders at a decent price also with included push option so I'm going with one of those. $5 shipping is the same as TME charges. If I can stick to these two distributors I'm happy and so far they seem to have all the parts I need.Speaking about tweaking the designs I'm starting to think the UI board doesn't need a SEPIC converter if I use a charge pump to generate the -5V rail on the lab power supply board instead of an inverting DC-DC converter which would have used the LT3580. The charge pump wouldn't be a big deal as I could just use some logic gates driving small dual MOSFETs and clock them with the SYNC signal. That would eliminate the requirement for coupled inductors which aren't as easy to get as regular ones.The LT3580 would be then replaced by the LT3680 which is also used on the aux digital supply board, reducing the BOM count.With the waveform gen configuration being almost complete it's time to focus on the next two groups of modules I have planned, the DC Load and lab power supply and sort out the mechanical aspects.Since I want the DC load itself to be modular there are two possible setups:Have the modules in parallel for more powerHave the modules grouped and isolated from each other, like a multi-channel power supplyThe first setup can contain a local microcontroller (on the DC load PCB) or not. The micro would be used for constant resistance or constant power modes. Paralleled modules will share a single DAC .The second setup will include some form of isolated DC-DC converter and logic isolators.For the lab power supply things will be a bit simpler, each power supply module is going to have an isolator+ADC&DAC board on top of it.Another piece of test equipment that I intend to design and build, another module in this case, is a mains Wattmeter.

author: void_error
author_rank: Frequent Contributor
timestamp: September 12, 2016, 05:01:50 am
content: Over the last few days I've been trying to figure out how to make the DC load modular and spent a lot of time looking for suitable parts.Had to stick with SPI because there are not many I2C ADCs available.The tricky part is making the modules daisy-chainable for the two main configurations - with or without an on-board micro.Why? Because there is only one Chip Select line available.With an on-board micro it can be done in firmware, each microcontroller will have an address. The peripherals will be on a second SPI bus.When there is no on-board micro I'll be using cascaded 74HC595s to multiplex the Chip Select signals for the DAC, ADCs & Temperature sensors.In the end it all boils down to a lot of jumper links used depending on the board configuration.I still have no idea if passing the analog signals from one DC load board to another is a good idea for "slave" boards containing only the analog stuff and temp sensors with the "master" board having the optional micro and DAC/ADCs.

author: void_error
author_rank: Frequent Contributor
timestamp: September 12, 2016, 07:43:03 pm
content: Before thinking of finalizing the DC load design I thought I'd check if the load modules scale up nicely and are stable in parallel with the help of LTspice.The actual control loop will be using an OPA2727 but for the simulation I used the closest LT part I could find within 5 minutes which is the LT1213.Everything seems to scale up nicely with no parasitic inductances/capacitances so a 400W DC load comprised of 4 DC load modules appears to be possible. Many thanks to Jay_Diddy_B forthoroughly explaining how to get the loop stable.On the digital side I had a few issues with designing the module for operation with or without an on-board microcontroller but most of them are now dealt with.One of the issues was multiplexing the fan rpm signal on the non-micro configuration but I had some free pins on the 74HC595 shift register used for multiplexing the ADC/DAC/Temp sensor chip select pins and used one to enable/disable the output of a 74LVC1G126 3-state buffer. A schematic would probably explain this better but it's not finished yet.

author: void_error
author_rank: Frequent Contributor
timestamp: September 17, 2016, 06:13:19 pm
content: At this stage I'm jumping between the (still) nearly completed UI/aux psu/waveform gen/USB-UART boards tweaking stuff and thinking of things I might want to add.Found one: add some energy storage caps to the UI board so they can power the EEPROM, micro, oscillator, and the optional RTC for an EEPROM write after power off as there will be no standby power supply and I'd like to have the previous settings saved until the next power on. Yes, it's going to have a "big clunkin' power switch".There are two things that come into play here:Detect the 3.3V rail voltage decreaseWrite to the EEPROM before the capacitor voltage drops below a certain value, about 2.7V in this case, the micro can run at 32MHz down to 2.5VThe first one will be handled by one of the comparators, input via an externally available pin.The second will be dealt with using the same comparator but with the input connected to the internal DAC acting as an internal voltage divider (referenced to Vdd).The other input of the comparator will be internally connected to the internal voltage reference.

author: void_error
author_rank: Frequent Contributor
timestamp: October 01, 2016, 11:54:31 am
content: Quote from: void_error on September 17, 2016, 06:13:19 pmGood thing I remembered to RTFM for the oscillator, which is an ILSI ISM95 or ISM97 because it doesn't work down to 2.7V so I'll have to switch to the PIC's internal RC oscillator when a power failure is detected and that's possible according to the datasheet.Another possible issue which I'm glad I didn't overlook could have been caused by the input protection diodes within the micro but another P-channel MOSFET which disconnects the resistor divider's positive side solved the problem.With that said, the schematic for the UI seems to be complete... except a few part values...EDIT:Forgot to change the nets for the encoders from +3V3 to VDD... and maybe a few more pull-ups.Corrected everything. Even had some MOSFETs backwards...

author: max_torque
author_rank: Super Contributor
timestamp: October 01, 2016, 03:45:37 pm
content: maybe silly question, but wouldn't it be worth doing all the different modules on a standarised card, with a std backplane connector? therefore you could add extra modules, or change the allocations easily. Even better, build them into a std rack mount enclosure like this sort of thing:and it would look pretty professional too

author: void_error
author_rank: Frequent Contributor
timestamp: October 01, 2016, 04:52:51 pm
content: Someone else also suggested that, but it would be too expensive. Rack mounted enclosures aren't cheap either.

author: max_torque
author_rank: Super Contributor
timestamp: October 01, 2016, 09:43:02 pm
content: whilst proper eurocard rack enclosures are expensive, i bet you could do a simple DIY solution using std back plane connectors and some laser cut acrylic or simple ally frame etc??Design you "processing" pcb as the back plane, with the IO and numerous serial bus connections, and have the various cards slot into that!

author: void_error
author_rank: Frequent Contributor
timestamp: October 02, 2016, 06:46:30 am
content: Quote from: max_torque on October 01, 2016, 09:43:02 pmThat would be possible but I would lose compatibility with solderless breadboards and protoboards which both use 0.1 inch spacing. The reason for the modules having 0.1 inch headers is if someone wants to hook up a module (like the waveform generator) to their own "processing board" like an arduino or raspberry pi they wouldn't need a custom made adapter board. They also have to fit in an off-the-shelf enclosure.The other issue with plugging the modules at 90 degrees is that all the different IO would have to be on the processing board so they would be accessible on the front panel and they would take up a lot of space, not to mention the mechanical part, securing all modules so they don't flop around. That's the reason the current mechanical layout was chosen, as it only needs one surface to attach to, in the case of the waveform generator which has a 3D model shownshown here, is the front panel.I also have to mention that all the bits of test equipment here are not precision driven but more by price, ease of construction and versatility so some compromises have been made.

author: void_error
author_rank: Frequent Contributor
timestamp: October 04, 2016, 04:58:05 pm
content: Some significant progress has been made on the DC Electronic Load module.The microcontroller for the "smart" version is going to be a PIC16F18345, again, a newer part, chosen for the pin reallocation feature and the multitude of peripherals, most notable being the availability of two hardware SPI ports, one used for communicating with the UI board, the other one handles the peripherals.Having all the versions on one board is going to be a bit tricky and it'll involve a few jumper links.

author: void_error
author_rank: Frequent Contributor
timestamp: October 12, 2016, 02:28:04 pm
content: The DC load will be split into two, one board with the analog stuff and temperature sensors, the other board will include the ADCs and DAC with the digital isolator and shift registers, haven't decided exactly what goes where but I'll make it in such a way so it will be shared with the lab supply.I'm also thinking about a purely analog version, but that implies analog temperature sensors and comparators for the over temperature pretection as well as some solution for fan control.

author: void_error
author_rank: Frequent Contributor
timestamp: October 21, 2016, 12:05:40 am
content: Made some block diagrams of what I have in mind so far. Hopefully I find a way around the tricky DC load requirements...While I was still at it I decided to make one for each piece of test equipment.If anyone's wondering what Q7 & Q15 are they're the last stage outputs of the shift registers used for Chip Select multiplexing.DAC_I, ADC_I etc. are the chip select signals.For the Waveform Generator I chose +7.5V to feed the linear regulator powering the square/PWM output driver but that might change. I could just slap a 5V linear regulator and ditch the +5V output from the Aux Digital Power Supply. It'll be cheaper too.

author: void_error
author_rank: Frequent Contributor
timestamp: October 25, 2016, 06:37:18 am
content: The DC load final schematic is beginning to take shape.Some changes were made to accomodate analog control so the digital temperature sensors were replaced by a pair of LM56.The nice thing about them is that they have two built-in comparators with an input and an output available externally for each of them and the obvious way to go was to slap an SR flip-flop (with an inverter on one of its inputs) and turn each temperature sensor into a schmitt trigger with the input being the temperature and presettable high/low temperature thresholds.It even has an internal voltage reference but it's not going to be used as there's already a more accurate LM4132-4.1 on board.The UI board will read the temperature via two MCP3001 ADCs, the cheapest I could find with a SPI interface and external voltage reference input. 10bit is probably overkill anyway.What's left to add is a PWM circuit for fan control for a fully analog version.With all of those things in place I had an idea...On paper a single DC Load module should be able to dissipate 100W but it should be tested after the thing is built. How? The answer lies in some lines of code that have yet to be written. I'm thinking about a test mode where you connect the load to a 150W+ voltage source and start "cranking" the current up while keeping a close eye on the temperature. Once things startwarmingheating up to a predefined temperature reduce the the current until thermal equilibrium is reached (in other words temperature reaches a stable value) and read the input power.Another thing worth mentioning is the availability of two current ranges implemented like Dave described in his EEVblog #931. Look it up on youtube if you haven't already.The SPI Isolation board will also include fan control/monitoring as well as the MCU for the "smart load" configuration along with isolated power. Nothing fancy, just a tiny MCP1416 driven pulse transformer with a few diodes and caps feeding two LDOs. The tricky part is having the whole lot of variants on a single board.I've previously done something similar and it's so easy to screw it up. Triple-checking won't cut it.

author: void_error
author_rank: Frequent Contributor
timestamp: October 26, 2016, 08:06:23 am
content: I just realized I could simplify some things... maybe...And reduce the BOM.The only thing I have to do is delete the level shifters from wherever they're used and put them on the UI board but there might be some drawbacks...You won't be able to use modules with different I/O voltages together without an additional level shifter but I won't do that so it's fine with me.

author: void_error
author_rank: Frequent Contributor
timestamp: October 26, 2016, 08:19:23 pm
content: Found another thing I f***ed up badly at. 74HC595 as SPI Chip Select multiplexer. I'll either have to use its reset pin or find a way to interrupt the data flow past it to the other SPI peripherals while shifting data into the 595 preferably using existing connector pins.

author: void_error
author_rank: Frequent Contributor
timestamp: October 27, 2016, 04:45:36 am
content: Problem solved using a 74HC74 configured as a 2-bit Gray code counter since I only have one pin available for latching the 595's outputs. One output goes to 595 latch pin, the other to the reset.

author: void_error
author_rank: Frequent Contributor
timestamp: October 29, 2016, 12:43:35 pm
content: Quote from: void_error on October 27, 2016, 04:45:36 amBetter/simpler idea: divide the 74HC595 latch pulse by 2 and use it as a clock enable to the other SPI peripherals. Only a D-type flip-flop and some gates are required. The reset pin on the 74HC595 won't be needed.

author: void_error
author_rank: Frequent Contributor
timestamp: October 30, 2016, 01:04:35 pm
content: Eventually I ended up with a demultiplexer for the SPI clock line.While looking for parts I ran into these really versatile configurable gates:http://cache.nxp.com/documents/data_sheet/74LVC1G57.pdfhttp://cache.nxp.com/documents/data_sheet/74LVC1G58.pdfI might actually replace all of the different discrete gates with some of these so there are less part numbers on the BOM.

author: void_error
author_rank: Frequent Contributor
timestamp: November 10, 2016, 05:32:53 pm
content: Looks like having two current ranges for the DC Load is pointless but I might keep the range switching for voltage measurement just to get better resolution at lower input voltages.I settled for 2A & 50V per module.Minimum current will depend on the minimum output voltage of the DAC and the offset of the op amps but it will go down to 1mA.

author: void_error
author_rank: Frequent Contributor
timestamp: November 10, 2016, 11:54:25 pm
content: I did mention I found pin-compatible ADCs and DACs from TI & AD.Here's a small list. These are the parts available at Farnell, and there's also a LT part I found.ADC12bitADS7816LTC186016bitADS8320ADS8325ADS8326AD7683AD7684DAC16bitAD5662DAC8501DAC8531DAC8551

author: void_error
author_rank: Frequent Contributor
timestamp: November 12, 2016, 11:20:07 am
content: Had an idea for an OPP (Over Power Protection) circuit. That means I don't have to settle for 50V & 2A but an upper power limit while keeping a maximum voltage limit.One way to achieve this is to set the threshold for the OVP (Over Voltage Protection) comparator based on the set current determined by the DAC output voltage. An op amp should do the trick. Time to play with LTspice.

author: prasimix
author_rank: Unknown
timestamp: November 12, 2016, 12:29:43 pm
content: I don't see an OPP as critical to deserve dedicated circuit and not be limited/calculated by MCU or you want response time in microseconds range? Of course if you have dedicated OVP circuit than suggested method make sense when you are in CC mode, isn't it? For CV mode you have to take into account max. current.

author: void_error
author_rank: Frequent Contributor
timestamp: November 13, 2016, 12:11:20 pm
content: If there is a MCU then there won't be a dedicated OPP circuit but since there'll also be a non-MCU version on the same board I thought I'd design that in so it's harder to blow the MOSFETs up.

author: 0xPIT
author_rank: Regular Contributor
timestamp: November 13, 2016, 12:26:31 pm
content: You might be interested in this project:http://www.heise.de/ct/projekte/machmit/ctlab/wiki(German)

author: void_error
author_rank: Frequent Contributor
timestamp: November 16, 2016, 03:28:24 pm
content: Quote from: 0xPIT on November 13, 2016, 12:26:31 pmTo be honest, it would take me about a decade to build something like that on my own...NI have done something similar but it's bloody expensive...I never intended to put everything in the same box. Maybe I should change the title to "DIY Partially Modular Test Equipment Project"?Anyway...OPP circuit is working in simulation (LTspice). I used a discrete VCA and I know it has a lot of drawbacks as I played with one on a breadboard a few years ago. Since OPP doesn't have to be accurate it should be enough, limiting the maximum power to roughly 105% which is within safe limits. Hopefully this is the last thing I have to implement.

author: void_error
author_rank: Frequent Contributor
timestamp: November 18, 2016, 01:33:53 am
content: Quote from: void_error on November 16, 2016, 03:28:24 pmAnd it's ditched as soon as I did a temperature sweep and expected it to be a mess and I was right.I guess I'll have to live with some limitations for a fully analog version if anyone wants to build one...In that case for a 2A version the load will shut down above 50V. Nothing more than a schmitt trigger needed.

author: void_error
author_rank: Frequent Contributor
timestamp: November 19, 2016, 02:39:55 pm
content: I'm thinking of changing the MCU again for something more powerful. Although the new 8-bit 16F1xxxx series has a lot of good stuff built in it might be a bit slow and lacking memory, and so far the only one I could find at Farnell and TME is the PIC16F18875 which has only 1k of RAM.The other MCU which will be part of the control loop for the E-load, the 16F18345 is not available at the aforementioned distributors either.EDIT: Guess I was wrong. Farnell has it.Changing to a PIC18F would be quite pointless because I won't gain much from the 8x8 HW multiplier but the PIC24s have a 17x17bit multiplier and 32/16bit divider which is useful given the multitude of tasks it has to do.To summarize, I'd use a PIC24FJ series 64-pin MCU in a TQFP package which will allow me to remove the shift registers on the UI board, and a PIC24F04KA201 for the E-load control loop for constant resistance / constant power loop. The other modification would be switching from SPI to UART for communication with the "smart" load modules since the 24F04K201 has only one MSSP module.They're both quite cheap.Any thoughts on this? Let me know.Too complicated, would take me too much time.

author: void_error
author_rank: Frequent Contributor
timestamp: November 22, 2016, 07:35:23 pm
content: The SPI isolation board is turning into a connectivity nightmare when it comes to routing. I'm limited to a width of 80mm and height of 20mm less than the DC load board which has to fit into a case which is 100mm or 115mm tall since it's going to sit on top. It'll also have to support both regular 0.1 inch pin headers as well as IDC headers. The pin headers will be used for daisy-chaining and the IDC headers only for the first board in the chain on the UI side. Daisy chaining using the pin headers also requires a mirrored pinout for right angle pin headers so this means another row of pins connected to ground.Since the SPI isolation board also has to plug into the Lab PSU board it means that that latter has to also be 80mm wide so I guess I'll have to start working on that too to make sure everything fits together.This is going to be tricky.

author: void_error
author_rank: Frequent Contributor
timestamp: November 26, 2016, 03:33:26 am
content: Everything is starting to come together nicely. The DC load schematic is almost finished as well as the SPI isolation board.I've also started working on the linear part of the lab power supply aka the post-regulator to make sure the SPI isolation board fits on top of it and the whole thing seems to end up around 100x80mm.The pre-regulator is going to be on a separate board which will also output the +/-5V rails required by the lab power supply as well as a bias voltage around 5V above the pre-regulator voltage.There's still a long way to go.

author: void_error
author_rank: Frequent Contributor
timestamp: January 31, 2017, 03:58:50 am
content: Sorry for not posting anything lately... that doesn't mean I abandoned this though.Some changes are in place, mainly changing the bus used to link all the modules together to something similar, a simplified version of whatprasimixproposedhere, which he's developing with a bit of assistance from me.For the simplified version of the bus only 15 lines are necessary, as described below for the UI board:CLK - clock line for feeding a clock signal to other microcontroller in the busGPO - General Purpose Output - user configurable output, can be used to control fans, etc.GPI - General Purpose Input - user configurable input, can be used for measuring fan rpm, etcSDA - I2C data lineSCL - I2C clock line1-WIRE (Note 1) - for connecting devices using Maxim's one-wire busTX - UART TX - configured as open drain to allow multiple master devicesRX - UART RXST_CP - 595 shift register storage pulse, latches the shifted data to the ouputsSH_CP (Note 2) - 595 shift register clock, driven from the SPI clock lineQS (Note 3) - SPI data output to 595 shift registerMOSI - SPI data outMISO - SPI data inSCLK - SPI clocknCS - SPI chip select outputNotes:1. the one wire bus uses a UART module2. SPI output available via Peripheral Pin Select (PPS)3. on peripheral boards (waveform gen, etc) it will connect to the 595's data input via the bus input connector, while the 595's last bit shift register output (QS) will connect to the bus output connector and to the data input on the next board for daisy chaning, a schematic will explain this betterChanges have been made to the UI board to accommodate the new bus connection which uses 5V signalling. The microcontroller used will be aPIC18F65K40or any of its bigger brothers in case more RAM is needed. Ditched the switchmode regulator in favor of cheaper LDOs. Since the LCD runs on 3.3V while the MCU rins on 5V some level shifting was required. This was achieved by making the I/O pins open drain and setting the input levels to TTL, with pull-ups to 3.3V.The Waveform Generator has changed a bit, with the square wave output fed from a comparator connected to the first amplification stage after the DDS filter, capacitively coupled. What that means there's no PWM capability on that output anymore, that will be available on the Frequency Counter module, the next one I'll be working on. I'm also using a dual output reference, aREF3140since it's easier to bias things.As far as connectors are concerned no changes will be made, sticking to ribbon cables for data and keyed headers for power.If anyone's still following this I have to say I want to see this completed as soon as possible but with so many modules I have to make sure everything fits together before throwing money at it. I don't want to have a second revision right after I build the first one so I'm taking my time to make sure it works first go.

author: void_error
author_rank: Frequent Contributor
timestamp: June 27, 2017, 03:21:22 pm
content: QuoteLooks like I haven's posted anything in here for quite some time...Well then...After running into the 500-pin limit of the free non-profit version of DipTrace more than enough times I decided to give KiCad another go after watching some random presentation on YouTube so here goes me redrawing everything. There won't be any lack of drawbacks however, because you can't use sheets in KiCad yet(?) and although there's a workaround using hierarchical sheets youcan't copyanything from the root sheet so unless you start messing with the files you've got your work cut out so I'm not going to do everything twice and since this is not a review of KiCad I shall end the rant here.What I'm going to end up with due to the lack of sheets is huge schematicsbut at least they'll be separated into functional blocks.Creating all the missing components is going to take some time as well.More updates coming soonTM.

author: void_error
author_rank: Frequent Contributor
timestamp: July 08, 2017, 04:03:40 am
content: Things look like they're coming together nicely. Since I have no pin limit anymore I'm going to put the Waveform Generator and the Frequency Counter on the same PCB while keeping the mounting on the back of the UI board.The Lab Power Supply schematic is almost finished, the only thing that's preventing completion is that I'd like to have as many components / functional blocks shared between all modules, making PCB layout, firmware and ordering of parts less tedious. I'm also keeping the option of having it work without digital control while keeping switchmode regulator sync, fan control with OTP (Over Temperature Protection) and switching off the pre-regulator for low output current settings.It has been previously mentioned that there were going to be two AUX power supply modules, they're now going to be merged into one and used to power the Waveform Generator + Frequency Counter or the DC Load modules. Where there are linear regulators there will be the option to choose between TLV1117/LM317 and 78xx for the positive supply rails and LM337 and LM79xx for the negative supply rails. There might also be a fan control circuit on that, haven't decided yet.Since I've mentioned the DC Load I might as well get into some details, first of which will be the 'weird' supply voltages of +7.5V and -2.5V for the op amps (OPA2727, also used in the Lab Power Supply) since their maximum supply voltage is 13.2V along with +5V/-5VOn the ADC side I ended up using only one with a 74HC4051 multiplexer for all measurements on both the Lab Power Supply and the DC Load. There's a list of pin-compatible ADCs and DACs a few posts back.As you've probably noticed, updates on this will be fairly random.

author: void_error
author_rank: Frequent Contributor
timestamp: August 04, 2017, 05:14:18 am
content: It's Aux Power Supply time.With some of the modules using more power rails than you can poke a stick at (you need more sticks) some form of power sequencing will be required, not so much because the power rails need to all come up at exactly the same moment in time but for that fault scenario when one of the rails outputs a voltage out of spec which could cause current to take the shortest path through the input protection diodes of some ICs and weird stuff could happen.A simple solution to this is to use a window comparator circuit (LM393) for each rail and some P-channel MOSFETs paired with a delay circuit (CMOS 555 or some monostable using logic gates) and a cheap voltage reference (TL431 or LMV431).Quote from: void_error on July 08, 2017, 04:03:40 amThat turned out to be not such a good idea. I want to be able to use the boards for other things and not having them only 20% populated.One more thing worth mentioning is the use of a 74HC138 3-to-8 line decoder to drive the CS pins of the SPI peripherals on the boards that use them, which means I can use only one 74HC595 where I would have otherwise needed two and adding an extra level of idiot-proofness.

author: Leo Bodnar
author_rank: Frequent Contributor
timestamp: August 04, 2017, 08:12:23 pm
content: If you are designing your own modular instrumentation project you might find thishttp://www.easy-phi.ch/interesting.Leo

author: void_error
author_rank: Frequent Contributor
timestamp: August 05, 2017, 08:49:57 pm
content: Prasimix has an idea like that. I did mention in a previous post that my version of modular is not going to have everything in the same enclosure and try to keep the costs down, although you could combine some of them. It's not going to be rackmount either.

author: void_error
author_rank: Frequent Contributor
timestamp: August 09, 2017, 07:23:51 am
content: Quote from: void_error on August 04, 2017, 05:14:18 amTurns out that it's not going to be so simple so I'll just use an undervoltage lockout comparator for each rail, OR them together, some TVS diodes for overvoltage protection and rely on the polyfuses at the linear regulators' inputs to limit the current. The reference for the UVLO comparator is going to be a TL431. Output disconnect will still be done using MOSFETs.

author: void_error
author_rank: Frequent Contributor
timestamp: August 10, 2017, 01:49:29 pm
content: After more than enough stupid ideas I managed to come up with a circuit that seems to work. You can find a crude mock-up of it below (http://falstad.com/circuit/circuitjs.html- File > Import From Local File). It's neither built up to scale (component values are subject to change) nor painted (no part numbers). Used a simple zener based series regulator instead of an LM317 just because it'll do for the simulation.Time to see how I can add most the same to a negative rail. After that I'll draw it in LTspice and 'virtually' abuse it some more then breadboard it at some point.Yes, I know, it's overkill.

author: void_error
author_rank: Frequent Contributor
timestamp: October 06, 2017, 10:41:19 pm
content: It's now time for a design goal (or feature?) update for each of the pieces of test equipment, it's the stuff on the first page.Someone mentioned a useful feature would be to turn two channels of a bench power supply on at the same timehereso I went ahead and opened my KiCad project for my bench supply to see if it was possible and it apparently is but more on that after I polish the schematic a little bit, I think it's lacking a few details at this point, like component values and associated footprints, maybe I should make a new component library for passive components with footprints associated instead of the standard generic resistor/capacitor ones which need to be linked to footprints manually since I have quite a few different size passives... anyway, since I'm using 595 shift registers for SPI addressing and the DACs used to set the voltage and current only have the clock input (SCLK) and the data input (MOSI) pins tied to the SPI bus they can be updated at exactly the same time given the output voltages are the same which is not that useful so I'll either have to find a DAC with a Latch DAC pin or find another way to make the DAC outputs rise at roughly the same time with the latter being an easier task as I already settled on some specific parts (see first page).Another idea I've been messing around with is completely ditching the on-board fan control circuit on each of the PSU channel. The new location will be the aux digital supply board since that will be used by the DC load modules anyway, which are now going to be 200W or lower, depending on the power MOSFETs' type and number of devices used. An extra connector will be required. In the case of the bench power supply the aux digital board's fan control circuitry will drive one fan for both channels.Also, sorry for not posting in a while, I thought I'd get enough stuff done first.

author: prasimix
author_rank: Unknown
timestamp: October 07, 2017, 11:47:12 am
content: Quote from: void_error on June 02, 2016, 02:22:51 pmMaybe it's time to think about data acquisition module, for beginning a modest one for e.g. multiple/multiplexed channels temp sensor logging and slow changing signals. The same module could also include few buffered PWM and/or DAC outputs and multiple protected/buffered Digital I/O.

author: void_error
author_rank: Frequent Contributor
timestamp: October 08, 2017, 08:26:45 am
content: That has been thought of, although I haven't mentioned it anywhere. I could add that to a third power supply channel (the 0-5.5V one for powering digital circuits). An ethernet connectivity module is also planned.Right now I'm standardizing the 595+SPI addressing across the three modules I'm currently working on. I've also been thinking about a way to identify the location of each module on the bus without changing things too much or using an EEPROM which will have to be written to before assembly and I have a possible solution which is going to fit the current bus architecture.Since the addressing and multiplexing of different functions on a module is based on daisy-chained 595 shift registers it appears to be simply adding a 74HC165 with its inputs tied to either the positive or negative supply like the address pins for I2C chips (see PCF8574 or similar). One of the pins will be used to indicate whether it's the last module in the chain. The firmware on main MCU will know how many bytes it needs to shift through the 595s and the location of each module regardless of the the order based on the definitions of each module programmed in. I'll need to modify the communications bus a little bit to accommodate an input from the shift register side or switch back to the initial idea to switch between MCU SPI connected to the shift registers or to the SPI slave devices outside the MCU which will free a few lines on the bus.I must admit I was too slow to reserve posts for future use as the replies started coming in too fast when I started this topic...Another module will be the front panel for the PSU / Electronic load which will also use 595s for the different functions it'll provide like channels in series/parallel or whatever else comes to mind. Or I might put the digital I/O and temp sensor inputs in there...

author: void_error
author_rank: Frequent Contributor
timestamp: October 08, 2017, 08:20:42 pm
content: Quote from: void_error on October 08, 2017, 08:26:45 amEnded up using a 74HC166 with a D type flip flop connected to the data output (pin 13) to make it compatible with one of the SPI modes, using the SH/~LD pin (15) as Chip Select and an extra AND gate to gate the clock of the flip flop (one input goes to SH/~LD, the other one to SCLK, output to flip flop CLK) and a tri-state buffer tied to the Q output of the flip flop, enabled by a low chip select signal. The whole thing end up as a SPI General Purpose Input expander and it's cheaper than say, a MCP23S08 8-bit GPIO expander, by a factor of two or more.

author: prasimix
author_rank: Unknown
timestamp: October 08, 2017, 09:14:54 pm
content: Quote from: void_error on October 08, 2017, 08:20:42 pmThat is not a real saving when MCP23S08 is around $1. On the other side you're decided to use not so cheap ADC and DAC for e.g. Power supply and electronic load. Also when you are thinking about savings, that is fine, take into account that one component even more expensive then few used as its substitute could cost less at then end (if you or anyone else want to organize production, because assembly line "time is money").

author: void_error
author_rank: Frequent Contributor
timestamp: October 09, 2017, 05:15:32 am
content: But on the other hand you can pair the read of the expander configured in this way with something that only uses the MOSI line like a DAC. Since I only need to read inputs a fully featured GPIO expander seemed overkill and it also has some communication overhead for configuring, making it slower. The read can also be paired with a DAC write if the DAC only uses the MOSI line and the same SPI mode.You're right about assembly line time, but I'm not going straight for production-readiness with the first revision.

author: void_error
author_rank: Frequent Contributor
timestamp: October 17, 2017, 05:35:20 pm
content: After spinning around in circles looking for suitable DACs with an LDAC pin in order to update two power supply or DC load channels at the same time it seems I'm back to the initial selection of cheap string DACs.Quote from: void_error on November 10, 2016, 11:54:25 pmNone of them have a LDAC pin which means I'll need to find a way to update them at the same time. Having the MSB the first bit that needs to be shifted in makes it more difficult so I should find a way to delay the LSB by at least one clock cycle and use that to clock it in simultaneously for both DACs. Some glue logic will be required or just ditch them and go for an AD5761 which has everything I need. The latter option is easier to implement so I'll probably be sticking with it.EDIT: Looks like the AD5761 is a clear winner. Just had a look at the waveform generator output stage and I'll use the 12-bit variant there for output offset adjustment since it gets rid of one op amp used for level shifting. Problem solved.

author: void_error
author_rank: Frequent Contributor
timestamp: November 18, 2017, 12:40:51 pm
content: Time for another short progress update...The UI board is going to use 3.3V logic, mostly due to the fact that the display is a 3.3V part and there's no information in the controller's datasheet regarding the output current of the data lines which means using open drain outputs and pull-up resistors to do the level shifting from the previously 5V powered MCU might not work properly so I'm not risking it.The changes to the UI board aren't going to affect the DC load or the Lab Power supply since they use digital isolators.What needs changing so far is the Waveform Generator / Frequency counter board and the good thing here is that the AD9834 DDS chip can use different supplies for the analog and digital supply pins which means I can get rid of a few parts like the level translator chips for the clock generator chips which run on 3.3V. The analog stuff will still run on 5V.Regarding the 595 shift registers, each board is going to use two of them because I couldn't find a way to implement all the SPI addressing and any other functionality using only 8 pins.I want to have everything ready for the PCB design stage by the end of the year but I might not be able to since the front panel board for the Lab Power Supply and DC Load as well as the digital channel for Lab Power Supply haven't been designed yet.

author: void_error
author_rank: Frequent Contributor
timestamp: December 31, 2017, 02:07:12 pm
content: Looks like the frequency counter part is almost complete with only a few tweaks here and there still to be done. Managed to get rid of the MCU and replaced it with about two truckloads of logic chips, mostly counters, flip-flops and multiplexers. It should go up to 20MHz @ 1Hz resolution with LVC series counters (74LVC161) but I've also included a divide by 10 prescaler which should allow it to go up to 100+ MHz with 10Hz resolution.

author: Kleinstein
author_rank: Super Contributor
timestamp: December 31, 2017, 03:26:46 pm
content: Quote from: void_error on December 31, 2017, 02:07:12 pmThis direction is odd. The more normal way today is to get rid of the logic chips and use a µC to implement a reciprocal counter. This way a frequency counter is a rather simple task and still can get really good resolution. So more like 8 digits of resolution after 1 or 2 second in a frequency range of about 10 Hz to around 50 MHz (more with prescaler) with just a single µC (like STM32F3...) and an external clock (e.g. TCXO) and the input stage. So the difficult part today are more like the input stage and maybe the software. So a frequency counter today is a small project, unless you want to go beyond something like 8 or 9 digts. With some special TDC modules / chips very high resolution is possible, that might want a good OCXO or more to get a meaning to 12 digits.

author: void_error
author_rank: Frequent Contributor
timestamp: December 31, 2017, 05:15:44 pm
content: Quote from: Kleinstein on December 31, 2017, 03:26:46 pmYes, I know it's odd. Initially I went for a local MCU as a frequency counter but I figured it wouldn't be too nice to force anyone who wants to build this to use a PIC (16F1619 in this case).But in one of the next revisions I will change to a MCU which is going to be installed on a daughter board so one can use their MCU of choice.With that in mind, the old-school version of the frequency counter it will be on a separate board, with the waveform generator having a MCU-based frequency counter.I'll build both versions, I'm curious how they perform.

author: Kleinstein
author_rank: Super Contributor
timestamp: December 31, 2017, 05:31:01 pm
content: One can also do classical counting with an µC. AFAIK the PICs are quite good at this. Other µs might need a little extra HW to get to higher frequencies. AFAIK some of the PIC18 include hardware that is supposed to be useful for analog time interpolation with relatively little additions This would give a rather high resolution reciprocal counter (e.g. sub ns resolution) with moderate effort.Usually reciprocal perform better than simple classical counters, as the resolution is no longer limited to fixed increments of 1 over gate time. Its only at the upper limit that both ways have about similar performance.Many other function would need an µC anyway - so I see no big advantage in avoiding an µC for a counter, if this is something the µC can do very well.

author: void_error
author_rank: Frequent Contributor
timestamp: January 01, 2018, 08:55:38 pm
content: Quote from: Kleinstein on December 31, 2017, 05:31:01 pmIt seems that I have implemented a reciprocal counter. Didn't know it was called that.I guess I'll be sticking with a MCU in the end. Foundthis neat little document.For anyone not wanting to use a PIC there will be the possibility to put their own MCU on a daughter board.

author: void_error
author_rank: Frequent Contributor
timestamp: February 07, 2018, 08:27:10 pm
content: I've almost finished everything needed for the waveform generator / frequency counter as far as schematics go, with the electronic load and lab power supply not far behind. Depending on how things progress I might have stuff on GitHub this weekend.One thing I've settled for is using 3.3V for the logic and +/-3.3V for the analog stuff where digital isolators aren't used, the only exception being the AD603 used to adjust the output amplitude of the waveform generator's output for sine/triangle which requires +/-5V, delivered via a pair of LM317L/LM337L off the +/-15V supply of the output stage.As far as the electronic load and lab power supply are concerned, they're 80% done unless I find easy ways to add more features which I've been doing a lot lately at the expense of them not being finished yet (like another multiplexer for the option to measure all the internal supply rails).Oh, and it's 80% of the schematics, PCBs not included.Speaking of PCBs, that's another can of worms since it's about a dozen of them... almost:UI boardWaveform Generator & Frequency CounterLab Power SupplyElectronic LoadFront Panel & Aux Digital ChannelUSB Charging ModuleUSB - UART interfaceAux Analog Supply (linear regulators - easy)Aux Digital SupplyOk, it's only 9 of them.Another thing I have planned for sometime in the future is an ethernet module based on some PIC18 and Microchip's TCP/IP libraries but I'm not going too far with it from the start and I'll probably base it on an existing example.One thing I still have to look into is whether I can reuse the Front Panel module designed to be used with the lab power supply for the electronic load as well, without the relays used to switch the two channels between independent/series/parallel and for that I have to decide what the high current range will be and what connectors I'll use and whether they'll be PCB mounted or panel mounted. Looking for parts is very time-consuming, especially when I'm trying to stick with only 2 distributors - TME & Farnell. Digikey and/or Mouser will have everything anyway but shipping cost will be higher for me at least.If anyone has any comments or questions or pretty much anything related you can leave them below. Blame the way the forum works if they end up on the next page (joking).

author: xani
author_rank: Frequent Contributor
timestamp: February 08, 2018, 01:10:05 pm
content: For ethernet side honestly you're probably better off just sticking raspberry pi there, it has serial, SPI and I2C on it, it's cheap, and you can then run any data acquisition directly in the system instead of pushing data to dedicated PC. Or even run a web UI with modules state/controlsFor IDing modules daisy chaining is probably easiest option, but you should also probably have modules send their name and some unique ID if a micro has it) with it. That makes it possible for code to work regardless of which order modules are put in or even (if unique IDs are used) if you reorder stuff for whatever reason. Of course, that requires a micro per boardIf you go with micro per board it would also be worth to add a single LED dedicated toidentifyfunction, that allows for making queries like "which board is ADC number 4" or "which board is one with ID 413e6f"Or go even fancier and put RGB led on, then you can do "connect left channel to green input, and right channel to purple one"

author: void_error
author_rank: Frequent Contributor
timestamp: February 08, 2018, 04:53:06 pm
content: Quote from: xani on February 08, 2018, 01:10:05 pmAdding ethernet is just an idea, only mentioned it because I saw it's possible with what I have so far. I'm just playing with the idea and not taking it too seriously at the moment.Quote from: xani on February 08, 2018, 01:10:05 pmFound a way that requires no micro and with jellybean parts. The ST_CP pulse is already used to latch the data onto the 74HC595's outputs so it's reused by U713 to latch the input data. U715 & U712 just make the whole thing SPI compatible. U712 outputs into the SPI MISO line and the STS line acts as an active high chip select. U715 is there to delay the data by one bit. In other words, the board ID is programmed via 6 solder links. D0 & D1 will have board specific functions, like signalling an overtemperature condition.Why I went that route is because I don't want to force anyone else building one of the aforementioned modules into using the same micro I used. Perhaps one would want to use an arduino, or STM or raspberry pi or whatever else to control the module(s).Quote from: xani on February 08, 2018, 01:10:05 pmGoing one micro per board would have been one way to make everyone happy but only if I provided a way of mounting a daughter board for each module which IMHO I found it would be a pain in the butt so I'm only doing it for the module that has the frequency counter where a micro is the only sane way to go. I should probably make a new lock diagram of how things would work together as the last ones I posted are quite outdated.

author: void_error
author_rank: Frequent Contributor
timestamp: February 11, 2018, 02:47:46 pm
content: Quote from: void_error on February 07, 2018, 08:27:10 pmThis guy spoke too soon.I thought I'd first see if everything fits together and it's not a huge pain in the ass to route where MCUs are employed so I had to move pin functions around. After finally getting to something doable for the UI board (yes, it strikes again) I realized it's way too big so I'm changing the connector placement from something likethisto moving the 30-pin bus connector to one side and maybe the pushbuttons to the bottom below the display depending on how much I can shrink the board vertically. It currently looks like this and one can almost build a factory on top of it:

author: John Heath
author_rank: Frequent Contributor
timestamp: February 11, 2018, 04:20:13 pm
content: I like it. Do you have a picture of what it physically looks like on your bench? Have you thought of a computer interface secondary display and mouse buttons for secondary desk top computer control. This would open new doors for your modular data acquisition system . One of those doors would be the internet where I from 1000s of miles away could press a bottom to make a measurement on your bench. Can not think of a practical reason to do this but then again why does a man climb a mountain , because it is there.

author: void_error
author_rank: Frequent Contributor
timestamp: February 11, 2018, 08:27:56 pm
content: I'll be using one ofthesebecause they're cheap and I'm cheap, unfortunately (not for me) no backplane/rackmount possibility out of the box, too much work for too little gain.Modular... hmm... nope, won't change the title but you can find something being designed to be modularhere.This is just a collection of bits of test equipment sharing a similar communications bus simply because it was easier to have it that way.Internet? Just hook up a raspberry pi or something via UART and you can have it. Going for practical first, after fancy a bit later.

author: void_error
author_rank: Frequent Contributor
timestamp: February 23, 2018, 06:02:51 pm
content: I think I have finally managed to get the PCB sizes right for the 4 stacked boards of the waveform generator. UI ended up 115x70mm, with the waveform generator 115x95mm. It might be the time to upload some schematics to github as drafts since things might change a bit with the PCB layout which is what I'm currently working on.

author: void_error
author_rank: Frequent Contributor
timestamp: February 25, 2018, 11:50:36 am
content: GitHub repo is now up. Check first post.

author: void_error
author_rank: Frequent Contributor
timestamp: February 26, 2018, 10:04:08 pm
content: Waveform Generator + Frequency counter project has also been uploaded to GitHub. Link on first page. Don't be afraid to point out any mistakes you may or may not come across.I'll also have to update the individual posts for each module. They're getting outdated.

author: void_error
author_rank: Frequent Contributor
timestamp: February 27, 2018, 06:14:46 pm
content: The first of the two voltage regulator modules is up on GitHub, the one for the digital part. It also has a... hmm... no idea how to call it... but it's basically a step-down regulator power stage with a PWM input and it's used for fan control. I'll upload the one for the analog part sometime later today if I don't get caught up in other stuff.On another note, most of the 4 PCBs that make up the minimum setup for the Waveform Generator + Frequency Counter are being worked on and their sizes set. I'm still having a few issues with connector placement but those will be sorted out. I haven't included the isolated USB-UART module since it's tiny in comparison but it also has to do with connector placement. In case I haven't mentioned already, it's going to use either a PIC18F13K50 or a MCP2200, they're pin compatible with the latter requiring no firmware.Almost forgot, I updated the first post. Again.EDIT: Forgot to add that regulator modules will also be used by the Electronic Load Module.

author: prasimix
author_rank: Unknown
timestamp: February 27, 2018, 11:44:01 pm
content: I'd like to encourage you to use GitHub Master branch as much as possible, and that important milestones, prereleases or releases simply mark by publishing it where you can include some description or list of accomplished tasks. Making multiple branches especially in early phase is a good source of confusion for one how is following you, want to fork a project and stay synced.

author: void_error
author_rank: Frequent Contributor
timestamp: February 28, 2018, 05:31:17 am
content: Will switch to master branch as soon as I get to past Rev 0. I'm still making small changes to the schematic as I work on PCB layout with one example being multi-part components which will be swapped around quite a lot. Rev 1A will be the first to be merged into master.

author: void_error
author_rank: Frequent Contributor
timestamp: February 28, 2018, 07:10:49 pm
content: Finally had some spare time to add the voltage regulator module for the analog sections to the draft branch of the related repo on GitHub.As always, the link has been included first post.

author: void_error
author_rank: Frequent Contributor
timestamp: March 04, 2018, 08:01:45 pm
content: Wasted the whole weekend on PCB layout. Results in first post / on GitHub. There's room for improvement. I haven't included the footprint libraries although I will since there are some footprints I made myself. Not all parts have 3D models yet.

author: void_error
author_rank: Frequent Contributor
timestamp: March 13, 2018, 07:37:31 pm
content: There might be a problem with the +/-5V regulators on the waveform generator schematic, thought I'd redo some math on the thermal side of things and it looks like those LM317L/LM337L won't be too happy at a little under 50mA with a 15V input and I don't want to 'Rigol it'.I have two options:1. Use physically larger packages for the regulators2. Move the analog supplies of everything using +/-5V apart from the AD603 to other rails.I'm inclined towards number 2 since the DACs can take up to +/-15V and the LMH6642 can easily live off +/- 3.3V. Only the DAC for adjusting the offset will need to be run off +/-15V though.As for option 1, I'm looking at D2PAK packages for LM317 / LM337 but those take up considerably more space compared to SO-8.

author: void_error
author_rank: Frequent Contributor
timestamp: March 14, 2018, 09:54:45 pm
content: Quote from: void_error on March 13, 2018, 07:37:31 pmYet again I realize I didn't have my head screwed in properly and while both of the above would work the voltages need to be +/-5V so there's no need for adjustable regulators. 7805/7905 will do just fine. As far as the case goes, D2PAK is HUGE and SO-8 can't handle half a watt... at least with a temperature of 50C inside the case which isn't likely since there's going to be a fan in there.Luckily the 7805/7905 also come in DPAK cases which are considerably smaller than the chopped up TO-220 which is the D2PAK, they're roughly the same size as an SO-8 and have significantly lower thermal resistance, under the form of78M05and79M05. Junction to ambient thermal resistance doesn't exceed 100C/W so that's only a 50C rise for 0.5W (10V drop @ 50mA) which is well within acceptable limits and real world thermals will be significantly better since it's mounted on a PCB. Problem solved. I choose option 3.

author: void_error
author_rank: Frequent Contributor
timestamp: March 22, 2018, 05:30:38 pm
content: Quote from: void_error on February 23, 2018, 06:02:51 pmNope. That was a bad idea. Plus thecasewhich was my initial choice would have ended up being mostly filled with air so I'm swapping it withthis oneand making the waveform gen PCB 175x70mm.Just so this is more fun, it looks like differential signalling might be required since the traces are getting quite long, not to mention that adding a ribbon cable would make things a lot worse. That means adding some differential transceivers and have the UART over RS-485, use RS-485 transceivers for SPI like metionedhere, same for the GPO and GPI, differential signalling for the clock (haven't looked into that but it should be able to handle 16MHz), should get away with single ended for the 400kHz regulator sync signal as long as it's buffered on every board I think, the 1-wire bus should be fine since it's really slow anyway.The only thing I have no idea what to do with is I2C. Any suggestions?

author: void_error
author_rank: Frequent Contributor
timestamp: April 10, 2018, 05:17:09 pm
content: Small progress update:After messing around with the idea of using RS-422/RS-485 transceivers I ditched it in favor of LVDS/M-LVDS. Since I also want to reduce crosstalk between pairs I'll be upping the pin count of the bus connector to 40 pins to allow for ground between pairs, although I'm not sure if the differential impedance will affect signal integrity and/or reflections across the ribbon cable too much at the rather low speeds the SPI will be running at - 16MHz clock or lower.Also, the glue logic used to switch between SPI and the shift register lines will be moved to each individual board so there's only going to be one differential SPI line with an extra line to select who gets clock and data.Another problem I ran into is having to sample voltage and current simultaneously and while there are simultaneous sampling ADCs out there I couldn't find anything suitable at a reasonable price so I'm opting for a bit of a hack here: clock both AD7683s at the same time, with one outputting it's data directly into the MISO line, while the other outputs into a 24-bit SRAM made out of D-type flip-flops. To get the data from the makeshift SRAM there's going to be a pin used in the same way as the ADC Chip Select. And in case you were wondering, there's a pin-compatible replacement from TI for the currently used ADC which is slightly cheaper -ADS8326.

author: void_error
author_rank: Frequent Contributor
timestamp: April 30, 2018, 09:43:28 pm
content: Minor setback: graphics card RAM died and I have no onboard graphics. Result: Windows commited suicide while attempthing to repair itself.Took this as an opportunity to boot linux mint in text mode off a USB flash drive and use lynx to navigate the interwebz and also post this simply because I can and I hate typing on my smartphone.The good thing is that the card's under warranty for another 3 months so I should be getting a replacement within the next 2 weeks so I can get back to adding LVDS to all the boards...Speaking of which, the GPO and GPI lines will be gone and a trigger line will be added.

author: prasimix
author_rank: Unknown
timestamp: May 18, 2018, 06:33:50 am
content: Quote from: void_error on April 10, 2018, 05:17:09 pmDid you possibly considerADS131A02? It's 24-bit but with very attractiveprice.

author: void_error
author_rank: Frequent Contributor
timestamp: May 19, 2018, 04:42:35 pm
content: Thanksprasimix, I had a look at the datasheet and it looks like a candidate for for the Power Supply Module, the Electronic Load Module and the Mains Power Meter Module, the only tricky part id the fact that it requires a 16.384MHz clock, which I could provide via the clock line on the bus and will also be used for switching regulator sync after division, the problem being that is I use 4x PLL on the main MCU I'd have to use a 8.192MHz crystal due to the 64MHz maximum clock limit and send the x4 multiplied by the PLL out the CLKR pin after it's divided by 2.Since the same clock is used by any other MCUs (PIC18F25K40) they'd have to run at 16.384MHz (4.096MHz instruction clock) unless I divide it by 2 and use the 4x PLL multiplier which is not that big of a problem.On the bright side, my PC is back up and running. Work will resume as soon as I have enough time and energy to put into this which might be totally random.I managed to mess around with adding LVDS and changing the bus connector yet again to one with more pins (40) and changing the PCB layout for the UI. I've also been looking into the possibility of keeping the ribbon cable for LVDS and it seems like a viable option as long as I keep stub lengths short (>30mm at the moment) and the clock speeds low, with the highest frequency being 16MHz. If anyone knows why this wouldn't work please don't hesitate to let me know.

author: void_error
author_rank: Frequent Contributor
timestamp: June 25, 2018, 06:53:46 pm
content: After being stuck for quite some time with having to use two 40-pin connectors on each peripheral board due to the daisy chaining requirement for the 595s which makes PCB layout a complete mess, I've ditched the shift registers and quite a bit of the glue logic in favor of a some of 3-to-8 decoders and a MCP23S08 I/O expander.The lines formerly going to the 595s are now address lines, a sort of bank select for the MCP23S08s. The chip select lines for the SPI stuff (ADCs, DACs, etc) on each board will be the decoded outputs of another 3-to-8 decoder with the 3 inputs connected to the outputs of the MCP23S08 which also offers a level of idiot-proofness (is this a real word?) in the sense that only one chip select can be active at one time in addition to the reduction of the number of lines required on the I/O expander.I won't be putting any of these changes on GitHub just yet as I still have to fiddle with the pins on the micro when I start working on changing the PCB layout.Speaking of which... is anyone interested of having the possibility putting your own favorite micro (on a daughter board) so I can add a bunch of pin headers to facilitate that?EDIT:That would include all of the boards which will have a micro, except for the UI board.

author: void_error
author_rank: Frequent Contributor
timestamp: July 14, 2018, 02:37:56 pm
content: Quote from: void_error on June 25, 2018, 06:53:46 pmNo more need for that. Switching to STM32s which have an integrated ROM bootloader. I've been looking into them for quite some time but until January this year all the decent development tools weren't free. Now there'sthiswhich is basically eclipse with GCC & GDB and works out of the box. No more slapping development tools together.The MCU of choice is going to be STM32F101VC for the UI. 100 pins LQFP, has a RTC with battery backup so no need for a separate RTCC chip.ROM bootloader is accessible via USART1. At the moment I'm not too sure about how I'll update the firmware on the MCUs of the other modules so I might have to abandon the half-duplex RS-485 style of communication via UART and think of something else just so I (or you) can flash everything after it's been all put together.

author: void_error
author_rank: Frequent Contributor
timestamp: November 25, 2018, 02:32:20 pm
content: Updated all of this project's github repos, have a look if you want. PCB layouts aren't finished and schematic need some cleaning up. I'll do it when I have the time and energy.

author: void_error
author_rank: Frequent Contributor
timestamp: December 27, 2019, 04:00:21 pm
content: Waveform gen is almost finished, everything's now up to date on Github as I finally found some time to work on it. The PCBs need a bit more work, via stitching in some places and spme traces need tweaking. Everything stacks up nicely.