Apr 212017
 

There are many options for powering 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

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

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.

Construction

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

     

  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

     

  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.

    Here is a 6s11p pack, with all the parallel sets connected up using a spot welder

     

  5. To give the desired voltage, we have to connect the series sets up so that they are -ve to +ve.

    A 6s pack, with nickel strips in place, leaving the main -ve and +ve at opposite sides

    Here is a completed 7s6p pack, with badly soldered connections. The negative it on the last set on the right on the bottom, the positive is first set on the left on the top. Ideally there should be more connections between the parallel set to give the current more room to flow

     

  6. At this point, you can test the voltages of each parallel set, and the total overall voltage of the pack.
  7. Next solder on the the main power connector. Make sure that the wire and connector can handle the expected current.
  8. The balance lead needs to connect between each parallel set, and also the main +ve and -ve terminals. The balance lead will have one wire to designate either the main positive or main negative. ie, if all bar one wire is red, and the last is black, then the black goes to the negative. If they’re all black apart from one red one, the red goes to the positive. There isn’t really a standard for these things as far as I can tell.
  9. Thats the pack all finished. Last step is to wrap it up in something. I use some large gauge heat shrink (from aliexpress.com) and insulating tape to seal it all up. The main reason for this is to stop anything accidentally falling across a couple of terminals, arc welding itself in place, massively discharging the cells, and setting alight. Generally not a good thing to happen.

    A finished battery pack, having a balance charge from an imax B8

Charging/Testing

You will want to thoroughly test the pack, especially if made from used cells. Check the total voltage on the main power connector and make sure it is within the range expected (from 3*<number in series> to 4.2*<number in series>). Then check each individual parallel set using the balance lead. Measure between each adjacent set of pins on the balance connector and you should get a value between 3 and 4.2, depending on the charge left in them after initial testing. Note, if one cell in the parallel set was at 4.2, and the rest at something like 3.7, then the higher charged cell will actually charge the rest of the cells until they are all at equilibrium. First battery pack I made got a little warm as this happened. Ideally, make sure all cells are at the same voltage before construction.

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.

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.

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. If this happens, you’ll have to dismantle the battery and retest all the cells in that set to find the bad one and replace it.

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.

One thing I haven’t covered in this article is a BMS. This is a Battery Management System, which monitors the battery, 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.

 

Apr 192017
 

The day finally arrived. I was going to show off R2 to the public. Up until this point, he’d not been out of the garage and only had a handful of visitors (including a few local kids… ‘have you got an R2D2 in your garage?!). I was a little nervous.

I’d only arrived home at about midnight the night before after having left a convention early (unheard of! Miss the survivors photo! What?!), not to mention I’d been in the convention hotel for 10 days by that point. After contacting the organiser of Morecambe Comic Con, he had said I could get there early to avoid the crowds and find a safe spot for R2. This meant being up, ready, loaded, and in Morecambe by 9am! One slight issue, well many issues with that time, but the main one being I hadn’t actually tried to load R2 into my car at all yet. I knew from measurements that he wouldn’t fit in in three legged mode, which was one of the reasons I’d built his sled. I also knew that the sled made it nice and easy to get him stood up in two leg mode. So all that was left was to see if the sled would hold up and get him into the car.

Success!

He fitted. Was a two person job unfortunately, but I have a few ideas to make it easier, and hopefully turn it into a single person job for the next event.

I managed to get to The Platform in Morecambe at about 8:55am, and hunted down the organiser. Thankfully Joy had followed me down, so helped me unload R2 infront of the Platform. Switching him from two leg mode to three leg isn’t too hard, 8 nuts to tighten on the shoulders, and some ankle locks to put in place on the feet. Unfortunately I had forgotten the spanner to tighten the nuts so had to get them as tight as possible by hand. Then came the fun of getting him in the building. The pavement surface outside was not conducive to operating an astromech. For something supposedly highly advanced, he doesn’t like to run on anything but a smooth surface. So, with a bit of lifting and a bit of dragging R2 entered the building. Thankfully once inside the floor was nice and smooth, perfect for R2 to have a wander.

As I brought him in and scouted out the place, I encountered a few handling problems. It appeared that I’d lost one of the shims from a foot which meant one of his drive wheels wasn’t getting the grip it should. This led to him veering off to the right all the time and at one point he encountered a stall and destroyed a lego figure! After apologising profusely, I found a corner to sit him in and waited for the crowds to appear.

Right about 10am, the doors opened for early access and I decided to move to the now closed fire escape. Up to this point, it had been open for people to bring their wares in for the stalls. Now it was a nice empty space to place R2.
Slowly the place started to fill up and R2 had his first visitors. The day started to just fly by after that. I just loved the reactions he was getting from people of all ages. It was so enjoyable to make people jump a little when he moved over to them, and I slowly got used to the controls and being able to give him a little personality. Up to this point, I’d only had a tiny space in my garage to move him, now I had a much larger area and could try a few different things. Kids seemed to love him, sometimes a little too much, but I’d already decided to work on the premise that if they managed to break something then I need to make it stronger. R2 should be a bit interactive. Tho there were times when I wished I had the cattle prod attachment on him. He got plenty of tugs on the HPs, and a few extra spins of the dome, and I managed not to trap any inquisitive fingers in the dome panels when they opened. One little girl however didn’t like him waving at her with a utility arm. I loved some of the cosplay at the event too, there were some fantastic costumes on show, including a friend of mine who came as Kylo Ren and hung around for pictures.

