LinkMeter v2 Homebrew BBQ Controller - Part 1


 
Status
Not open for further replies.
Is there a trick to monitoring my HM output via say.. an arduino?

I have my HM board hooked up to my arduino (3.3v & GND, digital 0,1 crossovered to the tx/rx), running a sketch like:

#include <SoftwareSerial.h>
SoftwareSerial HeterMeter(0, 1);

void setup()
{
Serial.begin(9600);
Serial.println("Startup complete");

HeterMeter.begin(9600);
}

void loop()
{
if (HeterMeter.available())
Serial.write(HeterMeter.read());
}

I run the sketch on my arduino, watch it print "Startup complete" and see my HM LED blink twice (which I understand means it got past initialization), but that's it as far as output is concerned, so HeterMeter.available() is false...
 
Originally posted by James G.:
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?

I did this a couple times before I figured out that if you set a password you have to create a second, non root account in order to log back in.

To recover, you need to put the router in recovery mode, then use tftp to re-flash. You can google your router model and find out how to do this.

After you get it into recover mode, you can then use tftp to send over the image file and it will reflash. It takes a couple times to get it to take because you only have a few seconds at the beginning of boot, but it will go.

all is not lost
icon_smile.gif


dave
 
Originally posted by James G.:
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?
If your system is "working" in that it boots properly, you can use the OpenWrt Failsafe Mode. Important LinkMeter's failsafe mode is at 192.168.200.1, not 192.168.1.1.

Basically start it up, as soon as the ... light on the right of the two comes on, press the button on the front a jillion times and it will start blinking like crazy. From there you can telnet to 192.168.200.1 and `mount_root` and `passwd` to change the password.
 
Originally posted by D Peart:
I did this a couple times before I figured out that if you set a password you have to create a second, non root account in order to log back in.
This was fixed actually... errr a couple of weeks ago. It works fine now for me with just the root account.
 
Originally posted by Kyle Christensen:
HeterMeter.begin(9600);
HeaterMeter runs at 115200 baud. If that doesn't work it, the next issue might be
SoftwareSerial HeterMeter(0, 1);
I've never used SoftSerial but Digital 0 and 1? Those are the pins that hardware serial goes on so you can't hook both serial ports to the same pins.
 
Originally posted by Kyle Christensen:
I had tried with 115200, no dice. No dice with 115200 and pins 2,3 either. I wonder what I'm missing.
Have you tried swapping the RX and TX lines? I just tried it myself with just pin D2 hooked to the pin next to the pin labeled RST on the FTDI connector to the HeaterMeter. I believe it is labeled RX on the v3.1 boards. However, my logic analyzer says that the baud rate is actually 125000 on one of my boards and 121212 on another, and I get garbage in your test program.

I lowered the baud rate on all of them to 19200 (19500 measured) and I now get data coming from Heatermeter to the Arduino, but every 20th character or so is corrupted on the receiver. It may be possible that the software serial just can't tolerate small variations in baud rate.

You might have better luck with a lower baud rate (9600 all around maybe?) but I stopped trying at 19200.
 
Originally posted by Bryan Mayland:
If your system is "working" in that it boots properly, you can use the OpenWrt Failsafe Mode. Important LinkMeter's failsafe mode is at 192.168.200.1, not 192.168.1.1.

Basically start it up, as soon as the ... light on the right of the two comes on, press the button on the front a jillion times and it will start blinking like crazy. From there you can telnet to 192.168.200.1 and `mount_root` and `passwd` to change the password.

Fixed! Linkmeter build is back on. This is good stuff for the wiki as all of the failsafe documentation on the web points to 192.168.1.1 for recovery. Thanks Bryan!
 
Hey Bryan! New member here. the work your doing is really great. I've been a Microsoft Engineer for 12 years and I'm still trying to wrap my head around everything. Is there a stable Linkmeter build out right now? Where is the best place for directions on the build? I'm trying to decide if I have the time for this project or if I should just build a simple PID fan setup. I'm interested in using it on a smoker I just purchased. Thanks for any help or direction you can offer.
 
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 Kyle Christensen:
I had tried with 115200, no dice. No dice with 115200 and pins 2,3 either. I wonder what I'm missing.
Have you tried swapping the RX and TX lines? I just tried it myself with just pin D2 hooked to the pin next to the pin labeled RST on the FTDI connector to the HeaterMeter. I believe it is labeled RX on the v3.1 boards. However, my logic analyzer says that the baud rate is actually 125000 on one of my boards and 121212 on another, and I get garbage in your test program.

I lowered the baud rate on all of them to 19200 (19500 measured) and I now get data coming from Heatermeter to the Arduino, but every 20th character or so is corrupted on the receiver. It may be possible that the software serial just can't tolerate small variations in baud rate.

You might have better luck with a lower baud rate (9600 all around maybe?) but I stopped trying at 19200. </div></BLOCKQUOTE>

Hm, at 115200, I actually get garbage output that's of the same approximate length as HM output on the FTDI pins, but I am not home at the moment so I can't easily reflash the chip on the board to lower the baud rate.

I really just wanted to see if my board was working, but I guess it is. I don't have my button board done, lcd or probes wired (still waiting on parts), but when I just plugged the HM board into my Linkmeter on what I think is ttyS1 (I put the header on pins 2-10 on my WRT54GV2), I didn't get any love (no LED blinking, and no activity if I cat /dev/ttyS1.
 
Originally posted by Kyle Christensen:
Hm, at 115200, I actually get garbage output that's of the same approximate length as HM output on the FTDI pins, but I am not home at the moment so I can't easily reflash the chip on the board to lower the baud rate.

I really just wanted to see if my board was working, but I guess it is. I don't have my button board done, lcd or probes wired (still waiting on parts), but when I just plugged the HM board into my Linkmeter on what I think is ttyS1 (I put the header on pins 2-10 on my WRT54GV2), I didn't get any love (no LED blinking, and no activity if I cat /dev/ttyS1.
Ah that's what I get too with mine set at 115200. I know the softwareserial library isn't very tolerant of bitrate variance, I'm sure that's what it is. At 115200, best case, the ATmega serial speed is off by 3.7%. The resonator can make it 0.5% more than that. It might just be too much for softserial to deal with.

Did you make a PCB for the button board? In my v3.2 order I included a button board design so I'm anxious to see how they came out. I wish I could find better caps for the ALPS 4 way directional switch, ones without the center post in them. It is a real pain to remove them before they'll fit.
 
Originally posted by Jeremy_D:
Hey Bryan! New member here. the work your doing is really great. I've been a Microsoft Engineer for 12 years and I'm still trying to wrap my head around everything. Is there a stable Linkmeter build out right now? Where is the best place for directions on the build?
The best place to start is The Wiki. It can be overwhelming because there's a lot of new information going all different directions. If you're familiar with building circuits, I'd say jump into the parts list and build a breadboard version. All the HeaterMeter parts come out to about $32 + fan + probes + pinheaders/connectors so I feel it is pretty economical, and if it doesn't work for you then you can reuse the parts for another design.

EDIT And as far as the stable version, the version that is currently available in the snapshots directory is probably going to become LinkMeter stable version 3 this week if I have time to finish testing.
 
Originally posted by Bryan Mayland:
Did you make a PCB for the button board? In my v3.2 order I included a button board design so I'm anxious to see how they came out. I wish I could find better caps for the ALPS 4 way directional switch, ones without the center post in them. It is a real pain to remove them before they'll fit.

Nope, I did not. The alps switch finally came off of backorder at mouser and shipped the other day, so I'll have to figure out something soon. Initially was going to cobble something together on a radioshack PC board I had laying around, but I'm second guessing it now. I'd love to figure out a way to mount the switch on the side of the router rather than the top, but that might be a lot trickier than just mounting it on the front piece of the router like you did.

I haven't quite figured out how I am going to shoehorn everything into the enclosure just yet. Due to the way my router's pcb is configured, I put in an order for some male crimp pins at Pololu with my crimpers, so I might just use some foam tape to mount the HM board towards the back of the enclosure since it'll give me some more flexibility.
 
Should the prebuilt openwrt image work on a wrt54g v3? I flashed it an ended up bricking the router, but was able to recover. It may have been my impatience that caused the bricking.
 
Question re: LCD wiring. The diagram in the Wiki for the the LCD -> HM wiring has all 16 wires diagrammed, but in the picture Bryan uploaded to his Picasa album at: https://plus.google.com/photos...583017522?banner=pwa

Only has 1,2,3,4,6 11,12,13,14 and I believe 16 hooked up, to what look like 6 pin connectors.

In this photo: https://plus.google.com/photos...489856530?banner=pwa

It looks like it's straight across to the equivalent pins on the HM board. How did those of you guys who don't have 6 pin connectors handle this? How'd you split them up?
 
Originally posted by Kyle Christensen:
Question re: LCD wiring. The diagram in the Wiki for the the LCD -> HM wiring has all 16 wires diagrammed, but in the picture Bryan uploaded to his Picasa album at:
Only has 1,2,3,4,6 11,12,13,14 and I believe 16 hooked up, to what look like 6 pin connectors.
Yeah there was someone who had an LCD which required all D0-D3 be grounded for 4-bit operation to work properly so when I designed the connector I thought it would be best to ground the pins as well.

The NewHaven LCD in the parts list doesn't require D0-D3 be grounded for 4-bit operation. In fact, when I looked more closely at the circuit board they are actually pulled up, so I was fighting how the LCD was designed. Armed with this experience I then was able to google and see other references that said theirs were pulled up as well and even an LCD controller chip datasheet that showed them as such. Therefore, the experimental V3.2 design leaves them unconnected and the user is free to connect them whichever way they want.

In either case, I only use connectors for the 6 outside wires on each side. And because the NewHaven has the integrated current-limiting backlight resistor, you can wire Pin 2 (+5V) to Pin 15 (+5V backlight), the red wire seen on the LCD itself. Also, Pin 1 (GND) to Pin 5 (R/W) because those are both grounded. I find it easier to work with the LCD the less wires are running from it to the HeaterMeter board.
 
Ah perfect, it makes sense now. Being a noob, I didn't quite grasp that the connectors on either side are mirrored. Now it clicks.

Since my pololu order hadn't shipped, I tossed a pack of 1x6 headers in there so I don't have to mess around with splitting them up into a bunch of 2 pin headers.

Also, the Auber blower I ordered came today. It is nicely constructed, but there are a couple of differences.

First, it doesn't utilize the same sort of connector. It's got an ac adapter style barrel connector on it, not the male "video cable" style that mates with the barrel connector in the hardware list. I sacrificed an old composite cable to the hardware gods and with a little work, voila:

blower.jpg


The blower is also a delta, but is smaller than the fan specified in the hardware list, so my idea of swapping in this blower in the event of a failure is a no go. It is a 12v 6.5cfm fan still, but it's just more compact. The damper in it seems to work well, but I can't speak for the spring attachment since I haven't braved the cold to go fiddle with my smoker. I shelled out the extra $3 for the silicone gasket, not sure yet if I'll need it. One thing to note is that if you opt for this style attachment vs the dog bowl method, you're going to want to get some high temp tape to cover the other two holes on that vent.
 
Have everything assembled for my linkmeter but I'm having a heck of a time getting my bootloader uploaded to my atmega328 chip. Followed the wiki and have tried both the breadboard and the icsp on the linkmeter board. Keep getting this error.
avrdude: stk500_getsync(): not in sync: resp=0x00
I've set my baud to 9600. Any help is appreciated. I also have a couple ata328 chips. Is there a way to check to see if a bootloader is already on the chip?
 
Status
Not open for further replies.

 

Back
Top