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

More news from the AVR version.

got the c program for the avr working.
I will do a bit clean up the source code and
add the max232 to the schematic and post then
files to download.

dj,

I assume, that adc_max in the pc c file is set to 4095 default with a 12bit adc in mind? Therefore with
the pic and my AVR version this should be changed with
the commandline option to 1023.

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

That's correct. It was meant for 12 bit ADC.

Actually 4095 is wrong, it has to be 4092 in this case since I shift the 10 bit ADC result to left by 2 bits and calculate the average of 128 sampling to simulate 12 bit ADC. This is the reason why I have the -a option to overide the default value.

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

OK,

Sorry for the delay but got really busy at work.

Got all the parts needed and would post pics and results soon.

Wayne, Thank you very much for the free boards! You Rock! /ubbthreads/images/graemlins/thumbsup.gif sending you your parts today.

Yes! Wayne did not charge anything for the pcb' s so I'm charging for just the parts + shipping, $15.00 + shipping sounds about right.

So I'd say around $20 USD for the complete kit and that includes shipping .

Who wants one?
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

I will take one. How much for shipping to zip 87004?

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

PM's sent,

nsmith if one backs out your'e next in line, $20.00 should cover it.

That's it no more boards left. LED_ASAP you squeaked by as always /ubbthreads/images/graemlins/smile.gif


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

Is there a way for me to get a "blank" PIC or a pre-programmed one? Online purchase is a bit of a hassle(paypal is not available in our country), I can't seem to find a local source of the PIC and microchip doesn't offer samples here. /ubbthreads/images/graemlins/help.gif

Most of the parts needed for the logger is already covered. /ubbthreads/images/graemlins/smile.gif
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

I got the parts today. I soldered the board up and I applied 7V to the connector and verified that the LED is blinking and the 5V supply is working. Looks like the processor is running and doing something.

As for functionality... NOT.

I'm confused. I've dealt with Serial for many years and again I think this is causing me confusion.

From the PC to the board. Is this a 1:1 cable? Does pin1 connect to pin1 on the cable or should it be crossed over?

On the board. Pin1 of the DB9 doesn't match the pin1 of the RS232 straight through cable I'm using so I inverted the connector on the board to get the pinnouts to match.

Still no input voltage.

I must be doing something stupid.

I tried hyperterminal and it appears my com port is port 2.

when I run cpf-logge....exe -p 2 I get an error "Erro on opening device. No such file or directory".

Yet the mode com2 baud=300 data=8 parity=n works fine.

It doesn't like it if I mode com1.

Any thoughts?

I'm running the program in DOS console window on a PC running WinXP.
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

Just got back.

[ QUOTE ]
dat2zip said:
I got the parts today. I soldered the board up and I applied 7V to the connector and verified that the LED is blinking and the 5V supply is working. Looks like the processor is running and doing something.

[/ QUOTE ]

That sounds good at least.

[ QUOTE ]
From the PC to the board. Is this a 1:1 cable? Does pin1 connect to pin1 on the cable or should it be crossed over?

[/ QUOTE ]

It is meant to be 1:1 cable and it is good to use those 9 core straight cable meant for the modem.

[ QUOTE ]
Still no input voltage.

[/ QUOTE ]

Most likely the com port is not providing the power through dtr and rts.

[ QUOTE ]
when I run cpf-logge....exe -p 2 I get an error "Erro on opening device. No such file or directory".

[/ QUOTE ]

Part of the program is originally designed for the MINGW environment where device name is "comx" while now it is on cygwin where it is "/dev/comx".

Try "-p /dev/com2" instead of "-p 2".

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

I use this .BAT file:

@echo off
mode com1 baud=300 data=8 parity=n > nul
cpf-logger-lite-pc -l 100 -v 4.96 zzz.txt

it works just fine !

and for the cable I adapted an old printer cable by changing the big connector by a female db25 wich I use with an adaptor /ubbthreads/images/graemlins/smile.gif


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

As far as having trouble with the power over the rs232
interface, for my laptop I have built an adapter which
connects DTR to a 9V battery, because there is to low
voltage at DTR/RTS from my old laptop. maybe a lowdrop
voltage regulator with shottky diodes would have solved
the problem as well ...

Another issue came up yesterday evening:

Has anyone darkend/shaded the OPT101?

Even with only a 5mm LED the OPT101 puts out its most
voltage, so the question is to darken the sensor, that
the reading is not to high, otherwise you would see e.g.
100% light even the light is getting lower until the sensor
is out of saturating? Do I miss something?

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

OPT101 is quite sensitive with built-in OPAMP preset gain. You can use external parts to set different gain yourself.

You can put the sensor away from the light (such as 1 m), but the ambient light will affect the reading.

In my case, I put the light source near by, and cover the opt101 with a layer of half transparent film to reduce the light.

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

Progress...

I can't get my PC to do anything.

On the laptop and a keyspan USB to Serial Adaptor I am able to get the board powered up and the LED blinks (dimly). So, success in that respect.

The Keyspan RS232 signal swing is +/-5V and the output of the 5V regulator is ~3V. So, the pic runs, but, the output signal is not sufficient to generate a valid RS232 signal back to the USB - Serial adaptor.

Those who got the board need to perform the following modifications:

1) Load the DB9 on the bottomside of the board.

2) Wire pin 5 of the DB9 to GND

3) cut the trace going to DB9 Pin 3

4) Add wire from DB9 Pin 2 to LED cathode.


On the keyspan it mapped the adaptor as com4. You can see it listed in the hardware profile.

My command line is cpf_l -p /dev/com4

Thanks DJ for the com port syntax.

I'll probably be using this with the laptop. Two solutions might exist.

a. Use a low dropout linear regulator in place of the 79l05. This will raise VCC closer to 5V. Maybe, it will work then.

b. Wire in a external battery supply like a 9V battery. (yuch)

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

Some progress.

I used an external supply to power the logger. CPF-logger-lite program doesn't work for some reason...

In hyperterminal I can now see the data. It's jibberish, with 9600, 8n1

Unless I have hyperterminal configured wrong maybe the serial baud rate is off???

I have also confirmed that if I bypass the linear regulator with a wire, the board works as well. Be aware, this only works if you RS232 swing is 5V. Using this on multiple PCs could damage the CPF-logger board with no linear regulator for regulation.

Any thoughts or suggestions would be greatly appreciated.

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

I think the osccal value is off. I'm measuring 127uS for one bit. That's pretty far from 9600 baud of 104uS/bit.
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

Wayne, did your programmer saved the osccal value before programming? what is the actual value at $3FFF ?

The 12F675 I purchased swinged between $20 and $30 values


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

Wayne, You look like having 2 different problems -- voltage and baud.

The output of the logger is supposed to be 5V (provided voltage from serial port is higher) minus Vf. So it is not real RS232 signal level. Many modern PC can accept and work well, but some modern com ports are providing low voltage such as yours.

Some suggestions.

1) Use LDO instead of 78L05 as you suggested. I suggest using 3.3V fixed output so that there is enough head room for the voltage swing. Then you can use "-v 3.3 -a 4092" option to indicate the Vdd.

2) Remove the led which is in series to the serial port to lessen the voltage drop. 3.3V output shall be detected by 5V circuit of the USB converter. You may move the led down to the ground with a series resistor to indicate the TX. Using bigger value (such as 2-5k) to limit the current to small and clear red led will be still bright.

3) If Hyperterminal brings output yet cpf-logger.exe doesn't, try using "mode" command before running cpf-logger.exe.

4) OSCAL value seems really out. Pablo's PICs had 0x20 - 0x30, mine had 0x64 - 0xa1. You can try from 0x80. One thing to remember is the power supply voltage, it may affect the internal RC ocsillator. Need to talk to Roberto for new chip.

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

guys,

I don't have a pic programmer. So reading location ?? is not in my realm of doing. I've got a board, parts, PC and RS232 cable.

I think cgpeanut programmed the part. Best to ask what he did to the parts when he programmed them.

Since I can't make out any of the jibberish on the screen and since it looks like the waveform timing is off. I was just speculating that it could be off. I have no idea.

As for the WinXP desktop.

Since I can't get the control lines active, I have no VCC on the part?

Any suggestions for the PC?
 
Re: CPF-LOGGER-Lite: Simple DIY Data Logger for CP

I uploaded a small program to display the incoming data using VB. Anything using MS products on MS-OS is no problem... This one uses MSCOMM.OCX.

test exe file

You can also download a program called "RealTerm" and this is very good. You can do most work with serial port.

download here

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

Wayne,

Sending you a new program uPIC 1st thing tomorrow just in case.
Will program tonight and post the screen shot as I download the program.
 
Back
Top