Big ol’ printer

A few years back I purchased a large form 3d printer, the Creality CR10-S5. This has a bed size of 500x500mm, and can print over 500mm high. Just about right for a single print R2 dome!

However, since getting it I’ve managed to get one half decent print off it. The problem is that this size bed is pretty much the limit of the standard Prusa design. That means that bed levelling is a real pain, and therefore first layer adhesion is a problem. Doesn’t help when the supplied glass can be bowed quite badly.

Oh, and did I mention loud? Even on a couple of inches of foam to cushion it off the floor it could be heard all over the house. Not good when you are wanting to do prints that may take over a week of constant printing.

Upgrades

So all that being said, it has been sat idle for well over a year. I just couldn’t be bothered with the faff of getting a print working on it, and then not being able to sleep because of the constant whine. Thing is, its a big piece of kit to sit idle, not to mention fairly expensive, so I decided to research a few upgrades.

So far, I have done the following:

  • Added stepper dampers
  • Added a PEI metal sheet for the bed
  • Added a BLTouch sensor
  • Replaced the motherboard

DamperS

The dampers are just some shock absorber addons to try and reduce any vibration from the actual motors. This was the first upgrade I did on the X and Y axis, tho it didn’t have that much effect.

PEI Sheet

The PEI sheet I got seeing as my official Prusa Mk3S has one, and it is very useful. Just needs a clean after every print with IPA and the next print will stick with no issues. Tho it does need to be heated to work properly I’ve found

BLTouch

The BLTouch probe allows for automatic bed levelling. It doesn’t actually level the bed, but it probes a number of spots and the firmware then compensates as you are printing. The bed still needs to be reasonably level, but it does mean you don’t have to level after every single print.

Motherboard

Now this last one. Replacing the motherboard is a bit of an understatement. I basically threw away all the electronics that came with the printer and put new ones in. From the power supply, to the motherboard, to the stepper drivers. The drivers you use can have a lot of effect on the noise of the steppers, so I wanted to go with Trinamic based ones as they can run the steppers really quietly. To get these to work, I got a BigTreeTech SKR 1.3 motherboard, and five drivers. For power I got a 12V 30A power supply, it needs the high current for the heated bed.

The added benefit to this is that it is now a 32bit based machine, with much fewer memory restrictions, and can run Marlin 2.0 firmware. I’ve actually forked the Marlin firmware repo to keep track of the changes I make to the config files:

Results

So far, I am very pleased with how the printer is now running. Bed levelling is a lot easier/non existant, first layer adhesion seems reliable, and we can hardly hear it running in the house, just a dull whine when its doing certain operations.

I’ve also been using PrusaSlicer, rather than the more usual Cura, so I’ve had to do my own profile for the printer. It still needs a few tweaks, but the results are good.

Future Work

Its still not perfect. There are a few things I still want to do to make printing more reliable and to speed it up.

  • Braces – The top part of the printer can move quite a bit, so I want to brace this. Might also stop some of the resonance.
  • Heated bed cable cover – The cable to the heated bed can get caught or frey, causing many issues and possibly a fire. I want to strengthen that up.
  • Tweaks to Marlin – The BLTouch is still a bit temperamental so some more tweaks are needed on that front
  • Tweaks to print profile – Still a fair bit of stringing, so the retraction needs increasing. Its also very slow on some operations so I need to find the balance between speed and quality.
  • Tidy up – Well, its taken a lot of messing to get it working, and the area around the printer is a state, as well as cables coming out everywhere and the MOSFET for the motherboard hanging loose. Everything (including the Raspberry Pi running Octoprint) needs to be tidied up somewhat.

I’m glad I finally got round to doing all this work, I was seriously at the stage where I thought I was going to get rid of it. But whilst its not up to official Prusa standards, its actually not too bad.

Obligatory Blog List

Most of the things I write are over on my droid blog but I thought it was about time I did a post on here, and what better than an obligatory list post!

A lot of my TV viewing is Youtube based, and I’m always talking to others about some of the channels I watch. Here is a cultivated list of some of my favourites in a few different categories.

Maker channels

This is a list of channels from the maker community, from woodwork to forge work.

  • Tested.com – Adam Savage of Mythbusters fame, along with other tech and geek reviews.
  • Alec Steele – Brit now moved to Montana, lots of metal work and some fine detail jewelery.
  • April Wilkerson – Wood working mainly, including a recent build of a massive shop.
  • AvE – Mad canadian, lots of hints and tips, along with tool tests and teardowns. Plenty of swearing and no holds barred.
  • Clickspring – Insane amount of detail and precision on this channel, so hypnotic to watch.
  • Colin Furze – Modern British mad scientist/inventor. Builds many dangerous contraptions in his workshop.
  • I Like To Make Stuff – Just what it says on the tin. Various DIY home projects and other fun builds.
  • Jimmy DiResta – The original Youtube maker, insane skills and brilliant builds.
  • Kris Harbour – Lots of sustainable building as he constructs an off grid homestead.
  • Primitive Technology – Goes out into the bush with nothing but a camera and a pair of shorts. There he builds huts, kilns, fires bricks, generally goes back to nature.

Space

Various channels that give information about space travel.

  • Everyday Astronaut – Bought a russian space suit, took some photographs, now a space science informer. Covers all aspects of rocket science and launches.
  • Scott Manley – Originally got popular from playing Kerbal Space Program, now does deep dives into rocket theory and reports on space activities.
  • TMRO – Weekly space news, interviews, generally keeps you up to date with what is going on in space.
  • The Vintage Space – All about the history of space travel and the people who made it a reality.

Science

All sorts of science and technology videos.

  • Applied Science – Crosses the line between theory and application, builds various demos of scientific principals.
  • Because Science – Where geek culture and science meet. How do super powers work?
  • Cody’s Lab – Science in the real world. Recovering gold, real life minecraft, taking a bath in mercury.
  • Curious Droid – Takes a look at aerospace technology, from past to present into the future.
  • Practical Engineering – Applies scientific principles in the real world, with many civil engineering examples.
  • Real Engineering – A wide ranging dive into various technologies and the science behind them.
  • Smarter Every Day – One of the biggest science channels on YouTube, covers topics on anything that takes his fancy, just dives in and figures out how things work.
  • Standup Maths – Maths problems, number theories, real world applications, all with a comedic style.
  • The Science Asylum – A great explainer of complex ideas such as quantum theory, relativity, and other deep physics ideas.
  • Veritasium – Covers science, education, and just about anything else he finds interesting.

Electronics

These channels cover restoration, dismantling, and building of electronic projects.

  • Big Clive dot com – Strips down various electronics goods, usually cheap chinese imports, to figure out how they work and review them at the same time.
  • Curious Marc – R2 Builder and old computer restorer.
  • EEVBlog – Mad Aussie with lots of knowledge of electronics, does tutorials and reviews of electronic devices.
  • James Bruton – Robot (including R2 and BB8) builder, gives some good overviews of how things work.

Misc

Have to have a misc section, various geeky or fun channels here.

  • Corridor Crew – Vlog of the team behind Corridor Digital. Some great tutorials on film making and special effects, along with fun games.
  • Corridor – This is where the Corridor Crew release their finished videos.
  • Fact Fiend – No nonsense guy talking about various topics, with many tangents throughout.
  • Fully Charged – All about electrics cars and other renewable energy solutions and projects. Hosted by Robert Llewellyn.
  • Sneaky Zebra – Cosplay videos and a few small features.
  • Slow Mo Guys – They film everything they can in super slow motion, usually at some form of bodily peril.
  • Tom Scott – Linguistics, quiz shows, amazing places, things you may not know. All whilst wearing a red t-shirt (definitely recommend watching Citation Needed on this channel)
  • Today I Found Out – A daily video about random facts.

That should do for now. I tend to find I watch videos from all these channels as soon as a new one is released. Theres plenty of back catalog to be going on with too.

Tracking the skies

SDR Radios

One of the things I’ve been getting into recently is using Software Defined Radios (SDR) with cheap USB digital TV tuners that are available all over ebay, etc. These have been taking the radio community by storm as the chipset in them from RealTek can tune into a really wide band of frequencies. Usually from down around 20MHz, all the way up to nearly 2GHz.

Typical Digital TV stick with the Realtek chipset in

Tracking the skies

One of the fun and cheap projects you can do is track all the aircraft that are flying around you. All commercial and some light aircraft are required to have an ADS-B transponder that sends out a radio signal on 1090MHz that contains their location, speed, etc. These signals can be received with one of these SDR dongles and decoded to display this information on your computer.

There is even a ready made piece of software called dump1090 (and many, many forks of it) that will also display this information on top of a google map.

Current view of the planes around me

Antenna

The first thing you will need is a decent antenna for receiving these signals. The easiest to make is a quarter wave ground plane. In the simplest terms, this means that the main part of the antenna is a quarter of the wave length of the signal. The equation for this is:

f = c / λ

where f is the frequency, c is the speed of light in m/s, and λ is the wavelength. So to get the wavelength of 1090MHz, you rearrange the equation to:

λ = c / f

Putting the correct numbers into this means that a quarter of a wavelength is just 68.8mm. This makes for a pretty small antenna.

The ground plane is just four more wires at 90 degrees to each other, and bent down at a 45 degree angle.

All these wires are then soldered into a standard SO239 panel socket.

