TeensyPi Networked Temperature Controller

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.
I am following along and have a couple questions on the Pi Plate Adapter.

4k7 Resistor - Is the resistor soldered through the board and making a connection underneath near the unassigned screw terminals on where the 3v3 and Data wires were soldered?

Are you powering the Teensy with a separate 5v supply (battery or plug) than the RPi that screws into the 5v & GND on the left?


As your self appointed resident "usability for dummies" tester, may I suggest adding a photo of the underside of the PiPlate in your assembly direction here? http://www.teensypi.com/building-a-teensypi-boards/ I had the same question re: the resistor connection and, being a soldering noobie, a picture would clarify it nicely.
 
As your self appointed resident "usability for dummies" tester, may I suggest adding a photo of the underside of the PiPlate in your assembly direction here? http://www.teensypi.com/building-a-teensypi-boards/ I had the same question re: the resistor connection and, being a soldering noobie, a picture would clarify it nicely.

I've made several of the PiPlates, each once a little different than the last, and have probably modified each one several times, so a photo of solder blobs on the back side of the board probably wouldn't be of much use. :(

Now that the Chinese New Year celebration is over, the boards that I'm having fabbed should show up soon. If the design checks out, I'm going to make the Eagle files available, so If anyone wants to make their own board, or have a group get together and have a "build-it" day, that would be doable. :rockin:
 
Got my TeensyPi assembled over the weekend and booted last night. I was surprised that the soldering/assembly went well considering it was my first one; a lot of fun.

The software loading was harder as I had difficulty figuring out the correct directory structure. Winzip didn't like the fact that the preassigned folder location started with "..\..\" so i did it manually (and not particularly well). Also had difficulty with compiling the teensypi.ino sketch for transfer to the Teensy, partially due to files not being in the correct directory. Things got better when I consolidated the Teensy libraries downloaded from the TeensyPi site with the libraries that came when I downloaded Arduino. Also got several errors related to I/O so I did a web search and found the following solution.

http://forum.pjrc.com/threads/252-OneWire-library-for-Teensy-3-(DS18B20)

The error code is from the OneWire.h library which apparently had some compatibility issues with Teensy. The fix was to use an updated OneWire.h library posted by PaulStoffregen:

"I am working on OneWire 2.2, with support for Teensy 3.0 and several small improvements. Here's a pre-release copy. Please let me know how it works if you try it?"

http://www.pjrc.com/teensy/beta/OneW...22_17jan13.zip

It's likely that I introduced the error by not replacing the OneWire library that came with Arduino/TeensyDuino with the TeensyPi supplied library. However, the suggested library appeared to have been updated more recently so I went with it and it solved the compiling issue; jury's out on whether I'm introducing some new error by not using the TeensyPi version. Has the OneWire library provided on the TeensyPi site been customized for use here? I can go back and reinsert the TeensyPi version of OneWire.h and see what happens if anyone has interest.

Next up, firing up the web interface and testing out the sensors/switches! (...and figuring out how I can do that from work so I'm not up until 1:30am again....)
 
Since Paul designed the Teensy 3.0 board, and has done extensive work on man Arduino libraries, I quite sure that his updated library will work just fine :rockin:

With any luck, I'll be releasing updated code to add PID control to the TeensyPi this weekend.

Fabbed boards are now in the U.S. and should arrive in a few days.

Wish me luck. :D
 
Since Paul designed the Teensy 3.0 board, and has done extensive work on man Arduino libraries, I quite sure that his updated library will work just fine :rockin:

With any luck, I'll be releasing updated code to add PID control to the TeensyPi this weekend.

Fabbed boards are now in the U.S. and should arrive in a few days.

Wish me luck. :D

Awesome! :mug:
 
Almost finished with an updated UI. I can post the source files when I am done.

Main Page
GFM1Z25.png


Sensor Detail (after clicking the temp sensor)
7sNA08j.png


Actions
h4dtT06.png


Action Detail (after clicking action temp sensor)
0AJWfBQ.png


Scan for new
lHFrPAP.png


Update names
kxs8R8p.png
 
Dayyuuumm! I wish I had such skillz ! Kudos to you guys. I've ordered Teensy. RasPi is already sitting in the drawer & waiting for it impatiently :)
Thanks again and keep on postin' !
 
OK, I'm pretty confident of the PID addition :drunk:

You can get the associated files from my github account .

It requires the addition of two more MySQL tables, accomplished by importing pid.sql and pidGraph.sql through phpmyadmin, uploading all of the new and updated *.php and *.html files to the RPi, and the Teensy 3.0 board has to be loaded with new software (TeensyPiPidDebug.ino) .

It is set up to handle up to 12 PID operations simultaneously and will graph the PID when it's enabled.

The Teensy 3.0 software is also setup to allow the setting of debug levels on the fly, so you can watch the progress of the Teensy 3.0 software on the Arduino IDE serial monitor or using minicom on the RPi (more on that later).

More details will be available on my website in the very near future, but if you're feeling brave, give it a whirl. :D
 
OK, I'm pretty confident of the PID addition :drunk:

You can get the associated files from my github account .

It requires the addition of two more MySQL tables, accomplished by importing pid.sql and pidGraph.sql through phpmyadmin, uploading all of the new and updated *.php and *.html files to the RPi, and the Teensy 3.0 board has to be loaded with new software (TeensyPiPidDebug.ino) .

It is set up to handle up to 12 PID operations simultaneously and will graph the PID when it's enabled.

The Teensy 3.0 software is also setup to allow the setting of debug levels on the fly, so you can watch the progress of the Teensy 3.0 software on the Arduino IDE serial monitor or using minicom on the RPi (more on that later).

More details will be available on my website in the very near future, but if you're feeling brave, give it a whirl. :D

I assume it's the TeensyPiPidDebug.ino that is the latest and greatest? Awesome work as always.
 
after I loaded the new .ino, I am getting now action on the Teensy... no light or anything. Will check again in the morning.
 
Every time I come back here I'm amazed all over again.

Jimmayhugh are you a developer by profession?

I worked in embedded systems for about 25 years, designed and coded with a few different microprocessors, microcontrollers and bit-slice systems.

Stopped working in that field in '99, now just do it for fun. :tank:

No degree, just a knack for the stuff and was in the right place at the right time.
 
after I loaded the new .ino, I am getting now action on the Teensy... no light or anything. Will check again in the morning.

Did you get any errors during the compile, upload??

I just noticed that I left the setDebug variable set to a non-zero value in the code. That's going to cause a 3 second delay on startup in addition to the time it takes to find the chips.

Set the setDebug variable to 0x0, re-compile and re-upload.

Anytime you upload code, to the Teensy 3.0, you have to restore all of your names and actions.

Keep me informed.
 
I recompiled this morning and got it all to load. What was odd was I reloaded the original .ino and still didn't get a response on the Teensy. But today when I rebooted everything it started to recognize the Teensy.

Going to play around with the PIDs this afternoon.

Thanks!
 
I recompiled this morning and got it all to load. What was odd was I reloaded the original .ino and still didn't get a response on the Teensy. But today when I rebooted everything it started to recognize the Teensy.

Going to play around with the PIDs this afternoon.

Thanks!

Welcome. :D

UPDATE - The PID Setup Page is available at my website.

I'm writing the PID update page for my website as we post. I'll detail the debug capabilities there for anyone that's interested.
 
Doing an apt-get update and apt-get upgrade seems to break the apache2 configuration. I can still sftp, ssh, use phpMyAdmin, but the webserver is unresponsive, even after a reboot. I believe is reconfigures the group and owner to www-data among other things.
 
Doing an apt-get update and apt-get upgrade seems to break the apache2 configuration. I can still sftp, ssh, use phpMyAdmin, but the webserver is unresponsive, even after a reboot. I believe is reconfigures the group and owner to www-data among other things.

can you connect to http://teensypi.local/head.html?

I had a similar problem where the Teensy didn't initiate, therefor the makeASocet.php could not connect to the Teensy and caused a page timeout. I got it to initiate yesterday, but when I came home today, it wont connect after I rebooted.

Is the status LED on the Teensy lit?
 
can you connect to http://teensypi.local/head.html?

I had a similar problem where the Teensy didn't initiate, therefor the makeASocet.php could not connect to the Teensy and caused a page timeout. I got it to initiate yesterday, but when I came home today, it wont connect after I rebooted.

Is the status LED on the Teensy lit?

Yes, connecting to head.html works. I tried restarting the Teensy and also reflashing it but I cannot access any of the php files, only head.html
 
Does the status LED light up on the Teensy when the RasPi starts?

Yes, it's flickering away.

EDIT: Did a complete power off and things seem to be slowly coming back. Initially UpdateNames wasn't refreshing after submitting an name, but that seems to be cooperating now. Once I confirm everything I will store this new Raspi image then try the PID additions.
 
I seem to be having some router issues right now, so my posts may be a little erratic...

I just did a update / upgrade on the RPi with no ill effects. :confused:

Keep me updated.
 
I've run into an issue and was wondering if anyone had any ideas. Everything is up and running more or less. I've built a bus on stripboard and connected all the switches to a relay. All 8 work flawlessly. I've connected 5 sensors which seem to work fine.

I've unfortunately never been able to connect both sensors and switches at the same time. Right now I have 8 switches wired up and the moment I connect a sensor it appears the teensy crashes. The led stops blinking and becomes solid and nothing at all is detected. I remove the sensor and restart and everything works just fine. The rpi seems to still be going about its business and the daemon seems to be running.

The only thing I can think of is could this be a current issue? I've got the whole thing running on a 1a USB to ac adapter. The kind that apple sends with iPhones/iPods.

Is 1a not enough for a raspberry pi, teensy, 5v sainsmart 8 relay module, 8 switches and 5 sensors?
 
doughaas said:
I've run into an issue and was wondering if anyone had any ideas. Everything is up and running more or less. I've built a bus on stripboard and connected all the switches to a relay. All 8 work flawlessly. I've connected 5 sensors which seem to work fine.

I've unfortunately never been able to connect both sensors and switches at the same time. Right now I have 8 switches wired up and the moment I connect a sensor it appears the teensy crashes. The led stops blinking and becomes solid and nothing at all is detected. I remove the sensor and restart and everything works just fine. The rpi seems to still be going about its business and the daemon seems to be running.

The only thing I can think of is could this be a current issue? I've got the whole thing running on a 1a USB to ac adapter. The kind that apple sends with iPhones/iPods.

Is 1a not enough for a raspberry pi, teensy, 5v sainsmart 8 relay module, 8 switches and 5 sensors?

Answering my own question. I tested a 2a adapter with the same result.

Teensy still seems to crash once I add a sensor
 
I seem to be having some router issues right now, so my posts may be a little erratic...

I just did a update / upgrade on the RPi with no ill effects. :confused:

Keep me updated.

What's odd w/ my setup... ever since I updated the .ino I have had issues with the Teensy not loading. The LED indicator doesn't turn on. I got it to work yesterday, but had issues again today. I am reloading again, I will update...
 
Answering my own question. I tested a 2a adapter with the same result.

Teensy still seems to crash once I add a sensor

I am powering my sainsmart realy with a separate 5v source. This opto-isolates the TeensyPi from the relay.

On the power input - 5v & Ground from separate source to JD-VCC & GND, and 5V from TeensyPi to VCC.

On the other inputs, 5v from TeensyPi, 8 inputs to the switches and GND from Teensy
 
redbenn said:
I am powering my sainsmart realy with a separate 5v source. This opto-isolates the TeensyPi from the relay.

On the power input - 5v & Ground from separate source to JD-VCC & GND, and 5V from TeensyPi to VCC.

On the other inputs, 5v from TeensyPi, 8 inputs to the switches and GND from Teensy

The relay seems to work fine off of the pi 5v.

The problem I seem to be having is that the teensy crashes whenever I tell it to scan for new devices with a sensor attached.
 
The relay seems to work fine off of the pi 5v.

The problem I seem to be having is that the teensy crashes whenever I tell it to scan for new devices with a sensor attached.

Double check your pull-up resistor. Double check that you are powering the data bus with 3v3. Double check that the data bus is consistent between the sensors and switches.
 
Answering my own question. I tested a 2a adapter with the same result.

Teensy still seems to crash once I add a sensor

Sounds like it may be a wiring issue. Try using the TeensyPi with just the temp sensor, then add one switch/relay at a time.

I use a 5v/5a switching power supply for my project, and have had 12 temp sensors and 24 switches driving LEDs running with no problems.

I've not used mechanical relays on my setup, just SSRs, so there may be an issue. You might have to add "kickback" diodes across the relay coils to prevent induced voltages from causing problems.
 
I have my TeensyPi running and am troubleshooting the occasional issues. I've updated with the PID software and have setup a test bed with a SSR/rice cooker so I should have some good data this weekend (need to read-up on PID tuning!). I had to search for and download the PID library file before the updated Teensy image would compile; may want to add that to the instructions for updating.

The only area I have had no success with is the COSM datafeed. Everything seems to be setup but the datafeed is empty. The onboard data logging has been hit and miss as well. I'd welcome suggestions on how to debug that. I have seen redbenn's issue where the sensors stop updating after restarting the Teensypi and can confirm that reloading the Teensy clears it up.
 
Any thoughts on why my teensy doesnt always initialize when I boot?

It was working fine before I upgraded. I just resoldered some wires that looked like they could need it, but still no luck. Reloaded the teensy software a couple times, now no luck at all.


*edit: It now seems to initialize, as there is a solid status LED. I reloaded the original teensy software, and it works fine again. Guess I'll keep trying.
 
Any thoughts on why my teensy doesnt always initialize when I boot?

It was working fine before I upgraded. I just resoldered some wires that looked like they could need it, but still no luck. Reloaded the teensy software a couple times, now no luck at all.


*edit: It now seems to initialize, as there is a solid status LED. I reloaded the original teensy software, and it works fine again. Guess I'll keep trying.

Define "initialize".

In a nutshell, the very first time that the Teensy 3.0 starts up after uploading new code, The Teensy 3.0 checks the EEPROM area. Since the code upload resets the EEPROM area, the TEENSY 3.0 does a search for chips, initializes the Chip Structure array with any chips it finds, and then uploads the Chip Structure array, the Action Structure array, and now the PID Structure array to EEPROM array. It also sets an ID value in the EEPROM that lets the Teensy 3.0 know that the EEPROM and Chip Structure array have been initialized. When you modify an Action or PID, those values are placed into the appropriate structure in the array, and the EEPROM is also updated.

If the Teensy 3.0 is then powered down and then powered back up, or reset without a subsequent upload, the Teensy 3.0 checks the EEPROM ID and, since it's initialized, loads the EEPROM data into the structure arrays. The Teensy 3.0 does not search for new chips in this situation, as a new chip may be inserted into the array at any location, which would possibly offset the naming values you put into the chipName table of the database, as well as the absolute address of the chip in the array structure.

In order to add new chips, you would use the "Scan for New Chips" funtion in the Update / Restore page, verify that the names are correct in the chipName table, and then do a Restore All.

I need to write a concise setup/modify/reload sequence to make sure that everyone is doing this the same (correct) way. I think that this may be part of the problem, and I will try to get something written this weekend.

In the meantime, the best course of action if adding new chips right now may be to re-upload the Teensy 3.0 software and start from scratch.

Sorry for the inconvenience. :eek:
 
What I was seeing is that when I would power up the RasPi, the Teensy status light would not turn on. This happened when I first updated, I checked the wiring, and still had issues... then it just started working again (as in the LED powered up when I powered up the RasPi).

With the new PID code, when I power up, the indicator now just stays a solid orange. When I try to access the teensypi.local/index.php (or other .php file) it times out. I can access teensypi.local/head.html and phpmyadmin, so it is not a web server issue. I believe that it is unable to make a "socket connection" with the teensy, and the MakeASocket.php is causing the timeout. No matter how many times I reset the TeensyPi or reloaded the code, no changes.

When I reloaded the original TeensyPi code, the first time I powered up and the same thing, solid LED. However, when I reset, it starts flashing when the TeensyPi reloads. I can then access all the pages on the TeensyPi, and scan for new chips, name the chips, etc.

I was able to successfully load the PID code last night, but when I got home from work today, it was not accessible.
 
I have my TeensyPi running and am troubleshooting the occasional issues. I've updated with the PID software and have setup a test bed with a SSR/rice cooker so I should have some good data this weekend (need to read-up on PID tuning!). I had to search for and download the PID library file before the updated Teensy image would compile; may want to add that to the instructions for updating.

The only area I have had no success with is the COSM datafeed. Everything seems to be setup but the datafeed is empty. The onboard data logging has been hit and miss as well. I'd welcome suggestions on how to debug that. I have seen redbenn's issue where the sensors stop updating after restarting the Teensypi and can confirm that reloading the Teensy clears it up.

The COSM feed is redbenn's baby, so maybe he could chime in on that.

As for the onboard data collection, it only runs when the Action or PID is enabled. If it ran all the time, it would rack up a huge mysql database file in a fairly short period of time, and since I haven't yet provided a web page to allow the data to be removed from the database. I felt that was a prudent step to take.
 
I'm seeing the exact same thing redbenn mentioned. When I left for work this morning I shut down the Teensypi. Came back this evening and turned it on, solid bright LED light on the teensypi and data on the web interface. I could get to the page but it said something about socket error. Cycled the power with same results. Reloaded the Teensy and it booted right up with the same sensor names/settings as when I left this morning. No need to search for new chips or restore settings. Sure seems like the Teensy is having trouble restarting it's routines after a shutdown.
 
The only area I have had no success with is the COSM datafeed. Everything seems to be setup but the datafeed is empty.

If you click on the debug console in COSM does anything show up if you access teensypi.local/cosm.php in another window?

When you update the names does it create datafeeds for the new chips?
 
What I was seeing is that when I would power up the RasPi, the Teensy status light would not turn on. This happened when I first updated, I checked the wiring, and still had issues... then it just started working again (as in the LED powered up when I powered up the RasPi).

With the new PID code, when I power up, the indicator now just stays a solid orange. When I try to access the teensypi.local/index.php (or other .php file) it times out. I can access teensypi.local/head.html and phpmyadmin, so it is not a web server issue. I believe that it is unable to make a "socket connection" with the teensy, and the MakeASocket.php is causing the timeout. No matter how many times I reset the TeensyPi or reloaded the code, no changes.

When I reloaded the original TeensyPi code, the first time I powered up and the same thing, solid LED. However, when I reset, it starts flashing when the TeensyPi reloads. I can then access all the pages on the TeensyPi, and scan for new chips, name the chips, etc.

I was able to successfully load the PID code last night, but when I got home from work today, it was not accessible.

I get the solid bright LED on the Teensy with the DebugPID ino flashed. I couldn't get it to work. Back on basic Tennsy.ino now
 
helibrewer said:
Double check your pull-up resistor. Double check that you are powering the data bus with 3v3. Double check that the data bus is consistent between the sensors and switches.

I checked all my solder points and checked voltages across the buses with my multimeter.

3v3 to ground is 3.3v
5v to ground is 5v
Data to ground is around 1.1v
3v3 to data is 2.2v

My buses are consistent.

When I scan for new devices with a sensor connected the teensy led stops blinking, becomes solid and 3v3 to data voltage becomes 3.3v.

It stays 3.3v as long as the teensy led is solid even once I disconnect the sensor.

Is this a problem with my pull up resistor?
 

Latest posts

Back
Top