Category: Personal notes
The Internet of Things – a new project
It’s been a week since I attended the UBM West conference in Anaheim, and I’ve acquired a new fascination with the Internet of Things. In fact, I’ve been more than a little fixated on it since coming home.
I have been having discussions with various friends in engineering about the IoT, and I can see that there is a lot of potential here, but also there is a lot of confusion, and companies working at cross purposes. The consumer marketplace is quickly adopting many different IoT ideas, while manufacturing seems to be talking a great game, but is adopting the Industrial Internet of Things (IIoT) slowly – if at all.
One of my software friends is pushing the Internet of Data – the idea that the device doesn’t matter, only the data. As part of the setup, the device explains to the network what it is, what it can do, and what data it can provide. It is up to the network to determine how to use this information.
Unfortunately, there is not industry standard for data sharing in the IoT. There is no real standardized Human/Machine Interface (HMI) to allow a human to interact with a local network of IoT to do useful things. The IFTTT web service is a useful idea of how such an HMI might work, but I’m having a hard time visualizing how it would work in a local network setting – where I could control the devices in my home through my tablet computer, or where a manufacturer could use it to choreograph several manufacturing robots to work together.
I’ve learned that there is a lot of pre-existing infrastructure and technologies for IoT, and there are several services that hook into it. The problem is getting them all to work smoothly together.
But reading about it all is completely different from actually doing it. And to learn, it is often best to create a project to accomplish something, and then learn from that.
So I’m starting a project.
If you know anything about me, you may know that I’m interested in permaculture. Permaculture is the creation of sustainable agricultural systems by studying and simulating the ecological systems found in nature. It is the idea of working with nature, fitting our society together with ecology. There are principles of design that guide permaculture, and they are useful – but they all boil down to a simple idea, human observation and reaction as a form of feedback is key to an agricultural system.
I’ve been writing about urban farming and aquaponics in my blog, “Fresno Backyard Harvest” for a few years now. Aquaponics has been of great interest to me as part of urban farming and permaculture. And I would like to better automate my urban farm, with controls that monitor plant moisture, measure water quality for my fish, and adjust water levels when necessary. I’d also like alarms when something goes wrong, and I would like to see how much of my urban farm I can measure.
For my first project, I intend to create something that will control a small aquaponics setup. I will use it to monitor various sensors, and report back to me. It should also control water flow.
Right now, I’m in the planning stage. I’ll keep a running journal of how I decide what to use, and what my designs look like. I’ll also keep a Github repository of each project.
You’ll be able to find my progress in the “Projects” category of my blog. Starting with this one. As my projects split off, they’ll be given their own categories.
I’m currently working on several areas of professional development.
- FE Exam – I’m working toward my Professional Engineer license for Electrical and Computer engineering. My first step is to take the Fundamentals of Engineering (FE) Exam. I plan on taking the FE Exam this fall.
- CAPM Certification – I’m studying for the Certified Associate in Project Management certification. I will apply for the CAPM certification in June / July.
- Software / Firmware – I want to keep up my skills in firmware programming, so I’ll be developing an embedded project in C++, and an Android platform project in JAVA.
Other things I’m working on include:
Programmable Logic Controllers – I’m really interested in using PLCs for my own permaculture / aquaponics projects. I’ve downloaded the PSIM PLC simulator, and am looking at purchasing a copy of PLCLogix when I’m have a better handle on the different languages.
I’ve also ordered a chipKIT uC32 based on the Microchip PIC32MX340F512H. I’ll use MPLAB X and a Microchip ICD to program it. My idea is to eventually use this to measure water levels and quality in an Aquaponics setup. I’ll be programming it in C++.
And finally, it’s time to upgrade my Amateur Radio licence class again. I’m currently a General class ham (KD6TXV) and want to upgrade to Amateur Extra class. I’ll be taking the exam this summer.
NTSC / PAL Field Counter Test Fixture
Due to corporate confidentiality, I’m not allowed to show much of what I’ve worked on. The Field Counter is one of the exceptions to this rule since it was never designed for sale.
This simple Microchip PIC based test fixture was used to insert a time stamp on every field of an NTSC / PAL video signal. Since video signal frames consist of even and odd fields, it would be convenient to label each field with a unique identifier.
In my original code I concentrated on the NTSC signal. I determined the field output by sending the FIELD pulse from the 1881 synch separator to the Microchip PIC. This gave me an even/odd field determination. With a 20 Mhz clock giving me 5 million PIC program cycles per second, I had a very comfortable margin of program cycles to play around with.
The processor would determine the next number in the sequential time stamp, and would send that to the NEC uPD6450 character display chip. When the next field was displayed the character display would include the time stamp as the overlay.
The software would then “count up” to 99 hours, 59 minutes, 59 seconds, and then roll over. I figured that 4 days of continuous testing would be overkill, and didn’t code the ability to count any higher.
The original field counter saw quite a lot of use. It was used to figure out when our equipment was digitizing video out of order, getting fields or frames “confused” and exactly how.
It was also used to test the promises of products sold by original equipment manufacturing companies who wanted our company to resell their products. This is how we learned that one company was only digitizing the odd fields of incoming video, or how another company averaged the odd / even fields together in a very lossy manner.
This tool was so useful that I built version 2.0. This is the hardware I’m showing here. This newer version included a serial EEPROM and an RS-232 transceiver, giving it the ability to communicate to a PC using Hyperterminal and add text to the video screen to indicate the test being performed.
I also included menu navigation buttons, and some hardware hooks to allow this tester to “watch” an SVGA signal and send a trigger output on any given SVGA scan line. The buttons were very useful, but when I determined that video was moving away from SVGA I never bothered to implement that function.
The field counter became very useful in other ways. I would hand these devices to our interns and have them modified for various purposes. There was even a prototyping area on the circuit board that allowed for easy modifications.
One modification by a very bright intern allowed the device to control the PAN/TILT/ZOOM functions of a camera by the use of a standard television remote controller. This was a proof of concept idea, that a cheap controller could be used to control a security system. Unfortunately Marketing didn’t approve.
Another modification allowed the platform to monitor a thermocouple while controlling the heat in a standard $30 toaster oven. This would allow the toaster oven to be used as an electronics reflow oven. I have used this oven to successfully reflow a couple of boards that I’ve made.
Unfortunately, since this was simply test equipment I’ve never been good about source control for the firmware. Over the years several interns have hacked up the source code, and I no longer have my original. You can see that in the code here.
I still have one of these units to play with. I may re-write the code in C++ and upgrade my reflow oven. But there’s a lot of other things on my plate these days, and this is not a high priority.