TeensyNet Project Interest?

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
It looks like the serial monitor can't open any port after the I2C_Scanner.ino program is running. No matter what port I choose, which according to windows is open, the port is always listed as "busy" by teensyduino. When using putty, no com port is open. In linux, the port is listed as not available. That is why the serial monitor is blank.
 
Which operating system are you using? I use Debian Linux, and under
teensyduino->Tools->USB Type

I select "Raw HID".

That opens an "Emulated Serial" Monitor that allows me to watch what's going on.

You can also change

Code:
// #define USESERIAL2 1 // if set to 1, use Serial2 with FTDI for debugging

to
Code:
#define USESERIAL2 1 // if set to 1, use Serial2 with FTDI for debugging

Re-compile, and re-load, and use an inexpensive FTDI USB to RS-232 cable to monitor the debug output.

On my system, I use /dev/ttyUSB0 for the channel and Cutecom for the terminal.
 
Last edited by a moderator:
OK, thanks for the instructions. I had a FTDI cable (3v3) when I previously went in and debricked my TP-Link AC1750 router. I changed to raw hid, I removed the comment in the program, and used /dev/ttyUSB0 for the channel and Cutecom for the terminal (it's better than screen). The terminal is blank. I also was able to open the serial port (/dev/ttyACM0) and used the teensyduino serial monitor... Also blank. I ran the find chips program and it shows the sensors and switches.
 
OK, thanks for the instructions. I had a FTDI cable (3v3) when I previously went in and debricked my TP-Link AC1750 router. I changed to raw hid, I removed the comment in the program, and used /dev/ttyUSB0 for the channel and Cutecom for the terminal (it's better than screen). The terminal is blank. I also was able to open the serial port (/dev/ttyACM0) and used the teensyduino serial monitor... Also blank. I ran the find chips program and it shows the sensors and switches.

At this point, I'm stumped :confused:.

The fact that you can see the 1-wire devices on the serial monitor means that the serial monitor is working.

I'll investigate this further at my end...
 
Is it possibly a hardware problem? Can I troubleshoot that in some manner?

If you've got an oscilloscope, you can take a look at the I2C channel to see if it's working, especially at the input to the I2CEEPROM.

You can also send it to me, and I'll take a look at it.

Here's a copy of the V14 schematic:

View attachment TeensyNet-V14-Schematic.pdf
 
I was thinking... Does there need to be any pull-up 4k7 resistor on the LCD board using the v14 board? I have filled all resistor positions on the LCD board that uses both a 5v and 3v3 line. If I remember right, you had two positions unfilled on the teensypi site. Could that be the problem? Otherwise I will PM you to send my setup, as you suggested. I do not have an oscilloscope. I use a voltmeter.
 
I was thinking... Does there need to be any pull-up 4k7 resistor on the LCD board using the v14 board? I have filled all resistor positions on the LCD board that uses both a 5v and 3v3 line. If I remember right, you had two positions unfilled on the teensypi site. Could that be the problem? Otherwise I will PM you to send my setup, as you suggested. I do not have an oscilloscope. I use a voltmeter.

If that is the only I2C device, then yes, you need a 4k7 resistor on the SDA and SCL lines.
 
While helping purdman10 with his project, I've discovered that there is a parasitic-only version of the DS18B20, the DS18B20P.

This part has the same ID as the DS18B20 (0x28), and can be discovered by the TeensyNet software, but the ability to read a valid temperature DOES NOT WORK. :(

Just something to keep in mind when shopping for parts and devices.
 
Is that a limitation of the 1-wire driver or some other piece of code?

btw/fwiw, when running these sensors in parasitic mode, you have to use a pretty stiff pull-up, like in the 200 ohm range, instead of the "normal" 4.7K...

Cheers!
 
Is that a limitation of the 1-wire driver or some other piece of code?

btw/fwiw, when running these sensors in parasitic mode, you have to use a pretty stiff pull-up, like in the 200 ohm range, instead of the "normal" 4.7K...

Cheers!

It's a limitation of my hardware design and code. When doing a temperature conversion or write to EEPROM on the DS18B20P, the data line has to be held strongly high for up to 10ms, and during that time the current draw is up to 1.5ma per device. The TeensyNet can support up to 36 devices, interrogated in round-robin fashion, so the current draw can be fairly high, especially if all devices are DS18B20s.

The MAXIM DS18B20PAR data sheet recommends a separate, microprocessor-controlled active pullup, which adds a layer of complexity that I wasn't willing to introduce.

I also make my own 1-wire slave devices that require a 5v supply to operate.
 
just a FYI. on your website (http://www.teensynet.com/) , the link to WIZ820io doesnt work. shows 404 error.

im getting ready to get one of these setup but for a different usage..

monitor the House Temperature and also monitor if the power goes out, when either the house temp is too hot, verify there is power in the house and if not toggle a relay on for a predetermined amount of seconds to start the Generator and fire off a text message to my phone. also if there is power but the house is hot , send me a text message.

everything here has UPS's under it so there will be power for a while even if the power does go out.
 
In your git hub site for version 0.0.56, where is teensynet.sql placed?

teensynet.sql is used to create the teensynet database and tables. If you're using the RaspberryPi image, it should already be setup. Otherwise it can be imported into MySQL using phpmyadmin as described here, under "Setup MySQL" at the bottom of the page.
 
Awesome - I'm looking to build a controller system to control glycol valves for 15 conicals. I'm thinking I may need a forward and a backward controller for the valves so that should work well.
 
Awesome - I'm looking to build a controller system to control glycol valves for 15 conicals. I'm thinking I may need a forward and a backward controller for the valves so that should work well.

I've been looking into creating a one-wire slave that would control either a stepper motor or a servo. I'll make a post here if I do.
 
Teensy Loader could not find TeensyNet.cpp
Error compiling.

Open the Arduino IDE, go to File->Preferences, and set Verbose output:


preferences-65982.png


Compile the program, then use use the button "Copy Error Messages" to copy and save the file to a text file. Zip it up and post it here so I can take a look at it.

I can't duplicate the problem here.
 
It was a problem with the teensy loader, not your program, which I then compiled. I do have questions about using the simpler version 5.2 board (the last version with the 3.3v line as well as a 5v line). I compiled 0.0.56 on the version 5.2 board because the version 14 board has borked. It loads, but cannot get an ip address either by dhcp or any static address. Do I need to compile an earlier version of the program for that version of board?
 
It was a problem with the teensy loader, not your program, which I then compiled. I do have questions about using the simpler version 5.2 board (the last version with the 3.3v line as well as a 5v line). I compiled 0.0.56 on the version 5.2 board because the version 14 board has borked. It loads, but cannot get an ip address either by dhcp or any static address. Do I need to compile an earlier version of the program for that version of board?

You may have to erase the EEPROM and start with a fresh compile. Things got moved around between versions, and I've had similar problems when using new software.
 
So I forgot my router password and had to reset it. Now my teensynet isn't acquiring an ip address. My pi gets one fine. I tried restating the teensynet several times with no success. Its not even showing up on my router as being connected. Any ideas of what I should try next?
 
Can you connect to the serial monitor? There should be some information as to what's occurring there. Are you using DHCP to connect, or a static address?

You may need to clear the data in the EEPROM, and restart the TeensyNet.

A little more information would be helpful.
 
I got it working. When I reset my router it changed the address range from 192.168.0.x to 192.168.1.x. I changed it back to the 192.168.0.x and was able to find it. Not sure why it wouldn't get an address with the other range when I have dhcp enabled.
 
I got it working. When I reset my router it changed the address range from 192.168.0.x to 192.168.1.x. I changed it back to the 192.168.0.x and was able to find it. Not sure why it wouldn't get an address with the other range when I have dhcp enabled.

It's been a few months since I looked at the code. When the Teensynet uses DHCP to get an IP address, it attempts to save that address to EEPROM, and will re-use that address for subsequent startups. That's because the PHP code and MySQL use that address to interrogate the TeensyNet. I never got around to attempting to use Zeroconf (Avahi) in order to interrogate the TeensyNet.

Something to add to the list...:p
 
@jimmayhugh Got another question near the beginning of the teensynet I had brought up a small issue where when I change my action settings when I hit the submit button I see a bunch of code across the top of the screen and I end up needing to reopen the page on my browser. Did you ever get the code fixed to eliminate this problem? I have a friend that is stating a brewery and is going to take my last board if there is a fix that I missed that would be great. I don't want to give him something that is going to have a code issue as he is going to be using it to control 7 bbl fermenters.
 
@jimmayhugh Got another question near the beginning of the teensynet I had brought up a small issue where when I change my action settings when I hit the submit button I see a bunch of code across the top of the screen and I end up needing to reopen the page on my browser. Did you ever get the code fixed to eliminate this problem? I have a friend that is stating a brewery and is going to take my last board if there is a fix that I missed that would be great. I don't want to give him something that is going to have a code issue as he is going to be using it to control 7 bbl fermenters.

It would help if you could post or e-mail me a page view of the problem.
 
@jimmayhugh Don't have time to get a screen shot I get the error message and in a couple seconds the page changes to a lost connection page. Here is a copy and past that I could get before the page changes. This all appears above the header.
$tempAddrQuery = SELECT name FROM chipNames WHERE address='0x28,0xCA,0xDE,0x6F,0x06,0x00,0x00,0x69' AND netID='3'
$updateArrayData1 = 1 0 0 0x28,0xCA,0xDE,0x6F,0x06,0x00,0x00,0x69
$updateArrayData2 = 34 0 0 0x12,0xCE,0x83,0xB1,0x00,0x00,0x00,0x96
$updateArrayData3 = 36 30 0 0x12,0xCE,0x83,0xB1,0x00,0x00,0x00,0x96
$in1 = B 0 1 1 0 0 0x28,0xCA,0xDE,0x6F,0x06,0x00,0x00,0x69
$in2 = B 0 2 34 0 0 0x12,0xCE,0x83,0xB1,0x00,0x00,0x00,0x96
$in3 = B 0 3 36 30 0 0x12,0xCE,0x83,0xB1,0x00,0x00,0x00,0x96
UPDATE action SET id='0',active='1',tempAddr='0x28,0xCA,0xDE,0x6F,0x06,0x00,0x00,0x69',tcAddr='0x12,0xCE,0x83,0xB1,0x00,0x00,0x00,0x96',tcTrigger='34',tcDelay='0',thAddr='0x12,0xCE,0x83,0xB1,0x00,0x00,0x00,0x96',thTrigger='36',thDelay='30',lcd='0',netID='3' WHERE id='0' AND netID='3'
 
@jimmayhugh Don't have time to get a screen shot I get the error message and in a couple seconds the page changes to a lost connection page. Here is a copy and past that I could get before the page changes. This all appears above the header.
$tempAddrQuery = SELECT name FROM chipNames WHERE address='0x28,0xCA,0xDE,0x6F,0x06,0x00,0x00,0x69' AND netID='3'
$updateArrayData1 = 1 0 0 0x28,0xCA,0xDE,0x6F,0x06,0x00,0x00,0x69
$updateArrayData2 = 34 0 0 0x12,0xCE,0x83,0xB1,0x00,0x00,0x00,0x96
$updateArrayData3 = 36 30 0 0x12,0xCE,0x83,0xB1,0x00,0x00,0x00,0x96
$in1 = B 0 1 1 0 0 0x28,0xCA,0xDE,0x6F,0x06,0x00,0x00,0x69
$in2 = B 0 2 34 0 0 0x12,0xCE,0x83,0xB1,0x00,0x00,0x00,0x96
$in3 = B 0 3 36 30 0 0x12,0xCE,0x83,0xB1,0x00,0x00,0x00,0x96
UPDATE action SET id='0',active='1',tempAddr='0x28,0xCA,0xDE,0x6F,0x06,0x00,0x00,0x69',tcAddr='0x12,0xCE,0x83,0xB1,0x00,0x00,0x00,0x96',tcTrigger='34',tcDelay='0',thAddr='0x12,0xCE,0x83,0xB1,0x00,0x00,0x00,0x96',thTrigger='36',thDelay='30',lcd='0',netID='3' WHERE id='0' AND netID='3'

It looks like I corrected that some time ago in the github, but you may have downloaded it before that. Open ActionDataWithMySQL.php, and down near the bottom of the file replace:
Code:
echo $debugStr
with
Code:
//  echo $debugStr

That should fix it.
 

Latest posts

Back
Top