Collecting the battery dimensions into a table should make it easier to generate new holders for astable multivibrators:
//- Battery dimensions - rationalized from several samples // Coordinate origin at battery end with contacts, key openings downward T_NAME = 0; T_SIZE = 1; T_CONTACTS = 2; T_KEYS = 3; BatteryData = [ ["NP-BX1",[43.0,30.0,9.5],[[-0.75,6.0,6.2],[-0.75,16.0,6.2]],[[1.70,3.70,2.90],[1.70,3.60,2.90]]], ["NB-5L", [45.0,32.0,8.0],[[-0.82,4.5,3.5],[-0.82,11.0,3.5]],[[2.2,0.75,2.0],[2.2,2.8,2.0]]], ["NB-6L",[42.5,35.5,7.0],[[-0.85,5.50,3.05],[-0.85,11.90,3.05]],[[2.0,0.70,2.8],[2.0,2.00,2.8]]], ]; echo(str("Battery: ",BatteryName)); BatteryIndex = search([BatteryName],BatteryData,1,0); echo(str(" Index: ",BatteryIndex)); BatterySize = BatteryData[BatteryIndex][T_SIZE]; // X = length, Y = width, Z = thickness echo(str(" Size: ",BatterySize)); Contacts = BatteryData[BatteryIndex][T_CONTACTS]; // relative to battery edge, front, and bottom echo(str(" Contacts: ",Contacts)); ContactOC = Contacts.y - Contacts.y; // + and - terminals for pogo pin contacts ContactCenter = Contacts.y + ContactOC/2; KeyBlocks = BatteryData[BatteryIndex][T_KEYS]; // recesses in battery face set X position echo(str(" Keys: ",KeyBlocks));
A new boolean,
RGBCircuit, adds a second pair of wire strut bases and punches holes in them:
Which looks about like you’d expect in real life:
The lettering, of course, doesn’t come through clearly, but it suffices as a hint for which battery to use.
The four vertical struts will support three astable multivibrators, each driving one color of a common-anode RGB LED. It remains to be seen if there’s enough room for all the parts along the sides of the battery pack.
The OpenSCAD source code as a GitHub Gist: