A Wireless Wood Stove Monitor on Hackaday


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2013
    Location
    Quebec, Canada
    Posts
    67

    Default A Wireless Wood Stove Monitor on Hackaday

    Hi group!

    I just want to show you my latest project made with PicBASIC: Wireless Wood Stove Monitor


    This project will be part of a bigger project and here is a clue just for you PicBASIC community:

    https://thingspeak.com/channels/20713

    Name:  WP_20151129_11_50_24_Pro_BLUR_2.jpg
Views: 606
Size:  316.8 KB

  2. #2
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: A Wireless Wood Stove Monitor on Hackaday

    Very Nice!!

    Thanks for sharing.
    I am definitely interested in your ThingSpeak stuff.
    I have been able to get a Thingspeak servier up and running on my own raspberry pi (although I haven't done much with it)

    If you want to incorporate wifi in any of your stuff I highly recommend you check out esp8266basic.com
    It is extremely easy to incorporate the esp8266 into your PIC projects to provide the wifi connectivity.
    If you click on over to the forum from the esp8266basic page you will find much discussion about posting data to thingspeak, getting ntp time, reading temp sensors, etc, etc.

    Here is a post I did here earlier...
    http://www.picbasic.co.uk/forum/showthread.php?t=20908

    So if you like BASIC and want to easily incorporate wifi then definitely check out the esp8266.

    thanks again and keep us posted on the thingspeak project.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  3. #3
    Join Date
    Feb 2013
    Location
    Quebec, Canada
    Posts
    67


    Did you find this post helpful? Yes | No

    Default Re: A Wireless Wood Stove Monitor on Hackaday

    I'll try ESP8266Basic one day or another for sure! I'm already making projets with PicBASIC and ESP8266:

    World’s First Internet Connected Lawnmower
    http://www.picbasic.co.uk/forum/showthread.php?t=20083

    Here is how I use an ESP8266 with PushingBox and ThingSpeak services
    http://www.picbasic.co.uk/forum/show...ht=#post133693

  4. #4
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: A Wireless Wood Stove Monitor on Hackaday

    Michel,
    your projects are awesome!

    I am working on interfacing an esp8266 to a PIC to control a nixie clock.
    I have it working now and am just fine tuning and adding features.
    as an example of the brilliant simplicity of using the esp8266basic...

    here is the code I have running on the esp module to get ntp time and provide it to the PIC...

    Code:
    memclear
    cls
    timesetup(-7,0)
    baudrate 9600
    serialtimeout 2000
    delay 1000
    button "Exit " [Exit]
    [Main]
    timer 100 [PicSer]
    wait
    '
    [PicSer]
    serialflush
    input picIN
    picIN = mid(picIN,1,5)
    if picIN == "Time?" then gosub [gettime]
    wait
    '
    [gettime]
    bla = time()
    hh = mid(bla,12,2) 'hour
    mm = mid(bla,15,2) 'min
    ss = mid(bla,18,2) 'sec
    '
    picOUT = hh & mm
    picOUT = picOUT & ss
    serialprint picOUT
    '
    return
    '
    [Exit] 
    end
    that is it!

    Now it is no where near as complete and capable as our beloved PICbasicpro but it really dosen't need to be. That is what the PIC is good for.
    You can run the complex code with complete reliably and have the esp module do the wifi stuff.

    And the real beauty and power of the espBASIC is that there is no complex tool chain to get it up and running. The development environment IDE is all hosted within the module itself. Once you flash the espbasic OS to the module then that is it! All the rest of code development happens in the self-hosted web page from the module.
    Last edited by Heckler; - 10th February 2016 at 06:04.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  5. #5
    Join Date
    Feb 2013
    Location
    Quebec, Canada
    Posts
    67


    Did you find this post helpful? Yes | No

    Default Re: A Wireless Wood Stove Monitor on Hackaday

    Quote Originally Posted by Heckler View Post
    Very Nice!!

    ... you will find much discussion about posting data to thingspeak, getting ntp time, reading temp sensors, etc, etc.
    OK you got me! Is it possible to do the thingspeak thing on the ESP and having a PIC do the heavy stuff and pushing the results to the ESP via the serial port? To be clear, does ESPBasic handle serial data IN easily?

    I'll give it a try with PushingBox. Having a standalone ESP board pushing notifications is very very very interesting...

  6. #6
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: A Wireless Wood Stove Monitor on Hackaday

    Hi Michel,

    here is a link to the command reference for thingspeak...
    http://www.esp8266basic.com/function...speak-api.html

    and a link to the espbasic command reference...
    http://www.esp8266basic.com/language-reference.html

    you will likely want to hop over the the forum (link at the top of his page) and do some looking there as the command reference is really lacking in example code. The command reference is also not very well organized and it can be hit or miss to find the command you are looking for.

    there is some example code for posting to thingspeak here...
    http://www.esp8266.com/viewtopic.php?f=40&t=6732

    and here is the code I am using that allows my PIC to request time from the esp module via serial at 9600 baud.
    PIC CODE
    Code:
    '=============================================================
    '          Get TIME from ESP8266-01 NTP Time Server
    '=============================================================
    SerTmout:   ' just blinks an led and tries again
        led=0
        pause 200
        led=1
        pause 200
        led=0
        pause 200
        led=1
        pause 200
    GetTime:
        txe=1     'high the serial output pin, needs to start high
        pause 100
        serin2  rxe,espbaud,3000,SerTmout,[wait(">"),SKIP 2] 'wait for esp to send ">,CR,LF"
        serout2 txe,84,["Time?"]   'ask for time by sending "Time?"
        serin2 rxe,84,3000,SerTmout,[dec2 hh,dec2 mm, dec2 ss]  'read back hh,mm,ss
    Return
    and the ESB8266-01 code
    Code:
    memclear
    cls
    timesetup(-7,0)
    baudrate 9600
    serialtimeout 2000
    delay 1000
    button "Exit " [Exit]
    [Main]
    timer 100 [PicSer]
    wait
    '
    [PicSer]
    serialflush
    input picIN
    picIN = mid(picIN,1,5)
    if picIN == "Time?" then gosub [gettime]
    wait
    '
    [gettime]
    bla = time()
    dw = mid(bla,1,3) 'dow
    mh = mid(bla,5,3) 'month
    dt = mid(bla,9,2) 'date
    hh = mid(bla,12,2) 'hour
    mm = mid(bla,15,2) 'min
    ss = mid(bla,18,2) 'sec
    yr = mid(bla,21,4) 'year
    '
    picOUT = hh & mm
    picOUT = picOUT & ss
    serialprintln picOUT
    '
    return
    '
    [Exit] 
    end
    There is a bit of a learning curve so do some reading on the espbasic forum.

    Note: the esp forum is a large forum the covers many other languages that can be run on the esp8266
    but when you click the link from Mike's www.esp8266basic.com website it takes you to a subsection of the forum just devoted to his espbasic.

    and finally here is a link to a sample project I did that reads 3 ds18b20 onewire temp sensors
    http://www.esp8266.com/viewtopic.php?f=41&t=7319

    But I think I would keep the temperature sensor work on the PIC side.


    good luck
    Last edited by Heckler; - 12th February 2016 at 16:54.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  7. #7
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: A Wireless Wood Stove Monitor on Hackaday

    NOTE:
    In the sample PIC code above, to get the time from the esp module I made a mistake.
    you need to replace the first serin2 line with this one...

    The rest of the posted code above should work with this exception.

    Code:
    SERIN2  rxe,86,3000,SerTmout,[WAIT(">"),WAIT(13),WAIT(10)] 'wait for ">" "CR" "LF"
    Last edited by Heckler; - 13th February 2016 at 02:09.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

Similar Threads

  1. More wood chuck lighting questions
    By AvionicsMaster1 in forum General
    Replies: 17
    Last Post: - 22nd January 2012, 05:45
  2. How many LEDs could a wood chuck light
    By AvionicsMaster1 in forum Schematics
    Replies: 5
    Last Post: - 18th December 2010, 07:35
  3. AC main monitor
    By tallen in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 25th August 2009, 17:23
  4. Baby Monitor
    By inoonan in forum Serial
    Replies: 2
    Last Post: - 14th September 2006, 23:54
  5. Car monitor
    By Christopher4187 in forum General
    Replies: 2
    Last Post: - 27th March 2006, 19:13

Members who have read this thread : 1

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