Sunday, May 21, 2017

How I installed lighting in my coaches



Introduction

 Having just finished detailing the interiors of my Leek and Manifold Railway (ish) coaches (see How I made interiors for my coaches) and modified some figures to sit inside them (see How I modified some cheap figures for the 1930s), I thought it might be opportune to install some lighting in them. I thought of various ways it could be done such as using a bus-bar as I had done on my Ford(ish) railcar (see How I bashed some Andel coaches into a railcar). However, some time ago I had bought some lighting boards cheaply on eBay which were supposed to work off track power, so I decided to use these as the basis for my lighting circuitry.


Preparing the lighting strips

The first job was to remove all the components from the perforated boards. For some reason, the LEDs were wired in series and so, as I wanted to run them from a 3v supply, I needed to rewire them. The components (ie rectifier, voltage regulator, capacitor) were redundant and so were relegated to the spares box.


The LEDs were wired in parallel and trailing leads added to one end.


I now needed to decide on which batteries I would use and how the lighting would be switched on and off

Batteries and switches

Option 1 - Alkaline batteries and manual switch

My first idea was to keep things very simple. Power the lights with two AAA alkaline batteries and switch them on and off with a latching push-button switch.

The lighting strips were fixed under the roof with BluTak and the switch contacts were soldered directly to the contacts on the battery box.

The battery box was then attached to the underside of the roof with BluTak.

NOTE: Subsequently, I discovered that when the sun shone (a rare occurrence in this part of the world), the BluTak softened and was insufficient to hold the battery box in place, and so the BluTak was replaced with Gaffa Tape.

Of course, this meant the roof had to be removed each time I wanted to turn the lights on or off, but it also meant that, as all the wiring was attached only to the roof section, there were no trailing wires between the roof and the rest of the coach body.

However,I was not entirely happy with this arrangement. Although I fixed the rood in place with magnets to make it easily removable, I wanted some way of turning the lights on and off without having to remove the roof each time. The magnets gave me an idea.


Option 2 - Latching reed switch and alkaline batteries

As I did not want the switch to be visible on the roof, and I didn't want wires leading down from the roof to the body of the coach, I needed a method of operating the lights remotely. Radio control was an option, but expensive, whereas reed switches could be triggered with a magnet. However, reed switches only provide momentary switching so I searched the internet for simple electronic circuit which would provide latching on/off switching. There were some available, but these were quite complicated affairs - I much prefer the simple (and cheap!).

My mate, Greg, in Australia drew my attention to some very cheap electronic modules which provided latching outputs from a momentary trigger.

At just over £1.00 each (including postage), they were a lot cheaper than I could make from discrete components - and so I sent off for a few.

There were other versions available and I also considered latching Hall Effect integrated circuit chips, but the residual current drain (ie how much current they consume when 'off') was 60uA, whereas the residual current drain on these modules is 'less than 2uA, according the blurb on the eBay page.

When they arrived (by slow boat, it seemed), I wired one up on a small piece of Veroboard with a reed switch connected between the 0v and Trigger inputs.

This was then connected to the battery box and the lights.

The wiring is minimal - the Veroboard is not essential but, as reed switches are very delicate, I wanted to provide some sort of protection against accidental damage.


In the coaches, there are six LEDs wired in parallel, but these have been omitted for clarity.

Option 3 - Magnetically operated switch with a 3.7v rechargeable li-ion cell

For the third (brake end) coach, I decided to explore the feasibility of using a rechargeable 3.7v li-ion cell. I made up a small circuit board as above, but included a 2A polyswitch to protect against accidental sort circuits.

This was wired-in between the positive lead from the li-ion cell and the +ve input leg of the flip flip module.

However, I realised I also needed to include a 1S li-ion battery protection board in the circuit, to protect the li-ion battery from becoming over-discharged. Li-ion batteries must never fall below a charge of 2.7v otherwise they become permanently damaged and so some form of electronic protection needs to be included to prevent this from happening.
 
A 1S protection board was acquired (via eBay) and wired-up - two leads to the li-ion cell and two leads to the flop flop module board.

