Stepper Motor Controller Rev B

Looks almost like the first version

This board may look familiar to some of you. Because at first glance, it looks just like its older brother described here: Dividing Head Controller. But many things have been improved in Revision B.

Changes are only visible from the back side

It has also found new use cases. Depending on how it is programmed, it can be applied wherever a stepper motor needs to be driven from a user interface or PC. So while it was first designed specifically to drive a dividing head, it is actually quite universal.

Re-designed power supply on the left

Now what’s new? First of all, the power supply has been improved to accept input voltages in the range of 6 – 60 volts instead of 6 – 30 volts previously. For me, this was one of the main reasons for the upgrade. The stepper motor I’ve used for the dividing head lacked a bit more torque at higher RPMs when operated from 24V. This new version has allowed me to use a 48V supply which has solved all the torque problems.

A more powerful microcontroller on the left and the new flash chip on the right

The other main upgrade is a more capable microcontroller, a PIC18F47J53. Together with a 32Mbit flash chip, this allows for a USB bootloader. It enables firmware updates without any specialized hardware or software. Any PC with a USB port will do, no matter the operating system. Watch this video for a demonstration of how it woks.

Since the stepper controller behaves just like a USB drive when connected to a computer, it also allows users to customize their device by simply editing a config file that resides on that drive.

Besides the fan output, there is now also an output for a mechanical brake. But despite the labelling, these are simply open collector outputs, with flyback diodes included, capable of driving around 1 amp. So depending on the software, they can be used for any other purposes.

Three devices during programming and testing

The remaining features are unchanged: There is still a 4 x 20 characters LCD display and two nicely hardware-debounced rotary encoders. There is still a buzzer, EPROM memory, reverse-polarity protection, an on-board temperature sensor and an input for an external temperature sensor (or any other analog input signal in the 0-3.3V range).

Desktop application for the dividing head

And there still is that USB port. But with the USB bootloader and the config file, this USB port has become much more useful. And I’v also spent some time writing software so that the device can be controlled from a (Windows) PC.

A different desktop app for a different use case. But absolutely identical hardware.

And as I’ve mentioned, the board has found new use cases that use application-specific software but absolutely identical hardware. And the modular design of the software allows for the most of the software to be re-used so you don’t have to re-invent the wheel whenever you have a new application for this device. You don’t have to re-do all the heavy lifting required for USB or smooth motion control. A few changes to the user interface and the corresponding API will typically cut it.

All the hardware and software is open source, ready for you to use, improve and adapt. It’s all on GitHub so let me just share the various repos:




Desktop applications:

Universal Interface

The Universal Interface

It’s time to present a relatively simple yet useful device: the Universal Interface. The need for this little helper arised when building the control for my CNC milling machine. But that’s a major project that I will introduce another time. Today it’s only about this little board.

Universal Interface at work inside the CNC control cabinet

My challenge was that I had to connect to and from a variety of external devices. Such as coolant pumps, pneumatic valves, probes and the like. Input and output signals could be anything from 5V logic, open collector logic, 24V logic to a relay. And they could be active low or active high.

The backside

Some situations also required a bit of logic. Not much but still some. Something like an AND and an OR gate or so. None of those circuits were challenging to design. But there were several of those and I didn’t really want to custom design and build a board for each one. Besides the fact that some in- and outputs were not entirely final yet or could change in the future. In other words, I wanted a single design that is flexible enough to handle all the present and future little challanges.

A total of 4 such interfaces are at work in the CNC control

Now to the design. There are 3 inputs (A, B and C) plus an enable input (EN). Each of these inputs is 24V tolerant and can be equipped with pull-up or pull-down resistors. And each of them can be configured to be either active high or active low. And of course, each of these inputs is nicely debounced by running it trough an RC filter followed by a Schmitt triggered logic gate. The logic state of each input is indicated with an orange LED located next to the input.

The inputs

Next comes the logic part. It uses a 74HC151 8-input logic multiplexer. The three inputs A, B and C select, which of 8 possible inputs is selected. The logic value of these inputs is then determined by 8 resistors as shown below. This allows an arbitrary logic function to be implemented in hardware. Nothing on this board requires software, it’s all hardware.

A hardware-configured logic table

Then comes the output stage. There is only one single logic output but it is provided in multiple varieties:

First, there is a single-pole, double-throw (SPDT) relay that is good up to 250 volts and 10 amps.

Then there is a powerful open collector output that can drain up to 2 amps. Flyback diodes are already included so this output can directly be used to drive another relay, a motor or whatever.

Then there is a standard CMOS 5V logic output. It can source or drain up to something like 25mA, pretty standard really.

And then there is also a 24V logic output which can optionally be equipped with a pulldown resistor or as a push-pull output as you know it from a typical CMOS gate. It can easily sink or source something like 500mA, maybe more. Protection diodes are also provided.

The outputs

And then there is also the enable input. If the enable input is not active, the 5V, 24V and OC output will all enter a high-impedance state. Of course, the relay does not have a high-impedance state and will just remain in its unenergized (i.e. off) position.

The power supply

As this circuit was intended to for use in an industrial environment, its supply voltage is 24V. This could easily be changed to 12V by simply using the 12V version of the relay – nothing else needs to be changed. The 5V voltage for the logic and 5V output is generated by a switching power supply that is good for up to 1 amp output current (far more than ever needed here) and an input voltage up to 30 volts. There is plenty of capacity both at the input (220uF) as well as the output (680uF). And yes, it is also reverse-polarity protected.

Side by side

That’s all I can say about this device. I’m currently using 4 of them in my mill, with different configurations, and they all work reliably.

There is room for more.

As you never know what the future brings, there is room for 3 more of these little helpers in the control cabinet. And if something is to change, I can likely accomodate for that change by simply changing a few resistors.

Where the input signals get treated

As all my stuff (or most of it, anyway), this project is on github:

Variable-Frequency Drive

I’ve just finished the variable-frequency drive (VFD) for my 1970s Schaublin 102 lathe. Before I dig into details, there’s a youtube video here:

My new VFD drive in action

I bougth this lathe around a year ago and it came with a bulky, two-speed 3-phase motor. My workshop at the time didn’t have a wall outlet for 3-phase power so I decided to run the lathe on regular 1-phase 230 volts using a frequency inverter. I knew that this kind of motors run poorly on inverters but I tried anyway. The result was even worse than expected, it barely ran and lacked any torque.

The old drive

So as expected I had to get a more suitable motor. After a bit of online research I ordered a physically smaller, 080 size Lenze MF series motor. This series of motors is specifically designed for inverter operation and offers constant torque over a wide range of frequencies. I sized it to offer slightly more torque than the original motor but that still resulted in a considerably smaller size and weight.

New motor temporarily mounted

I temporarily mounted the new motor with an adaptor made of 3 sheets of wood and added a cheap RPM meter I ordered on Alibaba. With a pot and two switches quickly mounted on top of the motor I got a working lathe. The new drive offered enough torque in all situations I encountered as well as a wide range of speeds. The main downside was that I lost the 3-speeds the lathe originally offered because the original V-belt pulley with its 24mm bore would not fit the new motor’s 19mm shaft. So I started to design a more permanent arrangement.

Carelessly mounted Alibaba RPM meter worked reliably (but super slow)

Just turning an adapter for the original pulley was not really an option because that would have resulted in a top speed of 8000+ RPM while only going down to about 200 RPM in low gear. So I decided to use the original pulley but with a fixed 2:1 reduction before that, giving me a more useful 100-4200 RPM range. For that purpose, I decided to use a 25mm, HTD-5M toothed belt.

Basic arrangement with shaft, bearings etc.

After playing around with several different designs in Fusion360 I started turning the various parts above. The motor, gearing as well as the inverter and controls were to be held together by an aluminium structure.

The 2:1 gearing at the core of the new drive

With the mechanics in place I started designing the electronics around it. For me, that’s the easy part 😉 Obviously, I need a pot and a 2-way switch to control the speed and direction plus a main switch. But since my lathe doesn’t have a lead-screw and hence can’t cut threads I thought I might one day want to add a CNC control just for that purpose. So I wanted to be able to remote-control the entire drive as well as to provide the necessary signals for a CNC control to monitor the speed.

Basic construction using 4 aluminum plates

While the chinese RPM meter worked reliably, it reacted super-slow to changes in speed and the bulky sensor proved difficult to mount in an elegant way. On top of that, it offered only a resolution of a single impulse per rotation and no information regarding the direction of rotation. I googled a bit and ordered a GTS45 gear tooth sensor from Renishaw. Its output is a standard, 90 degrees out-of-phase quadrature signal. Despite being a quality, industrial grade sensor, it only costs around 20 EUR and they are happy to sell them in single quantities. I also ordered a maching 90mm, 64-tooth tooth weel.

The remaining 64-thooth thooth-wheel with sensor in the background

I turned away most of this tooth wheel until only a rim with an 80mm bore remained. That then fitted nicely besides the pulley on the headstock. I decided to design my own RPM meter and to fully integrate it into the rest of the control. This reduces everything to a single PCB which simplifies wiring quite a bit.

Front panel

I wanted to have nice, large switches on the front panel even though the forward/reverse switch only provides a control signal and doesn’t switch any power. I also turned a know for the pot out of 1.4305 stainless steel. Together with the 4-digit 7-segment display, the physical layout was pretty much given. So I had to design the PCB to somehow fit in.

Back side of the front panel

To simplify things, the control runs right off mains voltage which is converted to 12V and 5V DC right on the board. The 12V rail is used to power the sensor as well as to operate 3 DR12 relais. Everything else runs on 5 volts. The inverter is controlled by two of the relais (one for forward, the other for reverse) while the third relay is used to choose beween two speed sources, one from the front-panel pot, the other one from an external input.

PIC microcontroller and input filtering

At the core of the design is a PIC16F18855 microcontroller. There are numerous inputs and outputs:

  • Forward, Reverse and Speed output to the inverter
  • Inputs for the forward/reverse switch and the pot on the front panel
  • Inputs for the quadrature signals from the sensor (as well as power supply for the sensor)
  • Inputs & outputs for remote operation: Enable, On and Reverse digital inputs, speed analog input (0-10V) and quadrature digital outputs

All digital inputs are RC-filtered and Schmitt-triggered before they are used. The PIC consumes all these inputs and then controls the display and the 3 relays accordingly. The cleaned inputs from the sensor are then also made available for the remote control via ULN2003 darlington pairs.

State of digital inputs is displayed via LEDs

The state of all digital inputs as well as the relays is clearly displayed using LEDs. While these are invisible inside the case, they are valuable while programming and setting things up.

Final assembly

With the motor coated with 2-component paint in RAL7031 blue grey, everything was assembled and wired using shielded wires. All that remained was to install it on the lathe and to try it out.

Finally. The new drive is mounted on the lathe and ready for use

For testing the remote operation functionality, I had to build some sorts of a remote control first. Besides the switches and a pot it also needed an RPM meter capable of dealing with quadrature signals. For the fun of it, I designed my own. I’ll describe that in a future post.

Remote control using a DIY RPM meter

As always, eagle files and code are available on github:

Dividing Head Controller

This post ist about the CNC conversion of a manual dividing head aka indexing head. If you’re not familiar with that kind of equipment, there’s a wiki page here.  One makes use of interchangeable indexing plates and and the internal worm gear to accurately divide the circle. Parts like cogwheels and the like can be machined this way. A video of the finished project can be found here on my youtube cannel.

The downside is that a high level of concentration is required to not mess things up. Often a single distraction is all it takes to ruin a part. Besides the fact that constantly changing indexing plates can get tedious. So I decided to mount a stepper motor to that indexing head and to design a controller to take care of that motor.

There are many affordable and well-designed stepper motor drivers out there so I decided to use one of those rather than building my own. So an external driver takes care of translating the 5 volts logic step / direction signals into the (typically 12, 24 or 48V) power signals required to drive the stepper motor. What this circuit does is to provide a user interface and to generate that step / direction signal.

I decided to use this motor driver from Planet CNC that comes with a 2×5 pins 100-mil header for the logic signals. So I also put such a connector with a corresponding pin-out on my board. Then a single ribbon cable (provided with the motor driver) is all it takes to hook up the driver.

The user interface consists of a 4×20 character LCD display and two rotary encoders with push buttons. The display is a Midas MCCOG42005A6W that I have used in several of my other projects before. It is very compact and comes with an I2C interface which saves quite a few pins on the microcontroller. There is also a buzzer to provide some acoustic feedback on button presses and the like. If it enoys you, you can always turn it off in software.

As in all my designs, the rotary encoder signals are nicely debounced in hardware as described here.

The board runs on a 24V supply that is also used to drive the motor. The microcontroller, a Microchip PIC1826J50, runs on 3.3 volts. Furthermore, the motor controller requires a separate 5V supply to power its logic. So I first designed a switching converter that generates a 5V output from any input voltage in the range of 6 to 30 volts. A linear regulator then produces 3.3 volts out of that 5V rail to power the PIC and other on-board logic. Unfortunately, a bug as creeped into my PCB layout – hence that fix with a piece of wire just below the coil.

With the PIC running on 3.3 volts and the motor driver at 5 volts, I also had to provide some logic-level conversion.  A 74AHCT125 line driver / buffer and a few resistors take care of that.

The PIC also comes with a USB interface so that the board could be controlled remotely from a PC. All the hardware for that is present on the board but I haven’t written any software for that yet. Most of that can be copy-pasted from other projects such as the solar charger but I simply haven’t done any of that yet.

Finally, there is a temperature sensor and a fan output on the board. I’m not currently using it but if there is need for a fan for the motor driver and/or the power supply, you can connect a fan directly to this board and have it temperature controlled. For the fan output, the buzzer and the display backlight are driven by a TPL7407L that already includes the free-wheeling diodes necessary to drive inductive loads such as a fan.

I’ve mounted all the power supply, the motor driver as well as this board in a nice, compact case that I bought at a flea market earlier this year.

Nice, solid ground connections are provided to all relevant components. The USB connector is accessible from the back through an extension cable.

The other USB connector belongs to the motor driver and is used for configuration.

Finally, the two knobs for the rotary encoders were turned out of aluminum at the lathe.

The rest of it is mainly mechanics. This may seem somewhat off-topic on this blog but expect to see more of it in the future 😉

Here are the parts required for the mechanical part of the CNC conversion. With the exception of the two cog wheels for the timing belt, they are all machined out of aluminum on a manual mill.

First, a spacer is mounted using three existing, M5 threaded holes.

The main body is then screwed onto this spacer and the cogwheel is mounted.

The hub of the cogwheel was turned out of steel and then press fitted to the aluminum cogwheel. This provides for a firm, true-running.

Then the motor with the 22 tooth sprocket can then be mounted together with the 15mm HTD-5M timing belt. Together with the 44 teeth cogwheel on the other end, this provides a 2:1 geering. The dividing head’s internal worm drive adds another factor of 90:1.

Since the motor, a Sanyo Denki 103 H7823 1740, has a resolution of 200 steps per revolution, this translates to a very convenient 0.01 degrees per full step.

Now all that is left to do is to fix the cover plate. As usual, all the relevant files are on github:

USB Mass Storage Device Bootloader

Let’s start with a video. It will tell you most of what I’m going to write about today.

That Hackaday Prize final has passed and unfortunately for me, the solar charger didn’t make it into the top 5. The good news is that there are plenty of projects and stuff that I would like to share. Things that I did over the last one or two years but never had time to write about. I’m trying to catch up with all that now.

