/>
X

A Non-obvious Use for Debbie (a Debian 4.0 Home Server)

12/28/2007One of the things I'd like to replicate here at home is a tool we have at work. Its a 32 channel, 12 bit resolution, analog to digital data acquisition recorder that allows ftp downloads and serves the data up as web pages.
xwindowsjunkie.jpg
Written by Xwindowsjunkie on

12/28/2007

One of the things I'd like to replicate here at home is a tool we have at work. Its a 32 channel, 12 bit resolution, analog to digital data acquisition recorder that allows ftp downloads and serves the data up as web pages. (It has an NEC CPU of some unknown type.) I use it to record voltage, current and temperature data when I'm punishing evaluation computers for possible use as parts of future products for the company. It was worth every penny we paid for it 6 years ago. The built-in generic pages it has are programmable and I've used that feature extensively. It also has the ability to serve pages with custom programmed backgrounds with the data tagged for display in specific locations or “windows” on the page. I never bothered with that feature previously but it would be a very attractive feature to use as a sort-of-HMI page that could be viewed by any of the family members and understood without much training. My family doesn't have the budget for that instrument but with Debbie and embedded Linux and some other bits of technology I can make an excellent substitute.

One of the long-term home based projects I'm working on is a grid-free electrical power system using wind and solar thermal energy sources. Assuming I keep it, I'll be at my day-job most of the daylight hours and won't be able to manage or directly collect the data from the system prototypes I've built. A data recorder is the obvious answer to avoid clone duplication and adding one more mouth to the family to feed! An attractive web page is to encourage enthusiasm from the family for the “projects” I'm going to be spending some weekend time on.

Data acquisition will be done by a group of tiny micros feeding their data over a RS485-like Master-Slave radio network to a salvaged P3 single board computer (SBC). It will be dumping the data collected from the micros with date-time stamps into a cvs file onto a compact flash drive. The micros will be little eZ8's from Zilog. Putting the tiny 8 bit micros right at the measurement point avoids long sensor leads and preserves the accuracy of the measurements. I hope to measure voltage, current, termperature, light levels, RPM rates, ambient temperature and whatever else pops up as a needed measurement.

Power to run the micros will be from batteries charged by solar cells located somewhere near the micro. To enhance power efficiency, most of the time the micros will be in sleep mode and a timer will wake the micro up to make its measurements and transmit the results and then go back to sleep.

Later the same micro family will be used as “smart instruments” for system sensing and/or control points of the production system(s). These eZ8 microprocessors are fairly well integrated with built-in a/d convertors, counters and comparator circuits that can be programmed either in C or assembly code with small chunks of code in flash ROM. They also have IO pins that can be used to turn relays or switching transistors on or off or sense switch positions as inputs. The micros have a very easy to use SPI interface and software package to program and debug them. These integrated processors keep the parts count low and the power requirements minimal.

(Before all the Microchip PIC fans go nuts, I know more about the Zilog eZ8 and eZ80 families. Its easier to work with what you know. This is supposed to be fun not work!)

Using little single-chip radios,CC2500 from TI. will allow me to put my experiments where I need to in the backyard without having to run cables all over the place.

One other sub-system I'll need to add is a micro-based “weather station”. This weather station will collect wind speed, direction, temperature and light levels. It might be necessary to be able to sense whether or not its raining, I don't know at this point. I hope to be able to use the same micro for the weather station that I use in all of the other “smart sensors” I install.

The junker P3 computer running a Debian 4.0 image can be located inside the house to stay cool(!) and so it can deliver its web pages and data files to Debbie by either Cat5 or an 802.11b connection and still maintain radio connections with the low power micros. An inexpensive web cam will be installed on the P3 computer. Grabbing stills to stuff into the data stream being fed to Debbie will allow some correlation of the environmental conditions at the time of the data collection. Webcam pictures will also be served up as the background fill for the data display web pages on Debbie. This system will begin by running a small Debian 4.0 OS image stripped down to the essentials needed to for the data collection function. Later I'll put an embedded Linux image on the system to run everything from a Compact Flash drive.

So far Debbie has worked in all of the relatively simple roles I've put her to. AVI, MOV and JPG files all work well on either the Linux or Windows clients when served by Debbie. PDFs work in either Linux or Windows. They even work when accessed by browser plug-ins, either FireFox 2 or IE6 or 7. Copying files to and from Debbie by the kids has been easy to implement. Discovered that an episode of Battlestar Galactica I recorded on a DVD recorder (running Linux on a ARM9, natch!) would NOT playback directly from the DVD on either Windows or Linux. Probably something I did wrong on the DVD recorder. It plays fine on the DVD recorder and other DVD players. Hmmm. Haven't tried playing a commercial DVD I've bought on either OS yet. Trying to record broadcast video straight to the DHS hasn't happened yet. I'll have to seize control of the remotes for the TV, the satellite box and the DVD simultaneously. A feat of monumental ingenuity when confronted with a teenager, a pre-teen and a spouse that considers the TV her property. Even then I might get the Jack Valenti stormtroopers in here to stop me violating some digital rights of the copyright owners.

However, I did find an issue that I need to investigate further.

12/31/2007

Ole Nick was kind and brought me a simple Nikon 6 megapixel still camera with video and audio capability. To me it was: Way Cool! Small enough to stick in my pocket and pull out to capture all kinds of things. Perfect to embarrass my kids in the future! I can yank it out take a still or record a home movie and unless the flash goes off, there will be no one the wiser. So I started putting the Christmas pictures onto Debbie's hard drive through a Samba share from a Windows XP box. No problem.

I started playing them back on the same Windows XP system by downloading them from Debbie. I use XP as a desktop when I have to and as part of my testing. I got distracted more than once in the last 2 weeks and found out that Windows XP will time-out an inactive network share connection even with a media player connected to a file with the file open on the Samba share. Inactive seems to be defined as a connection that hasn't pulled any data down from the server in about 20 minutes. I knew about this Windows desktop “security feature” but it hadn't registered on me that it would be an issue on local intranet connections, just Internet connections through IE, whoops. This can cause issues with files on mapped drives on Samba servers that have been paused using different Windows file viewers. The problem is that the Samba share doesn't seem to time out or at least not at the same time. This is going to require some investigation and likely some XP registry hacking editing.

The effect is that the XP logon to the share is forced to be re-established by the XP desktop regardless of what the connection state on the Samba server and that requires the password to be known by the client. A pain in the posterior when you are trying to make the system seamless and look as if the share is just a folder on the local drive. This was a “security feature” added with SP2. Until I find a hack to “fix” the feature, I'll have to drop scripts and shortcuts on the desktops of the kid's Windows computers.

1/8/2008

Started laying out the schematic for the eZ8 microprocessor I plan on using for the data acquisition and control of my little prototypes. It's going to be a really tiny system. Less than 2 square inches or about 129 square centimeters without solar cells or batteries. All surface mount parts, all real tiny. Cool.

1/12/2008

Still haven't had time to figure out the time-out issue. I have a hard time leaving a computer alone for 20 minutes or more when its on and sitting in front of me.

Without even thinking about, I plugged my USB 2.0 SanDisk flash drive reader-writer into Debbie's USB socket. It immediately mounted the plugged in 1GB SD flash from the Nikon without a hiccup. Debbie let me browse around and copy my impromptu movies and stills onto the Samba shares for immediate sharing with all the other network clients. You long-time Linux hands think: “So what?” Now try it on a Windows 9X or NT or 2K box without the upgrades or installing drivers. What I really hate about XP especially SP2 is that it takes sometimes 90 seconds to 2 minutes to get XP to let go of the USB connected “removable” flash drives. Windows MediaPlayer informed me that I shouldn't look at my little movie I'd made on my Nikon due to potential “security” problems and this is with the local network set as safe. Yeah buddy! I'm going to virus infect my own movies!

Related

Why you should really stop charging your phone overnight
iphone-charging.jpg

Why you should really stop charging your phone overnight

iPhone
I loved driving the Hyundai Ioniq 5 and Kia EV6, and there's only one reason I can't buy one
img-1724

I loved driving the Hyundai Ioniq 5 and Kia EV6, and there's only one reason I can't buy one

Electric Vehicles
Samsung phone deal: Get the Galaxy S22 Ultra for $299
1296x729-29

Samsung phone deal: Get the Galaxy S22 Ultra for $299

Smartphones