The cell and protection board were then wired-up with the module and LED boards.

Once everything had been tested, I made a box for the li-ion cell from black 1.5mm plasticard .....

 A 2.1mm DC socket was included in one end of the box ........

 ...... and wired-up .......

....... so it could be used to recharge the battery. All the leads and the battery protection circuit board were shrouded in heatshrink sleeving to help avoid accidental short circuits.

The battery box was assembled .......

...... and then wired back into the main circuit,

The battery box was fixed beneath the floor of the coach ......

 ..... giving plenty of clearance between it and the track.



....... and the leads from it connected to the rest of the circuitry with a 2 pole micro JST connector ......

..... enabling the roof to be removed completely if the need should arise.

Conclusion

In all three coaches, the lights are now switched on and off by waving a magnet over the coach roofs.

The reed switches have proven to be very sensitive and the magnet needs only to be waved in its general vicinity for the lights to come on (see video below).

I may increase the value of the resistor in the LED circuits, to reduce the current to the lamps. In the dark, they seem to be a lot brighter than the lighting which would have been available in the original coaches. This will have the added advantage of increasing the 'life' of the batteries before needing replacement or recharging.

I will be interested to find out how long the batteries do last. I imagine they will last longer than a year given that the current drain on them is so low. However, field-testing will enable me to put a more definitive figure on that. In the meantime, I am very pleased with how the coaches look - I now need to consider ways of lighting the station buildings and platforms as I now have good reason to run night trains.

Wednesday, May 17, 2017

Quick introduction to the iMax B6 charger

 Contents

Introduction

The iMax B6 battery charger has undoubtedly become the most widely used charger in the world of radio controlled modelling. It is versatile, cheap and very effective in safely handling all sorts of battery types. However, its versatility can mean that its operation seems very daunting for the uninitiated, particularly as the manual tends to assume the user already has a fair amount of background knowledge. Having been using an iMax B6 charger successfully for around five years, I feel confident enough to share the knowledge I have accumulated by putting together this little introductory guide.

This is not intended to be a comprehensive explanation of all the features inherent in the charger - but hopefully should be sufficient to get you started. I have focused on two types of rechargeable battery - NiMh and Li-ion as these are the ones garden railway modellers are most likely to encounter and those which I am presently using in my locos. The general principles set out here apply to the other types of battery which the charger can handle. For more information about various types of battery and how they can be used to power model locos see A quick introduction to batteries for model trains and  Getting Started with Battery power and radio control

I am also concentrating here on Version 1 of the charger. This is deliberate. I feel that the iMax B6 Version 2 charger has been made unnecessarily complicated for novice users. The guidance provided here will help V2 users, but you will encounter some differences - for example, Version 2 will only charge li-ion batteries if a balance charge lead is connected even when in LiPo Charge mode (see below).

Let's get started.

Preparing the charger

When your charger arrives, it should come in a box....

..... and include a manual and a collection of leads.

 The charger can be mains powered (as in this case) or powered from a 12v supply such as a transformer or a car battery (very handy if you are in the middle of a field and want to recharge your model boat or aeroplane).

All my locos have built-in battery packs which are charged primarily through 2.1mm DC sockets. The charger comes with a 2.1mm DC plug connected to crocodile clips. To connect the charger to this lead requires the connection of the main charge lead (with red and black banana plugs), to the sockets on the side of the charger.

The 2.1mm plug lead can then be connected to this lead using the other set of crocodile leads. Not very elegant but functional. You need to make sure the crocodile clips don't accidentally short circuit with each other, of course.

The charger comes with a range of standard connectors and so it should be possible to find some way of connecting it to most common configurations of battery lead.

We are now ready to start charging - provided you know what sort of battery pack lies within your loco. For more information on batteries for garden railway locos see (A Quick Introduction to Batteries for Model Trains)

Charging 

NOTE: It is advisable to always connect your iMax B6 to its power supply before connecting it to your battery pack. As cells and battery packs inevitably hold a charge, you could risk damaging the components in your charger if current flows to the charger through its charging leads before the charger has been powered-up.