First of all, I have completed the USB bootloader for the solar charger. This part of the project will enable the non-technical end user to easily and reliably update the firmware in the field.

Unlike a USB HID (Human Interface Device) bootloader that requires some application to run on the host computer, this USB MSD (Mass Storage Device) bootloader requires absolutely nothing in terms of host software. It’s entirely independent of the OS used. Windows, Linux, Mac, it all doesn’t matter. As long as they can deal with a USB drive, they’re good to go. Just copy the new software (in the form of an .hex file) to the Solar Charger drive and follow the instructions on the display.

It might even be that this bootloader is the world’s first of its kind for the PIC18 platform. To be sure, this kind of bootloader has been around for years for more powerful 32-bit microcontrollers like ARM Cortex and the like. But in my online research I have been unable to find any other such project for the PIC18 family (or any other 8-bit microcontroller). So I had no choice than to write my own. If you know of any other implementation, please let me know.

Once the file has been found and the user has pressed the button, the file is checked. If all those checks pass, we can be confident that we have a valid hex file. Of course, it doesn’t tell us anything about the quality of that code, that’s an other issue. But technically we should be fine.

Once the checks have passed, the user is once again requested to press the push button to confirm that this file should be programmed onto the chip. While it’s programming, it keeps displaying the current hex file entry it is processing to give the user an idea of the progress. It also keeps track of the number of flash pages it has written. One page corresponds to 1024 bytes on this architecture.

Once all the new code is flashed onto the chip, a message is displayed and the user is asked to once again press a key to re-boot the device into normal operating mode.

There are two different ways to enter bootloader mode. One is to press the push button at power-up. The other one consists in writing the value 0x94 (an arbitrarily chosen value) to the EEPROM address 0x100. In this case, the device will start up in bootloader mode no matter the state of the push button. The bootloader then overwrites this value (to 0x00) in order to start up normally next time.

After the reboot, you should be greeted by the startup screen of the solar charger firmware as shown above.

While I wrote this bootloader specifically for the solar charger, the code is rather universal. It can be ported to other PIC18 projects with relatively little effort. As always, the code’s on github:

Solar Charger in Hackaday Prize Finals

I’m delighted to tell you that my MPPT Solar Charger has been nominated for this year’s Hackaday Prize Finals taking place on October 22nd.  I’ve submitted it in the Power Harvesting Challenge category a while ago and was just informed that it was picked as one out of twenty projects submitted to the finals. Check out the original article here. Of course, any support is highly appreciated.

If you check out the project description on you will notice that my blog is somewhat lagging the latest developments. But don’t worry, I hope to post more updates as well as a few videos soon.

MPPT Solar Charger – Revision F

While the solar charger was originally intended to be used as a standalone device, it can just as well be integrated into other projects. In such applications, the user interface can be left away without sacrificing functionality other than the display and rotary encoder.

One project doing just that is MeshPoint, a rugged wifi hotspot for disaster and outdoor areas. But in most cases, the main application needs to be able to communicate with the solar charger. It wants to know if power is harvested, how full the battery is and so on. It needs to be able to enable and disable the various power outputs and maybe to control the fan. Or maybe it wants to make use of the charger’s real time clock and calendar. Or store some configuration data on the charger’s EEPROM. Possibilities are endless.

And when it comes to external communication interfaces, all the chargers up to revision D had little to offer other than the USB interface. Depending on your project, adding USB host functionality may be inconvenient or even totally out of the question. There was always the possibility to somehow tap the display’s I2C port but there was no extra header on the board for that.

Revision E has finally changed that. The charger now comes with two extra headers, one for I2C and one for SPI. As of now, the PIC acts as a master on both of those buses but slave functionality can be (and is planned to be) added in software. Hardware-wise it is even possible to update the charger’s firmware through those interfaces. I must admit that this is not the number one priority to be implemented but its nice to know that the possibility is there.

With the implementation of the USB bootloader next on the agenda I also upgraded the microcontroller to the newly introduced PIC18F47J53. It is extremely similar to the previously used PIC1846J50 and entirely pin compatible so it didn’t require any changes to the board. But it has twice as much flash memory (now 128kB) which allows for a feature-rich USB bootloader without runing into any issues memory-wise.

Another nice thing about it is that it has many more PWM modules which means that all four power outputs can now be PWM controlled. Think of LED lighting which is probably one of the main uses of those outputs. As a bonus, it also comes with an 12bit ADC which means four times the resolution on the temperature sensors.

When modifying the software to fit the new board and microcontroller, I noticed that my pin choice for the external SPI slave select signal was somewhat unlucky. I happend to pick one of the few pins without PPS (peripheral pin select) functionality which can be a problem if you try to use that interface with the charger configured as slave. The fix was easy, just swapped two pins but required a slightly modified board. That’s why the current version is now revision F.

Click here for the previous post in this series.

Free Solar Charger PCBs

A reader of this blog was so kind to send me a number of surplus boards of two of my solar charger designs. Thank you, Joachim.

Solar Charger Hall of Fame

[November 10, 2017]

After just a few days, all of the boards were sent out to all over the world. Today, the first photo of an assembled board has arrived. I’ll post this and all following photos here:

By Orkhan from Germany

Arduino Solar Charger

The first variety is my Arduino solar charger shield. Being my first attempt it is maybe not the most advanced design but it’s by far the simplest. So it’s well suited if you want to get your hands dirty while keeping the level of complexity reasonably low and do all your programming via the Arduino IDE. And despite its simplicity it operates very efficiently – apart from the power-hungry Arduino.

Solar Charger Rev C

This is a relatively recent and far more advanced design. It is very low power, highly efficient, comes with USB and lots of bells and whistles. So if your ambitions are somewhat higher this board is for you.

The Rules

Now here are the rules. As the title of this post suggests, I give these away for free. I ship them world wide absolutely free of charge. All I ask for in return is a photo of the assembled board within 6 weeks after you get the board. A maximum of 2 boards per person (one of each design).  First come first served. Just send an email to [admin at soldernerd dot com].

RaspberryPi Robot

It’s been almost two years since I did (or at least started) this project but I never sat down to document it. That’s what I want to do today. As the title says it’s about a little robot based on a RaspberryPi. Like many of its kind it is driven by a pair of stepper motors each driving a wheel directly attached to the respective motor axis. At the back there is another smaller, pivotable wheel to keep the robot in balance.

Here’s a video of the finished robot in action, running a simple demo program demonstrating the various functions.  By the way, I’ve started a youtube cannel to share these kind of videos. I’m not really a video guy so this text and photos blog will stay my main medium but some projects like this robot, videos are a welcome addition.

Yes, I’m well aware that many similar designs already exist out there I could just go out and buy a kit like this. But making my own sounded more interesting so when I was looking for a Christmas present for my godson of sorts I did just that.

Above is a close-up of the main PCB that I’ve designed and built for this project. The idea is simple: There is a PIC16F1936 microcontroller that communicates with a RaspberryPi over I2C. The PIC then handles all the low-level details of controlling a pair of Allegro A4982 stepper drivers. These work at up to 35 volts, handle up to 2 amps of current and can hence drive much more powerful motors than the relatively small NEMA 17 size motors I’ve used here. They are easy to use and feature microstepping up to 16th steps.

Besides the two stepper drivers there is a ULN2803 providing 4 power outputs capable of driving up to 1 amp each. The ULN2803 includes free-wheeling diodes so these outputs could be used to directly drive somethingn like a relay or a DC motor. But at least for now these outputs drive some RGB LEDs at the front as well as a buzzer.

The original idea was to power the RaspberryPi  from the 5V linear regulator on the board and then draw the power for the PIC from the RaspberryPi’s 3.3 volt rail. Since the PIC uses only a few milliamps that’s entirely possible.

