LinkMeter v2 Homebrew BBQ Controller - Part 1


 
Status
Not open for further replies.
I made my 4-way button board yesterday and got it working. I just etched it myself using a toner transfer method as I have a really old toner based photo copier.

Saturday I hope to populate a board and figure out how to load the bootloader with my isp programmer. Any pointers from any out there? I've never done it, and done even know which bootloader to install
icon_smile.gif


thanks,
dave
 
One other question. Is there room to socket the ATMega on the rev 3.1 board or are things too close to socket?

thanks,
dave
 
Originally posted by D Peart:
Bryan,

Do you have a link to the bootloader of choice for this project?

thanks,
dave

Dave,

I used the one in the wiki section, I believed that to be correct. Don't have my boards yet to test, but that is what I used...

Scott
 
Originally posted by D Peart:
One other question. Is there room to socket the ATMega on the rev 3.1 board or are things too close to socket?

thanks,
dave

Well I can answer this for others, yes you can socket the ICs. I used two 14pin sockets for the ATmega and one for the shift register.
 
Originally posted by Scott Miz:
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by D Peart:
Bryan,

Do you have a link to the bootloader of choice for this project?

thanks,
dave

Dave,

I used the one in the wiki section, I believed that to be correct. Don't have my boards yet to test, but that is what I used...

Scott </div></BLOCKQUOTE>

Scott,
I must be missing something because I can't find the bootloader on the wiki. I'm looking for the bootloader* files that I can put into Arduino IDE to flash to the board.

I did get the heatermeter code installed an compiling.

Also, should pin 13 flash if the boot loader is loaded correctly? I hooked up a temporary LED to pin 13 to see if it flashed per the Arduino documentation, but for me it just stays on. Maybe because I flashed the arduino-023 bootloader? That is why I'm looking for the older one.

thanks all,
dave
 
Originally posted by Bryan Mayland
icon_biggrin.gif
o you have an FTDI cable? Or any sort of USB serial cable? You can use that to see what's going on and it usually will tell you what you need to do to fix it (well, point you in the direction of the problem). If you have a 5V one you can just use a 4.7k/10k voltage divider on you USB side's transmit line.

I tried using the serial port again on the Arduino and it worked! It works on my laptop but not my desktop. However, I can only read data on the console using the TX pins. When I hooked up the RX the data gets garbled...presumably because there is some issue with the voltage. In any case I was able to get it into failsafe mode and working again. I couldn't figure out what drivers I need to install to get internet/wifi going so I flashed the WRT150N version of Attitude Adjustment/trunk and everything worked. Only problem was that there were a lot of extra files that took up too much space on the router to put the Linkmeter stuff on. So, I wrote down all the broadcomm files that were on the working version...then reflashed with the Linkmeter build and now I am getting this error:

_tftpd_open(): retries=2/3
Failed.: Timeout occured
CMD: [flash -ctheader : flash1.trx]
Reading :: _tftpd_open(): retries=0/3
_tftpd_open(): retries=1/3
_tftpd_open(): retries=2/3
Failed.: Timeout occured


I haven't looked into it yet.

UPDATE: Fixed...it just wanted the stock linksys firmware. Now I have to figure out how to get all the correct OpenWRT packages on there to get the WRT150N going with Linkmeter. Menu still now working.
 
Okay so everything is wired up and mostly working. For some reason, the menu isn't working out of box with the build in the git. I don't see anything on line 2 of the LCD. I can toggle the lidopen mod. The board is not connected to the router or a WiShield.

I could probably figure this out in a couple days on my own but I was wondering if you (Captain Bryan) knew what might be causing this. I noticed that the current heatermeter code is much different than build r97. It is almost 1/3 smaller than r97. Anyone else having trouble with this on their build?

UPDATE: I take it back...I can see a probe populate the second line if I plug in another probe. Still can't advance through the menu! Hopefully Bryan will be back on in a couple days...he always seems to know what to do...probably because he writes the code. In the mean time I am going to read through the code and try to understand it.
 
Originally posted by Dave S (GeoDave):
Okay so everything is wired up and mostly working. For some reason, the menu isn't working out of box with the build in the git. I don't see anything on line 2 of the LCD. I can toggle the lidopen mod. The board is not connected to the router or a WiShield.

I could probably figure this out in a couple days on my own but I was wondering if you (Captain Bryan) knew what might be causing this. I noticed that the current heatermeter code is much different than build r97. It is almost 1/3 smaller than r97. Anyone else having trouble with this on their build?

Dave,

How did you go about loading the bootloader onto the ATmega? I tried using the Arduino IDE, selected the Uno board, and USBtinyISP programmer. Hooked it up to the ISP 2x3 header and loaded the bootloader. I say the programming LED turn on for the USBtinyISP and it stayed that way for a about 30 seconds to a minute.

However, I can't get the ATmega to show signs of life. I hooked up an LED to pin 13 because the bootloader is supposed to flash that pin upon loading, but when I do this on the heatermeter board, the LED just stays lit. I then built a perf board version just to test the LED and it doesn't do anything.

I'm beginning to think that I didn't get the bootloader on there correctly.

thanks,
dave
 
How did you go about loading the bootloader onto the ATmega?

I used USBTinyISP with the ICSP pins on my Arduino. Easy and worked right away. I used the latest optiboot boot loader from here http://code.google.com/p/optiboot/. I saw Bryan say something in an earlier post about this boot loader.

I hooked up an LED to pin 13 because the bootloader is supposed to flash that pin upon loading, but when I do this on the heatermeter board, the LED just stays lit.

I looked at the schematic and the LED on the v3.1 board is on the arduino digital pin 9 (Atmega pin 15). Try the BlinkWithoutDelay example and change the pin number to 9.

Now if I could only figure out this menu issue. It has something to do with the LCD. I know this because on my first build a couple months ago I modified the r97 build to use with my serial LCD and it goes through the menu just fine.


I have almost given up on getting the Linkmeter to work with the WRT150N. I may revisit it when I calm down a bit. I see WRT54GL on craigslist all the time so I might pick one of those up just so I can have the finished product.
 
Originally posted by Dave S (GeoDave):

Now if I could only figure out this menu issue. It has something to do with the LCD. I know this because on my first build a couple months ago I modified the r97 build to use with my serial LCD and it goes through the menu just fine.


I have almost given up on getting the Linkmeter to work with the WRT150N. I may revisit it when I calm down a bit. I see WRT54GL on craigslist all the time so I might pick one of those up just so I can have the finished product.

I know this is a long shot, but the shift register orientation is opposite of the ATmega. Did you get it on the board correctly? I know initially I almost put it in backwards.

dave
 
I know this is a long shot, but the shift register orientation is opposite of the ATmega. Did you get it on the board correctly? I know initially I almost put it in backwards.

dave

Ehhh...I don't think it is the actual LCD. I tested all aspects of the LCD and it works great. Maybe there is something wrong with the buttons. They worked in the old code.
 
Here's a question for ya. I don't remember setting the password on my router when I installed the firmware, but when I try to log in/configure it asks me for a password.

Umm, how do I reset/reflash to get this fixed?

From reading the web, I tried to get into failsafe mode, but I don't think it works because the router IP was changed to 192.168.200.1

dave
 
Woo, I've been out of town for a few days and suddenly things get busy! Let me see what I can answer here.

1) My web page has all 0s for the time and no data - This is normal if no heatermeter is connected. The time at the top displays the last update time not really for the page but rather the last update received by linkmeter service. If there's not data coming, the last update is at 0.

2) What's the 4 switches - (in addition to what others have said) I mount them separately from the main board so you only have to run 2 wires to the button board. Here's a picture of a 4 way switch I built on a piece of cut up CD. On breadboard with 4 switches back and front (kinda).

3) 36 pin header - Break this into pieces to make any straight P* parts. Ps are pins, Js (jack) are receivers.

4) Which optiboot? - The optiboot that comes with arduino-0022 may work or it may not (it did for some of my boards but not others). The thing is that it has a definite but that will present itself depending on the floating state of a gate in a CPU so use the fixed version. This is the one that is in the Ardino project github and as of Oct 30, also at the optiboot main page. v4.4 is current right now.

5) DIP Sockets? - I used a 28pin dip socket (that I just noticed wasn't on the parts list) for the ATmega chip but soldered the shift register in directly. I didn't anticipate removing it at all. If you are in doubt, you can always just not solder in the shift register and populate it and stretch the legs out a bit to make sure they're getting good contact. My current v3.1 board just has the chip sitting in there actually.

6) LED flash - Yes pin 13 should flash when the bootloader starts up, two brief flashes if I remember. In addition, HeaterMeter will blink pin 9 once as its first line of code, then again once the initialization is finished and is about to go into the main loop (100ms later if that much). If pin 13 comes on and stays on something is probably wrong. It is the SPI clock line as well so make sure you didn't compile HeaterMeter with HEATERMETER_NETWORKING on, which will try to communicate with a WiShield and never succeed.

7) Smaller than r97? - Yes without the WiShield/TCPIP stuff built in, the sketch is massively smaller.

8) No probe second line - The second line is blank if there's no probes installed. The v3.1 board doesn't have the Ambient sensor on board, allowing you to choose between having the ambient sensor or a 3rd food probe. If you'll never use the 3rd food probe, you can solder the thermistor directly onto the board between the FOOD3 pin and GND pin. I would have liked to made a second GND hole but there wasn't space.

9) No menu on HeaterMeter - If you can turn on lid detect mode but not get into the menus, your "Right" button may be defective or the resistor value for that pin is off. If you can check with a voltmeter, the voltage on the button return line should be greater than 3.2V but less than 3.9V when the button is pressed. (5V when it isn't)

10) Default password - Username "root", password is blank.

11) Failsafe mode? - OpenWrt failsafe mode is built in, but unlike the guides on the Internets, the router IP is 192.168.200.1 in failsafe (and default config). This was done to prevent conflicts with most people who already have a network on 192.168.1.x which would make the OpenWrt wireless client config more confusing than it already is. During router bootloader, if you need to tftp, the IP is still 192.168.1.1.

General - If the shift register is in backward, you won't see anything on the LCD.

General - If you're using a serial cable between your computer and the router to check the bootup, remember you have to connect ground from your serial cable to the router as well, not just RX/TX. If you don't connect GND, generally it will sort of work but be all garbled, because the ground signal is actually going through your 110V mains and back to the laptop which of course screws up the timing depending on what's between the two.

General Troubleshooting - If you're using an FTDI cable, you should be able to see heatermeter updates in the Arduino serial monitor at 115200 baud. A small config dump at the beginning then 1 new status update every 2 seconds. If you're seeing garbage every ~2s you at least know it is running but something else is wrong.
 
Hmm, I think I'm getting the router into failsafe, because the DMZ led is flashing. But once this is happening I can't ping 192.168.200.1 or 192.168.1.1.

Upon bootup I do see 192.168.1.1 ping for about 3 seconds before the booting finishes. I wish there was a way to "reset" to default settings again, but I can't seem to find anything for openWRT.

Ideas before I short the flash pins together?
 
Originally posted by D Peart:
Hmm, I think I'm getting the router into failsafe, because the DMZ led is flashing. But once this is happening I can't ping 192.168.200.1 or 192.168.1.1.

Upon bootup I do see 192.168.1.1 ping for about 3 seconds before the booting finishes. I wish there was a way to "reset" to default settings again, but I can't seem to find anything for openWRT.

Ideas before I short the flash pins together?

I got stuck here for over a week. I don't think I could ping it so I wouldn't focus on that. It wasn't until I hooked up the serial port that I figured out I was in failsafe. It does sound like you are in failsafe. Assuming you are using a Linkmeter build, once you get into failsafe, use Putty to telnet in on 192.168.200.1. It might not work the first time but keep trying. You might even need to set a static ip of 192.168.200.2. Once you get the telnet console you can commands to reset it...google openwrt failsafe and look at the bottom of the page.

I am having trouble getting my WRT150N working but that is because of my lack of understanding of OpenWRT and the packages.
 
Originally posted by Dave S (GeoDave):
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by D Peart:
Hmm, I think I'm getting the router into failsafe, because the DMZ led is flashing. But once this is happening I can't ping 192.168.200.1 or 192.168.1.1.

Upon bootup I do see 192.168.1.1 ping for about 3 seconds before the booting finishes. I wish there was a way to "reset" to default settings again, but I can't seem to find anything for openWRT.

Ideas before I short the flash pins together?

I got stuck here for over a week. I don't think I could ping it so I wouldn't focus on that. It wasn't until I hooked up the serial port that I figured out I was in failsafe. It does sound like you are in failsafe. Assuming you are using a Linkmeter build, once you get into failsafe, use Putty to telnet in on 192.168.200.1. It might not work the first time but keep trying. You might even need to set a static ip of 192.168.200.2. Once you get the telnet console you can commands to reset it...google openwrt failsafe and look at the bottom of the page.

I am having trouble getting my WRT150N working but that is because of my lack of understanding of OpenWRT and the packages. </div></BLOCKQUOTE>

For your serial. I have mine hooked to stty1, do I need stty0? Did you hook it to you PC or the heatermeter board to see this? I would assume the PC. If so did you have to put a max232 or something on it to level shift the signals?

I tried stty1 where I have pin 3 hooked to my computers serial rx and pin 5 to tx. I don't get anything in putty when I make a serial connection.
 
OK I'm making progress. I was able to tftp a copy of linkmeter-wrt54g-squashfs.bin. Which allowed me into the router and my password was not set! Yeah!

I then went to configure the Wifi, but when I try to enable the radio I get:

Package libiwinfo required!
The libiwinfo package is not installed. You must install this component for working wireless configuration!

From the wiki it sounds like the libiwinfo -15 is included. Did I mess something else up?

I do see the linkmeter page, and it appears to fine.

Sorry for all the questions,
dave
 
Originally posted by Bryan Mayland:
9) No menu on HeaterMeter - If you can turn on lid detect mode but not get into the menus, your "Right" button may be defective or the resistor value for that pin is off. If you can check with a voltmeter, the voltage on the button return line should be greater than 3.2V but less than 3.9V when the button is pressed. (5V when it isn't)

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?!?

General - If you're using a serial cable between your computer and the router to check the bootup, remember you have to connect ground from your serial cable to the router as well, not just RX/TX. If you don't connect GND, generally it will sort of work but be all garbled, because the ground signal is actually going through your 110V mains and back to the laptop which of course screws up the timing depending on what's between the two.

General Troubleshooting - If you're using an FTDI cable, you should be able to see heatermeter updates in the Arduino serial monitor at 115200 baud. A small config dump at the beginning then 1 new status update every 2 seconds. If you're seeing garbage every ~2s you at least know it is running but something else is wrong.

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.

Finally, for Christmas I would like to build a heatermeter for my mother. She has a Bradley electrical smoker. Yes, I am a southern boy so smoking is in my blood even though I live in Seattle. Anyway, if you know anything about these smokers you know how wildly the temperature fluctuates (in order of 30-60 degrees above and below the set point even on the digital units). A company has come out with a unit to control the smoker using a PID controller but it is $100 dollars. I would like to design something very simple using a boarduino like design with a 16x2 LCD. I have already started on the schematic. You would have a female IEC connector to plug the unit into the wall, a square outlet to plug in the electric smoker, and a relay to switch power on between the IEC connector and outlet. The electric smoker would be set to the highest temp and the heatermeter/linkmeter code would be used to switch the relay on and off. It would also be nice to use the 120v to power the arduino but that would need a transformer, capacitors, and some diodes. Call it the Heatermeter Bradley....thoughts?
 
Originally posted by D Peart:
For your serial. I have mine hooked to stty1, do I need stty0? Did you hook it to you PC or the heatermeter board to see this? I would assume the PC. If so did you have to put a max232 or something on it to level shift the signals?
Just for future reference, the router/router bootloader does all its stuff on tty0. A max232 level shifter shifts to RS232 serial so that's probably not what you want. You should however shift a 5V USB TTL serial cable if you're using it. The transmit from PC to Router just needs a simple voltage divider (4.7k/10k) to take its 5V transmit line down to 3.3V. The transmit from router to PC is fine the way it is.

You're right about libiwinfo being missing. I'm not sure where along the lines that happened. I'll see if I can figure out what's wrong (it might be more than just not having the package, it might be a dependency changed).
 
Status
Not open for further replies.

 

Back
Top