NiMh battery packs

Nickel Metal Hydride (NiMh) batteries are very popular as a power source for garden railway locos. They come in standard AA, AAA, C and D sized cells and are also available as ready-made packs from suppliers such as Strikalite.

To set up the charger for a NiMh battery pack, the charger needs to be connected to its power supply and also to the battery pack, in my case through the 2.1mm DC socket which I have positioned on the base of this loco.


The display on the charger will show whatever was on the screen the last time it was used (which can be handy if you use only one type of battery pack for all your locos). Let's assume it shows something like this when it is turned on.

This is telling us the charger is presently set-up to charge a lithium ion (LiPo) battery pack rated at 7.4v (ie containing two 3.7v cells in series (ie 2S)). It will be charging them at a rate of 0.1 Amps.

Clearly, we need to re-set the charger so it is ready to charge our NiMh pack.

Press the Batt. Type / Stop button a few times. 

The display will show the charger cycling though various settings. Keep clicking the button until the screen shows you have reached the NiMh Batt section (don't worry if you go past this option, just keep clicking the button again until this option cycles round again).

Now press the Start / Enter button to select this option

The display will now show that the charger is ready to charge NiMh batteries. My charger is also showing it will be charging them at a rate of 0.1 Amps.

I tend to charge all my batteries at a rate of 0.5 Amps - this takes less time than charging at 0.1 Amp but, to my mind, is not too quick.  

The faster you charge batteries the more stress you put them under which tends to decrease their working life. As a rule of thumb, you should never charge a cell at more than its amp-hour capacity. For example, a battery pack made from 2300mAh (ie 2.3Ah) cells should be charged at somewhere under 2.3 amps. As the amp hour rating of some batteries is at best optimistic and at worst downright misleading, then it is safer to never exceed half the stated Ah rating of a cell - so for a 2.3Ah call, my suggested maximum level of charging would be around 1.25 Amps. The smallest capacity batteries which I use are rated at 900mAh (ie 0.9Ah). So, using a default value of 0.5 Amps is within the safety margins of the vast majority of my batteries and cells.

To change the rate at which the pack charges, press the Start / Enter button again and the amps value should start flashing. Now use the Inc. button to increase this value (or the Dec. button to decrease it). Press the Start / Enter button when it reaches 0.5A (or whatever value you prefer) to 'enter' this value into the charger.

You are now ready to charge your batteries. Press and hold down the Start / Enter button for around three seconds, until the charger beeps and goes into charge mode. The display should change to show the status of the charging process, such as this.

My display shows I am charging a NiMh battery pack at 0.5Amps which presently has a charge of 4.41 volts. The charger automatically detects the number of cells in the pack and adjusts the charge voltage accordingly. My pack comprises three NiMh cells (ie 4.6v) and so the charger has detected the voltage the cells are currently holding. This value will vary during the charge process as the state of charge changes.

Leave the charger running - but keep checking it.

You should never leave the charger running unattended. Although it has many built-in safety features, any type of battery pack can overheat or accidentally short circuit. If you want to stop the charging process at any time press the Batt. Type / Stop button. You can always resume the charging process by going through the above procedure once more. NiCad cells and batteries suffer from something called 'memory effect' which means they have to be completely discharged at regular intervals before being recharged. NiMh cells do not suffer from this affliction and neither do lithium-ion cells which should NEVER be discharged below a level of around 3 volts (2.7v is the absolute lowest safe level) otherwise they will become permanently damaged.

When the battery pack has reached its optimum charge, the charger will automatically stop and beep a few times. The display will show something like this ......

...... indicating that the pack is FULL and (in my case), the present charge rate is 0.0 Amps (ie it has stopped charging), the pack's charge is 4.88 volts, it took 180 minutes and 44 seconds to charge and delivered 1424 mA. The charging process is now complete and so the charger can be disconnected and switched off.

If you find that charging has stopped but the display does not show FULL, then check the Error Messages section below. 

Charging li-ion packs

There are two ways of charging a li-ion pack with this version of the charger - Charge mode and Balance charge mode. This section deals with Charge mode - the following section deals with Balance charging. For more information about balance charging see A Quick Introduction to Batteries for Model Trains


Connect the charger to the power supply and the loco as previously .....

In my case, I am charging my Simplex loco which has two AA sized li-ion batteries connected in parallel (ie 3.7v output but twice the capacity).

 Keep pressing the Batt. Type / Stop button until the display shows you are being offered the LiPo BATT mode.

Press the Start / Enter button to accept this mode.

If the display doesn't show LiPo CHARGE, press the Inc. or Dec. buttons until it does.

 We need to set up the charging parameters to match the size of pack in the loco. In my case, the battery pack is 3.7v (1S) and I want to charge at a maximum of 0.5Amps.

Press the Start / Enter button and the Amps value will start to flash. Now press the Inc. or Dec. button to change the value to 0.5A.

Press the Start / Enter button to accept this value and the voltage value will now start flashing. In my case, I needed to change this value to 3.7v (1S), and so I pressed the Dec. button once. You will need to press the Inc. or Dec. button to change the value to the correct one for the size of your pack.

Press Start / Enter to accept this value.

To start the charge process, press and hold down the Start / Enter button for around three seconds. The charger will beep and the display will change. For my loco, the display showed this ...

R: 1SER shows that the charger has detected that a 1S pack is connected and S: 1SER shows that I set the charger for 1S.

To confirm these settings, press the Start / Enter button. If the settings are incorrect, press the Batt. Type / Stop button and reprogram the settings as above. Alternatively, if the charger is showing a lower value for the pack than you were expecting then something may be wrong with the pack - maybe a lead has become loose inside the pack or one of the cells has failed.

Assuming everything is OK and you have pressed the Start / Enter button, the display should now show the status of the charge.

 Li1S shows we are charging a 1S li-ion pack, at present the charger is charging at a rate of 0.3A (this value will vary through the charge, slowly decreasing in value to zero). The present level of charge in the pack is 4.2 volts and around 15 seconds have passed (difficult to snap a constantly changing value). At present 1mA has been passed from the charger to the battery pack.

When the charger detects that charging is complete, it will beep and display something similar to this....

... showing that in this particular case, the battery pack is FULL, the charge rate is now 0 Amps (as you would expect - charging has stopped) and the voltage of the pack is 4.2 volts. It took 34min and 30 seconds to charge the pack with 101mA being passed into the pack.

If charging has stopped and the display does not show FULL, then check the Error Messages section below.

Balance Charging a li-ion pack

It is advisable to balance charge a li-ion pack from time to time to ensure that all the cells in the pack are equally charged. For more information on balance charging and wiring up packs for balance charging see A Quick Introduction to Batteries for Model Trains.

Before setting up the charger, the loco needs to be connected to the charger with the main charging lead and the relevant balance charge lead. In this example, the loco contains a 3S pack (ie three 3.7v li-ion cells connected in series, giving 11.1 volts). A four-pin JST-XH (3S) balance charge lead is connected to the relevant socket on the side of the charger .......

...... and plugged into the balance charge lead on the loco. The main charge lead is also connected from the charger to the battery, in this example through a 2.1mm DC socket.

By pressing the Batt. Type / Stop button a few times the display eventually offers LiPo BATT mode.

Pressing Start / Enter puts the charger into this mode.

We now need to change from LiPo CHARGE mode to LiPo BALANCE mode. Press the Inc or Dec. button until the display shows LiPo BALANCE

 As my battery pack was 11.1v and I want to charge at a maximum rate of 0.5A, I needed to change these settings.

 Pressing the Start / Enter button once causes the Amps value to flash. By pressing the Inc. or Dec. buttons this value can be changed. In my case, I changed it to 0.5A. Pressing the Start / Enter button again accepts this value and makes the Voltage value flash.

Using the Inc. or Dec. button, the voltage value can be changed. As my pack was 11.1 volts, I incremented the value until it showed 11.1v (3S) and then pressed the Start / Enter button to accept this value.

The charger was now ready to start the balance charging process. Press the Start / Enter button  for around three seconds until the charger beeps and the display shows (or something similar) .......

This shows that my charger has detected a 3S pack is connected (R: 3SER)  and that I have set it up to charge a 3S pack (S: 3SER). As the two match, I pressed Start / Enter to start the charging process.


My display now showed ......

This tells me that the charger is in the process of charging a lithium ion 3S battery pack (Li3S), at a rate of 0.5 Amps (0.5A) and the present voltage of the pack is 11.71 volts (11.71V). It is Balance charging (BAL) and so far 8 seconds (000:08) have elapsed and around 2mA (00002) have been passed to the pack. Note that these values change according to the state of the pack - the amps will gradually fall to zero as the pack increases its level of charge.

By pressing the Inc. button, the charge status of each cell in the pack can be seen - in this case the first cell in the pack is 3.82 volts, the second cell is 3.83 volts and the third cell is also 3.83 volts. Pressing the Inc. button again will take the display back to the previous screen.


Charging will continue automatically until the charger senses that the pack has reached its maximum charge. It will then beep a few times and the display will show something like this ......

This shows that the battery pack is FULL, the present charge rate is 0.0 Amps (ie charging has stopped), the pack now has a charge of 12.6 volts, it was BALance charged, charging took 100 minutes and 59 seconds and 417 milliamps were transferred from the charger to the battery pack.

Pressing the Inc. (or Dec.) button will change the display to show the state of charge of each battery when charging finished.

As you can see, two of the cells are 4.2 volts and one is 4.19 volts. If these figures were widely discrepant you would know that one or more of the cells was failing.

WARNING - Do not disconnect the charger from its power supply before disconnecting the balance charge lead from the battery pack. The voltage from the the battery pack may fry the electronics in your charger.

If charging has stopped and the display does not show FULL, then check the error messages section below.

Error messages

There are more error messages listed in the manual, but these are the ones most likely to occur.

TIME
This is not really an error but may occur if a battery pack takes a long time to charge up.
 The charger has an inbuilt timer which will stop the charging process after 120 minutes (by default). If this happens, press the Batt. Type / Stop button and then reset the charger to start charging once more (as above).

The "Safety Timer" period can be changed by going to the settings section of the charger - press the Batt. Type / Stop button until the USER SET / PROGRAM section shows up, press Start / Enter to enter this section and then keep pressing the Inc. or Dec. buttons until the Safety Timer section is reached and then press the Start / Enter button and then the Inc.or Dec. buttons to change the value). You can also change other settings in this section but if you are unsure it is advisable to stick with the default settings for the charger.

 Connection Break
 The main charge lead is not properly connected. Check that the plugs are properly inserted or the leads inside the loco are not loose.

