Lab PSU 0-30V / 10A – Part 1

I desperately need more lab PSU’s and I have a bunch of LM723 and TIP3055 transistors that are excellent for creating an old-fashioned Linear PSU module. Thinking a bit ahead I want to create the analogue regulator as a small, separate module with knobs on the front, heat-sink & transistors on the back and connectors on the side.

The 3D model above is an early draft on 70 x 75mm. I am using hole througt Components on this one to enable hobbyists to grab a PCB and solder them up themselves to save cost. Adding a Voltage/Ampere meter is easy because I just use a module like this one (or similar):

They cost less than 5.- USD and they work well. I add no other led’s or display, but I add two power switches – one for input and one separate for output.

I am also using 2 x TIP3055 that technically enable 30A together, but PCB lanes and current limit is scaled for max 10A. The following block diagram show the complete PSU.

The mains are basically a 36V/10A DC-DC regulator. These comes at a decent cost with CE/FCC approval that is needed for 48V and higher. What is remaining is to find a project box and we have a nice Lab PSU.

to be continued…

Water Detector

This drawing illustrate a water detector. A water detector is basically a standard ADC reading between two resistors where the 2nd resistor is a PCB as illustrated above. As the water raises the PCB will start leading current and the ADC reading will move from 3.3V to GND. This is the same principle as used for temperature- and light detection resistors- except that the resister is a PCB in this case. We we can apply the sensor with a cable some meters from the actual sensor Logic as we don’t want electronics flooded.

A water detector is something you don’t believe you will need, but if you ever have a water leak you would like to know about it fast since water usually cause less damage if it removed instantly.

PLC Sensors and Actuators

One major issue is how to identify units in a network. I used STM32F030F4 on these and I absolutely love this little MCU costing 50 cent in TSSOP20 package, but it lack the serial number that is burned into other STM32 MCU’s. This serial number is crucial as it present a factory set ID allowing me to just plug in sensors expecting them to identify themselves. STM32F042F6 solves this, but cost ca 2.- USD from the sources I use, so I am very tempted to use STM32F103C8 or CB and create a larger PCB so it becomes single sided. The later actually lower cost in production – but, lets see where we land as I update the modules.

PLC Cottage Surveillance

My grandparents passed away some years ago leaving a beautifully mountain farm behind. As no-one lives up there we have to leave the farm unattended for months at the time. This is a challenge in winter time as we fear the water pipes with freeze. The farm actually got internet installed so it is possible to use internet to create a remote controlled automation system.

Using Internet for anything you need to address security. Using Windows these days is not an option, so I am happy for Raspberry PI as base units. I am no web service expert, but I believe I can communicate directly between my home and the mountain farm by using a Address Lookup Service that we need to create. Basically the HMI and PLC both connect to internet and get details of whom to communicate with through a public service. Once the address is known they create a secure tunnel for communication. I will deal with security later, for now lets just assume this works and that we can use mobile devices as HMI.

 

The system I want to create will consist of a range of modules:

  • Redundant PLC Base with mains, battery, wired and mobile internet connection as well as connection to sensors and actuators.
  • Sensors for temperature, humidity, water leaks, light, movement etc.
  • Camera, speakers and microphones. Actuators swithing on/off heat, opening/locking doors etc.

I use the mountain farm as design base because it present a few challenges. And I obviously want to control this using Plain.

On-Line Documentation

I just uploaded a design doc for the Universal Motor Controller on the downloads page. I used LibreOffice 5.3 since it could export to PDF, but believe me this is the last time I use that. I had so many problems importing drawings that I ended up importing everything to Word and then copy & paste as bitmap from Word to LibreOffice. LibreOffice doc’s and illustrations is not a good combination. I like LibreOffice, but I like Things that work more!

Universal Motor Controller – rev 1.0

This is the front and back 3D model of the Rev 1.0 of my Universal Motor Controller. I will be leaving the non-isolated RS485 for now. I want to do some changes around the MCU layout later anyway as I actually have a lot of spare pins here, but lack space to support a com adapter. This board is 80 x 40mm and only 2-layer PCB with a lot of functionality.

Design doc is located on the Download page!

Universal Motor Controller – PSU

The HEXFET on my Universal Motor Controller is 30V, so I decided to change my existing DC-DC to 12V out and add a classing LM1117 for the 3.3V. The LMR14206 based DC-DC is basically so small that it is not much larger than LM1117 on PCB space. It is restricted to ca 800mA, but it will only drive the gate drivers, MCU and com etc so it should be sufficient.

I did find a few DC-DC converters with a different range on Voltage/Ampere, but they also use more PCB space. Jumper J5 and J11 allow 12V to be connected directly if your using 11.1V battery etc. The issue is that the Gate drivers need 10+ V to operate and as the DC-DC will drop 1-2V we might get a challenge using 11.1V LIPO batteries so I added the jumpers in case they are needed.

I would have loved to operate from 5V and up, but to do that I would need a very powerfully step-up DC-DC converter as we would feed the motors as well. It is doable, but it add to the size. We will be looking at optimizations later anyway.

This 2nd diagram is also part of the PSU and show the adapter connector as well as the P4SMA suppression diode from Vishay. This will break down around 27ich V and suppress any unwanted pulses. These diodes are life savers, but they take some time to react which is why you must add an adapter board with either a capacitor or battery. What will happen is that capacitors will take the edge of the pulse giving the suppression diode time to suppress the pulse. If you have a large capacitor or battery that will need tom be “filled up”, meaning that the diode will only react if the battery or capacitor is overrun.

If you recall my previous breakdown and discussion I concluded that a 24V motor can spike up into 20x (480V). The HEXFET’s will basically short those spikes and might be feeding them into the PSU part. A capacitor/battery can charge that energy, but we have a suppression diodes around to prevent that these spikes do damage. The basic adapter Board is only a specialzed vero Board to allow mounting of hole-through capacitors.

Universal Motor Controller

I designed this universal motor controller capable on driving DC-, Stepper-, BLDC- and even AC – motors earlier. The design parameters was 12-24V at 15A. This is quite a capable controller, but I did a mistake that limit the controller to 12-20V since I connected the Gate Drivers to the Motor PSU directly. To compensate for this I need to modify the design and implement a separate 12V PSU. As I correct this I also want to consider some additional changes.

I am considering is to replace the RS485 with an isolated RS485 due to the amount of energy involved. The 3rd change is Ethernet on a separate adapter board. Basically I want to copy the modules I use on the Universal Adapter as soon as I have tested them.

I am not sure about Ethernet. Ethernet sound nice due to the functionality, but it is a clumsy, 4-wire 1:1 solution. RS485 is slower, but it is a 2-wire network. It actually makes more sense having dual RS485 to be honest. CAN & Ethernet is easier to deal with using an adapter board- RS485 is considered a lower level of communication than CAN because CAN have protocols like CANopen, J1939 etc. The reality is that if we use RS-X that changes.

What I probably should do at some point is to create a “Ethernet” on top of RS-X by using a dual RS-X connection. But, that is fun for later…

So the modified design will be

  • STM32F405RG MCU, 168Mhz, 32bit M4, 1MbFlash, 192KbSRAM
  • 4 x separate half bridge drivers, 30V @15A
  • Current sensors on all
  • BEMF sensors
  • PSU Voltage Sensor
  • Separate 3.3V supercap to sustain MCU in power dips.
  • 3 x hall sensors
  • 2 x temperature sensors.
  • 1 x resolver
  • 2 x end sensors
  • 1-2 x RS485
  • Adapter board for battery/caps
  • Adapter board for CAN/Ethernet/Wifi

Applications

  • Solenoid driver
  • DC Motor driver
  • Stepper Motor Driver
  • Brushless 3-Phase motor driver

Fast ADC

The build in 12 bit ADC will give a resolution of 0.007V if I use it to control a 30V Lab PSU, so I was looking for something with a higher resolution. I did find something that could handle 24 bit @ 2.4Msps, but it required a NDA to see the price – I think not. A little surprised about prising on fast ADC’s.

The one over is a decent choice that is quite popular. ADS1256 from TI delivers 24 bits @ 30Ksps on 8 channels for ca 6.- USD +/-. It has been around for a while. The breakout board is ca 16.- GBP on ebay. I will play with this a little, but for now I will settle with that build in 12 bit on STM32 because they are also very fast.

I do however not need fast sampling rate, I need a very fast response in the MCU on changes. The build in ADC’s have threshold interrupts that should do that for me. Fun to come.

I do however like the ADS1256 so maybe I throw up a PLC ADC board with opto isolators. Non-isolated ones exist.

STM32F042F6 breakout

A breakout board with STM32F042F6. This can also handle STM32F030F4. Very small, cute and breadboard friendly. This little MCU is Corex M0 32 bit, 48Mhz, 32Kb Flash, 6Kb SRAM and contain a long list of IO including touch contacts. The board include x-tal (not mounted here) and a 3.3V PSU that also can act as a PSU for the rest of your design. The SWD Connector is available at top, so you can also Mount this vertical to save Space if you only need a few pins.