Unfortunately I haven’t given that setup a lot of thought before building the board. Of course, when powered from something like 12V, the LM2931 regulator gets way too hot when powering a RaspberryPi that pulls a few hundred milliamps. So I’ve sacrificed one of my solar charger RevC boards that includes two very powerful USB charging outputs.

During testing and debuggin I’ve used a small 12V AC/DC converter screwed to the bottom side of the robot. Once more or less completed I’ve changed the power supply to an old 3-call (11.1V) LiPo battery from a RC helicopter. It’s no longer fit for flying but still adequate to power this thing for a few hours.

The entire structure is laser-cut from 5mm medium-density fiberboard and held together with M2.5 torx screws with square nuts. M2.5 square nuts measure precisely 5x5mm so that goes together rally nicely. I’ve added and changed a few things as I went along, drilling extra holes to mount the blue PCB for the power supply, the LEDs, to hold the battery in place and some other things. But the structure as such works very nicely. It’s relatively simple if you have some place to do laser cutting (try your local fab lab…) and is inexpensive and sturdy.

The weels are laser-cut from the same material and are sized to measure precisely 200mm in circumference. That’s handy since the steppers feature 200 steps per rotation. 


That’s about it, most of the relevant files are on github. The OpenSCAD files for the laser cutting are not so just let me know if you’re interested in them. I’m happy to share them, too. Here are the links for the software and hardware, respectively.

As always, I welcome any thoughts or comments.

MPPT Solar Charger – Update

It’s been a while since I posted anything related to my MPPT Solar Charger project. That doesn’t mean that no progress has been made…

I’ve performed many hours of testing, pushing the charger to and even beyond its 75 watts rating. I was able to confirm the very high efficiency n the range of 96 to 98% over a wide range of loads from 1 to 75 watts. And I’m happy to report that during all those tests I haven’t damaged anything. I’m more than pleased how this little charger is performing.

The most obvious progress that I’ve made is the mechanical design that you can see on the various photos here.  The case is a pretty standard 115x90x55mm cast aluminum box for which the boards were designed right from the start. So if you’ve ever wondered about the peculiar shape of the display unit’s PCB you now know why. If I had made it rectangular it won’t fit.

I’ve milled the various holes and slots out of that cast case on a manual mill which was somewhat time consuming but a lot of fun. The slots at the back for the in and outputs have turned out particularly well I find. Hence the close-up 😉

I’ve also given away some boards over the months. A few of them went to an open-source project named MeshPoint where they are integrated into a WiFi hotspot designed for outdoor use in disaster areas, refugee camps and the like. The project is also on hackaday .io where it runs for this year’s hackaday prize.

Together with the bords that I’ve used myself for testing I’m slowly but surely running out of the protopac that I’d ordered from So I decided to make a few minor changes to the board resulting in Revision D. The changes are really slight and require no or only slight changes in the firmware.

By far the biggest change concerns the flash chip. As I’ve mentioned before, the last one was simply a bad design choice because it can’t do sector ereases. The Atmel AT45DB161E can do that and provides 16Mbit (i.e. 2 MB) of storage which is plenty for our application. This change of course does require firmware changes but since hardly any code for the flash chip has been written so far that’s not really an issue.

I’ve also included the surge suppression diodes that I removed when going from Rev B to Rev C. They are not really required but make the charger far more rugged against any spikes in the (particularly input) voltage. That also makes testing quite a bit safer so  I thought at least having the option of including them is well worth while.

The signals from the three temperature sensors now get RC filtered to hopefully solve some issues I’ve experienced with overly noisy measurements. Placing the capacitors close to the microcontroller was a major challenge but I think I did the best I could.

The other changes are really tiny. I’ve fixed a mistake on the silk screen, changed a number of footprints to make the parts easier to solder and added a diode from the USB bus to the output. That allows to power the charger via USB. That’s obviously only useful for testing and debugging but there it’s a nice feature.

If you want to check out the details, they are on github: Or click here for the next post in this series.