Electronics > Projects, Designs, and Technical Stuff

DIY Modular Test Equipment Project

<< < (22/29) > >>

prasimix:

--- Quote from: void_error on June 02, 2016, 02:22:51 pm ---[reserved for future use]

--- End quote ---

Maybe 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.

void_error:
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...

void_error:

--- Quote from: void_error on October 08, 2017, 08:26:45 am ---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.

--- End quote ---

Ended 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.

prasimix:

--- Quote from: void_error on October 08, 2017, 08:20:42 pm ---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.

--- End quote ---

That 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").

void_error:
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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod