Changing the threshold of a LED-Battery indicator

A few years ago I bought some Battery indicators on Aliexpress. They are sold for different battery configurations, mine says 13.2..16.8V, so its most likely for 4S LiPo. The part apparently is called XW228DKFR4.

Aliexpress product image

But now I have a 8S LiFePo pack and want to modify it to match its voltage. LiFePo has a rather flat voltage over its state-of-charge, so most likely this will not work well. But it sure is better than no indicator. So I took a closer look so I can change the circuit to work with about double the voltage.

I made a picture of the board, and traced it in KiCad.

Reverse engineered PCB
Reverse engineered Schematic

The schematic is quite simple:

  • A protection diode on the input
  • Reference-Voltage generation using a 431 type
  • A four-tap voltage divider
  • A quad OpAmp used as comparator

So to make it work with out new voltage range, we just need to adjust the voltage divider. And because the voltage is higher, we also change the LED-Resistors and the TL431 current limiting resistor. The new values are written in pink, the original values are blue in the above schematic.

Spreadsheet resistor calculation screenshot

The trick to this calculation is to set the rTotalGoal resistor first, and then start changing the values in column B so that the Vthreshold matches the TargetVoltage as close as possible. The cell B10 is calculated so that the sum of all the resistors is rTotalGoal and changing one resistor does not change the whole calculation.

I used the https://www.qsl.net/in3otd/parallr.html# resistor calculator to get solutions for the weird resistor values. For example 12104 is 22k||27k.

Hirata AR-c270 Scara Robot Retrofit – Part1

Hirata Scara Robot
Hirata Scara Robot

Recently I bought a Scara-Robot from Ebay. Its an older model with an outdated control. Motors, servos and encoders are in working condition. Using the Teach-Pendant I can move the Robot around.

My plan is to retrofit the control using linuxcnc. All IO will be done with a MESA 7i77+5i25 combo. I will try to reuse everything besides the original control.

There was quite a lot of documentation included in the Ebay auction, but most of it only covers software. No hints on the pinouts of the servo amp. The company producing the robot still exists, so I gave them a phone-call to request additional docs. I bought the manuals they offered me, but unfortunately they didn’t help at all. So I had to take the thing apart and try to reverse engineer the important parts. My findings so far are all in this 20150422_doku_hac214a.

servo-amp
HPC-53IDI Servo Amplifier

There are some diagramms for the motor- and encoder connections. And yes, the encoders produce a nice A/B-Signal:

As a next step I will test on of the amps standalone. Hopefully the info extracted so far is okay. Running the amps in velocity mode will make it easy to connect everything to the 7I77.