Author Topic: Small Lab (SLab) release  (Read 9505 times)

0 Members and 1 Guest are viewing this topic.

Offline Vic20Topic starter

  • Contributor
  • Posts: 46
  • Country: es
    • R6500
Small Lab (SLab) release
« on: February 16, 2018, 08:25:23 pm »
Hi, I have been viewing the tube channel for a long time and connecting to the blog as guest from time to time.
Now I have developed a project that perhaps could be interesting for someone.

It is basically a, Python based, ultra low cost instrumentation system for learning or playing with electronics:

http://r6500.blogspot.com.es/2018/02/slab-first-release.html

The hardware details are acompained, for now, with 13 tutorials about common electronic devices.

The software is open source and the documents are free to share.
 
The following users thanked this post: paf, daveshah

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6694
  • Country: nl
Re: Small Lab (SLab) release
« Reply #1 on: February 17, 2018, 01:42:59 am »
Interested to see where you take this.

I'd put some 100K resistors on the opamp inputs and the feedback paths of the outputs, make it a bit more robust. Also lack of galvanic isolation of any measurement system is always a bit iffy.
« Last Edit: February 17, 2018, 01:45:05 am by Marco »
 
The following users thanked this post: Mr. Scram

Offline Vic20Topic starter

  • Contributor
  • Posts: 46
  • Country: es
    • R6500
Re: Small Lab (SLab) release
« Reply #2 on: February 17, 2018, 08:19:23 am »
Interested to see where you take this.

As far as I can.
From the hardware point of view, I'm now planning on a 0V..12V or -6V...+6V shield with good current capabilities at the supply limits.
But it will be complementary because it increases system complexity.
From the firmware point of view, I'm planning in increase sample rates by using a lower level programming in the MCU.
From the Python point of view, more functions will be added.
From the documentation point of view, I plan on expanding, for now, the BJT and Opamp tutorials.

Quote
I'd put some 100K resistors on the opamp inputs and the feedback paths of the outputs, make it a bit more robust. Also lack of galvanic isolation of any measurement system is always a bit iffy.

Take note on the suggestion. This will be most interesting to protect the ADC opamp inputs. The idea was to have a low part count so that anyone can play with this without even a shield on the 303RE board. Till this point in time I have not had any problem with the system, however. The fact that the system is powered only by its own outputs help on that although I know that there could be hazards using L or C components.

Don't understand why galvaninc isolation could be so important. The system is grounded by the USB connector. In most labs, measurements are grounded, at least, on the BNC scope connectors.
AFAIK, low cost USB instrumentation devices, like the Analog Discovery, for instance, are not galvanic isolated.

 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Small Lab (SLab) release
« Reply #3 on: February 17, 2018, 04:01:11 pm »
That is a very neat project!  I like the arbitrary waveform of the house and car because I can see using it with an analog computer model of an automotive suspension system.  Then I can use the analog inputs to capture the analog computer outputs and somehow merge them together.  The arbitrary waveform generator will also create a model of the roadway, potholes and all.

The power of having Python computing capability to draw the analytic plot and the hardware to create a physical plot of the RC circuit is awesome.  I don't think I have seen anything like that.

 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Small Lab (SLab) release
« Reply #4 on: February 17, 2018, 09:25:48 pm »
Your decision to use the mbed platform is excellent.  In one stroke you have eliminated the inevitable "How do I install the toolchain on my Frambus 300 with Windows 3.1".  For portability, mbed wins hands down over resident toolchains.

I ordered the basic parts (a couple of op amps) and I'll soon be having a PCB built.  I want to wait until the Nucleo board is in hand before I commit to a layout.  I will very likely add a row of GND pins adjacent to the signal pins and I might want to move the Halt button to the top board.  It seems like it might be reachable if I only use the Arduino headers but it seems partially concealed if I use the Morpho headers which are easier to lay out.  I need to think about this...

The transistor curve tracer alone is sufficient reason to build the project.  I have a little 'show and tell' coming up as my grandson pursues EE.  Excellent!

 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Small Lab (SLab) release
« Reply #5 on: February 17, 2018, 09:43:49 pm »
Your decision to use the mbed platform is excellent.  In one stroke you have eliminated the inevitable "How do I install the toolchain on my Frambus 300 with Windows 3.1".

... And introduced the problem of "now the server has gone the way of Microsoft's PlaysForSure(TM) servers, how can I access an dmodify my design.

Some of us remember the 1970s, and why the IBM PC was greeted with relief. TANSTAAFL.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: JPortici, Mr. Scram

Offline Vic20Topic starter

  • Contributor
  • Posts: 46
  • Country: es
    • R6500
Re: Small Lab (SLab) release
« Reply #6 on: February 17, 2018, 09:48:22 pm »
The power of having Python computing capability to draw the analytic plot and the hardware to create a physical plot of the RC circuit is awesome.  I don't think I have seen anything like that.

Thanks

Being able to use numpy vectors as waveforms and being able to capture the response also as vectors give a path to use the SciPy computation capabilities together with the measurement data. The possibilities are mind blowing. In no time I'm able to compute a rough estimation of THD from measurements, for instance.
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: Small Lab (SLab) release
« Reply #7 on: February 17, 2018, 09:53:04 pm »
Don't understand why galvaninc isolation could be so important. The system is grounded by the USB connector. In most labs, measurements are grounded, at least, on the BNC scope connectors.
AFAIK, low cost USB instrumentation devices, like the Analog Discovery, for instance, are not galvanic isolated.

Galvanic isolation is important because sooner or later someone connects a scope or something else (e.g. a non-floating power supply) that is mains earth referenced to the circuit incorrectly and promptly blows up both the board and the USB ports in their computer. This is a very common problem - just google "Arduino blown USB port".

It also helps to somewhat protect against conducted noise getting into your circuit (PC is *horrible* for that) and any oopses if someone plays with higher voltages (12V or such) on the board and manages to short the voltage to the USB bus.

Otherwise it is a pretty neat project, it could be very much a poor man's Analog Discovery for learning analog electronics.
« Last Edit: February 17, 2018, 09:59:42 pm by janoc »
 

Offline Vic20Topic starter

  • Contributor
  • Posts: 46
  • Country: es
    • R6500
Re: Small Lab (SLab) release
« Reply #8 on: February 17, 2018, 10:04:56 pm »
Your decision to use the mbed platform is excellent.  In one stroke you have eliminated the inevitable "How do I install the toolchain on my Frambus 300 with Windows 3.1".  For portability, mbed wins hands down over resident toolchains.

Well, MBED is great for working with MBED enabled boards, like the nucleo ones, without needing to install a toolchain and with the availability of a ton of libraries.
I think it wins hands down to most Arduinos.
But it's not perfect. Basic things like changing processor frequency is not easy on MBED.
Moreover, there are too much different MBED enabled boards and not all functionalities work on all of them.
A future firmware won't use MBED because I need to use all four MCU ADCs at the same time and use DMA to speed-up the sampling.

Quote
I ordered the basic parts (a couple of op amps) and I'll soon be having a PCB built.  I want to wait until the Nucleo board is in hand before I commit to a layout.  I will very likely add a row of GND pins adjacent to the signal pins and I might want to move the Halt button to the top board.  It seems like it might be reachable if I only use the Arduino headers but it seems partially concealed if I use the Morpho headers which are easier to lay out.  I need to think about this...

A used a short board on the Arduino connectors in order to not block the buttons (Reset and Halt).
Having the buttons on the shield is better but it requires a little more routing. If you leave space for Halt, put also a Reset button.
If you are building your own shield I recommend, as Marco proposed, that you leave space for 100k resistors in series with the positive opamp inputs of the ADC drivers. That will protect the Opamps in the case that you try to measure voltages outside of the board supply range. (Like connecting to node at 20V  from ground)
In the future I will change the pin assignement to locate each ADC input in a different hardware ADC. That means using the Morpho connectors.

Quote
The transistor curve tracer alone is sufficient reason to build the project.  I have a little 'show and tell' coming up as my grandson pursues EE.  Excellent!