R2 playing nicely with Kylo

I tried to stay out of the way as much as possible as it breaks the magic if they see the wizard behind the curtain, or rather the guy holding the controller. When I was spotted, quite a few people were amused at the fact I was using a standard PS3 controller to operate him. A few people wanted to know how he worked, or more details about the build, which I was more than happy to supply. Possibly a bit too much information was given at times, but they were polite enough to keep smiling whilst I talked.

At one point, I was even interviewed by a reporter from the local newspaper. She asked a few questions and took a short video of R2 doing some spins, and uploaded it to their facebook page. The main site had an article released today, and I was mentioned and quoted in it.

I had a few friends come and visit me too, after all I had been talking about R2 so much over the last few years they wanted to actually come and see what I had been wittering on about. I’d like to apologise now for the nonstop talk of R2. Most who saw him agreed it was a worthwhile project!

Trying to hire R2 as an Auror

There was an issue with the main dome drive, which I gave up trying to fix towards the end of the day, but noone seemed to notice that he wasn’t turning his head much. I was pleasantly surprised by the battery, which after a full day of entertaining was only just down to below half capacity. Also, taking him back to the car over the rough surface outside shook a few parts off him finally. I knew something would end up falling off, but they held on all day at least!

R2 gets the ladies…

Already hoping to be at another event on Star Wars day, a May the Fourth event at Southport Vue cinema. Just need to get his MOT and my driving test, so he can be an official Builders Club droid. I’ll should have the door panels finished for the next event too.

Apr 192017
 

This year has been a bit busy so far, and in February I realised I only had something like three free weekends to get R2 ready for his first outing, Morecambe Comic Con, a deadline I was determined to keep. Between conventions, work trips, and more conventions (including two on back to back weekends), I knew I had a lot of work to do in a short time. Thankfully, with a bit of organisation and a few late nights I finally managed to get him to a showable state. Not quite to the level I wanted, but close enough.

I utilised Github’s issue and project management tools to help organise myself, putting issues in as todo items, as well as logging things that I found were wrong as I went along. This actually helped quite a bit, and I’m going to endeavour to keep using it. I slowly managed to close off some of the items, and R2 was getting more and more complete. I managed to get the electronics and code to a level where it was stable and he wasn’t too fast to react. Had a few dicey moments when direction changes at high speed made him teeter on the edge of doing a faceplant.

And more bits were added, I got his skirt installed finally, after having bought it nearly a year ago. This however involved some fairly major dismantling of R2, which in turn meant I had to finally get the sled finished for him. Overall, I’m quite pleased with the sled, and it allowed me to lay him down gently and take his legs off to get into the base of the frame.

With the skirt all painted and in place, it was time to test the electronics with his new battery. Up to this point I’d been using a couple of SLA batteries, but these were heavy and didn’t fit in properly. Not to mention they were very low capacity. Over the last year I had been collecting old laptop batteries from various sources, and stripping them down to get the 18650 cells out of them. Once I’d tested the cells and selected the decent ones, I made a new battery pack (6s11p) which should provide 24V, with about 22Ah of capacity. A bit of metal folding and riveting, and R2 also had a battery box.

A quick reassembly, and he was back on all three wheels, ready for the final touches. However, time was getting very short indeed by this point. I had one weekend and a few evenings to get the panels on the doors, and to sort out a few other annoying little details. I’d had the idea of using sheet steel for the doors, but had trouble putting the correct curve into the metal to make it sit nicely in the door areas. If I can get this right, then the doors can be attached easily with magnets to the hinge areas, letting me remove them so I can still get the skin off if needs be. Without the right curve tho, this just didn’t work and looked rather poor. Unfortunately, with no time left I simple hot glued them in place, so that at least there was something there. There wasn’t even enough time to paint one of the panels, so was left bare. 

On my last evening to work on him, I made the decision to change the dome drive mechanism. I’d got a new, more powerful motor, but this gave me troubles with the friction drive in that the rubber ring was coming off. I did have a dome gear set, and decided to try that out (once I’d found it. The garage is a bit untidy). Turned out this was a bad idea. The motor gear is only a thin piece of aluminium, and you have to get it exactly in line with the equally thin main gear. With more time (and the correct cad file) I’ll laser cut a much thicker motor gear out of acrylic. This will make it both easier to mesh the two gears, and also a little quieter hopefully.

So, at about 1am I called him finished and went to bed. I was due to set off to a convention the next day in London. To make it even more complicated, there was another convention the weekend after in the same hotel. Rather than drive home, just to drive back again a couple of days later, I opted to stay down in London. I would’ve got another couple of evenings to do more work, but in the end I decided it was the better option.

All I had left to do was get to the convention

Apr 102016
 

Ok, so remote means just a few meters away, either in the house or in the car. Somewhere warm anyway.

So, as mentioned in my previous post, I’d done a lot of research, and one of the things I came across was this video:

This is what I want to be able to do. I’ll never have the room for an actual observatory like this one, but I could at least automate a lot of the work. That’ll scratch at least two, maybe three, of my geek itches. Of course, everything has to be Linux based, and also as cheap as possible. With that, I decided on at least the following to start with:

  • AstroEQ – Definitely needed goto support on my EQ5 mount to start with.Fully made systems can be bought (minus steppers and mounting hardware), but I already had most of the parts laying around the place so decided to make it myself using an Arduino Mega
  • Indilib – This, running on a raspberry pi acts as a remote control server for anything that I wanted to add. All devices had to be supported, or easy enough for me to add with my limited programming skills.
  • Guide Scope – These are used to ‘lock’ onto a star and make sure that the telescope mount follows it precisely. Long exposures of up to even 30 minutes can then be achieved without too much difficulty. Initial plans are to try and use the Raspberry Pi camera (will try both standard and NoIR) versions.
  • Focuser – Last essential part for remote control is the ability to focus the telescope. This will use the DSLR attached and a stepper motor coupled to the focus knob. There are a couple of arduino based projects that emulate the MoonLite protocol, which is supported by indilib.

Once I’m happy with this lot (and I *will* blog my progress) and have some of my other projects finished (*cough* R2), then I want to take a look at a couple of other add ons such as:

  • Filter wheels – I can use kstars to take many photos with different filters in place, and also with a black filter I can automatically take dark frames for stacking images. (Dark frames are used to remove noise in the picture that is generated by the DSLR)
  • Auto lens cap – A simple servo driver to cover the telescope main lens. Not really necessary, but figured it would be a nice project.

I should be able to do all of this fairly easily. I already have most of the components necessary, and the software running on my workbench. One of the big issues I’ll need to work on is just how to mount it all to the scope and stop the cables getting tangled!

My next blog should be on building and configuring the AstroEQ.

Apr 052016
 

Hi, my name is Darren and I’m a serial hobbiest.

Well maybe not that bad, most of my hobbies are pretty much related (electronics, computers, science), and a lot are things I’ve been interested in since I was a kid. Most recently, I’ve invested in a fairly decent telescope and mount to do some visual astronomy, but more for astrophotography. I want to take pretty pictures of things very far away! So after a lot of reading of various blogs and websites (Star Gazers Lounge forum is fantastic), and watching numerous youtube videos, I got a tripod for my camera and a couple of cheap lenses off eBay. That is all that is needed and you can get some half decent shots.

My astrophotography album

But it wasn’t enough. So I dove back into the forums and did even more research, and learnt a few important things.

  • Telescope – Numerous different types, mainly split into reflectors, refractors, and catadioptric. All have their benefits and downsides, but for doing astrophotography the telescope isn’t the most important item surprisingly.
  • Mount – This, for astrophotography, is the most important thing to get right.You need to have a solid mount for doing anything more than a few seconds exposure, and one with tracking in Right Ascension at least, to track the stars. And it really needs to be an equatorial mount to avoid rotation of the starfield as it rotates.
  • Eyepieces – You need eye pieces to view through a telescope, and the shorter the focal length, the greater the magnification. These are generally only used for visual astronomy, as cameras bypass the need.
  • Camera – Most DSLR cameras block out a large part of the infra red by design, but you can get them modified to remove this filter and get much more vibrant images. Its not a necessity, but definitely a nice to have.

Whilst learning all this, I had a thought in my head about some form of computer control (Linux based, of course) and actually stumbled upon a few projects to help with this. The first was AstroEQ which was an opensource ‘Goto’ system (select a star, and the telescope will automatically move to center on it) designed around an arduino. That was a perfect start for me, and I was pretty sure I could get it working from Linux. Thats when I discovered indilib!

Indilib is an open source system for controlling all sorts of astronomical instrumentation, not just goto mounts, but also things like auto focusers, digital camera, filter wheels, and other custom devices you may want. Even better, all this can be run from a Raspberry Pi as the control server and a laptop using the actual astronomy software. This would mean I could set it all up, and retreat to somewhere a little warmer to actually do my observations and photography. I’m sure this is against the amateur astronomers code or something, but damn it gets cold out there.

Along with indilib, there is kstars. This is a planetarium program written for the K Desktop Environment, and with EKOS plugin can control any indilib hardware. Not only that, it can schedule work and sequences, and help you plan your observations.

I’m going to (try to) write more blog posts chronicling my progress on getting all this set up, and some HowTo posts on using indilib on a raspberry pi, with kstars, and any custom hardware I make.