LinkMeter v2 Homebrew BBQ Controller - Part 1


 
Status
Not open for further replies.
Thanks for all your help Kyle & Bryan. Finally got my ATMEGA bootloader burned. I guess there are several ways to go about it. I followed the guide below the picture of the LinkMeter on Page 1 (How to program an AVR with another Arduino). I used the 16mhz resonator from the HM parts list on my breadboard per the diagram. The biggest problem I had was working out the avrdude commands and making sure everything I was flashing (optiboot_atmega328.hex) was in my Home folder (Mac).

So once again, thanks for all your help....on my way to my new LinkMeter
icon_wink.gif
 
Update: Got the HeaterMeter sketch uploaded without any problems to the microcontroller! Woo Hoo!! Now I just need my circuit board (Should be here Monday or Tuesday) and I can start putting it all together!! Pretty soon I will be automatically controlling my
wsmsmile8gm.gif
 
Originally posted by Dave S (GeoDave):
I wonder is someone has written a mobile plotting api for jquery. You could have the temps at the top taking up 1/5th of the screen with a mobile version of the chart taking up the rest. You could then have an expandable dashboard at the bottom to control the lid open mode, max fan speed, etc. Just an idea...probably pretty ambitious...you have surprised in the past.
You don't really need a mobile plotting API, because flot works just fine on mobile platforms. Here's a little test I did this morning:


The main reason there's not two versions of the site though is because then I'd have to maintain two versions of the site. It wouldnt't be a problem if the index page was well designed, but it isn't and would need to be refactored before being easy to power two versions.
 
Is there any plans for the SD card? Getting all my parts collected for the linkmeter build and wondering if it's worth adding.
 
Originally posted by Bryan Mayland:
You don't really need a mobile plotting API, because flot works just fine on mobile platforms.

The main reason there's not two versions of the site though is because then I'd have to maintain two versions of the site.

Still looks good small!

I can understand how it would be a pain to maintain even more code.

I have been looking through the code to see how the serial data is handled by the Linkmeter code. Am I correct to say that the serial data is received and stored in a "circular buffer" via the rrdtool in lua. Then your lua code somehow creates a JSON object for the buffered data which is then used by jquery/float code. I think this stuff is so incredibly interesting.
 
Well, I think I may be in a bit over my head. I hope you guys can help me out a bit here.

I decided to try this project and have very little electronics experience and no Arduino experience. Anyway I ordered all the parts (before realizing I didn't need them all) and got boards from DorkbotPDX. Picked up a WRT54GL.
I bought an atmega pre-loaded with bootloader from Adafruit (which didn't come with a socket, ugh). I dont have an ISP programmer or what have you so I decided I would try the method from the router.

I soldered the board together (I think). I got a bit confused when trying to decipher what was optional and whats not. So I pretty much have a fully populated board without the radio for the wireless probes.

I flashed the WRT54GL with the JAN28 build of the Linkmeter firmware. Plugged the heatermeter board to the serial on the router. Now, the power supply is confusing me. Is the 3.3v from serial enough? or do I need to pull 5v/12v from somewhere else on the router (I cant tell where the yellow wire is going to in Bryan's picture)?

Next issue is Linkmeter/openwrt seems to be crapping out on me. I can get logged in and to the config page. But when I try to start exploring, ill click a link and it will go to some url like 192.168.200.1/luci/;stok:43219875239/admin/lm/fw
I cant remember the exact url right now but the ;stok
icon_frown.gif
randomnumbers) in there is throwing me off, just doesn't look right. Anyway after that the router seems to crash, can no longer access any pages or even ping.

Also at this point I have not connected any button board, lcd, or probes; if that makes a difference?

I was planning on buying a blower from Auber Instruments for this project instead of messing around with trying to mount a digikey one. Has anyone else used the AuberIns blower for the heatermeter?

So that is kind of where I am at right now. I would really appreciate if you guys can help me along a bit.
 
Hey Guys, have another question for you. I flashed my WRT54G v1.0 router with OpenWRT version 2.4 (as recommended in the guide for my router model on the OpenWRT website) and made all the NVRAM changes per website. Logged into Luci, went to the FlashFirmware tab and uploaded yesterdays build of LinkMeter firmware. Directions said to wait a couple of minutes and then try to access router through IP address again. Couldn't access router at all and DIAG light staying on steady.

Is this router bricked?

If it is...how can I unbrick it? Do I need an FTDI cable to access the router through its serial port?

I did try to acces the router using Telnet and I can't open the router address (192.168.1.1 is this the correct address or should it be 192.168.200.1?).

Thanks in advance for your help!
 
Originally posted by James G.:
Is there any plans for the SD card? Getting all my parts collected for the linkmeter build and wondering if it's worth adding.
I have one in my device and use it for my database stash. The stash concept will be fleshed out a little more to include storing description, keywords, maybe some annotations, but that's about it. I also created a small swap file which gives me a little extra breathing room on memory when something goes wrong.
 
Originally posted by Dave S (GeoDave):
I have been looking through the code to see how the serial data is handled by the Linkmeter code. Am I correct to say that the serial data is received and stored in a "circular buffer" via the rrdtool in lua. Then your lua code somehow creates a JSON object for the buffered data which is then used by jquery/float code.
That's pretty close! Yeah the lucid server calls in to linkmeterd when there's data on the serial port to serialHandler() (used to be inline in the serialPolle structure but recently pulled out to its own function). That function uses the linesource class to split it line by line, the beginning of each line is checked against the segmentMap structure for a handler. segStateUpdate() is the one that handles the temperature updates. From there, the line is split into fields, the values are stored in the JSON_TEMPLATE structure as well as passed through to the rrd file, which is a sort of database that stores:
360 points of data where every point is the average for 10 seconds (1 hour)
360 points of 1 minute average (6 hours)
360 points of 2 minute average (12 hours)
480 points of 3 minute average (24 hours)

If the web browser has subscribed for events, via an lmclient LMSS command, a copy of the JSON object is passed back-- through the UNIX domain socket /var/run/linkmeter.sock to the LUA receiver running in the web servering process to the client. This is the same thing that happens when you do a poll request to the URL /lm/hmstatus, only in that situation there's only one JSON object sent back and the connection is closed. Once in the web browser, the data is appended to the flot datasource and the graph is redrawn.

Because the graph also needs a history, the browser makes a request to /lm/hist, which is served by the web server querying the rrd database and returning a CSV file of the history at one of the above-mentioned resolutions. This is all handled internal to the web server, without requiring going to linkmeterd.

Magic!
 
Originally posted by Brandon Sungur:
I soldered the board together (I think). I got a bit confused when trying to decipher what was optional and whats not. So I pretty much have a fully populated board without the radio for the wireless probes.

I flashed the WRT54GL with the JAN28 build of the Linkmeter firmware. Plugged the heatermeter board to the serial on the router. Now, the power supply is confusing me. Is the 3.3v from serial enough? or do I need to pull 5v/12v from somewhere else on the router (I cant tell where the yellow wire is going to in Bryan's picture)?
What you've built should be fine. Yes you do need 12V coming in to the board to power it. The 3.3V doesn't power anything aside from the RF12 radio. Just run a line like my yellow wire from the 12V plug on the router to the +12V pin on the HeaterMeter board. You don't need ground wire, there's already one included in the pin header connection.
Next issue is Linkmeter/openwrt seems to be crapping out on me. I can get logged in and to the config page. But when I try to start exploring, ill click a link and it will go to some url like 192.168.200.1/luci/;stok:43219875239/admin/lm/fw
I cant remember the exact url right now but the ;stok
icon_frown.gif
randomnumbers) in there is throwing me off, just doesn't look right. Anyway after that the router seems to crash, can no longer access any pages or even ping.
It might be the web server crashing on account of some garbage coming in on serial from the HeaterMeter board if it isn't powered. Does it still crash if the HeaterMeter board isn't plugged in? When it seems to crash, can you still SSH or telnet to it? The stok garbage is annoying, but it is your session ID used in conjunction with your login cookie. If there was no stok, I could make a link on this page that would be able to control your LinkMeter just by visiting this page in a vulerability known as cross-site request forgery.
I was planning on buying a blower from Auber Instruments for this project instead of messing around with trying to mount a digikey one. Has anyone else used the AuberIns blower for the heatermeter?
I noticed last week that the 6.5CFM blower Auber sells is actually identical to the blower in the parts list that I selected when I first started this project. Their attachment mechanism is a 2.1mm barrel jack just like our power plug is I believe.
 
Originally posted by Bryan Mayland:
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by James G.:
Is there any plans for the SD card? Getting all my parts collected for the linkmeter build and wondering if it's worth adding.
I have one in my device and use it for my database stash. The stash concept will be fleshed out a little more to include storing description, keywords, maybe some annotations, but that's about it. I also created a small swap file which gives me a little extra breathing room on memory when something goes wrong. </div></BLOCKQUOTE>

When you do figure out the stash functionality, will you consider allowing us to specify a path for storage? I'd rather just nfs mount something on my local network rather than go to the trouble of integrating an SD card.

P.S. The mobile flot graphs look awesome, hope it looks as nice on iPhone..
icon_smile.gif
 
Originally posted by Jay Bremner:
Hey Guys, have another question for you. I flashed my WRT54G v1.0 router with OpenWRT version 2.4 (as recommended in the guide for my router model on the OpenWRT website) and made all the NVRAM changes per website. Logged into Luci, went to the FlashFirmware tab and uploaded yesterdays build of LinkMeter firmware. Directions said to wait a couple of minutes and then try to access router through IP address again. Couldn't access router at all and DIAG light staying on steady.
No it isn't bricked, it probably just does the same thing mine does 9 times out of 10 when I try to flash a new firmware on it. It will still take a new image but only over tftp to 192.168.1.1. You'll need to use the "linkmeter-wrt54g-squashfs.bin" image though, as the router bootloader only accepts BIN files. You've just got to set your machine's IP address to something 192.168.1.x, unplug the router, plug it back in and almost immediately start your tftp and it should flash and you'll be good to go. However, you will lose any settings you'd made.
 
Originally posted by Bryan Mayland:

I noticed last week that the 6.5CFM blower Auber sells is actually identical to the blower in the parts list that I selected when I first started this project. Their attachment mechanism is a 2.1mm barrel jack just like our power plug is I believe.

Good to know. I bought the blower and started figuring out how I was going to fabricate a bracket, etc, then I found that Auber one. I might just cut my losses and buy one since in the end it's going t end up costing me nearly as much to hack something together that doesn't even have a nice damper.
 
Originally posted by M Rochford:
Is all this going to change once "Raspberry Pi" is released?
Most likely. The HeaterMeter PCB will be redesigned to mate with the Pi's expansion header. The need for an USBTinyISP will go away too, because you won't need a bootloader on the ATmega, as I'll be able to program it directly using the Pi's SPI bus master. The basic operation of the HeaterMeter will be unchanged.

Software-wise, things will be probably very similar. The majority of the LuCI website will go away, leaving just the LinkMeter stuff.

The only hardware problem I am looking at is that the Pi is an inch tall, the HeaterMeter board is about a half inch overall, and then the LCD adds another half inch plus, so you're looking at an overall height of 2+ inches, which sort of sucks considering the Pi is only 2.2 inches wide. It would be as tall as it is wide! The other problem is that the Pi is so small that it doesn't have any mounting holes, which could make mounting a HeaterMeter side-by-side with it a little loose.
 
Originally posted by Kyle Christensen:
When you do figure out the stash functionality, will you consider allowing us to specify a path for storage? I'd rather just nfs mount something on my local network rather than go to the trouble of integrating an SD card.

P.S. The mobile flot graphs look awesome, hope it looks as nice on iPhone..
icon_smile.gif
You can do that now maybe. The stashpath is in the /etc/config/lucid file. I haven't mounted a remote nfs share in 10 years at least so give it a try and see if you can mount it, and if you can then just change your stashpath.

Check out this link on your iPhone and see if it works LinkMeter mobile mockup
 
Originally posted by Kyle Christensen:
Good to know. I bought the blower and started figuring out how I was going to fabricate a bracket, etc, then I found that Auber one. I might just cut my losses and buy one since in the end it's going t end up costing me nearly as much to hack something together that doesn't even have a nice damper.
I actually considered it myself last week when I saw it. My 2 year old cardboard mockup is beginning to get a little ratty and I tried cutting out my fan template in metal and didn't do a very good job again. Oddly enough, the design the Ed recommended I make back then is the same design as the Auber, although they have the nice mounting spring and shutter. 50 bucks though for a $12 part and some metal!
 
Originally posted by Bryan Mayland:
I actually considered it myself last week when I saw it. My 2 year old cardboard mockup is beginning to get a little ratty and I tried cutting out my fan template in metal and didn't do a very good job again. Oddly enough, the design the Ed recommended I make back then is the same design as the Auber, although they have the nice mounting spring and shutter. 50 bucks though for a $12 part and some metal!

The way I see it, by the time I bought a dog bowl, screws, some type of sheet metal and aluminum to fabricate brackets, and paid the $200 deductible to have my fingers sewed back on, I'd have been better off buying the Auber.

The mockup looks great on the iPhone, the only issue is when you rotate the phone into landscape mode the y-axis for the graph jumps to the middle of the screen.
 
Originally posted by Bryan Mayland:
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by Jay Bremner:
Hey Guys, have another question for you. I flashed my WRT54G v1.0 router with OpenWRT version 2.4 (as recommended in the guide for my router model on the OpenWRT website) and made all the NVRAM changes per website. Logged into Luci, went to the FlashFirmware tab and uploaded yesterdays build of LinkMeter firmware. Directions said to wait a couple of minutes and then try to access router through IP address again. Couldn't access router at all and DIAG light staying on steady.
No it isn't bricked, it probably just does the same thing mine does 9 times out of 10 when I try to flash a new firmware on it. It will still take a new image but only over tftp to 192.168.1.1. You'll need to use the "linkmeter-wrt54g-squashfs.bin" image though, as the router bootloader only accepts BIN files. You've just got to set your machine's IP address to something 192.168.1.x, unplug the router, plug it back in and almost immediately start your tftp and it should flash and you'll be good to go. However, you will lose any settings you'd made. </div></BLOCKQUOTE>

Thanks, Bryan!
 
So I must hang my head in shame. Last night I uploaded the linkmeter image to my wrt54gl. Long story short. Set the password, logged in a couple times as I was playing with the software. Things were good. This morning I couldn't login. $#&*! I have no idea what I did. Anyways, what are my options for starting over after getting locked out?
 
Status
Not open for further replies.

 

Back
Top