Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:39 24 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Electronics : PicLog question/suggestion

Author Message
SparWeb

Senior Member

Joined: 17/04/2008
Location: Canada
Posts: 196
Posted: 06:07am 26 May 2008
Copy link to clipboard 
Print this post

This is a fairly direct question for the creator(s) of Piclog: Have you considered using an offset with the voltage calibration? I have been checking the calibrations (while experimenting with other things) and I stumbled upon the fact that the calibrated voltage does not keep up with changes up or down. Does it sound like I have a problem, or can you verify this?

I found the following data:

Measured | PIC ADC
Voltage | Measured

14.04 | 700
12.57 | 667
12.53 | 666
11.35 | 633
11.24 | 630
8.00 | 495

Between 14V and 11V, the variation of the data from the PicAxe is linear, but the line does NOT go through zero, as the calibration of the PicLog assumes.

I added two lines of code:

Volts=Volts*4
Volts=Volts-1400

The output number (eg. "1300" for 13.00V) can then be recorded as 13.00V with a calibration constant of 100 in the PicLog setup window.

Any thoughts about this?

By the way, I watched the on-board voltage while taking these measurements, and the regulator maintained a consistent 5.0V when input anything between 8V and 14V.


Steven T. Fahey
 
Gill

Senior Member

Joined: 11/11/2006
Location: Australia
Posts: 669
Posted: 10:03am 26 May 2008
Copy link to clipboard 
Print this post

G'day Steve,
For the code of Glenn's PicLog, a word variable is used as you have done. The ADC is calibrated to read 35.5volts as ADC 355. this gives an ADC reading of 100 for 10volts. Glenn does not go to 0 for a 0 voltage reading. He uses the range of 10v to 35.5v to give ADC 100 to 355. It is most likely all chips are still linear in this range if not near 0.

The purpose of this is to ultimately express the voltage range as a byte variable. He does this by subtracting 100 from the ADC to give a range of 0 to 255 which is exact for a byte variable.

I was most impressed by his deviousness in manipulating the figures. I can set for a byte variable at 12v that makes logging to the terminal clearer but it can not be manipulated to suit any voltage range as Glenn's can.

As a comment on your code, that is fine too at 12v, depending what you're constraints are in regards word/byte variable as needed by further processing for display, storage, transmission etc. For the problem as identified, I don't see your method as quite right yet, though you might be on the right track. I too have found this problem but do not know how to easily adjust for it. You've given me some food for thought. Edited by Gill 2008-05-27
was working fine... til the smoke got out.
Cheers Gill _Cairns, FNQ
 
SparWeb

Senior Member

Joined: 17/04/2008
Location: Canada
Posts: 196
Posted: 04:24pm 26 May 2008
Copy link to clipboard 
Print this post

I do not follow the first part of your answer. I think you are looking at a different code than mine. I started with the stock code that came with the ZIP file.

The Piclog code I downloaded goes like this:

***
Start:
SYMBOL WSpeed = W3
SYMBOL RPM = W2
SYMBOL Amp = W1
SYMBOL Volt = W0
Main:
readadc10 4,Volt 
readadc10 1, Amp 
Count 3, 1000, RPM
Count 5, 1000, WSpeed
sertxd("[<V>", #volt, "</V><I>", #Amp, "</I><R>", #RPM, "</R><S>", WSpeed, "</S>]")
goto main
***

This code does nothing to calibrate the voltage ADC reading before sending it through the serial port. While I have changed things about the RPM and wind speed measurements, I hadn't changed the "Volt" word variable until now.

If Glenn has changed the code since I downloaded this, then sorry, I'll go look for it.

Steven T. Fahey
 
GWatPE

Senior Member

Joined: 01/09/2006
Location: Australia
Posts: 2127
Posted: 10:51pm 26 May 2008
Copy link to clipboard 
Print this post

Hi SparWeb,

I can see what Gill has said, but this is not evident in the picaxe code I have either. This may be in the piclog code, but I haven't gone looking. I still use my own loggers, but I am looking at the piclog for compatability with other forum members. Once I have my F&P mill in operation. .. Gordon.
become more energy aware
 
Gill

Senior Member

Joined: 11/11/2006
Location: Australia
Posts: 669
Posted: 02:31am 27 May 2008
Copy link to clipboard 
Print this post

Sorry folks, was looking at the Charger code so there's no relevance to the PicLog in that part of my reply.

The last sentence remains, where I don't see your calc as resolving the problem, as firstly the ADC is not linear in that range of your figures, and if it were to a 0 offset, it still doesn't do the job. Perhaps a calc for the closest possible is the best we are going to achieve?

With this problem I have have adjusted so the most important area of reading is correct and accepted the variation elsewhere. I doubt the error occurs in the hardware as I notice errors with the Alegro current sensors as well after the Picaxe ADC function. I tried to incorporate a linearity adjustment to complement the span adjustment. Tried to do it with the 1/2 vcc = 0 Allegro sensor but too difficult for me in that configuration. I should have sorted the method using a standard 0 arrangement first. I like the idea of a hardware adjustment better as I feel it can be used with different chips and it's use is manual rather than mental with the calculations needed for each chip and continually cycling through extra code with the software approach. Still any effective workaround will do.




was working fine... til the smoke got out.
Cheers Gill _Cairns, FNQ
 
dazler

Newbie

Joined: 21/10/2007
Location: Australia
Posts: 37
Posted: 10:53am 27 May 2008
Copy link to clipboard 
Print this post

hi all can u buy this all parts in one set or the unit complete ?
daz
 
Gill

Senior Member

Joined: 11/11/2006
Location: Australia
Posts: 669
Posted: 11:57am 27 May 2008
Copy link to clipboard 
Print this post

Sorry daz,
The piclog and the charger are both DIY projects and no kit or completed unit is offered, just instructions.

However someone may respond to a request to build one for you if you asked. Perhaps the ForSale/Wanted section and you could negotiate a price if you gave a contact email address?
Worth a try?
was working fine... til the smoke got out.
Cheers Gill _Cairns, FNQ
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 09:13pm 27 May 2008
Copy link to clipboard 
Print this post

I didn't know about the non-linear response of the ADC inputs, you learn something every day

It does apear to be linear over the middle range, as used by the PicLog. Lucky eh!

As Gill said, there is no PicLog kit or unit as such. Like a lot of the projects on this site, its here to inspire. The PicLog is just one way to use a cheap microcontroler as a data logger. Its works, though its not perfect, and there is always room for improvement.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
dazler

Newbie

Joined: 21/10/2007
Location: Australia
Posts: 37
Posted: 12:17pm 28 May 2008
Copy link to clipboard 
Print this post

thanks guys well look into it. may be ill have a go if the costs are not to high. any know the rough cost to make one??
cheers
darren
 
GWatPE

Senior Member

Joined: 01/09/2006
Location: Australia
Posts: 2127
Posted: 11:58pm 28 May 2008
Copy link to clipboard 
Print this post

Hi Darren,

I had a couple piclog type cct's added to a PCB job. I would estimate that for a $275 run, you would get about 20 or so piclog PCB's. Around $15 each. The components would roughly double this cost, and labour the same. These would be professional artwork, double sided board, plated through holes with solder mask both sides with a component silkscreen. These would be SMD type boards, with connector headers for inputs and outputs. I am not volunteering to provide cct boards, but am giving realistic production costs. For me to make an individual board, with stuff I had, would be a lot cheaper... Gordon. Edited by GWatPE 2008-05-31
become more energy aware
 
dazler

Newbie

Joined: 21/10/2007
Location: Australia
Posts: 37
Posted: 08:51am 29 May 2008
Copy link to clipboard 
Print this post

thanks Gordon for that, will look in to it . also dose the piclog save the data from ur windmill, until u download or connect it to ur PC?
darren
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 09:49am 29 May 2008
Copy link to clipboard 
Print this post

Nah the Piclog wont record data without a PC. What the PicLog does is take 3 or 4 measurements and send this data in raw form to the PC. Its the PC that converts this data into something we can understand, and record it for loggin purposes.

Gordons right, a PicLog would cost about $30 plus a couple of hours labour to make, depending on how you wire it all up.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
SparWeb

Senior Member

Joined: 17/04/2008
Location: Canada
Posts: 196
Posted: 06:36pm 29 May 2008
Copy link to clipboard 
Print this post

Hey since I just built one, and I don't have a lot of experience with building electronics, I think my time and cost would be typical. It just so happens that Glenn's estimate is good on both counts.

Building the PICLog didn't take long at all. Reading the diagrams, locating parts in the store, ordering the chip, those are all the things that took time. How come nobody ever mentions that when they say "it took me so long to build it"? Nobody has an hour-meter on their solder iron.

I also had many components already on hand. If you have none, then shopping will take a while. If you've been scavenging bits here and there for years, then you'll be halfway there. Another reason why it makes no sense to ask someone "how much will it cost?". The PICLog is not for sale.

Steven T. Fahey
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024