A quarter wave ground plane antenna for 1090MHz

There are many sites that will give a much better walk through of how to make one and the details behind it.

Software

Next, we need to look at the software. At this stage, if all you want to do is have a quick look for some fun, all you need is the antenna, usb stick, and the dump1090 software from one of the many forks (If found the dump1090-mutability one to be best). Download or clone this repo, and follow the compile instructions to give it a try. You should then be able to view the results either on screen or via a web browser.

The other option if you are going to go for a more permanent solution is to maybe use the data to improve a commercial sight such as FlightRadar24. This is what I chose to do, so I signed up for an account with them and followed the instructions to build a dedicated Raspberry Pi receiver that will automatically upload any information I receive to their systems, hence improving their reliability. This also gets you a full business account on there worth $500/year!

Enclosure

Lastly, if you’re doing a permanent solution, you need somewhere to put it. To save space and cost, I just used a Raspberry Pi with an decent sealed enclosure box.

Setup without the enclosure

I used some epoxy to glue the antenna on the end of some 20mm conduit that I had, with the cable passing down through it. Then drilled two holes in the box. One that I put a rubber grommet in to pass the power feed through, and the other to put an external antenna connector through.

Lastly, I used epoxy again to fasten some 20mm brackets to the box lid for the antenna to attach to. This was better than screwing, as fewer holes for moisture/bugs to get in through. Then I just mounted the whole thing on the side of my garage and passed a cable for power to it.

The whole unit is attached to the side of the garage

Ideally it would be placed higher, or at least the antenna would be, but that started to make things complicated. As it is, I can still get signals from planes nearly 200 nautical miles away.

Summary

Now I can access the Pi whilst I’m on my network and view all the planes around me. I also have a full business level account with FlightRadar24. Is there much point? Nope, not really apart from helping crowd source data for a company. Why’d I do it? Because I can and its fun!

Lack of updates

Wow, its been nearly a year since I last posted. Oops

Most of the things I do at the moment are R2 related, and I’ve moved that out into a separate blog, so thats where a lot of activity is:

https://r2djp.co.uk/

So I really need to do a post or two on here about what I’ve been doing recently that isn’t R2 related. Hopefully I will have some astrophotography stuff soon, and also have a couple of decent 3d printers.

I do want to do a post with an overview of my OpenHAB home automation too, as that is getting quite useful.

Oh, and I’ve also been getting into a few ham radio projects again!

Lets see if I actually do get round to writing about them all.

Solar and stats

I finally got round to getting solar installed at the house. Due to the dormers, I ouldn’t really fit much on the main roof. I did manage to squeeze 1.5kW of panels onto the garage.

Red Electrical came and installed everything very quickly and neatly, very impressed with their work and support in deciding what equipment to go with.

The solar inverter that I went with is a Solis mini 1500 4g by Ginlong. Basically, a single MPPT grid tie inverter that will handle up to 1.5kW. The 4g just means its the fourth generation of their kit. Its a fairly cheap but decent chinese model, and has the option of a wired or wireless monitoring stick. This is where the fun starts!

Monitoring

Now, I like to gather stats about power usage (and just about anything else really), and I rather liked the idea of using data directly from the inverter rather than the more typical way of using clamp meters such as those from Open Energy Monitor, which I have used before. The idea being that data from the inverter will be more accurate than a passive monitoring system.

Of course, it wasn’t going to be that easy. The monitoring stick is designed to push data out to a remote server and you access the data via a portal. The portal isn’t actually that bad, it seems the system is used and rebranded by a number of manufacturers, but this wasn’t good enough for me. I wanted the data fed into my home automation system (OpenHAB), similar to how I’d set up my off grid system.

Thankfully, at least the monitoring stick does support sending to an alternate IP address and port. The problem is, the protocol is not documented anywhere and the manufacturer will not release it. I searched for quite a while under various names and brands and found a few people who had tried to do similar. The newest work in github was from graham0, but was two years old and for a different version of the firmware. However, it did give me a starting point.

Decoding

So, pointing the secondary address of the monitoring stick to my desktop, I started examining the data being sent. There was a choice of a few protocols, but the one that seemed to give the best data was listed as SolarMAN-1.

What I was receiving was a 270 byte string. In HEX this was:

687941b08f4661718f466171810305030507e40100b3930000509ee9590100af
010000XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXa7008701060000000000030000
000300620900006209881348000000820000001e000000000000000300000000
00001d0403000000000000000000000010270000009000009000000000000000
000009e2069816

The XXXXXX part are the serial number of the inverter. I figured this out first as it was actually sent in plain ascii. Good start, at least I was getting something.

