Data logger clock and array


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Cool

    Quote Originally Posted by PicLearner View Post
    I have some experience with Proton picbasic.
    You know this forum isn't for Proton picbasic right?

    The data logger will be taking every 1s-10s samplings adjustable from Excel.
    So Excel is going to talk to the PIC?

    What do you think the best way to make 20 minutes Clock?
    Make a whole bunch of 1 second clocks and keep track of them.

    I've never used USB before but it might be a good idea to learn it.
    There's one really really really good thread here on how to do just that using an 18F4550.

    How to communicate between USB and excel? Would it not require custom PC software? Using serial port I can even use HyperTerminal to import the data.
    Pull it in using that link I eluded to above, and dump the data to a .csv file, then import it to Excel. Or write a really cool VBA app to pull the data from the file as it comes in. Doesn't matter.

    I'd like to keep data logger very simple without external parts. This is just a hobby project and I know once my friends would see the data logger I would have to make them as well. I'd prefer to keep the project with minimum parts so I wouldn't even need a PCB and it'll be easy to build it for my friends.
    Now that's classic... And just how do you suggest doing that? Chips without a PCB... Are you going to mount this stuff on wheat bread or Pringles chips or what?
    What exactly do you plan on datalogging again?
    Last edited by skimask; - 24th September 2008 at 23:16.

  2. #2
    Join Date
    Sep 2008
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    In order for me to keep it very simple it would take ADC from lipo cells which are 3.7v. I might use a resistor 4.7k on the connector it self or without a resistor since it shouldn't have any spikes in voltage. To take frequency I was thinking just to use 2 resistors 1k and 100ohm to drop the voltage. To power up the pic I was thinking to use TO-92 0.5% LDO and 1 or 2 small capacitors. I'm not going to use voltage reference to keep it simple and ADC probably should work within 1%-3% accurate. As you can see 1 PDIP microchip, 1 LDO, 1-2 capacitors and just connector glued and soldered directly to microchip. Using software rs232 I don’t need Max232 so I can just use serial female connector with 2 resistors and connect it directly to microchip whenever I need to upload the data. Sure I can make PCB at home but I just want to keep it very simple so my friends can use it as well just to pay for parts or so. I bought PicBasic just for fun since I like electronics and I don't intend to make profit but maybe I might sell it for a small fee. I have regular job which pays my bills and I don't mind to spend money for my hobby that I like.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by PicLearner View Post
    To power up the pic I was thinking to use TO-92 0.5% LDO and 1 or 2 small capacitors.
    You should be able to drive a PIC directly from one LiPo, no regulators need.

    I'm not going to use voltage reference to keep it simple and ADC probably should work within 1%-3% accurate.
    There's a few PICs out there that have a built-in .6v reference which you could 'reference against'.

    As you can see 1 PDIP microchip, 1 LDO, 1-2 capacitors and just connector glued and soldered directly to microchip.
    If you think it'll run, go with it... I don't think it'll run and last, but that's just me.

    Using software rs232 I don’t need Max232 so I can just use serial female connector with 2 resistors and connect it directly to microchip whenever I need to upload the data.
    Same thing with the USB, the connector, 2 wires to the PIC (D+/D-), an extra cap, and the right firmware.

  4. #4
    Join Date
    Sep 2008
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    double post deleted
    Last edited by PicLearner; - 25th September 2008 at 00:13.

  5. #5
    Join Date
    Sep 2008
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    Yeah I know. So far I love the forum, it's got so much info to learn from...

    Quote Originally Posted by skimask View Post
    You know this forum is Proton picbasic right?
    I was thinking to use Excel to change settings in microchip using PLX-DAQ or Realterm OCX example. I can adjust number of batteries, number temp sensors connected to pic just by using serout command to update EEPROM of Flash to store different settings.

    Quote Originally Posted by skimask View Post
    So Excel is going to talk to the PIC?
    Let's say I use interrupt for 1 second using 16bit timer. 8mhz / 4 cycles / 16bit timer 65536 = 0.000030517578125 multiply by 256 prescaler = 0.0078125. 1 second / 0.0078125 = 128. As I understand it should interrupt the software 128 per second. My guess it might conflict with a software running in the background or I'm wrong.

    I would love to hear more about that.
    Quote Originally Posted by skimask View Post
    PLX-DAQMake a whole bunch of 1 second clocks and keep track of them.PLX-DAQ
    Very simple, please read my previous post.

    Quote Originally Posted by skimask View Post
    Now that's classic... And just how do you suggest doing that? Chips without a PCB... Are you going to mount this stuff on wheat bread or Pringles chips or what?
    What exactly do you plan on datalogging again?

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by PicLearner View Post
    Yeah I know. So far I love the forum, it's got so much info to learn from...
    Let me try that one again...

    You know this forum is for MeLabs PicBasicPro and not Proton Basic right?

  7. #7
    Join Date
    Sep 2008
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Let me try that one again...

    You know this forum is for MeLabs PicBasicPro and not Proton Basic right?

    Yeah I know. That's what I said I bought MeLabs PicBasicPro but I've used Proton lite to learn on

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by PicLearner View Post
    Yeah I know.
    Ok, just checking...

    That's what I said I bought MeLabs PicBasicPro
    Having trouble finding that particular sentence...

  9. #9
    Join Date
    Sep 2008
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    Sorry I didn't say what data logger is for. This is just for Remote Control airplanes/helicopter so I know what battery voltage is and motor RPM, temperature of the battery and speed controller. The main reason to use minumum external parts so it is very light because every gram counts on small electric RC helicopters. Everything looks very easy to make since I already did everything bit by bit by writing to flash and reading from flash. Getting ADC to work properly in 8bit and 10bits and CCP to ger RPM from the motor. Debugging the pic using RS232 and HyperTerminal but I just can't figure it out how to make clock. Can anybody please tell me if my calculation is right?
    Let's say I use interrupt for 1 second using 16bit timer. 8mhz / 4 cycles / 16bit timer 65536 = 0.000030517578125 multiply by 256 prescaler = 0.0078125. 1 second / 0.0078125 = 128. As I understand it should interrupt the software 128 times per second. How do I figure it out if it will not conflict during ADC, CCP, EEPROM, CCP sampling, writing and erasing? I know I can disable interrupt routine during any of these sampling but it'll mess up the time. Is it even possible to do that without external RTC?
    Last edited by PicLearner; - 25th September 2008 at 00:40.

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by PicLearner View Post
    Let's say I use interrupt for 1 second using 16bit timer. 8mhz / 4 cycles / 16bit timer 65536 = 0.000030517578125 multiply by 256 prescaler = 0.0078125. 1 second / 0.0078125 = 128. As I understand it should interrupt the software 128 times per second. How do I figure it out if it will not conflict during ADC, CCP, EEPROM, CCP sampling, writing and erasing? I know I can disable interrupt routine during any of these sampling but it'll mess up the time. Is it even possible to do that without external RTC?
    8Mhz / 4 = 2Mhz...
    Clocking a 16 bit timer off the instruction clock @ 2Mhz = 2Mhz / 65536 = 30.517578125 interrupts per second (have to take the 1/x of the result, that's the part you forgot).
    Set up the interrupt routine to count to 30, then take a sample. Yes, you'll be 16.69ms off for each second, unless you reload that particular timer at each interrupt with a correction factor to make it exactly one second. Look up the phrase PIC Multi-Calc.
    If you clock an 8 bit timer off the instruction clock @ 2Mhz, 2Mhz / 256 = 7812.5 interrupts per second. Set up that interrupt routine to count to 7812, then take a sample. With the 8 bit timer, you'll only be 65us off in each second.

Similar Threads

  1. Bit Angle Modulation (BAM) in a PIC
    By Bronx68 in forum mel PIC BASIC Pro
    Replies: 150
    Last Post: - 24th February 2015, 13:41
  2. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  3. PIC HSERIN problem
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 20th July 2008, 11:08
  4. Using SPI with External Interrupts
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th June 2008, 04:08
  5. 16-bit SPI problem
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th June 2008, 15:42

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts