CPF-LOGGER-Lite: Simple DIY Data Logger for CPFers

Candle Power Flashlight Forum

Help Support CPF:

Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

... Just finished the layout for the basic
AVR version and will do the hardware built up
next weekend. Maybe I have time next week for
the software while I am in internetfree holidays ...

Cheers
Ralf
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

Boards are now ordered. Should be here next week some time. Maybe, the 15th or 16th.

From there I'll send them to the distribution point.

Wayne
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

Updated the cpf-logger-lite-pc.c|exe files a little.

Earlier the current was calculated from the voltage difference between ch2 & ch1, but now it is changed to ch1 & ch2.

Also added -S option to calculate the current from ch2 voltage alone. It is useful to calculate the current flow using MAX471 current sense IC or from prog pin of LTC4054 li-ion charger IC.

3 downloadable files are updated.

cpf-logger-lite-all-10a.zip
cpf-logger-lite-pc.c
cpf-logger-lite-pc.exe

I tried using gnuplot on WinXP and it does plot the chart realtime from the data file being logged using this control file. It is an example of li-ion charging log and you need to change the sample according to your configuration.

<font class="small">Code:</font><hr /><pre>reset
set datafile separator ","
set xdata time
set format x "%H:%M"

set title "18650 Li-Ion Charge Log"
set xlabel "Time (hh:mm)"
set ylabel "Battery Voltage (V)"
set yrange [0 : 5]
set y2label "Charging Current (A)"
set y2range [0 : 5]

plot "18650-c.csv" using 0:6 title "Battery Voltage (V)" with lines 1, '' using 0:10 axes x1y2 title "Charging Current (A)" with lines 2

pause 5
reread</pre><hr />

But once the chart window is moved away from the top, it get locked up. So I need to find some other solution on Win32. UNIX may not have this problem at all.

There are 2 other things I noticed and want to mention related to the operation.

1) When a (reasonably) high voltage is applied to ch1 before the PC logger program starts, the current seems back flowing and powering the PIC, so the PIC may not start correctly.

If this happens, start the PC host program first, then connect the ch1 input source.

2) My Win XP has many different drivers hooking to the serial port usage in daisy chain, some are for USB to serial emulation, serial monitoring and also serial port permission control for MS DOS programs. So depending on which driver is involved, some of the communication program don't work (can't get the serial input).

Most MS library based program such as written in VB seem to work fine, but those based on Unix emulator (cygwin) may have problem (though most users may not see the problem).

A simple "mode" command in the batch file may solve the problem. No such problem is ovserved in Linux/UNIX environment.

<font class="small">Code:</font><hr /><pre>@echo off
mode com1 baud=300 data=8 parity=n > nul
cpf-logger -d %1 %2 %3 %4 %5 %6 %7 %8 %9</pre><hr />

It may sound discouraging, but it is a small hitch which may be applicable to handful of people.

-- dj
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

DJ, one question:

I found a USB to RS232 adapter lying around (from a vtech phone) is based on the FTDI FT232 chip, is there a simple way to adapt the logger to use it?

Thanks


Pablo
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

[ QUOTE ]
PEU said:I found a USB to RS232 adapter lying around (from a vtech phone) is based on the FTDI FT232 chip, is there a simple way to adapt the logger to use it?

[/ QUOTE ]

Pablo,

FT232 allows you to emulate a com port from USB so that a serial device can be connected to a USB port. My PIC programmer uses the same chip to emulate a com port on USB connection.

You can download the generic driver from FTDI web site if you don't have one.

http://www.ftdichip.com/FTDrivers.htm

I don't have a converter so I can't say if it would work, but if you get it working, would you share with others?

-- dj
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

To All:

I've received some parts from digikey specifically,

qty 20, LM78L05, voltage regulator in TO-92 package
qty 20, ED3308-ND, 8 pin IC socket Gold .300 better than rat-shack's /ubbthreads/images/graemlins/smile.gif
qty 30, P11212-ND, cap 25V ELECT FC radial

I've tred looking for the correct 0.1uF capacitor but failed can anyone inform me of the correct digikey part #? also the part number for the head strip 4 pins.

Now, RS has the big 0.1uF caps in two's per package green in color, should I get those?

Has anyone ordered their free samples fo TI's OPT101 chip? I have the 10 PIC12F675's on hand so we are good on the uMs
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

DJ: of course, will try, will tell /ubbthreads/images/graemlins/smile.gif
CG: I have 5 units here, if you cannot order I can mail you one /ubbthreads/images/graemlins/smile.gif

I tought that finding the 12f675 here was an easy task... I found the only place that stocks them today /ubbthreads/images/graemlins/smile.gif

And the comic part, I was about to solder the parts and figured out that I mirrored the PCB /ubbthreads/images/graemlins/banghead.gif


Pablo
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

@PEU:

I have 5 OPT101's as well, but figured since we can order free samples
from TI why not? Saves us 5 bucks and TI's shipping is very fast /ubbthreads/images/graemlins/grin.gif

I forgot to mention the db9 female serial port any specifics? Will it be just
the regular type like the one RS carries?

I've built the circuit again on a breadboard will post pics once I got it to work.
I think I crossed some lines aswell, /ubbthreads/images/graemlins/frown.gif Good news is it only took 30 mins to
layout, I Hope it won't be that long to trouble-shoot
.
I think it's best to use components that will actiually go into the official
cpf-logger board Wayne is making for us.

@DJ,

Am I correct to assume that power to the logger circuit is derived from
the serial port or do I have to supply a separate 5V power source?

Hooking it up to the LT4054 charger circuit to log charger activity,

AI-0 to measure the voltage output of the charger
AI-1 to measure the voltage at the PROG pin of the charger
AI-2 to STATUS PIN. and will ignore A-3 since it's fixed to the OPT101 light
sensor. (not needed)

Now just to be clear A-0 refers to pin1 of J2, A-1 pin2 of J2, A-2 pin3 of J2 correct.?

Once this is done will figure out how to properly calibrate the PIC using
DJ's instructions plan on shipping the kits pre-calibrated. make sense?
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

Hi Cgpeanut,

The BOM I originally came up with was as follows:
10uF Cap - 493-1036-ND (Electrolytic $0.20ea)
.1uF Cap - 399-1644-1-ND (Tantalum, $0.19ea)
1k R - 311-1.0KECT-ND (SMT, 1206 case, $0.078ea, min 10)
10k R - 311-10.0KFCT-ND (SMT, 1206 case, $0.088ea, min 10)
Diode - BAV70FSCT-ND (SOT-23 dual 1n4148, $0.22ea)
Regulator - NJM78L05UA-ND (SOT-89 78L05, $0.39ea)
OPT101 - OPT101P-ND ($5.50ea)
DB9 - 177-809F-ND (right angle pcb mount $5.74ea)
DIP Socket - A24794-ND (8-pin, through hole, $0.36ea)

DJ listed C3 and C4 as being either ceramic or tantalum. I made the BOM as all tantalum to keep the unique parts count low and make it easier for ordering. Dat2zip requested that the 0.1uF caps be changed from tantalum to ceramic. He never specified whether it was just for C3/C4 or all of the 0.1uF caps, so I can't be sure what pads are on the board.

The caps Wayne specified were:
.1uF Cap - 311-1179-1-ND (Ceramic X7R, 1206 case, $0.098, min 10)

The case size on the two different components is roughly the same size. Only the pad lengths are different, so either one should fit on the board. You would have to ask DJ if you can go all Ceramic or all Tantalum for the caps. You should also ask Wayne if he was referring to only C3/C4 or if he meant all of the 0.1uF caps.

Hope this helps,
pb
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

@pbarrette,

Awesome! I got qty (30) of the Digikey Part #: PCC1870CT-ND which is a 0.1uF cap X7R in 1206 package which I think is the right one.

Thanks for the clarification! Now as far as resistors goes 5 watt regular resistors should work I have them.

Diodes any type should work I got a bunch of those, I think we are close, just need to get the circuit working and get the parts gellin /ubbthreads/images/graemlins/grin.gif
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

Roberto, the power is supplied from the com port through the rectifying diode and 78L05.

A0 is from gp0 and A1 from gp1. So A0 is pin 7 and A1 is pin 6 and so on. The gp0 to gp6 go from pin 7 to 2.

C3 & C4 are decoupling caps and preferably ceramic, but will do with other types. In fact I use anything available including 10uF electrolyte type. On a low current operation, you can even skip it, but for pulse led output it becomes critical to have one.

The rest 0.1uF are for low pass filter and I get reasonable response with 0.1uF and 1k. Again any type will do.

-- dj
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

This is the BOM from the schematic. You can reference the PCB Footprint column to see what PCB component footprint I used on the layout.

<font class="small">Code:</font><hr /><pre>
Item Qty Value Ref Desigator PCB Footprint
1 1 0.1uF C1 SM_1206E_CAP-CHIP_IPC99
2 1 0.1uF C2 SM_1206E_CAP-CHIP_IPC99
3 1 0.1uF C3 SM_1206E_CAP-CHIP_IPC99
4 1 0.1uF C4 SM_1206E_CAP-CHIP_IPC99
5 1 10uF C5 CYL/D.200/LS.100/.031
6 1 10uF C6 CYL/D.200/LS.100/.031
7 1 0.1uF C7 SM_1206E_CAP-CHIP_IPC99
8 1 0.1uF C8 SM_1206E_CAP-CHIP_IPC99
9 1 LED D3 LED/T-1-3/4/CATHODE=2
10 1 BAT54C/SOT D4 SM/SOT23_321_STD_PINNOUT
11 1 CON4 J1 BLKCON.100/VH/TM1SQ/W.100/4
12 1 DB9 J4 CON-DSUB-RP_9-TM_F318
13 1 1k R1 SM_1206E_CAP-CHIP_IPC99
14 1 1k R2 SM_1206E_CAP-CHIP_IPC99
15 1 1k R3 SM_1206E_CAP-CHIP_IPC99
16 1 10k R4 SM_1206E_CAP-CHIP_IPC99
17 1 1k R5 SM_1206E_CAP-CHIP_IPC99
18 1 SW SPST/SM SW1 BLKCON.100/VH/TM1SQ/W.100/2
19 1 PIC12F675/8pin U2 DIP_E100_8-TM_W300_L400
20 1 OPT101/8 pin U5 DIP_E100_8-TM_W300_L400
21 1 OPT101/5 pin/v U6 BLKCON.100/VH/TM1SQS/W.100/5
22 1 LM78L05AC/TO92 U7 TM_TO92-3_H031-D200

</pre><hr />
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

Folks,

Here's the parts I'm ordering at Digikey this monday changes, improvements please, post here. I'm building for 8 individual kits.

LM78L05ACZNS-ND Regulator in sot-23 package
LM78L05ACZNS-ND 8 pin socket gold .300 footprint
493-2431-1-ND 0.1µF CAP TANTALUM 0.1UF 35V 20% SMD
P11212-ND CAP 10UF 25V ELECT FC RADIAL
WM6404-ND CONN HEADER 4POS .100 VERT TIN
432-1153-ND SWITCH TOGGLE SPDT 5A SLDR LUG
BAV70FSCT-ND DIODE ULTRAFAST HI COND SOT-23
177-809F-ND CONN DB9 FEM .590" RA MET SHELL

Are we set on regular 5 watt resistors? no Biggie the 311-1.0KECT-ND and
LM78L05ACZNS-ND are like $.76 for a pack of 10.

did I miss anything?

Also, will get the RS case locally, I have one to check for form and fit once I get the boards.
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

cool PEU, does it work in linux? how are you sending the hex file to the chip?
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

Hi Cgpeanut,

The 7805 regulator Wayne used for the board layout is a TO-92 case as opposed to an SOT-23, or the SOT-89 originally specified. More like Digikey # LM78L05ACZFS-ND

I'm a bit confused about the "5 watt resistors" bit. I'm thinking that 5 watt resistors are probably overkill and would likely be far too huge to fit the 1206 footprint on the board. The "311-1.0KECT-ND" part number you have listed would work great for the 1k's while "311-10KECT-ND" would be good for the 10k's.

So a proper translation from Wayne's BOM to Digikey friendly format would go something like this:
<font class="small">Code:</font><hr /><pre>+-------------------+------+-------------------+----------+
|Item | Qty | Board Designator | Price |
+-------------------+------+-------------------+----------+
|311-1179-1-ND | 6 | C1 C2 C3 C4 C7 C8 | 0.098 |
|493-1077-ND | 2 | C5 C6 | 0.20 |
|5mm LED | 1 | D3 | N/A |
|BAV70FSCT-ND | 1 | D4 | 0.22 |
|A19372-ND | 1 | J1 | 0.31 |
|177-809F-ND | 1 | J2 | 5.74 |
|311-1.0KECT-ND | 4 | R1 R2 R3 R5 | 0.078 |
|311-10KECT-ND | 1 | R4 | 0.078 |
|CH760-ND | 1 | SW1 | 0.73 |
|A24794-ND | 2 | U2 U5 | 0.36 |
|A19373-ND | 1 | U6 | 0.39 |
|LM78L05ACZFS-ND | 1 | U7 | 0.47 |
+-------------------+------+------------------------------+</pre><hr />

I have made some changes to the components you listed above:
1) The 8 pin DIP socket is the same Digikey part # you show for the regulator.
2) The 0.1uF ceramic capacitors are much cheaper.
3) The P11212-ND electrolytic is not in stock.
4) The WM6404-ND pin header is not in stock.
5) The rocker switch is much cheaper.

I also left out the part number and costs for a 5mm LED. I'm sure, as CPF'ers, we should all have some of those lying around. /ubbthreads/images/graemlins/smile.gif

If Wayne or Dj have no objections, then this should be the final Digikey BOM for all parts on Wayne's board.

For a quantity of 8 components, the cost comes to $77.35 which makes for $9.67 per board (minus shipping) for the components themselves without the PIC. Obviously, that figure should be increased to offset cgpeanuts time and trouble, additional shipping, etc.

The complete components order for 8 boards can be found here under WebID 6083164 AccessID 36500 for the next 30 days (after which Digikey automatically deletes it).

Hope this helps,
pb
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

I used a program called winpic (linked in that page) but Im sure there must be a linux prog capable of doing the job, since this programmer is compatible with a very popular one called JDM or com84.

Pablo
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

pb,

I have no objections. I just hope I drew the schematic correctly and there are no PCB errors.

I'm thinking the boards should be here as soon as Monday or anytime tues/wed.

If the boards are majorly wrong, I'll be glad to fix the problem and redo the boards over again.

Wayne
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

Ordered the parts /ubbthreads/images/graemlins/smile.gif thanks pb you made it a lot simplier /ubbthreads/images/graemlins/happy14.gif

1,10,A19373-ND,CONN HEADER VERT 5POS .100 TIN,,0,0.39000,$3.90000
2,20,A24794-ND,CONN IC SOCKET 8 POS DIP 30AU,,0,0.28800,$5.76000
3,10,LM78L05ACZFS-ND,IC REG 0.1A 0-125DEG C TO-92,,0,0.47000,$4.70000
4,10,CH760-ND,SWITCH ROCKER SPST BLK 10A QC TE,,0,0.64800,$6.48000
5,20,311-10KECT-ND,RES 10K OHM 1/4W 5% 1206 SMD,,0,0.07800,$1.56000
6,50,311-1.0KECT-ND,RES 1.0K OHM 1/4W 5% 1206 SMD,,0,0.04220,$2.11000
7,8,177-809F-ND,CONN DB9 FEM .590" RA MET SHELL,,0,5.74000,$45.92000
8,10,A19372-ND,CONN HEADER VERT 4POS .100 TIN,,0,0.31000,$3.10000
9,30,BAV70FSCT-ND,DIODE ULTRAFAST HI COND SOT-23,,0,0.16200,$4.86000
10,100,311-1179-1-ND,CAP .10UF 50V CERAMIC X7R 1206,,0,0.05950,$5.95000
11,20,493-1077-ND,CAP 10UF 35V ELECT VR RADIAL,,0,0.12400,$2.48000
12,1,AC163021,KIT ADAPTER SOT23-6 TO 8P DIP,,0,12.00000,$12.00000
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

I just finished assembling the board, but I cannot make it work /ubbthreads/images/graemlins/frown.gif

Led turns on, PIC was programmed and verified twice, I even found an error in the posted schematic that already corrected.

Im using winXP and this commandline:

cpf-logger-lite-pc zzz.txt

logger is connected to COM1

any ideas?


Thanks


Pablo
 
Back
Top