I worked on the assumption that the rest of the data was encoded similar to the previous protocols as worked out by graham0, I started looking for various 2 and 4 byte blocks. Temperature was quickly found as the first two bytes after the serial number. The rest of the data took a few days to crack. As I logged more of the rawdata to a file, I started pattern matching trends and data to the graphs that the main monitoring portal was producing.

Storing

In the end, I managed to write a program to take in the data and spit out usable stats. My next step will be to pipe this data into my MQTT server. Then OpenHAB can then access it much like my previous solar experiences. I have released the code on github, incase anyone else has a similar setup or wants to extend it. The raw data actually seems to support dual MPPT inverters, and theres a lot of data in there that I haven’t figured out yet.

So far I’m pretty certain that I’ve got the following stats correct:

  • Temperature
  • DC Volts (from panels)
  • DC Current (from panels)
  • AC voltage (grid supply)
  • AC Current (how much is fed into the grid)
  • AC Frequency (should be around 50Hz)
  • kWh produced today
  • kWh produced in total

I’ll continue work on it and see what other stats I can pull out, but from this I should be able to calculate most other things.

Is it worth it?

As its only a small solar install, the ROI is going to be quite long compared to the solar on the previous house (only have another year or so and they should be paid off). However, I do think solar is great thing to have. Now if only I could justify a powerwall…

My Own Lightsaber

R2 is progressing nicely, solar stats are gathering, and I’m waiting for parts for my powerwall project. To add to the list of projects, and to learn techniques on the lathe and mini-mill, I’ve decided to build my own lightsaber.

If you want a lightsaber, there are plenty of options. Cheap ones, off the shelf decent ones, upgraded ones, custom ones, and even kits. As I want to learn machining skills I am going down the custom DIY route.

Saber Parts

A saber in its simplest for is:

Sound Board

This is a small board with an accelerometer, LED driver, speaker driver, and a couple of inputs for buttons, with a microcontroller to tie it all together. From research and conversations with my friend Neil (who has his own saber shop, London Sabers) I decided to go with a sound board from a company called Plecter Labs. This is a home run shop that produces a range of sound boards of differing complexity. The boards can be bought in the UK from JQSabers. That is also where I got a lot of the other parts that I needed.

Lightsaber sound board wiring test

Test wiring of sounds board and other components

LED

These days you have a choice between a single LED cluster in the hilt, or a string of LEDs that run up the inside of the blade. With a string of LEDs you can have a gradual light up of the blade that looks more like the film, but with a single LED cluster in the hilt it makes the blade a lot easier to remove. To keep things simple, my lightsaber will just have a single LED cluster in the hilt. I’ve gone with the Tri Cree XP-E2 which has two blue and one white LEDs on a small circuit board. The white LED allows for something called ‘Flash On Clash’ which, as  it sounds, means that when the sound board detects that you’ve hit something, the blade will pulse with an extra white light.

Lightsaber LED with wires soldered on, ready to be connected to the sound board.

Tri Cree LED

Hilt

This is the part that will be 100% custom for me. There are modular options available, or replica ones if you want something from the film. I’m doing a totally custom design and will all be machined by me on the lathe and mini-mill. It will be a fairly simple design (for this one at least) as my skills on the lathe are not exactly the best yet.

Lightsaber 'emitter' after it has been turned on the lathe and given a light polish

Emitter end of the hilt

Adding some fine grooves into the hilt of the Lightsaber on the lathe.

Turning the main part of the hilt, adding some cosmetic details

Blade

The blade is just a simple tube with reflective film on the inside to give a smooth lighting. As I want to be able to hit things with my lightsaber, I’ve gone for the thick walled dueling blade.

Progress

So far, I have made the emitter and main part of the hilt, along with doing a test wiring of all the electronics to go inside of it. Quite pleased with how the hilt is coming along, I just need to wait for my new mini-mill to turn up so that I can accurately drill some holes and create areas for the switch to sit. The pommel end of the hilt still needs to be designed, and will house the main speaker. Currently I’m working on some laser cut parts that will hold the internals in place, yet still be easily removed for servicing.

Laser cut parts to hold the guts of the lightsaber

The start of the skeleton for the internals

18650 Power Wall

The next step in my solar power quest is to get a decent amount of storage. To that end, I’m attempting to make my own 18650 power wall using all the recycled cells I’ve been harvesting.

Power Wall Design

I’ve been watching a lot of DIY power wall projects, including HBPowerwall and Jehu Garcia. Unlike my batteries for R2 which will be charged and discharged with me present, a power wall needs to be left unattended for extended periods of time usually. Mine will be in the garage and I’ll only be physically present when working on projects in there. This means that I need to add some extra safety features into it such as fuses.

Fuses and holders

4 x 18650 Holder

4 x 18650 Holder

A lot of people have been soldering fuse wire directly to the 18650 cells, but this is something I want to avoid. Firstly, this runs the risk of ruining the cell. Secondly, I’d like to easily be able to swap out failed fuses and cells. One person I’ve been watching on YouTube is Adam Welch who had a nice idea on how to solve both these issues. I’m extending on his idea by using fuse holders and standard 5x20mm fuses. Along with this I will be using some standard PCB mount 4 x 18650 holders.

The holders will allow for quick swapping of any dead cells, not that I’m expecting that to happen too often but I am using recycled cells with unknown service life.

PCB Design

To make this a bit more professional I’ll tie all this together with some custom PCBs that I’m currently getting made. The PCBs will join two holder trays together and mount the fuses to them.

Bottom side of 18650 Power wall PCB

Bottom side of PCB

Top side of 18650 Power Wall PCB

Top side of PCB

There will also be an edge connector designed into the PCB. The final idea will be for modular shelves that can be added into the main battery as I build them by making a backplane that they plug into. The backplane will have rows of sockets, and also house the BMS system that I want to add to further protect the battery and cells. It also gave me a chance to try out KiCAD rather than Eagle CAD that I had been using for projects up to this point.

Aims

Whilst this approach won’t be anywhere near as energy dense as something like the HBPowerwall project has accomplished, it should allow me to have a nice small scale, safe, installation.

No way I’ll ever do something like this tied to the grid, but it should be enough for lighting and charging my tool battery packs at least. With only 100W of solar panels at the moment, a single bank of cells will give me a little more energy storage than the two SLA ones. Adding a second will hopefully take this up to about 400Wh of storage. More than enough for my needs.

Still messing with the monitoring of the solar, seems to be working ok so far. However, there is currently no load on the charge controller which means it enters float charge and doesn’t show the actual amount of energy I could produce. I’m going to start wiring in a load of some form to get better stats.

 

 

Pretty Solar Graphs

The first step on my solar progress is to get some graphs done, to get an idea of how much energy I can get from my solar panels on an average day. From this I can work out what I can conceivably run from my setup.

Background

Previously, I installed a simple solar setup for testing. This is using an EPEver Tracer1210A solar charge controller, from Tracer. It wasn’t the cheapest, but it had a lot of good reviews (watch out for cheap copied). The other benefit was the fact it had a serial output that talked modbus, or rs485. Intended for official devices, they do provide the protocol to allow third parties to read the system details.

After doing some searching, I discovered Jamin on github who had done some coding and circuit design to get the current details from the charge controller and push the results out to a service called Blynk.

My Project

Overview

This project gave me the starting point for what I wanted to do. My idea was to do this:

Controller -> RS485 -> NodeMCU -> MQTT -> OpenHAB -> InfluxDB -> Grafana

A little bit convoluted, I could probably have pushed straight to a database for logging, and do the graphs in grafana. I decided that pushing via MQTT would allow me to integrate the logging into my OpenHAB system, which would give me the capability to trigger home automation actions depending on the statistics from the charge controller. For example, it makes it very easy to use OpenHAB to send an email if the battery level gets low, and not only that it could turn off some of the load running off the battery as it gets to different levels.

Circuit

The circuit is pretty much a direct copy of what Jamin used, only adapted for a NodeMCU rather than a ESP8266 Mini Dev board.

Bad photo of current system.

Prototype of circuit. Ordered a 5110 LCD to add to it, and will neaten it all up then.

I did look into powering this from the 5V on the serial output of the charge controller, but according to the documentation this can only put out about 50mA of power, which probably won’t be enough to cover the usage by the NodeMCU.

Code

The initial code can be found on my github repository here:

Still a work in progress, but it does the basics so far. Future improvements will allow writing of certain settings, maybe a simple webserver for point in time readings, or an LCD screen.

Logging

So the circuit will transmit the readings over wifi to my central MQTT server, running mosquitto. MQTT is just a simple messaging system when you can subscribe to, or publish to, certain queues.

Readings from the charge controller will be published to set queues on the server, which OpenHAB will be subscribed to, with the following items file:

Number EPSolar_Temp "Temperature [%.2f °C]" { mqtt="<[mymosquitto:EPSolar/1/ctemp:state:default" }

Number EPSolar_BattVolt "Battery Voltage [%.2f V]" { mqtt="<[mymosquitto:EPSolar/1/bvoltage:state:default" }
Number EPSolar_BattRemain "Battery Remaining [%.2f %]" { mqtt="<[mymosquitto:EPSolar/1/bremaining:state:default" }
Number EPSolar_BattTemp "Battery Temp [%.2f °C]" { mqtt="<[mymosquitto:EPSolar/1/btemp:state:default" }

