Show off your DIY and modified tools!

Status
Not open for further replies.
This was a really quick project to get my bulky tools and power cords off my desk:

image_vagmhl.jpg
 
Found a use for my rejected fuse wire. I've taken advantage of the relatively high resistance to make a DIY rheostat.

image_nawjox.jpg


Works from 50 Ohms down to about 4 Ohms. My meter reads 0.3 Ohms just across the probe wires, so I have to take that into account.
Also, twisting the wire together makes for great picture-hanging cable. :)

I recently received some tiny potentiometers in the mail, along with the 2A glass fuses I ordered.

image_aptwuf.jpg


Gonna put these to good use.
 
Since I built that DIY rheostat, I've been wondering what the difference is between a rheostat and a potentiometer. As far as I can tell, the rheostat only has two points of contact, positive and ground. A pot on the other hand has three. The middle one being ground and the other two being positive. As the pot moves resistance increases on one positive while being reduced on the other. Is that right? Or is there more to it than that?

Anyway, the little blue pots I bought have replaced the resistors on my TP4056 charging panels.

image_gmucve.jpg

You can see above, that I've got this one dialed in at 500mA.

Thi pins on the pot turned out to be just the right length so I could set them flat against the panel and not need any additional wires. The closest pin got trimmed, and the unused one I just bent underneath the pot so it would be out of the way.

This was a pretty unnecessary mod, but it was fun, and will have its uses. For one thing, one of my chargers was delivering slightly more than 1A, so with these guys in place I was able to dial it back a bit. Probably not a big deal, but still kind of nice to be able to do. Also, I find when I get down to the 0V cells in a batch, I prefer to charge those individually as they tend to have more issues than the 1-3V cells do. The pot will let me limit the amps to those ones to 500mA. I like to do that with individual cells.

The other day, my cousin accused me of using my inventions to manipulate time and space. (He was joking of course.) So I made a small addition just to prove him right, LOL:

image_arbsex.jpg

Also, I think I forgot to mention earlier, I had some of that 12V LED light strip laying around and I added some to help light up the panels. You can kind of see it just above the Opus and iMax's. Its all powered through the computer power supply. Even the flux capacitor (which does have a bit of practical value as a USB charger.) That's really the biggest benefit to the whole setup. Instead of two power strips, I now only need a single AC outlet.

I think this may finally be the last modification I make to the testing station. Unless I get some great ideas from the rest of you. Speaking of which, just about all the stuff I've made so far has been inspired by things that the rest of you have already done. I'd love to see more posts from you guys here if you're willing to share. :)
 
Very Nice... Especially the Flux Capacitor ;)
 
JeremyChoy said:
Charging station which has temperature sensors in each bay. it will play a sound and turn red when a cell gets too hot. I've also added a current sensor so I know roughly when to go back and check.



image_lemuzm.jpg


image_pxmmwe.jpg


image_zhufss.jpg

Very cool. Can you share you technical specs on this? How did you do it. what sensors did you use? are you using arduino, can you share code?
Nice!
 
rebelrider.mike said:
A prototype fuse tester; inspired by Average Joe. :)


image_jbfflu.jpg

I noticed the test-board used to hold the fuses, do you know the current rating of the connections in it, can they handle the current necessary to blow the fuses?

I read somewhere that the traces weren't rated that high!
 
Also note that on the busbar you will get higher reading since it cools off the fuse wire somewhat. So for proper readings you need to solder the wire when testing :)
 
This is nothing new, just trying to re-create some of #daromer's work to measure temps while getting anintroduction to python and grafite grafana and influxdb.etc... (like 3 projects in one)


image_smhsuu.jpg

image_anrhnq.jpg


Kind of using http://diytechandrepairs.nu/create-your-own-temperature-logging-for-your-opus-bt-3100-charger/as a pattern, but Iam using some recycled2 wire thermistors and a MCP3008 10 bit ADC.

I wired it all up last Friday and worked on the programming the last week, then decided to replace the wiring (speaker wires) with a cat-5 cable. I tried really hard to get the cat-5 plug to fit in the back of the opus, but it is really tight so i decided to make the thermistor wires a pigtail.

Will be working on this project while I am waiting on parts for my bigger tester... good to dust off my DIY chops a bit.

image_fvbwbg.jpg


Also working on measuring temps with an i2c module as well. I have to move all the thermistor wires around to work on the i2c,.The pushbutton is unused.

Here is the Python scriptfor measuring temps using the MCP3008 ADCon a Raspberry Pi.
Code:
#!/usr/bin/env python
# This script will read a set of 10K thermocouples using a MCP3008 ADC on a Raspberry Pi running python
# Adapted from work by others... Adafruit Industries, Paul Chow and 4 or 5 others (URL's provided in comments).
# For my needs, I merged their work with some of mine to make this script that calculates temperature and creates a log file for up to 8 ADC ports.
# https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters/mcp3008
# http://www.paulschow.com/2013/08/monitoring-temperatures-using-raspberry.html [basiclogmcp.py]
# ASCII Art Schematic added from Paul's web site
#
#
# +3.3V ---- 10K THERMISTOR --+-- 10K OHM RESISTOR ---- GROUND
#			  |
#			  |
#			  |
#			DIGITAL PIN on MCP3008 (the chip I am using)
#
# Pinout
#
# MCP 3208 Pin     Pi GPIO Pin #  Pi Pin Name
# ==============    =============== =============
# 16 VDD         1       3.3 V
# 15 VREF        1       3.3 V
# 14 AGND        6       GND
# 13 CLK        23       GPIO11 SPI0_SCLK
# 12 DOUT        21       GPIO09 SPI0_MISO
# 11 DIN        19       GPIO10 SPI0_MOSI
# 10 CS         24       GPIO08 CE0
# 9 DGND        6       GND
#
# A simple script to log data from the MCP3208
# Based off mcp3208.py

DEBUG = 0  # set DEBUG = 1 if you want to see values displayed as calculations are made

import os
import math
import string
import time
from time import strftime   #dropped this in favor of using the logging library
import logging
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)

# uncomment to use weather.com for outside temp
# weather_com_result = pywapi.get_weather_from_weather_com('yourzipcodehere')
# you will also ned to install the libraries from https://code.google.com/archive/p/python-weather-api/
# import pywapi

######################################################################################################
# The library for initializing and IO for the MCP3008 is on Adafruit:
# https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters
# follow the link for the MCP3008 SPI or the other I2C if thats what you have. I am using the MCP3008
######################################################################################################
# Simple example of reading the MCP3008 analog input channels and printing them all out.
# Author: Tony DiCola
# License: Public Domain
# Import SPI library (for hardware SPI) and MCP3008 library.

import RPi.GPIO as GPIO
GPIO.setwarnings(False)

# read SPI data from MCP3008 chip, 8 possible adc's (0 thru 7)
def readadc(adcnum, clockpin, mosipin, misopin, cspin):
    if ((adcnum > 7) or (adcnum < 0)):
        return -1
    GPIO.output(cspin, True)

    GPIO.output(clockpin, False) # start clock low
    GPIO.output(cspin, False)   # bring CS low

    commandout = adcnum
    commandout |= 0x18 # start bit + single-ended bit
    commandout <<= 3  # we only need to send 5 bits here
    for i in range(5):
        if (commandout & 0x80):
            GPIO.output(mosipin, True)
        else:
            GPIO.output(mosipin, False)
        commandout <<= 1
        GPIO.output(clockpin, True)
        GPIO.output(clockpin, False)

    adcout = 0
    # read in one empty bit, one null bit and 10 ADC bits
    for i in range(12):
        GPIO.output(clockpin, True)
        GPIO.output(clockpin, False)
        adcout <<= 1
        if (GPIO.input(misopin)):
            adcout |= 0x1

    GPIO.output(cspin, True)
   
    adcout >>= 1    # first bit is 'null' so drop it
    return adcout

# change these as desired - they're the pins connected from the
# SPI port on the ADC to the Cobbler
SPICLK = 18
SPIMISO = 23
SPIMOSI = 24
SPICS = 25

# set up the SPI interface pins
GPIO.setup(SPIMOSI, GPIO.OUT)
GPIO.setup(SPIMISO, GPIO.IN)
GPIO.setup(SPICLK, GPIO.OUT)
GPIO.setup(SPICS, GPIO.OUT)

# Set up logging
# https://stackoverflow.com/questions/15474095/writing-a-log-file-from-python-program
log = "ADC_temps.123017.log"
logging.basicConfig(filename=log,level=logging.DEBUG,format='%(asctime)s %(message)s', datefmt='"%Y-%m-%d %H:%M:%S",')
logging.info('============================================')
logging.info('Info: Logging started')

print(' ' * 23)
print('Reading MCP3008 values, press Ctrl-C to quit...')
print('Logging to: ')  #print the name of the log file
print(log)

# debug option to see if I can read all ports on the ADC
if DEBUG == 1:
    print ('================================')
    adcout=readadc(0, 18, 24, 23, 25)
    print(adcout)
    adcout=readadc(1, 18, 24, 23, 25)
    print(adcout)
    adcout=readadc(2, 18, 24, 23, 25)
    print(adcout)
    adcout=readadc(3, 18, 24, 23, 25)
    print(adcout)
    adcout=readadc(4, 18, 24, 23, 25)
    print(adcout) 
    adcout=readadc(5, 18, 24, 23, 25)
    print(adcout)
    adcout=readadc(6, 18, 24, 23, 25)
    print(adcout)
    adcout=readadc(7, 18, 24, 23, 25)
    print(adcout)
    print ('================================')

# Print a column header for the screen.
print(' ')
print('|   Time  | {1:>4} | {2:>4} | {3:>4} | {4:>4} | ' .format(*range(8)))
#print('-' * 60)
#print('/n')
logging.info('Date-Time,OutTemp,Port1,port2,port3,port4')
logging.info('-' * 50)
logging.info(" ")


value=0
volts = 1 #   #initial values to prevent division by zero error
ohms = 1 #  #initial values to prevent division by zero error
lnohm = 0
temp = 0
tempc = 0
c2 = 0
t1 = 0
t2 = 0

# Added an array to hold the temperature calculations before output
temps = [0]*10
values = [0]*10

# from http://raspberrypi.powersbrewery.com/project-8-temperature-sensing-thermistor/
# Create a function to convert a resistance reading from our
# thermistor to a temperature in Celsius which we convert to
# Fahrenheit and return to our main loop
def temperature_reading(R):
  B = 3250 # Thermistor constant from thermistor datasheet
  R0 = 10000.0 # Resistance of the thermistor being used
  t0 = 273.15 # 0 deg C in K
  t25 = t0 + 25.0 # 25 deg C in K
  # Steinhart-Hart equation
  inv_T = 1/t25 + 1/B * math.log(R/R0)
  T = (1/inv_T - t0) * 1
  return T * 9.0 / 5.0 + 32.0 # Convert C to F

# Main program loop.
while True:
    # Read the ADC channel values and calculate temps, log them
    # The read_adc function will get the value of the specified channel (0-7).
    #logging.warning('To do: log a warning message if the temperature is over a threshold')
    print('-' * 50)
    i = 0 #for i in range (0-3):
    while i <= 3:
        value = readadc(i, 18, 24, 23, 25)
        values[i] = value
        #calculate the voltage
        volts = (value * (3.3 / 1024))  #GG_changed grouping
        if value == 0:
            # cheating a bit to prevent division by zero later on
            value = 880
        ohms = ((1024/value-1)*10000) #calculate the ohms of the thermististor
        t = temperature_reading(ohms)
        #output to log and screen
        if DEBUG == 1:
            print(value)
            print(volts)
            print(ohms)
            print("Port %i ADC reading is: %5.2f" % (i, value))
            print("Port %i temperature is: %5.2f" % (i, t))
            logging.info('5.2%f' % t) #write to log
        temps[i] = t
        i = i+1  #increment port number
        if i == 4:        # call for print and log
            print('%s,%6.2f,%6.2f,%6.2f,%6.2f' % (strftime("%D-%H:%M"), temps[0],temps[1],temps[2],temps[3]))
            logging.info('%6.2f,%6.2f,%6.2f,%6.2f' % (temps[0],temps[1],temps[2],temps[3]))#write to log
            # logging.info('%5.2f,%5.2f,%5.2f,%5.2f' % (values[0],values[1],values[2],values[3])) #write to log
            time.sleep(2)   # Pause, then repeat the while true loop over and over again...
            i = 0       # keep the while loop going
           
GPIO.cleanup()   #outta here.

... and here is an example log file written to the SD card.
Code:
"2017-12-31 18:41:56", ============================================
"2017-12-31 18:41:56", Info: Logging started
"2017-12-31 18:41:56", Date-Time,OutTemp,Port1,port2,port3,port4
"2017-12-31 18:41:56", --------------------------------------------
"2017-12-31 18:41:56", 
"2017-12-31 18:41:56", 67.52, 67.90, 66.96, 67.52
"2017-12-31 18:41:58", 67.52, 67.34, 66.96, 67.52
"2017-12-31 18:42:00", 67.52, 68.09, 66.96, 67.52
"2017-12-31 18:42:02", 67.52, 68.09, 66.96, 67.71
"2017-12-31 18:42:04", 67.52, 68.09, 66.96, 67.71
"2017-12-31 18:42:06", 67.52, 68.09, 66.96, 67.71

Now working on getting the script to log temperature data to InfluxDB using Telegraf... its not really clear to me yet, so I am reading about the line protocol and how to get data into the database...

Regards,
Gary
 
Finally got all the code working ! Hallelujah !

Since I am not a programmer by trade and I had zero experience with Python, Influx, Grafana, and GPIO on the Pi it was a real learning experience.

I would never have made this effort if @daromer had not shared his work on the Pi3 and his solar management dashboard, but that was so cool I had to try it myself.

Still having some discrepancies in the dashboard, but the data is making it from the recycled thermistors in the Opus throughan ADC chip to the Pi running Debian Stretch and my collection script in Python 2.7 writing by Json to Influxdb v1.2 and being reported by Grafana v4.3 or something like that.


image_mbsqei.jpg


This is a building block to get me going on dashboards and databases for my tester build project
 
I already posted this in a different section, but I upgraded my Snap-On NiCad impact gun to lithium using 5S1P Samsung 25R cells.

On one test, reversing wheel lugs at 140 pound feet, it had a a max wattage of 712 watts / 41 amps peak.

Pictures and mods here:
https://secondlifestorage.com/t-Converted-tool-battery-pack-from-NiCad-to-Lithium

I like this thread... I add my other projects to it as well.
 
It's been 8 months since last update to this thread

Anyone have anything new to add?
 
Status
Not open for further replies.
Back
Top