Author Topic: Data logger progress  (Read 2113 times)

0 Members and 1 Guest are viewing this topic.

willib

  • SuperHero Member
  • ******
  • Posts: 2414
  • Country: us
Data logger progress
« on: September 11, 2006, 01:16:07 AM »
In order to get my data logger going i have been working on programming a PIC16F877A microcontroller


Its been an uphill battle , one step forward two steps back

but i think i've FINALLY got the programmer functioning reliably


so far i've programmed the F877A to output pwm at 20kHZ , i've got it hooked up  to a 12V battery a FET ,an inductor and a diode , i just need the right inductor ,  at this frequency it should work really well

this has not too much to do with the data logger , i just wanted to see if i could make it work at the higher frequency


the next step is to get some data out of the uController , i would like to get it to work with a RS232 serial interface and hook it into a PC , by way of wondoze Hyperterminal that would be cool !!


PS

I'm thinking of ordering some PICs ( smaller ones) that cost around a dollar and programming them to output a varible PWM signal

all one would need is a clock IC and a 10K varible resistor and something to put it on , like a breadboard also you would need a 5V dc source

« Last Edit: September 11, 2006, 01:16:07 AM by (unknown) »
Carpe Ventum (Seize the Wind)

willib

  • SuperHero Member
  • ******
  • Posts: 2414
  • Country: us
Re: Data logger progress
« Reply #1 on: September 10, 2006, 09:22:05 PM »
This is so much fun

i just varied the pwm from the PIC by adjusting the position of my test bed Alt


By turning the Alt a tad this way and that , varing the magnetic field , and with the hall sensor output hooked to the analog input of the PIC, i was able to vary the PWM output by turning the alt just a little bit

i dont really know what it could be used for , i'm just playing around

« Last Edit: September 10, 2006, 09:22:05 PM by willib »
Carpe Ventum (Seize the Wind)

commanda

  • Hero Member
  • *****
  • Posts: 731
Re: Data logger progress
« Reply #2 on: September 11, 2006, 12:39:28 AM »
You have seen Gizmo's picaxe data logger, haven't you?


Includes pc software written in VB.


Amanda

« Last Edit: September 11, 2006, 12:39:28 AM by commanda »

stephent

  • Sr. Member
  • ****
  • Posts: 268
Re: Data logger progress
« Reply #3 on: September 11, 2006, 06:09:51 PM »
Whatcha programming in?

C C+ Assembly

Which program are you using to do the "programming" with?

Windows also I presume.

Serial port--parallel port programmer?

Input! Input! (just like Short Circuit--the movie)

There's really some neat stuff that can be done with the micro's with just a few components.

Those Picaxe's (rehashed pic's) are just about the very simplest I have ever used of the pics/atmels, etc to get something running in a hurry though. And getting info out of too. Although the Atmel chips ain't so bad either.

« Last Edit: September 11, 2006, 06:09:51 PM by stephent »

willib

  • SuperHero Member
  • ******
  • Posts: 2414
  • Country: us
Re: Data logger progress
« Reply #4 on: September 11, 2006, 07:11:53 PM »
i program in PIC assembly language

I wrote my own programmer ,and designed my own programmer board ,it plugs into the ISA bus on the PC

 since windoze takes over the I/O on the pc i have to switch over to a different drive , with DOS on it , actually i use Win95 and Dos on that drive and run Pascal , i could make into an .EXE but since im allways changing something on it , i just leave it as a .pas program


in hindsight i should have just coppied a programmer board ( there are dozens out there), and downloaded one of several free windows compatable programmers.

i would have been up and running in days instead of the weeks it took to write the programmer.

oh well

its running now , thats all that matters at this point.

« Last Edit: September 11, 2006, 07:11:53 PM by willib »
Carpe Ventum (Seize the Wind)

willib

  • SuperHero Member
  • ******
  • Posts: 2414
  • Country: us
Re: Data logger progress
« Reply #5 on: September 11, 2006, 07:13:31 PM »
Hmmm no i havnt seen it

got link?
« Last Edit: September 11, 2006, 07:13:31 PM by willib »
Carpe Ventum (Seize the Wind)

commanda

  • Hero Member
  • *****
  • Posts: 731
Re: Data logger progress
« Reply #6 on: September 11, 2006, 07:59:29 PM »
« Last Edit: September 11, 2006, 07:59:29 PM by commanda »

willib

  • SuperHero Member
  • ******
  • Posts: 2414
  • Country: us
Re: Data logger progress
« Reply #7 on: September 11, 2006, 08:06:22 PM »
Oh yeah , i remember now thanks!
« Last Edit: September 11, 2006, 08:06:22 PM by willib »
Carpe Ventum (Seize the Wind)

stephent

  • Sr. Member
  • ****
  • Posts: 268
Re: Data logger progress
« Reply #8 on: September 11, 2006, 10:14:06 PM »
willib----you need to use Linux--the programming tools are MANY--many--many (my latest addition is monodevelope) --the cost is nil,nada,zilch for many distro's of Linux.


Ask commanda or others on this forum.

Think Ubuntu or Centos or Fedora Core....maybe PCLinuxOS or any of the other hundred or so distro's of Linux.

« Last Edit: September 11, 2006, 10:14:06 PM by stephent »

commanda

  • Hero Member
  • *****
  • Posts: 731
Re: Data logger progress
« Reply #9 on: September 12, 2006, 02:56:54 AM »
Only a hundred?


Personally, I use Ubuntu for a desktop, and SME for a server/router.


Picaxe is good. Write program in basic. Download firmware with a simple serial cable. Too easy.


Amanda

« Last Edit: September 12, 2006, 02:56:54 AM by commanda »

willib

  • SuperHero Member
  • ******
  • Posts: 2414
  • Country: us
Re: Data logger progress
« Reply #10 on: September 12, 2006, 08:05:29 AM »
its all greek to me

i have a redhat cd but never have used linex
« Last Edit: September 12, 2006, 08:05:29 AM by willib »
Carpe Ventum (Seize the Wind)

willib

  • SuperHero Member
  • ******
  • Posts: 2414
  • Country: us
Re: Data logger progress
« Reply #11 on: September 12, 2006, 08:07:25 AM »
I agree the picaxe would be a good way to go for somone just starting out with microcontroller programming
« Last Edit: September 12, 2006, 08:07:25 AM by willib »
Carpe Ventum (Seize the Wind)

DanOpto

  • Newbie
  • *
  • Posts: 42
Possible code source
« Reply #12 on: September 12, 2006, 05:54:23 PM »
Look at

http://academic.hws.edu/geo/logger/logger.html


Nice data logger with code for microchip processors


Features

    * Digitizes and records analog voltages (0-5V range) at programmable periods (8 seconds to 6 days).

    * Powered by AA and 9V Batteries.

    * Adaptable to temperature, stream stage (water height), light intensity, soil moisture and other analogue (0-5V) sensors.

    * Communicates (Initailization/Data Recovery) to a Windows PC through a Reader. One Reader services many loggers.

    * Saves data as a delimited ASCII text file on a windows compatible PC.

    * Very inexpensive and easy to build (~$20/logger, $25 Reader, $50/sensor - depending on sensor type and sensitivity).

    * Hobart and William Smith Colleges, National Science Foundation, and the John Ben Snow Foundation provided initial support to test and improve earlier versions of HWS Data Logger.

« Last Edit: September 12, 2006, 05:54:23 PM by DanOpto »

willib

  • SuperHero Member
  • ******
  • Posts: 2414
  • Country: us
Re: Possible code source
« Reply #13 on: September 13, 2006, 10:07:17 AM »
Wow

i'm looking at the source code for the Reader , and i think i can translate it to run on a 16F877 , its well documented

ps i've allready downloaded and run the part that runs on the PC , it looks nice

thanks Dan !
« Last Edit: September 13, 2006, 10:07:17 AM by willib »
Carpe Ventum (Seize the Wind)

stephent

  • Sr. Member
  • ****
  • Posts: 268
Re: Data logger progress
« Reply #14 on: September 23, 2006, 09:57:25 PM »
Even the little PicAxe 08M's will read the Dallas one-wire sensors...some of this is so easy without a lot of components like the old hard wired days.

@Commanda

I use Fedora Core 5 and the only 2 Win computers in the whole place is my wife's Dell in the house and the PicAxe programming computer (old Celeron 1.7ghz) right beside me--but it's not connected to the 'net.....FC5 Linux on this one (P4) and one sitting right beside me is an AMD 64 bitter running Fedora Core 5 64bit OS--Linux firewall (dedicated computer)--Embedded Linux in the network router and the modem.

Ubuntu is ok--but I prefer FC5 + KDE Desktop and all of those nice programming tools.

It's easier for me to just build another computer out of parts and pieces laying around here then having a dual boot (ugggghh) to mess with Windoze and program those little PicAxe's.

And yeah--there is a bunch more then 100 different distro's of Linux--a lot more--but most of them aren't so well supported or updated as well as the front runners.

@willib

Don't use RedHat Linux--it's old and outdated by a mile now. They (RedHat) are up to RHEL 4.3 ?? version now and it's slick! If you want to try a RedHat based Linux that's very up to date (free to boot!), download or buy the install disks for Centos Linux (or Whitebox). It's the source code for RHEL recompiled without the REDHat identified stuff--it's legal too.

It's a very good solid OS--but I would recommend trying Ubuntu first--it's an easier switch from using Winxx for just about anyone. Or PCLinuxOS--it's an easy first time switch too.

You will find Linux has just about all the programming tools you will ever need, and then some!
« Last Edit: September 23, 2006, 09:57:25 PM by stephent »

altosack

  • Jr. Member
  • **
  • Posts: 92
Re: Data logger progress
« Reply #15 on: September 27, 2006, 09:25:03 PM »
I think Linux is great and I use it (yes, to program microcontrollers), but I would caution willib that if he wants to upgrade to a PIC24F or dsPIC from his current 16F, they are not well supported by Linux (this will probably change soon, but there are never any guarantees).


Pic16F, 18F, Atmel AVR, ARM (any version), countless others, no problem.


Willib, if you want a little taste of Linux, you can always get the pic version of gcc for Windows (gcc was originally a C compiler written for Unix/linux, but has now been ported to Windows and supports assembly/C/Fortran/Pascal quite seamlessly). If you're interested, let me know and I'll give you the link (I only know the linux link off the top of my head ;-).


Dave


P.S.: If you're looking for advice on which Linux version to get, be forewarned that you will never get a consensus on it. I use debian, and if I were going to use a Redhat style, I would use Fedora Core (oops, Stephen did mention he was using that...).

« Last Edit: September 27, 2006, 09:25:03 PM by altosack »

stephent

  • Sr. Member
  • ****
  • Posts: 268
Re: Data logger progress
« Reply #16 on: October 05, 2006, 10:15:38 PM »
Altosack---Dave.

Now on the Linux consensus--I could hardly disagree with you on that.

There's a bunch of Linux fanatics out there that will fight tooth and nail over which distro is tops--I just use the one I'm most comfortable  with..(and impressed by). And reccommend the ones I personally know will be just about as drop-in as Linux will get for New Users (I hate the word newb--newbie--noob).


I still use Windoze for tax time and since Wine can't run the Picaxe software--for that  too.

And feel very comfortable using the tool that works best in which situation.


But the Linux programming tools are top notch. And QCad for a cad software ain't a slouch either.

Have I mentioned I like Linux yet?

« Last Edit: October 05, 2006, 10:15:38 PM by stephent »