Number EPSolar_LoadPower "Load Power [%.2f W]" { mqtt="<[mymosquitto:EPSolar/1/lpower:state:default" }
Number EPSolar_LoadCurrent "Load Current [%.2f A]" { mqtt="<[mymosquitto:EPSolar/1/lcurrent:state:default" }

Number EPSolar_PVVolt "PV Voltage [%.2f V]" { mqtt="<[mymosquitto:EPSolar/1/pvvoltage:state:default" }
Number EPSolar_PVCurrent "PV Current [%.2f A]" { mqtt="<[mymosquitto:EPSolar/1/pvcurrent:state:default" }
Number EPSolar_PVPower "PV Power [%.2f W]" { mqtt="<[mymosquitto:EPSolar/1/pvpower:state:default" }

Number EPSolar_ChargeCurrent "Battery Charge Current [%.2f A]" { mqtt="<[mymosquitto:EPSolar/1/battChargeCurrent:state:default" }

Number EPSolar_PVVoltMax "PV Voltage MAX (today) [%.2f V]" { mqtt="<[mymosquitto:EPSolar/1/stats_today_pv_volt_max:state:default" }
Number EPSolar_PVVoltMin "PV Voltage MIN (today) [%.2f V]" { mqtt="<[mymosquitto:EPSolar/1/stats_today_pv_volt_min:state:default" }

My OpenHAB system is configured to store persistence data into an InfluxDB server, which is a common setup amongst the OpenHAB community and is well documented. This InfluxDB stores historic data on items in OpenHAB, which is searchable by Grafana. Grafana gives a nice interface to produce all the pretty solar graphs you might want.

Solar Graphs

Using Grafana to get some pretty solar graphs

Pretty Solar Graphs

This makes it really easy to see just what is happening, including the charging states as it you can see the switch from bulk to float charge on the battery voltage. This should allow me to make sure the charging is correct for the Lithium Ion batteries I want to eventually connect.

A bit of Solar

I got a message a few weeks back to see if I was still looking for old laptop batteries for 18650 harvesting, and of course I said yes. The next day, I got one or two batteries dropped off at my house:

A few crates. There were a couple of other ones too.

A few crates. There were a couple of other ones too.

Wow. Its going to take some time to crack them all open, harvest the cells, and test them all properly. Of course, I’ve got two batteries for R2 now that seem to be in a good shape and last long enough for pretty much any event. So the question is, what do I do with all the cells I’m going to have once I’ve finally gone through all these crates.

I’ve a few projects in mind that will utilise a couple of cells each, including a standby battery for R2’s brain, but a rough calculation shows that once I’m through all these crates I’ll have approx 1200 cells of varying states. So far, I’m through about half a crate and the vast majority seem to be in a good condition and over 2000mAh capacity. That means I’ve got nearly 8kWh of energy storage! Even if I assume half the cells are dead (so far only about 2% seem dead), thats still 4kWh.

The first thing that jumps out for this amount of storage is a form of power wall. Now, I’m not going to do anything grid tied, that is just too much hassle, but doing something off grid for the garage is definitely doable. If I can perhaps do enough to run the computer and other electronics, plus indoor and outdoor lighting, then I will consider it a success.

25W solar panel for testing

25W solar panel for testing

To start the project, I got hold of a few small solar cells, one 25W, and a couple of 50W ones. The 25W one will be used for experimentation and testing theories out, and the two 50W panels will be mounted on the wall of the garage for a more permanent solution. I also purchased an EPSolar MPPT charge controller, to go with a couple of spare 12V SLA batteries I had spare from initial testing of R2. I went for this model as it has a serial out port on it that will allow me to tie it into my OpenHAB home automation system and graph things like battery charge, solar power production, and any load on the system.

Fabricated a couple of brackets to mount the 100W combined solar panel

Fabricated a couple of brackets to mount the panel

Being able to graph those details will allow me to make an estimate of how much energy I can generate on a typical day, and from that calculate how much I can actually run off my system for a given amount of solar panels, and also work out just how many kWh of energy storage I need.

The charge controller however will only work with standard lead acid batteries, whilst I want to make use of the 18650 cells. To this end, I did a lot of reading and it seems that there are very few hobby level solar charge controllers that will work properly with lithium technologies. Some charge controllers can be made to work with them, but it is more of a bodge.

After much searching, I did find one chinese charge controller that said it worked with lithium batteries, and actually seemed to back that up in the details. One of the main things to look for is that it supports the typical CC/CV (constant current/constant voltage) charge methods that are required for all lithium cells. A few clicks, and it was on its way on a slow boat from china.

Solar charge controller mounted

Solar charge controller mounted

For now, I’ve got the EPSolar charge controller mounted on the wall of the garage, connected to the 100W of panels outside.

Next steps are to get some data logging from the serial port, probably using an ESP8266 based device, dumping the data into my MQTT server, which in turn will be monitored by OpenHAB to be dropped into an influxDB store for graphing with Grafana.

Along with this is the slow process of breaking open a lot of laptop batteries and harvesting the cells. Once I have enough for a decent sized test, I will be looking into various ways of mounting them and hopefully adding an individual fuse to each cell for safety. More research into BMS for making sure the battery is properly balanced is required too.

 

 

Building a battery for R2 with 18650 cells

There are many options for a battery to power an astromech, from the tried and tested Sealed Lead-Acid, to the latest LiFePO4. This article will look at utilising the very common 18650 cells. These are used in power tools, laptops, even Tesla cars.

WARNING, this article will talk about opening old packs, harvesting their cells, soldering cells, spot welding cells, and lots of other things that could be quite dangerous.

Lithium cells of any type can heat up or burst into flames if mistreated. Only attempt the things in this article if you are entirely comfortable with any possible outcomes. Do other research, read other articles, the author accepts no responsibility for any injuries or death from the instructions given.

General theory

18650 refers to the size of the cells, 18mm x 65mm. They generally have a capacity between 1500 and 3500mAh. If you see anything saying 4000mAh or above, chances are its a scam. There are a lot of cells branded ultrafire that claim over 6000mAh capacity which is a total lie. Voltage ranges from 4.2v when full, to 3.2v when empty. These cells use Lithium-Ion technology, which is a lot safer than the Lithium Polymer that is used in many radio control devices. The drawbacks are that it has a much lower discharge rate. LiFePO4 are even safer, but are also more expensive. Li-Ion seems to be a middle ground, which is why it is used in so many places.

Generally, these cells are arranged in series/parallel to get the desired voltage and capacity. For example, a 24V battery is made of 6 cells in series. Extra capacity is added by putting more cells in parallel, so that if you use cells with 2500mAh capacity and want a 24V battery with 10Ah capacity, then you will use 4 rows of 6 cells, commonly written as 6s4p.

The current drain allowed on a battery is usually 1C, or 1*<capacity>, so in the same example 6s4p battery, you can have a maximum drain current of 10A. Doubling the battery up to be a 6s8p will give you 20Ah and a 20A potential drain. 1C is the safe limit using recycled cells. If you are using brand new cells then you may be able to get a higher current draw by checking the datasheet. For example a NCR18650B can draw 2C and a NCR18650PF can go up to 3C.

Sources

Cells

As mentioned above, 18650 cells are used in many places, and can generally be recycled. The best place I have found for second hand cells is from laptops or power tools. These battery packs can be cracked open and the cells removed. It is quite a labour intensive task, but saves a lot of money. You can pick up job lots of second hand cells from eBay, tho this is getting more expensive as more people are harvesting cells this way.

You have to force the two halves of the battery case apart, usually with a screwdriver or similar flat sharp object, and then separate the cells from the circuitry and cabling inside. Always wear heavy gloves, and take extra care when using a lot of force. Its easy to slip and damage yourself or the batteries. Also make sure to take care not to use the cells as a fulcrum as this will also damage the cell. Basically, be careful and take your time.

An Opus BT-C3100 18650 charger/tester

The drawback is that each cell is of unknown capacity and life, some cells may even be totally dead. They could already have been through a few thousand cycles. Each cell needs its capacity testing with a charger/tester such as the Opus BT-C3400. Of course, if you can ask friends and family for donations of old laptop batteries, you can save even more money. I managed to get a lot donated for free. Despite the drawbacks and amount of work required, you can end up with a battery for next to nothing that would cost a lot if you bought a ready made one. For example, I built a 24V 25Ah (approx) 6s11p for around £50 of cells, plus a few other bits.

The other option is to buy brand new cells in bulk. Either from Chinese sites such as aliexpress.com, or from other sites closer to home such as eu.nkon.nl. Chinese ones are generally a little cheaper, but you do have a long lead time and the risk they are counterfeit. A typical cell such as the NCR18650B (high capacity/average discharge rate) or NCR18650PF (medium capacity/high discharge rate) can be bought for approx £3 a cell.

Additional

As well as the actual cells, there are a couple of other essentials. These are cell spacers, which clip into various configurations to hold the cells in place, and allow air flow around them. You’ll also need nickel strip to connect all the cells together. Both of these items can be bought from aliexpress.com in bulk. If you are buying brand new batteries from NKON, they also sell nickel strips for a decent price when bought in batches of 10m.

Lastly, you’ll need battery connectors and a balance lead. The battery connector can be anything you wish, as long as it will take the current. The balance lead is a connector so you can make sure that all the series cells are at the same voltage. This is important so you don’t let one cell run down lower than the others, which will potentially damage the cell, and maybe the whole battery. You need one for the correct size of battery (eg, a 6s battery will need a 7 wire balance lead) which can be got again from aliexpress.com or ebay.

Constructing the battery

Once you have enough cells together, and all the other items, time for construction. The general process is:

  1. Sort the batteries into parallel sets with the same total capacity. The idea is to have them well balanced before you even start. You can use a site such as repackr.com to help with that
  2. Clip the cell spacers together in the required layout (eg 6×12 for a 6s12p), then lay the cells out. Each parallel set should be the same orientation (eg, negative to the top), but alternate them as you fill in the series set.

    The start of a 6s12p pack. Can see the parallel sets run down the picture, with the series sets alternating across

    The start of a 6s12p pack. Can see the parallel sets run down the picture, with the series sets alternating across

     

  3. Once you have all the batteries in place, clip the top of the frame into place

    Here is a small 3s5p pack, ready for the nickel strips

    Here is a small 3s5p pack, ready for the nickel strips

     

  4. Now its time to connect the parallel sets up. Using either a soldering iron, or a spot welder, connect strips along all the parallel sets. These are the ones that are all the same way up. What this does is create the capacity for battery pack. Be careful if soldering, don’t allow too much heat to build up on the cell, do it as quick as possible. You can get spot welders from aliexpress.com for around £200 that will do the job a lot better.""

    You can also get a device that will give you a full readout, just from plugging the balance connector in. They are only a few pounds from places like ebay. They will let you view the total voltage, each parallel set voltage, and also the max/min/dif between the cells.

    Balance capacity checker

    For the initial charge you will need to use a decent balance charger, such as an imax B6. These are generally for lipo batteries, used in radio controlled quad copters or planes. The benefit of a charger like this is that it will balance the cells out and has lots of monitoring and protection built in. Follow the instructions in the charger manual closely.

    Testing

    Once charged, leave your pack for a while, even a month, testing the voltages periodically. If you have a dead cell, then it can manifest as one of the parallel sets slowly loosing charge. When this happens, you’ll have to dismantle the battery and retest all the cells.

    If you have the time, you can also do a full discharge test with the charger on the battery to get an accurate reading of its capacity. This will take a long time if you’ve made a big battery, depending on the charger you use. If you aren’t overly bothered about an accurate capacity test, just run the battery in the droid (or whatever other use) and monitor the voltage. Don’t let the voltage go down below 3*<number in series> (eg, a 6s should never be let to dip below 18v). To prolong the life of the battery, don’t even let it go that far. Full charge/discharge cycles are the worst case for wear on them, and will shorten the lifespan. I recommend discharging it to around 40-50%, at least on the first try.

    After the first discharge, check the balance of the cells again. Ideally there should be little difference between them in a fully functional battery pack. If there is significant difference (IMHO, 0.1v between the highest and lowest voltage) then you may have a bad cell somewhere. Do another balanced charge and discharge cycle and see if the same cell has troubles. If it does, rip it apart and try again.

    If the battery remains balanced, then you can actually use a none balance charger (cheaper, and usually higher current for rapid charging) for most charge cycles. Tho make sure it is balanced occasionally and no harm in doing a slow balanced charge once in a while.

    Conclusion/Notes

    Using 18650 cells gives you great flexibility in not only the size (voltage and Ah), but also the shape. This example has shown creating standard blocks, but with some creativity you can make a battery that follows a certain shape (ie, follows the outer curve of an R2 unit’s interior). If you want to make use of recycled cells, then this is a very cheap option to get some very high capacity batteries built. Even buying brand new cells will still save you a lot of money.

    For example, I’m currently building a 6s12p pack using NCR18650B cells. I’m getting these for approx £3 a cell. That makes the total cost of cells £216, which gets me a 24V/40Ah capacity battery in a fairly small form factor that can give out nearly 80A (my droid barely pulls 10A at full speed!). I doubt I could fit enough SLA batteries in my droid to get that, and a similar capacity of LiFePO4 would set me back about £800. Even taking into account the cost of a spot welder (which can be used many times of course) its double the price.

    Further research

    One thing I haven’t covered in this article is a BMS. This is a Battery Management System makes sure nothing is going wrong with it, and will cut off the output when the battery gets too low. I’m still researching these myself, and will possibly mess with them on my next pack. IMHO, if you are keeping an eye on the battery voltage during use and doing periodic balance tests and charges, then a BMS is not necessary.

    Also note that capacity of the cells will drop over time, depending on number of cycles, how deeply they were charged/discharged, and how rapidly they were discharged. Take care of the battery, and it will last longer, drain it constantly at high current and it will be dead within a few hundred cycles.