Cell Connect
You are in Balance Charge mode and the balance charge lead is not connected or there is a problem with it.
Check the balance charge plugs are properly inserted or one of the leads in the battery pack has not become disconnected.

Over (or Under) Voltage
The voltage has been set incorrectly (for Li-ion and LiPo batteries).
 Check you have set the voltage correctly for the pack which is inside the loco.

Conclusion

I hope you have found this brief introduction useful. As indicated in the introduction, it is not intended to be a comprehensive guide, just something to get your started. If your loco is powered by a lead acid battery then you need to put the charger into Pb mode or if you are using Nickel Cadmium batteries then it needs to go into NiCd mode. The settings for these batteries and packs will be similar to those in the NiMh section above. I have not included specific sections on these batteries as none of my locos presently use these batteries.

The charger has many other features such as capabilities to safely discharge batteries, recycle the charge of batteries or charge batteries so they are in a condition to be safely stored for a period of time. Hopefully, armed with the above information you should be able to work out how to use these features and maybe make some sense of the manual which comes with the charger.

The iMax B6 comes in many different guises - some are genuine re-badged clones of the original and there are many 'fake' versions. However, they all work in broadly similar ways and so you should find that the above instructions will work with the vast majority of iMax B6 derivatives.

 I have tried to cover the basics but, if you spot any inaccuracies or omissions, then please let me know via the comments section below.

Happy charging!