Glad you find it interesting.
The DC functionalities, like the curve tracer, of the SLab project, are so easy to implement that I don't understand why I haven't seen that before.
I did something similar with the ADALM Board (https://wiki.analog.com/university/tools/m1k) but I needed to reverse engineer the Python interface to the board. In the end I tought that I would have more control developing muy own firmware for a Nucleo board.


 

Offline Vic20Topic starter

  • Contributor
  • Posts: 46
  • Country: es
    • R6500
Re: Small Lab (SLab) release
« Reply #9 on: February 17, 2018, 10:07:16 pm »
... And introduced the problem of "now the server has gone the way of Microsoft's PlaysForSure(TM) servers, how can I access an dmodify my design.

As I'm somewhat paranoid, I keep local copies of the MBED code.
I'm not worried about MBED closing because I know that I can easily replicate current firmware functionality using other toolchains.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Small Lab (SLab) release
« Reply #10 on: February 17, 2018, 10:15:45 pm »
Your decision to use the mbed platform is excellent.  In one stroke you have eliminated the inevitable "How do I install the toolchain on my Frambus 300 with Windows 3.1".

... And introduced the problem of "now the server has gone the way of Microsoft's PlaysForSure(TM) servers, how can I access an dmodify my design.

Some of us remember the 1970s, and why the IBM PC was greeted with relief. TANSTAAFL.

At which time you need to find the toolchain of the day and install it.  When I was porting the code back and forth (for testing) I was using Rowley Crossworks  but Eclipse/Gcc would have worked just as well.

The fact that ARM owns the mbed platform helps as does vendor participation in the mbed interface by companies like ST.  It costs ARM just about nothing to maintain the platform (although I see a lot more administrative involvement since ARM bought the platform) and it is insignificant as long as ARM licensing is a thing.  I kind of suspect ARM will be around for a while.

And I do keep a copy of my source files locally.  Just in case...

I only go back to 1970 with this code stuff but it has been a fun ride!
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Small Lab (SLab) release
« Reply #11 on: February 17, 2018, 10:21:21 pm »
As I'm somewhat paranoid, I keep local copies of the MBED code.
I'm not worried about MBED closing because I know that I can easily replicate current firmware functionality using other toolchains.

For those new to this idea, make sure you download the platform files as well.  My plotter project uses the mbed TCP/IP stack so when I bring down my code, I rip that at the same time.  You want to be able to build you project locally on some toolchain.  Installing said toolchain is a subject for a different forum.

Then there is the effect described in the early FORTRAN world as:  "I wrote the best version of my program after I dropped the box of cards for the previous version!"  Starting over removes the obstacles caused by previous decisions.  Yes, we really did carry around boxes of punched cards.  Early sneaker net, I guess...
 

Offline Vic20Topic starter

  • Contributor
  • Posts: 46
  • Country: es
    • R6500
Re: Small Lab (SLab) release
« Reply #12 on: February 17, 2018, 10:32:52 pm »
Galvanic isolation is important because sooner or later someone connects a scope or something else (e.g. a non-floating power supply) that is mains earth referenced to the circuit incorrectly and promptly blows up both the board and the USB ports in their computer. This is a very common problem - just google "Arduino blown USB port".

Yeah, I understand your concern.
The project is not designed as an Scope alternative. You are only supposed to power your circuits from the board itself. Connecting the board to circuits powered from elsewhere can produce all kinds of problems and could damage the PC trough its USB port.
As the communication is serial from the main MCU and converted to USB on the STLink MCU it could be quite easy to communicate the board trough an optocoupled isolation barrier.
That would need an independent power supply and in no time the needed budget starts to ramp up.
As I commented, I think that the problem is common to most low cost USB instruments.
At a lower cost that a full isolated system, a more secure version of the shield will benefit from some protection components on the external terminals.

Quote
It also helps to somewhat protect against conducted noise getting into your circuit (PC is *horrible* for that) and any oopses if someone plays with higher voltages (12V or such) on the board and manages to short the voltage to the USB bus.

I'm quite puzzled of the low noise levels I get on the AC measurements.
On DC it is much worse but, DC measurements can easily benefit from averaging.
The Marco suggestion of adding 100k resistors in series with the opamp buffers ADC inputs can easily protect them against voltages in the order of 20V.
I think that the supply hazards are somewhat protected by the nucleo board internal circuits as I think that  there is a diode in series with the power line. You can always burn the nucleo board, but it is much better than ruining a PC.
All external lines on SLab, except the supplies, connect with the main MCU and the main MCU connects with the ST-Link MCU through a serial link unrelated to the external pins. It is much easier to blow the Nucleo board or the main MCU than blowing the PC, but I understand that going so low in cost can yield some potential hazards. But they are not much different than using the nucleo board in any other project.

Quote
Otherwise it is a pretty neat project, it could be very much a poor man's Analog Discovery for learning analog electronics.

Thanks
That's the Idea. I have an Analog Discovery (Version 1) and it is a quite neat piece of equipment. Version 2 is much better.
I wish it was something like the SLab Python layer for the Analog discovery. Although the Discovery software is good, I miss some easier automation capabilities.
But close to 300$ is too much money if you want a low budget Small Lab for on-hands electronic learning.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Small Lab (SLab) release
« Reply #13 on: February 17, 2018, 10:49:27 pm »
Your decision to use the mbed platform is excellent.  In one stroke you have eliminated the inevitable "How do I install the toolchain on my Frambus 300 with Windows 3.1".

... And introduced the problem of "now the server has gone the way of Microsoft's PlaysForSure(TM) servers, how can I access an dmodify my design.

Some of us remember the 1970s, and why the IBM PC was greeted with relief. TANSTAAFL.

At which time you need to find the toolchain of the day and install it.  When I was porting the code back and forth (for testing) I was using Rowley Crossworks  but Eclipse/Gcc would have worked just as well.

The fact that ARM owns the mbed platform helps as does vendor participation in the mbed interface by companies like ST.  It costs ARM just about nothing to maintain the platform (although I see a lot more administrative involvement since ARM bought the platform) and it is insignificant as long as ARM licensing is a thing.  I kind of suspect ARM will be around for a while.

You are out of date. ARM Holdings has already gone; it was borged by SoftBank. https://www.ft.com/content/235b1af4-4c7f-11e6-8172-e39ecd3b86fc

So you are actually relying on a Japanese company.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: Small Lab (SLab) release
« Reply #14 on: February 17, 2018, 11:49:55 pm »
Yeah, I understand your concern.
The project is not designed as an Scope alternative. You are only supposed to power your circuits from the board itself. Connecting the board to circuits powered from elsewhere can produce all kinds of problems and could damage the PC trough its USB port.
As the communication is serial from the main MCU and converted to USB on the STLink MCU it could be quite easy to communicate the board trough an optocoupled isolation barrier.
That would need an independent power supply and in no time the needed budget starts to ramp up.


The issue is not that it should replace a scope but that this sort of tool could be useful outside of the scenarios you envision. E.g. to measure something off-board, to check the signals generated by the board using an oscilloscope, etc. Plenty of possibilities for error - just hook up the scope ground clip wrong!

You have also said you are planning 12V and 6V supplies, so at least boost converters will be on the board at some point. Another chance to make a costly oops - never underestimate the damage a dangling jumper wire can do when it has 12V on it and the other end touches something it shouldn't. With an isolator it would blow up the Nucleo at worst. Without it you have just screwed up your motherboard - a much more expensive problem.

Re - independent supply - a 5V phone chargers are widely available and almost anyone has one. The cheap USB isolators from AD cost few bucks. If this is something aimed at beginners, then I would certainly include them - yes, it gets a bit more expensive but it is certainly less expensive than replacing/fixing a PC motherboard.

As I commented, I think that the problem is common to most low cost USB instruments.

I think Analog Discovery isn't isolated because it uses USB 2.0 and there are no cheap isolators for something that fast. And that other instruments are poorly designed doesn't mean yours should be too.

At a lower cost that a full isolated system, a more secure version of the shield will benefit from some protection components on the external terminals.

I would say that is orthogonal and you really should include both. If nothing else, at least make sure that people can actually use an isolator (e.g. something like this:
https://www.aliexpress.com/item/New-USB-Isolator-1500v-Isolator-ADUM4160-USB-To-USB-ADUM4160-ADUM3160-Module/32719549159.html) by providing for external power possibility in the design.
« Last Edit: February 17, 2018, 11:55:03 pm by janoc »
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Small Lab (SLab) release
« Reply #15 on: February 18, 2018, 01:58:57 am »
An isolator like this from Adafruit is pretty expensive when compared to the Chinese offerings (which I have) but I bought one anyway.  The downside to these things is that there is very little output current available on the downstream side - like 100 mA.

https://www.adafruit.com/product/2107

The board itself, with the blinking LED on the ST-Link gadget will draw about 70 mA and that only leaves 30 mA for the DUT.  I suppose we should deduct a few mA for the analog gadgets as well.

A good plan is the use the E5V input pin and a 5V wall wart or the Vin pin and a 9V wall wart.  These pins are available on both the Arduino and Morpho headers.  I have a bunch of 5V 2A wall warts so that's the way I plan to handle it.  I may put a barrel jack on the PCB when I design it.

The plan right now is to put the analog board on the underside of the uC board.  That leaves the various pins accessible and I could just solder on a couple of pin connectors to the wires coming out of the wall wart.  A little heat shrink and I'm done.  No need for a barrel jack.

I think I'll bring both 5V and 3.3V out for the DUT.  If I need a bunch of 3.3V, I can make it from the 5V line with an external LDO regulator.

I'll be adding a bit of bulk capacitance to the PCB along with decoupling at the op amps.

 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Small Lab (SLab) release
« Reply #16 on: February 18, 2018, 04:21:47 am »
On the idea of putting the analog PCB under the uC board:  This will leave ALL of the topside pins available in both formats.  There is no reason to bring the digital pins out to the analog board because they can be reached from the top side.
« Last Edit: February 18, 2018, 04:25:27 am by rstofer »
 

Offline Vic20Topic starter

  • Contributor
  • Posts: 46
  • Country: es
    • R6500
Re: Small Lab (SLab) release
« Reply #17 on: February 18, 2018, 09:04:03 am »
On the idea of putting the analog PCB under the uC board:  This will leave ALL of the topside pins available in both formats.  There is no reason to bring the digital pins out to the analog board because they can be reached from the top side.

The problem is labeling.
If I use, say, D2 to D10 as digital pins D1 to D8, it is more complex to use without error.
Also, I like male pins on the board. In the nucleo board Morpho pins are male, buy they are not labeled at all.
Finding the proper pin associated to D1..D8 is a nightmare.
In general, I thik it is better to have available only the pins that SLab knows how to use.

As the first shield board was so small, I think it suits better to have it on the top.
If a make another more capable interface board, the fact that it is over or below the MCU board will be decided from the size of both boards. The bigger one will be on the bottom.


 

Offline Vic20Topic starter

  • Contributor
  • Posts: 46
  • Country: es
    • R6500
Re: Small Lab (SLab) release
« Reply #18 on: February 18, 2018, 09:16:37 am »
You have also said you are planning 12V and 6V supplies, so at least boost converters will be on the board at some point. Another chance to make a costly oops - never underestimate the damage a dangling jumper wire can do when it has 12V on it and the other end touches something it shouldn't. With an isolator it would blow up the Nucleo at worst. Without it you have just screwed up your motherboard - a much more expensive problem.

The plan is to have an external, about 20V isolated input, and generate the positive and negative rails from it.
In this way it will be much easier to isolate the PC.
Boosting from the 5V USB is not an option because I want to have a little more current capability.

Quote
Re - independent supply - a 5V phone chargers are widely available and almost anyone has one. The cheap USB isolators from AD cost few bucks. If this is something aimed at beginners, then I would certainly include them - yes, it gets a bit more expensive but it is certainly less expensive than replacing/fixing a PC motherboard.

Something like the ADUM3160?
Nice chip.

Quote
I would say that is orthogonal and you really should include both. If nothing else, at least make sure that people can actually use an isolator (e.g. something like this:
https://www.aliexpress.com/item/New-USB-Isolator-1500v-Isolator-ADUM4160-USB-To-USB-ADUM4160-ADUM3160-Module/32719549159.html) by providing for external power possibility in the design.

The nucleo board can be powered independent from the USB port. It is in the manuals, I can include the HowTo in the documentation.

Another option will be to communicate using an isolated FTDI RS-232 cable.

Thanks for the time dedicated to review the security of my design.
 

Offline Vic20Topic starter

  • Contributor
  • Posts: 46
  • Country: es
    • R6500
Re: Small Lab (SLab) release
« Reply #19 on: February 18, 2018, 09:21:28 am »
The board itself, with the blinking LED on the ST-Link gadget will draw about 70 mA and that only leaves 30 mA for the DUT.  I suppose we should deduct a few mA for the analog gadgets as well.

Perhaps is enough on several scenarios. The microchip opamps I use are selected for their low cost and full rail capabilities. But the current output capabilities are quite small.

Quote
A good plan is the use the E5V input pin and a 5V wall wart or the Vin pin and a 9V wall wart.  These pins are available on both the Arduino and Morpho headers.  I have a bunch of 5V 2A wall warts so that's the way I plan to handle it.  I may put a barrel jack on the PCB when I design it.

Yeah, this is a good plan.
I'll sure put it on the documentation.

Quote
I'll be adding a bit of bulk capacitance to the PCB along with decoupling at the op amps.

Good idea, although current and speed on the opamps is quite low.
But sure a decoupling never hurts.
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3781
  • Country: de
Re: Small Lab (SLab) release
« Reply #20 on: February 18, 2018, 01:56:12 pm »
The nucleo board can be powered independent from the USB port. It is in the manuals, I can include the HowTo in the documentation.

Another option will be to communicate using an isolated FTDI RS-232 cable.

Thanks for the time dedicated to review the security of my design.

Yes, it can. However, what I had in mind is that if you are designing a board around it, adding a barrel jack and a voltage regulator would cost next to nothing and make it easier for the end user.
 

Offline Vic20Topic starter

  • Contributor
  • Posts: 46
  • Country: es
    • R6500
Re: Small Lab (SLab) release
« Reply #21 on: February 18, 2018, 02:22:40 pm »
The nucleo board can be powered independent from the USB port. It is in the manuals, I can include the HowTo in the documentation.

Another option will be to communicate using an isolated FTDI RS-232 cable.

Thanks for the time dedicated to review the security of my design.

Yes, it can. However, what I had in mind is that if you are designing a board around it, adding a barrel jack and a voltage regulator would cost next to nothing and make it easier for the end user.

You can use the internal nucleo voltage regulator. It can be powered from 7V to 12V. No need, really, for an external regulator.
I will probably add this option on the next shield version.
I'm not so sure about barrel connectors. As everybody today has 5V bricks with micro USB connectors, an USB connector will be best. Problem is that it is not so easy to solder.
Other problem with barrel is that there are so many kinds of barrels. That's why sometimes I end up using a 3 pin connector with (-)(+)(-) configuration.

The nucleo boards feature two regulators. One (U3) for going from 7-12V to 5V and another (U4) to go from 5V to 3V3
I can put an USB connector on the 5V rail and a barrel on the 7-12V one. Then you can chose which one you solder and use on the board.

There is a third regulator (U1) that powers the ST-Link MCU that connects to the PC using USB. But this power should never reach the circuit under test.

 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: Small Lab (SLab) release
« Reply #22 on: February 18, 2018, 02:49:08 pm »
If nothing else, at least make sure that people can actually use an isolator (e.g. something like this:
https://www.aliexpress.com/item/New-USB-Isolator-1500v-Isolator-ADUM4160-USB-To-USB-ADUM4160-ADUM3160-Module/32719549159.html) by providing for external power possibility in the design.

I have some of the Aliexpress USB isolators and I have just taken off the DC power isolator module. The thing is the ADUM4160 chip has really great isolation - 5KV, 10pF, 35kV/us. The cheap power isolation module is pretty bad. From memory, the DC power isolator is only rated at 1kV or 1.5kV and it adds a lot of noise. The board is greatly improved with just the ADUM4160 chip and no power isolator.

Instead, I often use a USB hub on the isolated side powered by a USB battery pack. It is surprising what works with Full Speed USB (12MHz). I have an old Hantek DSO2150 USB oscilloscope and it is very usable with the isolator so as long as I am careful. Gives me a cheap floating oscilloscope isolated to 5kV.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Small Lab (SLab) release
« Reply #23 on: February 18, 2018, 04:54:04 pm »
USB power is diode connected to the 3.3V ST-Link regulator with no way to isolate it short of removing the diode.  The U5V vs E5V jumper only handles power to the uC regulator.

Even if E5V is fed from an outside source, parts of the board are still powered over the USB input.  When E5V is jumper selected, ST-Link loses the ability to control power to the uC.  I don't know what this capability is used for but it goes away.

I had thought that having just 30 mA for the DUT was a little skimpy if I wanted to do transistor curves above that level.  I'm not thinking about 2N3055s but even 2N3904/5 are good for more than 30 mA of collector current.

I am going to break out E5V on my board so I can feed it from a 5V wall wart but I am planning to use it with USB power until I can't.  I always plug my projects into a powered USB hub, never directly into my PCs.  On my Surface Book, the powered hub is connected to the powered docking station which, sooner or later, gets connected to my PC.  I would have to do something incredibly stupid to break through an isolator and 2 powered hubs to get to my PC.  Even without the isolator, it would be tough to damage the PC.  I simply don't work at higher voltage levels.

In terms of the PCB, mine is 2.5"x3.8" no matter what.  That is the MiniBoard size at ExpressPCB and it is fixed - unless I want to pay a LOT of money for custom sizes.  Even the MiniBoard is several times the price of a Chinese board but I don't have to struggle with KiCad <or whatever> to get the artwork.

As such, the board has to be oriented orthogonal to the main board which will leave the IO pins over on the right edge when the board is viewed with the USB connector at the top.  I will probably use two-row female headers with one row grounded.  You can never have to many ground points!

I'm thinking in terms of a 40 pin header with unused positions between features.  Two pins for DAC, unused pin, 4 pins for ADC, unused pin, 8 pins for digital, unused pin , 3.3V, 3.3V, 5.0V - just right!  As 5V would only be used in very special circumstances, I think I'll put a jumper in the middle of that trace.

I guess I better get busy with the PCB layout...
 

Offline Vic20Topic starter

  • Contributor
  • Posts: 46
  • Country: es
    • R6500
Re: Small Lab (SLab) release
« Reply #24 on: February 18, 2018, 06:12:56 pm »
USB power is diode connected to the 3.3V ST-Link regulator with no way to isolate it short of removing the diode.  The U5V vs E5V jumper only handles power to the uC regulator.

Yes, I noticed that.
You cannot prevent a path from the E5V line to the USB line although the diode gives some protection.
The best way to provide isolation is snapping the USB part of the Nucleo board.
Then power the MCU part of the board from E5V or VIN

There are several lines that go from the USB part to the MCU part of the Nucleo board, but during normal SLab operation only three are needed: MCO, RX and TX. You can use three optocouplers for them. MCO is needed unless you populate the oscillator components on the MCU side of the board. The requirement for the optos will be the 8 MHz MCO signal as the RX and TX signals are lower frequency.
Connecting RX and TX after snapping the board requires installing two solder bridges to have access to those signals on D0 and D1 or the Morpho pins.

During MCU programming you will need to provide a path for the SWIM signals: TCK, TMS, NRST and the Vdd sense. I think SWO is not really needed.

Quote
Even if E5V is fed from an outside source, parts of the board are still powered over the USB input.  When E5V is jumper selected, ST-Link loses the ability to control power to the uC.  I don't know what this capability is used for but it goes away.

The E5V jumper position just makes the external source on VIN or E5V power the main MCU. You will still be powering the ST-Link MCU depending on the voltages on the E5V and U5V nodes.

If you remove diode D2 and put jumper JP5 on E5V, then you won't never use USB power.
There will be a path from E5V to 3V3 trough a regulator and from 3V3 to the USB connector trough T1.
But the most important thing is that powering the ST-Link MCU from E5V has the potential hazard that something that blows E5V can blow the ST-Link MCU that is connected to the PC on the USB lines.

Quote
I had thought that having just 30 mA for the DUT was a little skimpy if I wanted to do transistor curves above that level.  I'm not thinking about 2N3055s but even 2N3904/5 are good for more than 30 mA of collector current.

I am going to break out E5V on my board so I can feed it from a 5V wall wart but I am planning to use it with USB power until I can't.  I always plug my projects into a powered USB hub, never directly into my PCs.  On my Surface Book, the powered hub is connected to the powered docking station which, sooner or later, gets connected to my PC.  I would have to do something incredibly stupid to break through an isolator and 2 powered hubs to get to my PC.  Even without the isolator, it would be tough to damage the PC.  I simply don't work at higher voltage levels.

Seems like a good plan.
Adding 100k resistors to the opamps positive inputs, both ADC and DACS, will provide some protection for the ADC and DAC lines. Using an external supply independent from USB will somewhat protect the USB power bus.
I know that it is good to be paranoid when dealing with protection, but those kinds of potential problems are always present when you deal with MCU demonstration boards.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf