LinkMeter v2 Homebrew BBQ Controller - Part 1


 
Status
Not open for further replies.
I have a WRT54Gl V1.o router that I bricked. I had linkmeter running on it and made a bone head mistake and uploaded the linkmeter.bin file from github. I can no longer access it and have tried all of the different debricking possibilities with the exception of jtag. Does anyone have any good ideas to try to fix this router?

Thanks
 
Originally posted by Duston Anthony:
I have a WRT54Gl V1.o router that I bricked. I had linkmeter running on it and made a bone head mistake and uploaded the linkmeter.bin file from github. I can no longer access it and have tried all of the different debricking possibilities with the exception of jtag. Does anyone have any good ideas to try to fix this router?

Thanks

You probably don't need a JTAG. However, it is useful for troubleshooting to read from the serial port. Bryan describe how to this here: http://tvwbb.com/eve/forums/a/...103/m/5721075126/p/6

There is almost always an "easy" fix if you think you "bricked" your router. You have to get to know your router. I bricked one of my routers about 5 different ways. This assumes you are using Windows. I would suggest you:

1. Download PuTTy or another SSH/telnet tool if you don't already have it. Windows also has a telnet program you can run from windows command prompt but you have to enable it...it is just easier to use PuTTy.
2. Check to see if you can telnet or SSH into the router using PuTTy. You will need to use the 192.168.200.1 IP address
3. If you can SSH in you would probably have success if you flash the trx file to the router with these commands:

wget http://capnbry.net/linkmeter/s...rcm47xx-squashfs.trx -O /tmp/firmware.trx

mtd -r write /tmp/firmware.trx linux

4. More than likely you won't be able to SSH or telnet in. In that case, you will probably need to enter failsafe mode. This can be done by following these instructions: http://wiki.openwrt.org/doc/howto/generic.failsafe

If I am remembering correctly you will need to set your computers (Ethernet card) to a static IP of 192.168.200.2. Basically you are going to unplug the router, plug it back in, and click the reset button until the DMZ button starts blinking off and on. Once the DMZ light is blinking you can telnet in at 192.168.200.1 using PuTTy. If you don't get in the first time, keep trying to telnet in...sometimes you have to try a couple times. However, I can assure you that if it is blinking it is in failsafe mode. From telnet type "firstboot" without the "") hit enter then reboot using "reboot -f". Give it time to reboot and see if you can log back in.

5. There are ways to reflash the bin using tftp2.exe (or from the windows command prompt) but that hardly ever worked for me. This involves setting your computers static IP address to 192.168.1.2. Set up a constant ping to 192.168.1.1 using the windows command prompt. This is done with the command: ping -t 192.168.1.1

When you start this ping you probably won't get any pings back. At this point you need to open tftp2.exe, load the appropriate .bin file, and set the ip address to 192.168.1.1. Don't hit the upgrade button yet. You will need to bring put tftp.exe and the constant ping command window on the screen next to each other. Unlplug the router then plug is back in. Wait about 4 or 5 seconds then press the upgrade button. If it doesn't take the first time keep trying. You are looking a ping ending in TTL=100. This essentially means flash me baby! The timing has to be just right.


I might have some other ideas if those don't work. Just let me know how it is behaving. I probably have experience a similar issue.
 
Bryan/DPeart,

Did you guys ever try flashing sketches using your USBTinyISP and the v3.1 boards ICSP header? I have done this in the past through my Arduino Duemilanove ICSP header. I like doing this because it eliminates the need for the bootloader which makes it load faster and you can fit larger sketches onto the 328. I just added this to the end of the Arduino board.txt file found at \arduino-0022\hardware\arduino:

##############################################################

usbtiny328.name=[usbtinyisp]ATmega328

usbtiny328.upload.using=usbtinyisp
usbtiny328.upload.maximum_size=32768

usbtiny328.build.mcu=atmega328p
usbtiny328.build.f_cpu=16000000L
usbtiny328.build.core=arduino

From there I can just select this as a board and upload sketches as usual. I did this last night with my Arduino and it worked. I then tried it with the v3.1 ICSP header and it does not work. I am getting this error:

avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

I checked into the error and it means that the programmer is not correctly connected to the 328 chip.

I looked at the schematic for the Arduino Duemilanove and it is very similar to the v3.1 board. However, when I look at the boarduino schematic and some other implementations of Arduino I noticed that Pin 3 Sck has a resistor and diode tied to ground instead of Pin 19 on the 328 chip. I haven't looked into what SCK is or what it does.

Can you check to see if you can flash a sketch using the ICSP headers on your v3.1?

Thanks,

Dave S
 
Dave S...... Do you still need a board???? I have one spare, and you can have it for $9, I will cover shipping...... Just let know
 
Originally posted by Scott Miz:
Dave S...... Do you still need a board???? I have one spare, and you can have it for $9, I will cover shipping...... Just let know

I think Dave P needed one but he may not need it anymore now that he has his diode drama resolved (glad I didn't have that problem)...poor Dave P! I don't need one. I am working on designing my own for fun. I am going to add a relay, power entry module (IEC connector), and power outlet to make an electric smoker version of the board. I am waiting for some parts so I can put the prototype board together.

I will probably try to run the schematic by Bryan before I have it made if he will entertain it. It is easy to make mistakes on those schematics/boards. I know Dave P has used one of his v3.1 to run an electric smoker...I presume he used a relay to switch the heating element off and on.

Dave S.
 
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 Scott Miz:
1.) On the linkmeter page, by time is off: just wonder if someone can guide me in setting that.

2.) Lid Open mode, is continuously deisplaying; any advice.... I can set temp, and my graph will adjust and run even though I have no probes set-up; I assume this is correct.

3.) I will just be using a Pit Probe, and a food probe; I am building up enough courage to try to set those coefficients. Should I set them both similair to Dave posted in an earlier post????

4) Also, can I use the prior 4 switch set-up from the earlier heatmeter and integrate on the Linkmeter?? If so, can I follow schematic 20110503.png for switch wiring?????
1) The time always resets when the router boots. There's a way to have it set automatically when there's an internet connection but OpenWrt recently changed the right way to do it so I'm not sure how it is done any more. On the system page in the web gui there is a "sync time with browser" button that manually adjusts it.

2) Displaying where? If on the LCD, then something is "pressing" the left button even if you have no buttons. If it is coming on and going off, is your temperature going all over the place? You say you have no probes connected so the temperature should display as "off" everywhere and not trigger the automatic lid mode.

3) If you haven't set any coefficients, and you're using the standard maverick probes, you're already set. The default loads these coefficients to all probes.

4) Yes the 4button and 4wayswitch are identical in functionality. Just make sure your connection to the board has the right pins connecting (pin 1 on one may not be pin 1 on the other). </div></BLOCKQUOTE>

Bryan,

I absolutely appreciate all your incredible hard work on this amazing project, I truly believe that this is far superior to the other products out that for ATC. I am a electronics technician, so the pcb board, placing components and testing are very familiar to me; but the programming is so new to me. What I have learned from this project has been incredible. I know I have asked alot of questions, but many of us are new to this and dreams to build this unit; yet you all have been working so long on it, that many things seem so simple.......

1.) I will work on the time problem.

2.) On the PC display its indicating " Lid Open "... On the graph via PC, my tempeture only shows what I change per my LCD.... Does that make sense????

3.) Yes, I am using the standard probes; but somehow over the Thanksgiving Hoilday my shipment got lost; so I am still waiting for them to arrive......

4.) I think I might be having a single button problem, I ordered 4 buttons to change this over; I think I know exactly where they get connected, but I would appreciate if you can aid me so I know I am right....

Great work gang, I hope we all can help each other to make this happen because I think it is REAL....
 
If anyone is looking for another fan design, here's one I did last spring using conduit:

http://tvwbb.com/eve/forums/a/...301049616#4301049616

Standard Digikey fan and a tube of High temp gasket for bonding the plastic conduit to metal conduit, although the temp at that location is pretty cool.

I'm planning on remounting it lower so its blowing directly on the coals. It works fine as is, but at about the 13 (of 15) hour mark, direct air on the coals would help.


Neil
 
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 Scott Miz:
Dave S...... Do you still need a board???? I have one spare, and you can have it for $9, I will cover shipping...... Just let know

I think Dave P needed one but he may not need it anymore now that he has his diode drama resolved (glad I didn't have that problem)...poor Dave P! I don't need one. I am working on designing my own for fun. I am going to add a relay, power entry module (IEC connector), and power outlet to make an electric smoker version of the board. I am waiting for some parts so I can put the prototype board together.

I will probably try to run the schematic by Bryan before I have it made if he will entertain it. It is easy to make mistakes on those schematics/boards. I know Dave P has used one of his v3.1 to run an electric smoker...I presume he used a relay to switch the heating element off and on.

Dave S. </div></BLOCKQUOTE>

Dave S,
I have a Power Raptor from BBQ Guru that works just fine with this setup. It is just a SSR that is controlled by HM and switches the heater element. It works great.

I'm getting ready to build two of my own using a SSR from Ebay. The SSR is just an electronic relay that doesn't have an issue switching millions of times that would break a mechanical relay. I'm going to use this one:
http://www.ebay.com/itm/Solid-...&hash=item45fe67a828

It handles a 12VDC control signal, and the 120VAC for the switched supply. Put it in a box, attach the heatsink and wire up an electrical outlet and your good to go. I'll let you know how it turns out.

Yes the diode was annoying, but luckily I had two working boards, so I could do a lot of AB comparisons.

dave
 
Originally posted by Dave S (GeoDave):
However, when I look at the boarduino schematic and some other implementations of Arduino I noticed that Pin 3 Sck has a resistor and diode tied to ground instead of Pin 19 on the 328 chip. I haven't looked into what SCK is or what it does.

Can you check to see if you can flash a sketch using the ICSP headers on your v3.1?
SCK Is the SPI bus clock which is generated by the master (the USBTinyISP in this case). The standard Arduino LED from the blink sketch is on this pin in addition to connecting it to pint 19 on the 328. The schematic may only imply that it connected (by having the nets named the same) rather than physically showing them connected.

I can flash things with the USBtiny on the v3.1 board no problem, but I'll try your your boards.txt addition when I get home tonight and see if it works with that.
 
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 Dave S (GeoDave):
However, when I look at the boarduino schematic and some other implementations of Arduino I noticed that Pin 3 Sck has a resistor and diode tied to ground instead of Pin 19 on the 328 chip. I haven't looked into what SCK is or what it does.

Can you check to see if you can flash a sketch using the ICSP headers on your v3.1?
SCK Is the SPI bus clock which is generated by the master (the USBTinyISP in this case). The standard Arduino LED from the blink sketch is on this pin in addition to connecting it to pint 19 on the 328. The schematic may only imply that it connected (by having the nets named the same) rather than physically showing them connected.

I can flash things with the USBtiny on the v3.1 board no problem, but I'll try your your boards.txt addition when I get home tonight and see if it works with that. </div></BLOCKQUOTE>

This is good to know, I was wondering if I could do this and skip the bootloader. I'll wait to hear back and give it a shot after that.

dave
 
Originally posted by Scott Miz:
1.) I will work on the time problem.

2.) On the PC display its indicating " Lid Open "... On the graph via PC, my tempeture only shows what I change per my LCD.... Does that make sense????

4.) I think I might be having a single button problem, I ordered 4 buttons to change this over; I think I know exactly where they get connected, but I would appreciate if you can aid me so I know I am right....
1) I would like to fix this but unfortunately the hard drive in my Linux box crapped out last week and is 1 bad sector away from total failure so I'm afraid to turn it back on until I get a new hard drive for it. That might be a few weeks because of the sharp increase in drive prices currently thanks to the flooding in Thailand.

2) Yeah it makes sense but... I don't think it should be doing that. It is hard to say what's going on but you may want to look at the data. If you're looking at the LM web site home page, add "hmstatus" to the end of the URL so it should be like /luci/lm/hmstatus and look for "lid:somenumber"

4) Pin 1 on the v3.1 board is just +5V and pin 2 connects to the common side of the switches of the button board. So just run pin 1 to all your resistors -> their respective buttons -> all tied together to pin 2. The 1k resistor (R5) from the HeaterMeter schematic is built into the v3.1 board so you don't need that on your button board.
 
Originally posted by Dave S (GeoDave):
usbtiny328.upload.using=usbtinyisp
Yeah that doesn't work for me at all. I usually use just the command line to flash it:
<pre class="ip-ubbcode-code-pre">
C:\Arduino\arduino-0022\hardware\tools\avr\bin>avrdude.exe -C ..\etc\avrdude.conf -cusbtiny -pm328p -v -B1 -Pusb -D
-Uflash:w:C:\Users\bmayland\AppData\Local\Temp\build6897105499473295766.tmp\heatermeter.cpp.hex:i
</pre>
or add the -V option to make if faster by skipping the verify. The flash takes 10seconds, ZING!
 
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 Dave S (GeoDave):
usbtiny328.upload.using=usbtinyisp
Yeah that doesn't work for me at all. I usually use just the command line to flash it:
<pre class="ip-ubbcode-code-pre">
C:\Arduino\arduino-0022\hardware\tools\avr\bin>avrdude.exe -C ..\etc\avrdude.conf -cusbtiny -pm328p -v -B1 -Pusb -D
-Uflash:w:C:\Users\bmayland\AppData\Local\Temp\build6897105499473295766.tmp\heatermeter.cpp.hex:i
</pre>
or add the -V option to make if faster by skipping the verify. The flash takes 10seconds, ZING! </div></BLOCKQUOTE>

Command line doesn't work for me...same error:

C:\>C:\arduino-0022\hardware\tools\avr\bin\avrdude.exe -C C:\arduino-0022\hardwa
re\tools\avr\etc\avrdude.conf -cusbtiny -pm328p -v -B1 -Pusb -D -Uflash:w:C:\Use
rs\MyComputer\AppData\Local\Temp\build1860658120256051608.tmp\AnalogReadSerial.c
pp.hex:i

avrdude.exe: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

System wide configuration file is "C:\arduino-0022\hardware\tools\a
vr\etc\avrdude.conf"

Using Port : usb
Using Programmer : usbtiny
Setting bit clk period: 1.0
AVR Part : ATMEGA328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page
Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW
MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
eeprom 65 5 4 0 no 1024 4 0 3600
3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500
4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500
4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500
4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500
4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500
4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0
0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0
0 0x00 0x00

Programmer Type : USBTINY
Description : USBtiny simple USB programmer

avrdude.exe: Setting SCK period to 1 usec
avrdude.exe: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude.exe done. Thank you.


I was able to upload from the Arduino software and also using your avrdude commands from the Windows command prompt through the USBTinyISP using the ICSP headers on my Arduino duemilanove board. I read the USBTinyISP site and they have a whole page on this error (http://www.ladyada.net/make/usbtinyisp/help.html). They claim it is always an issue with the the arduino's hardware. I checked to make sure that everything is connected probably and they are. Did you have your RFM12 hooked up to the board you flashed to lastnight? If not could you try your ICSP on a board that does? I do have the RFM12 hooked up. I wonder if having the RFM12 hooked up to the MOSI/SCK/Reset is keeping the MISO/MOSI/SCK/Reset pins from switching. Just an idea...thoughts?? Anyone else want to test this?? Dave P wanna check this out? It would be good to fix this issue on the next version if in fact it is an issue. I am getting sick of pulling the 328 out to program it when I change the code.

Oh Dave P....I got a garbled display for a couple minutes this afternoon...then it went away. Second time it has done this. Probably the diode.
 
Originally posted by D Peart:
Dave S,
I have a Power Raptor from BBQ Guru that works just fine with this setup. It is just a SSR that is controlled by HM and switches the heater element. It works great.

I'm getting ready to build two of my own using a SSR from Ebay. The SSR is just an electronic relay that doesn't have an issue switching millions of times that would break a mechanical relay. I'm going to use this one:
http://www.ebay.com/itm/Solid-...&hash=item45fe67a828

It handles a 12VDC control signal, and the 120VAC for the switched supply. Put it in a box, attach the heatsink and wire up an electrical outlet and your good to go. I'll let you know how it turns out.

Yes the diode was annoying, but luckily I had two working boards, so I could do a lot of AB comparisons.

dave

I was thinking of trying this relay: http://www.ebay.com/itm/ZG3M-3...c1390a#ht_2145wt_698

Cheaper, smaller, and can be mounted to a PCB. It doesn't take as much current. I am thinking 8amps is probably fine for controlling a heating element. Thoughts?
 
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:
Dave S,
I have a Power Raptor from BBQ Guru that works just fine with this setup. It is just a SSR that is controlled by HM and switches the heater element. It works great.

I'm getting ready to build two of my own using a SSR from Ebay. The SSR is just an electronic relay that doesn't have an issue switching millions of times that would break a mechanical relay. I'm going to use this one:
http://www.ebay.com/itm/Solid-...&hash=item45fe67a828

It handles a 12VDC control signal, and the 120VAC for the switched supply. Put it in a box, attach the heatsink and wire up an electrical outlet and your good to go. I'll let you know how it turns out.

Yes the diode was annoying, but luckily I had two working boards, so I could do a lot of AB comparisons.

dave

I was thinking of trying this relay: http://www.ebay.com/itm/ZG3M-3...c1390a#ht_2145wt_698

Cheaper, smaller, and can be mounted to a PCB. It doesn't take as much current. I am thinking 8amps is probably fine for controlling a heating element. Thoughts? </div></BLOCKQUOTE>

That one is rated at 8A. My electrical element is 1500 watts, so at 110V that is ~13.63A so that SSR would not work. You need to figure out what your current capacity needs to be, then add a little head room, as you don't want to be running at 100% of the rated capacity the entire time. For mine I figured a 20A SSR would be minimal. I got the 40A because it came with a heat sink and wasn't much more $$.

My PowerRaptor from BBQ Guru has a large heat sink on it and it can get pretty warm to the touch when it is running for a long time.

dave
 
Originally posted by Dave S (GeoDave):
Did you have your RFM12 hooked up to the board you flashed to lastnight? If not could you try your ICSP on a board that does? I do have the RFM12 hooked up.
Yeah the board I used has an RFM12 on it. If you have that populated, do you have Q4 populated and a jumper on SJ1? Q4 is the RFM12's power supply when you're not connected to the 3.3V supplied by the router. SJ1 is there so you can "turn off" Q4, although I'm not sure it matters if it is off or not when connected to the router.
 
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 Dave S (GeoDave):
Did you have your RFM12 hooked up to the board you flashed to lastnight? If not could you try your ICSP on a board that does? I do have the RFM12 hooked up.
Yeah the board I used has an RFM12 on it. If you have that populated, do you have Q4 populated and a jumper on SJ1? Q4 is the RFM12's power supply when you're not connected to the 3.3V supplied by the router. SJ1 is there so you can "turn off" Q4, although I'm not sure it matters if it is off or not when connected to the router. </div></BLOCKQUOTE>

Yeah I have the Q4 installed. I haven't installed the header or jumper. I did try jumpering it and it still doesn't flash.

Could it be the difference in the clock? My Duemilanove is a crystal and the heatermeter is the ceramic.

I haven't had the time to figure out the RFM12. It is on my to do list. I assume the lmremote sketch is to be used with another arduino and an LCD. Looks really cool...that is why i bought it!
 
I'm seeing a weird thing going on. I know this has worked in the past, but maybe I broke something?

I can change the set point on via HM and see the change in LM, but if I change the set point or even probe names on LM I don't see them get updated on HM, instead a few seconds later they get overwritten to their previous values.

I'm seeing this on two systems now, did I mess up the Tx signal on the router?

thanks,
dave
 
Originally posted by D Peart:
I can change the set point on via HM and see the change in LM, but if I change the set point or even probe names on LM I don't see them get updated on HM, instead a few seconds later they get overwritten to their previous values.
You can try seeing if it is a web problem by ssh/telnetting in and running a set command from lmclient
<pre class="ip-ubbcode-code-pre">
lua /usr/lib/lua/lmclient.lua LMST,sp,225
</pre>
That should set the setpoint to 225. If that works then something is up with the web interface. If that doesn't work then try setting it directly through the serial port
<pre class="ip-ubbcode-code-pre">
echo -e \\n/set?sp=225 > /dev/ttyS1
</pre>
If still nothing, then sounds like something is screwed up with the serial. Try removing the HM board and connecting the router RX/TX together and seeing if you can echo things to it with the instructions I posted on the previous page.

Changing topic! A workaround to the time being off until Openwrt fixes it upstream. Go to the web interface and go to System -> Startup and add a line to the rc.local at the bottom. First, go to the list of time servers and pick one that is up and near you geographically then add to the rc.local (before the exit 0)
<pre class="ip-ubbcode-code-pre">
rdate servername
# example
rdate nist1-ny.ustiming.org
</pre>
Your clock will be synced on bootup with the time server.
 
Status
Not open for further replies.

 

Back
Top