LinkMeter v2 Homebrew BBQ Controller - Part 1


 
Status
Not open for further replies.
Originally posted by Dave S (GeoDave):
Everything is up and running on the board and menu. For some reason my little cheap 390 1/4 watt 5% resistor works with my wishield implementation but not the Linkmeter v3.1 board. I put in a 1% and it works again. I am sure there is a good reason for this?!?
That's crazy. The tolerances in the code are pretty wide. The target is 3.6V but it should accept anywhere between 3.2V and 3.9V which is closer to 10%. I wonder if the 390 resistor is off by that much? Or the other 1k on the line?

Yeah I was able to read from the arduino serial console at 115200 baud with TX and ground hooked up with the resistors you suggested. When I plugged in the RX it gets garbled. I am going to use the 1% resistors to see if that fixes the issue.
To clarify you connect the one line from the router's ttys0 and ground through the resistor divider and you can see stuff on the serial console? Or you've got the HeaterMeter output coming in? If it is heatermeter output, the resistors aren't needed, if it is the router's you've got them on the wrong line. (it is kinda confusing because both are "transmit" depending on whose perspective it is) Data coming from the router ttys0 to the PC should be straight through (because it is 3.3V and that's good enough to count as far as the PC is concerned). Data going from PC to router ttys0 needs the resistors to knock the 5V PC signal down to 3.3V.
 
Hey Gang.... This might be a completely stupid question regarding the LCD display, but I want to check before I screw something up. I notice that there is 16 pins on the top and bottom of display board; which set of connectors do we hook-uo to, top or bottom row, or both????

Thanks
 
I'm fairly confident that the bootloader is not getting installed correctly using the ICSP. I've tried the latest optiboot from a few posts above, but none of them result in a booting Arduino. I tested this by putting a LED on pin 13, I also pulled the chip and breadboarded it and nothing there either. My last attempt was to hook it up to the LM and it just said the programmer was unavailable.

Has anyone successfully loaded a bootloader on a clean atmega chip with the v3.1 board? I'm wondering if I need to take a quick trip to Fry's and buy an Arduino board?

When I load the bootloader via the Arduino IDE the programmer runs, and finishes. I did try it without a chip in the socket and it did error out saying there was no device. So some part of it is working
icon_smile.gif


thanks,
dave
 
OK I picked up an Arduino Uno Rev3 from Radio Shack. Sure enough the boot loader isn't installed. So I tried to burn it in the Uno board using the USBtinyISP, but I just can't get it to work.

So I tried using the Uno board and breadboarded the one to be burned. No go. I must be stupid or something because I can't figure out how to get the bootloader loaded
icon_smile.gif


arghs!


EDIT:
Success!!!!! Here is what fixed it:
"Re: avrdude error
Reply #24 - 13.09.2007 at 02:11:24
I had the same errors and this is what I did to fix it:

It all has to do with your COM port which can be accessed (for windows) under Control Panel/systems/hardware/device manager/ports

With the board hooked up to your computer you will see the USB COM port. Is this COM port number under 10? If not then go the advanced options for that USB port and rename it to a number lower than 10 and be sure that it is also not a number that is currently in use.

You will also have to change the bits per second for that same USB port (this is under port settings). You will need to change it to 115200.

Then when you are in the Arduino environment...select the new COM port number that you just renamed. That should do the trick!
 
It works!!!!!

To get my boot loader on I did use the ISP header on the Uno board I bought. I'll try to do it using the heatermeter board just to test it out and will post back.

1. cd C:\Users\David\Desktop\arduino-0023\hardware\arduino\bootloaders\optiboot (my IDE install area)
2. omake atmega328_isp

You will see something like this:
../../../tools/avr/bin/avrdude -C../../../tools/avr/etc/avrdude.conf -c usbtiny
-p atmega328p -P usb -b 115200 -U flash:w
icon_redface.gif
ptiboot_atmega328.hex -U lock:w:0x2f:
m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed

To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "optiboot_atmega328.hex"
avrdude: input file optiboot_atmega328.hex auto detected as Intel Hex
avrdude: writing flash (32768 bytes):

Writing | ################################################## | 100% 19.20s



avrdude: 32768 bytes of flash written
avrdude: verifying flash memory against optiboot_atmega328.hex:
avrdude: load data flash data from input file optiboot_atmega328.hex:
avrdude: input file optiboot_atmega328.hex auto detected as Intel Hex
avrdude: input file optiboot_atmega328.hex contains 32768 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 17.16s



avrdude: verifying ...
avrdude: 32768 bytes of flash verified
avrdude: reading input file "0x2f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x2f:
avrdude: load data lock data from input file 0x2f:
avrdude: input file 0x2f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude: safemode: Fuses OK

avrdude done. Thank you.

At this point you load the hm.hex in the web browser. (I used my Uno board again, but will run through the web to test as well)

At this point I saw the green led flash twice and the LCD screen backlight turn on, but I couldn't see anything on the LCD.

I tuned the pot by the LCD hookup until I could see the LCD and it was working!!

The buttons worked fine, I can change settings with the buttons, and see them update on the webpage, and update the webpage and see the changes on the LCD.

I don't have any probes yet, so this is about as far as I can get for now.

To hook up the LCD I was wondering which way was up. If you look at the LCD on the back the lettering "right-way". I hooked up the top set of connections. I used an old floppy cable to connect to the right angle headers on the LCD and just soldered the cut end of the cable onto the heatermeter board. This worked out really well.

So I'm happily waiting for my probes to arrive so that I can try it out some more.

Question. Can I test the blower control circuitry without probes? I saw a manual fan mode option, does this allow me to run the fan?

After building this I think I could put these boards together in a few hours at most. If anyone is interested I'd consider documenting my next build with pictures? I have two more to make. Let me know.

dave
 
OK did some testing.

1. loading the boot loader via the ISP interface on the heatermeter board with my USBtinyISP programmer worked fine.
2. Loading the heatermeter firmware via the web interface onto a bootloader only build did not work. I got an error about the stk_500 programmer not available.
3. I then loading the sketch via the Arduino IDE.
4. Updating the heatermeter image via the webpage worked fine. So it appears that it will upload if you already have heatermeter running on it, but not if you have a newly bootloaded part.

dave
 
OK I am trying to compile the Heatermeter software with Heatermeter Networking so that I can use a wishield and I keep getting this error.

hmmenus.cpp: In function 'state_t menuNetworkInfo(button_t)':
hmmenus.cpp:219: error: 'zg_get_rssi' was not declared in this scope

I have no clue what to do to get past this error. Any help would be great thank you.
 
Originally posted by Scott Miz:
I notice that there is 16 pins on the top and bottom of display board; which set of connectors do we hook-uo to, top or bottom row, or both????
That's one of the nice parts about the NewHaven LCD, they're both the same so you can connect whichever is more convenient for your installation. Before I had the 16 pin header on the LM 3.1 board, this was helpful because I ran 5V and ground between all the necessary pins on one side then did all the connections on the other.

And to clarify, looking at the LCD from the front (view) side, pin 1 is on the left, pin 16 is on the right. There should be some silkscreen on the back that indicates that as well.
 
Originally posted by D Peart:
Question. Can I test the blower control circuitry without probes? I saw a manual fan mode option, does this allow me to run the fan?
Dave you are awesome! I'm sorry I haven't been around much while you're struggling through this but you're doing great. Thank you for keeping us updated, I'm going to see if I can pull some of your information out to get into the wiki to help other people. You're absolutely right about needing heatermeter to be on there before the web update will work. I need to make that more clear in the wiki as well.

So is there anything to add about flashing the bootloader for the first time with the HM4LM board's ICSP header? Does it work fine but you just couldn't upload after the first attempt because of that hidden COM port baud needed to be set?

To answer your question about the blower, yes just set to manual mode = yes and then use the up and down buttons to control the blower speed. You can also use the web interface if you do a manual set command to a negative number. Go to the config page then enter sp=-100 for 100% or sp=-50 for 50% and I think you get where this is going. Positive numbers are temperature, negative numbers are manual percents.
 
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 D Peart:
Question. Can I test the blower control circuitry without probes? I saw a manual fan mode option, does this allow me to run the fan?
Dave you are awesome! I'm sorry I haven't been around much while you're struggling through this but you're doing great. Thank you for keeping us updated, I'm going to see if I can pull some of your information out to get into the wiki to help other people. You're absolutely right about needing heatermeter to be on there before the web update will work. I need to make that more clear in the wiki as well.

So is there anything to add about flashing the bootloader for the first time with the HM4LM board's ICSP header? Does it work fine but you just couldn't upload after the first attempt because of that hidden COM port baud needed to be set?

To answer your question about the blower, yes just set to manual mode = yes and then use the up and down buttons to control the blower speed. You can also use the web interface if you do a manual set command to a negative number. Go to the config page then enter sp=-100 for 100% or sp=-50 for 50% and I think you get where this is going. Positive numbers are temperature, negative numbers are manual percents. </div></BLOCKQUOTE>

I as able to flash via the HM4LM boards ICSP header, but the optiboot bootloader only flashes the pin 13 once, then stays on. This is different than what my Uno board does and is different that what the docs say. This led me to believe that the bootloader didn't flash. After flashing the bootloader I did try to load the HM.hex file via the router just to see if it would work but got a communication error so I figure that the bootloader really didn't take. That was when I went to Radio Shack and bought the uno.

If you don't have a serial programmer, like on the uno board how are you supposed to get the HM.hex downloaded for the first time? I still don't understand that.

I may have burned something out though. I was playing around with it and it started smelling like smoke
icon_frown.gif
Turns out I got a stray jumper wire under the board and it shorted out the 12V supply. Now when I turn it on, I just get the No Pit Probe message and can no longer navigate. I checked and I still get 5V to the button, and obviously the LCD as I can read the message, 12V to the blower header, but I can't figure out what I did. I don't have any probes, they are on order, hopefully will get them Saturday. Ideas?

thanks,
dave
 
Originally posted by D Peart:
If you don't have a serial programmer, like on the uno board how are you supposed to get the HM.hex downloaded for the first time? I still don't understand that.

I may have burned something out though. I was playing around with it and it started smelling like smoke
icon_frown.gif
Turns out I got a stray jumper wire under the board and it shorted out the 12V supply. Now when I turn it on, I just get the No Pit Probe message and can no longer navigate. I checked and I still get 5V to the button, and obviously the LCD as I can read the message, 12V to the blower header, but I can't figure out what I did. I don't have any probes, they are on order, hopefully will get them Saturday. Ideas?
That's odd about the pin 13 staying on. It might actually be more something HM does when it starts up to initialize the SPI bus that does it. I'll have to check on that.

If you don't have a serial programmer, the first time you flash the hm.hex you have to do it using the reset button. See the Installing HeaterMeter from the router section in the wiki. I dunno if there's a better way to organize the information there, because I think it is a bit confusing if you're at the "I just assembled my HM4LM, now what?" stage. There's a lot of different ways you can do things I guess that makes it confusing. Let me know if you can think of a better way to organize it.

I've done that before with a piece of wire or a bit of clipped component lead that gets under the board and shorts it out on the table. Gah the damage you can do there! AVRs are pretty resilient and can take up to 12V of power, but they don't like high current (from a short). Is it just the buttons not working? Maybe check and see if when you press the buttons the return line from the buttons goes from 0V to some other voltage. If that looks good make sure that is the same voltage you're getting at pin 23 of the ATmega. If it is, it is possible you fried the analog inputs and should just be able to replace the chip. If it isn't, then you might have burned the trace and can try just running a wire from the pin header to pin 23 to jump it.
 
Originally posted by Bryan Mayland:
If you don't have a serial programmer, the first time you flash the hm.hex you have to do it using the reset button. See the Installing HeaterMeter from the router section in the wiki. I dunno if there's a better way to organize the information there, because I think it is a bit confusing if you're at the "I just assembled my HM4LM, now what?" stage. There's a lot of different ways you can do things I guess that makes it confusing. Let me know if you can think of a better way to organize it.

Ok just re-read and now remember why I didn't do it that way. Since the libiwi (or whatever its called) library isn't in the linkmeter build I cannot connect the LM to the internet so the wget won't work. I guess I could have ftp'd it over, but didn't go that way.

dave
 
Originally posted by D Peart:
Ok just re-read and now remember why I didn't do it that way. Since the libiwi (or whatever its called) library isn't in the linkmeter build I cannot connect the LM to the internet so the wget won't work. I guess I could have ftp'd it over, but didn't go that way.
Yeah I am working that by the way, the luci dependency didn't auto-check it when I did the last pull so it wasn't built in. I have an image with it in but the sysupgrade borked my router. I think maybe if you sysupgrade to a larger firmware it messes up the overlay filesystem? In any case, I need to physically connect a cable to it to tftp to the bootloader so I haven't gotten to it yet.
 
Alright, there's a new snapshot version available with libiwi in it:
http://capnbry.net/linkmeter/snapshots/trunk/

Note that if you use the web interface to "join" a wireless network and create a wwan interface, the time won't be right when you start. This is because the time only updates via NTP when the wan interface comes up unless you edit a config file, which defeats the point of using the web interface. Actually... I don't see anything launching rdate any more.

Also unfortunate is that for some reason on Nov-8 OpenWrt committed a patch that "prevents accidentally bridging [client] mode interfaces". This blocks the manual editing of the config file from working unless you remove the patch.

Sorry, just working out loud there. So I guess the preferred method of making it a wireless client is to use the "join" feature from the web interface then add `rdate 0.openwrt.pool.ntp.org` to the rc.local (which is under system -> startup I believe)
 
I don't know if anyone else is interested, but I made a cutout template for the LCD panel. Print the PDF file and it "should" print to scale. You can then use it to cut your case openings.

I don't have a place to host it, so if you'd like it PM me an email address and I'll email it to you.

dave
 
Originally posted by Bryan Mayland:
Alright, there's a new snapshot version available with libiwi in it:
http://capnbry.net/linkmeter/snapshots/trunk/

Note that if you use the web interface to "join" a wireless network and create a wwan interface, the time won't be right when you start. This is because the time only updates via NTP when the wan interface comes up unless you edit a config file, which defeats the point of using the web interface. Actually... I don't see anything launching rdate any more.

Also unfortunate is that for some reason on Nov-8 OpenWrt committed a patch that "prevents accidentally bridging [client] mode interfaces". This blocks the manual editing of the config file from working unless you remove the patch.

Sorry, just working out loud there. So I guess the preferred method of making it a wireless client is to use the "join" feature from the web interface then add `rdate 0.openwrt.pool.ntp.org` to the rc.local (which is under system -> startup I believe)

this version worked for me. I ended up just configuring it by editing the files with vi. It's up and running great now. I've had the fan set to 30% and am going to run it for several hours to see if things run OK. So far the FET is warm to the touch, but not hot at all.

How did you hook up your ambient probe? Just curious.

thanks,
dave
 
How do I read the datasheet for the thermister and come up with the correct constants to get the right temperature?

I'm more that a little confused on how to do this, though I'll keep reading
icon_smile.gif


I found this post:
http://tvwbb.com/eve/forums/a/...571029706#3571029706

And tried those coefficients because it is the same part number, but I'm reading 113 on the HM while my thermometer is reading 78.

I set it by sending this command via the webpage:
pc0=8.68132E-004,2.54902E-004,1.77129E-007,0,2

suggestions?

One other question. Do we need to have co-efficients for the maverick probes or are they good to go?
dave
 
Having lots of fun now
icon_smile.gif


I noticed that when I switched from a Yes to a No the s from the Yes was left displaying on the screen. So just to see if I could do it, I fixed the code:
line 235 of hmmenus.cpp to say:
lcdprint_P((editInt != 0) ? PSTR("Yes") : PSTR("No "), false);

Basically I just put a <space> after no to make it three characters long to overwrite the s in Yes.

I compiled, uploaded it via my Uno board and it works! I know it's really simple, but it worked
icon_smile.gif


As I was doing this, I wanted to create a hm.hex file to upload via LM, but could not figure out how to do it in the Arduino environment. Any pointers on how you do this?

thanks,
dave
 
I was able to get better readings on the thermister by using the offset setting. Is this the expected way to do this? I have a -37 degree offset for the thermister.

There is another formating issue I fixed. The max automatic fan speed needs a %3d in it to make for a clean display.

When I put the HM into a manual LidOpen setting, it only stays there until the temp is at the set point. The issue is that when done manually the temp is at the setpoint so it comes back out immediately. This makes it not work well as I could never get the lid off fast enough to have a temp drop before leaving lid open mode. Maybe we put a 30s delay before leaving lid open mode, giving us time to open the lid?

Pretty cool that it is working.
dave

EDIT: For the lid open hysteresis I changed lines 327-331 of gridpid.cpp to be this:
int pitTemp = (int)probePit->Temperature;
if (pitTemp >= _setPoint &&
(LidOpenResumeCountdown <= LidOpenDuration - 30))
{

I hard coded the 30 seconds, but it seems to work well for me. I can now go into lidopen mode and actually open the lid and stay in the mode.

dave
 
Status
Not open for further replies.

 

Back
Top