Earlier in the week my chips showed. They came from California, not from up the street. Wow, they are tiny, but that is ok. I've decided this is going to be a prototype, and if things are working, I'll do a board layout, and have a short run of boards made. Maybe do a kit, if anyone wants one. This being a holiday weekend (Thanksgiving), I didn't do anything but think about things.
I did go look a new phones. I am really excited about the Galaxy Note II. Close to a tablet, but then it is still a phone. It does fit in my pocket, and the stylus seems really useful. I played with one at the mall on Friday, and I really liked it. More to learn, but overall the same Android that I know and love. More to see and a smooth briht screen.
Speaking of Android vs. Apple again, one of the other Cozy builders talked with one of the autopilot manufacturers who said, Apple doesn't want liability for any control software, so Apple won't let anyone add an autopilot app to the iTunes store. My comment was, the Android eco-system is just getting ramped up, with multiple sizes and configurations. Unless Apple has something significantly better than Siri, they are always going to be playing catch-up to Android.
Discovery Board - Autopilot
Hack-a-day again cam through. They had links to the STM discovery F3 board Linux tool chain. Not for building Linux on the board, but for building apps for the board in Linux. The board has been sitting in my bedroom on my night stand for the last month. I was excited about getting it, but no time. Hopefully some time will be available real soon now, especially with the availability of OpenOCD for the F3 ready to go.
The DIY Drones guys had a Black Friday sale. I was looking and thinking, they have whole FMC (flight management computer) for about $150 on sale. I certainly can't build one for that much, including software, given my time.
My Christmas wish...more time, and closer to my airplane.
happy holidays
tom
Process of building an Airplane Engine monitor. It will connect a Arduino to an Android phone or Tablet.
Sunday, November 25, 2012
Wednesday, November 14, 2012
I just gotta say something...
A product review, if you will.
I got an "Fly Air Mouse" for the Mk808, and am mostly unhappy with it. The accuracy isn't that good, and it doesn't function all the time. The keys bounce, and the some of the buttons don't always do what it says.
There is a nice bluetooth to USB dongle that just plugs in the Mk808 and it all woks fine. The instructions aren't really clear. You need to push the Android button down half way, to use it like a mouse. The full press means select, similar to the left mouse button, but it doesn't always work.
There is a full keyboard on the device, that can be very nice. searching for netflix videos, or entering something in a web site. You need to be careful, the keys bounce. You might be typing in a simple word, say "columbus" and it comes out "ccollumbbuus". I am never sure, and still pressing the delete or back space, and that key will bounce. Getting back to the first "c" may erase the whole word.
Actually I think the best thing would be a simple wireless mouse. The on screen keyboard on the Mk808 is really solid, and almost everything can be done with the left mouse button.
I don't want to complain about anything, or make the world think that this is completely useless. It can be usable, but I probably won't use it much.
That is all for tonight.
tom
I got an "Fly Air Mouse" for the Mk808, and am mostly unhappy with it. The accuracy isn't that good, and it doesn't function all the time. The keys bounce, and the some of the buttons don't always do what it says.
There is a nice bluetooth to USB dongle that just plugs in the Mk808 and it all woks fine. The instructions aren't really clear. You need to push the Android button down half way, to use it like a mouse. The full press means select, similar to the left mouse button, but it doesn't always work.
There is a full keyboard on the device, that can be very nice. searching for netflix videos, or entering something in a web site. You need to be careful, the keys bounce. You might be typing in a simple word, say "columbus" and it comes out "ccollumbbuus". I am never sure, and still pressing the delete or back space, and that key will bounce. Getting back to the first "c" may erase the whole word.
Actually I think the best thing would be a simple wireless mouse. The on screen keyboard on the Mk808 is really solid, and almost everything can be done with the left mouse button.
I don't want to complain about anything, or make the world think that this is completely useless. It can be usable, but I probably won't use it much.
That is all for tonight.
tom
Sunday, November 11, 2012
I got a couple days...
Before the MAX31855's show up. So I can afford some distractions. The STM32F3 discovery board I ordered showed up. This board will probably be pretty useful. I still want to do some instruments, and this could be the strap down IRU maybe. It seems to have enough GPIO pins on the board to maybe even be an air data computer by adding a couple pressure sensors to it. It only has USB IO so connecting it to an Android might be a challenge.
I've been listening to the GoogleIO podcasts and the Android library has a nice IO library that allows similar calls for Bluetooth and USB. I think it requires 4.1 though, and may or may not have backward compatibility. I really feel I missed out on this years conference. I don't know why it wasn't even on my list this last year. They gave away a really cool ADK kit that is like an alarm clock, but allows many development options, including demo code for connecting euther Bluetooth or USB.
I figure between the ADK libraries and some demo code for the STM32 discovery board, I ought to be able to connect them together. I need to play with USB hubs though. The physical connectors are either USB minis or USB micros and nothing has a A connector. The discovery board has two USB mini connectors, and the tablets and phones have USB mini connectors. I believe the phones support USB On-The-Go so that should work, but I still need a cable. That is there I think the HUB would work, since I have plenty of A to Mini and A to micro cables.
Sure enough, once you start looking, good things happen! There are A female adapters to mini and micro B connectors, or individual ones. This is going my way now.
Some phones have gyros, and most have compasses with accelerometers, so why have this board in the plane? Few tablets have gyros, and that is what I want in the dash of the plane. The compass may not work in all orientations, or near whatever is in the panel either. Having this board allows placing the gyros and compass in known good locations, and having the air data information integrated will allow any tablet to be used, and know it will work at all times.
I may not finish this in the next couple days, but that is OK. I have plenty to follow up on, and read about and plan. Give me a couple months, and I think I'll have something working.
I've been listening to the GoogleIO podcasts and the Android library has a nice IO library that allows similar calls for Bluetooth and USB. I think it requires 4.1 though, and may or may not have backward compatibility. I really feel I missed out on this years conference. I don't know why it wasn't even on my list this last year. They gave away a really cool ADK kit that is like an alarm clock, but allows many development options, including demo code for connecting euther Bluetooth or USB.
I figure between the ADK libraries and some demo code for the STM32 discovery board, I ought to be able to connect them together. I need to play with USB hubs though. The physical connectors are either USB minis or USB micros and nothing has a A connector. The discovery board has two USB mini connectors, and the tablets and phones have USB mini connectors. I believe the phones support USB On-The-Go so that should work, but I still need a cable. That is there I think the HUB would work, since I have plenty of A to Mini and A to micro cables.
Sure enough, once you start looking, good things happen! There are A female adapters to mini and micro B connectors, or individual ones. This is going my way now.
Some phones have gyros, and most have compasses with accelerometers, so why have this board in the plane? Few tablets have gyros, and that is what I want in the dash of the plane. The compass may not work in all orientations, or near whatever is in the panel either. Having this board allows placing the gyros and compass in known good locations, and having the air data information integrated will allow any tablet to be used, and know it will work at all times.
I may not finish this in the next couple days, but that is OK. I have plenty to follow up on, and read about and plan. Give me a couple months, and I think I'll have something working.
Friday, November 9, 2012
Back to the Original Purpose
Enough with the SDRs and Chumby's and other distractions. Well, mostly...
I've been a subscriber to EE Times for probably 20 years. It used to be a weekly paper like format, but is now a skinny magazine, but with amazing web bits to supplement it. A couple weeks ago, there was the an invitation to a webinar on RTD and Thermocouples put on by Maxim. The webinar happened on Wednesday, and I listened to it. Pretty good talk, the speaker couple have been more exciting, but was well prepared, and talked about some good products. He didn't convince me to switch to RTD's but I am now thinking of using an integrated SPI chip to do everything.
The webinar hammered into me the reason for the second temperature sensor at the cold junction. The reason is, that ends up being a second thermocouple, since the copper wires that we are connecting to are of different material than the wires in the thermocouple. If we don't know that temperature, then the actual temperature we want to measure will be off a bit. Having the second temperature sensor will add to the complexity, and cost of the circuit.
The one complex circuit presented used the MAX6126 for voltage reference, and DS600 for the cold junction temperature sensor and the MX7705 for A/D converter. There was some discussion about keeping a constant current source, and other details using these three chips to get a good measuring circuit.
Then he showed the MAX31855, wow, pretty simple. Connect the thermocouple on two pins, some power on a couple more pins, a crystal and capacitors on other pins, and then the SPI to the processor and you are done! About the simplest convertor I have seen for under $5! It does SPI, so I should be able to piggyback 8 or 12 or 16 depending on engine chosen. I won't have to use up the A/D convertors to get past a 6 cylinder engine. There is an SPI library for the Arduino and everything.
Now I am still dreaming, I need to actually build something. I need to order about 8 of them, 4 J type, and 4 K type. DigiKey has them for about $3.55 each, but only if you order 2500 at a time! Single quantities are over $7.50 each, and hard to come by. Maxim is generous, and offers them as free samples. I was able to get 2 of each that way. Well, I ordered them tonight. They are just up the street, well some part of the company is (right down Beltline on Midway in Addison, probably 5 miles west, yup google maps says 4.7 miles).
Another toy
This is sort of related, since it is Android. I got an Mk808 android device. I say device, because I am not sure how to categorize it. It plugs into a HDMI port on a TV or monitor and uses that for a display. Otherwise it mostly acts like a tablet processor. There are no g sensors or touch screens, but you can plug in mice (or bluetooth mice) and control the desktop that way. It can run crackle or netflix, and youtube so it is good for an entertainment device. It has a browser (two), and can read and write office like documents (or use google docs).
So what you say, I can get a tablet and do all that. How about replacing your PC with one of these? What would it hurt? You say you can't download photos to it, no you probably can't. You can't play games on it? Well, my kids are driving my wife nuts playing angry birds. You can download all kinds of games. It has the whole google play store on it. Games, apps and media are all available.
What if you wrote desktop type apps for it. Why not, you know, a 32 in 1080p monitor would be way cooler than two 20 inchers, there would be no line, and the mouse would smoothly slide between windows.
What does a desktop PC cost, $400, maybe $1000? Well this is under $100. Yes, that is right, 1.6GHz processor with 1GB memory isn't much, but it might be worth a try? EBay has 'em for about $50 if you want to experiment and don't want to blow too much. Get one of the fancy wireless keyboard mouse combos and you have a full multimedia center. Cut the cable and do some fun stuff.
Thursday, November 1, 2012
Chumby Links, and Tips
People are starting to ask me questions about the Chumby. I am not sure what to think, but rather than getting asked the same questions dozens of times, I thought I'd offer some answers ahead of time.
You can start up an SSHD on the Chumby. Go to the about device screen in setup and click on the pi symbol in the upper right corner. Using something like putty on windows, or ssh on linux/mac command line, you can connect as the root user. On my chumby, I connect by typing:
ssh root@192.168.2.10
or
ssh 192.168.2.10 -l root
By default there is no password. You can add one, but on reboot, the sshd turns off, and no one can connect. There are instructions for adding passwords on chumby tricks web site. Actually that page has lots of useful links.
I am an emacs user. It is a wonderful tool/IDE/editor. There is no emacs on the stock chumby. I used my laptop to enter the code, this provided me a place to backup the code, so now it is on both the Chumby and my PC. I then cut-n-pasted to a simple vi session on the chumby.
Of course Perl is already there, and all I needed to do was write some code it could interpret. Yes, interpret, but trust me, well written Perl is stinking fast. I've done some image processing using it, it is fast enough.
There is a micro SD card in the Chumby. It can be removed, and I imagine you could load your code on there. You don't need to, you can use the read write file system /mnt/storage to put your code on. I made a sub directory and called it bin, to be standard with the rest of *nix. (If you want to learn about the philosophy behind Unix/Linux etc, the book The UNIX Programming Environment by Kernighan and Pike, read it study it, and you will be the best programmer ever).
Every time the Chumby boots up, or any *nix system starts, it runs some fixed sequence. There are some scripts in /etc/init.d that has the scripts. I didn't use them, because that partition is read only. You can do a mount -o remount,rw / on that partition, and put in your script.
I did it the old fashion way; using the command line. Unix is funny, if you start an app on the command line, and the terminal that that app was started from the app goes away also. There are things we can do to get around that. The nohup command is how we ignore the hangup signal when the terminal goes away. Just start the program prefixing the command line with "nohup" and end it with an ampersand "&", and the program will keep running until it gets a fatal error, or the computer reboots.
Another way to make an app keep running after the terminal goes away, involves fork and exec, and a disoconnect. The Stevens book Advanced Programming in the Unix Environment (another book you should be at least familiar with if you want to be a great programmer) has that answer.
SMTP servers have many options. Some require authentication, some don't. You will have to read all your server documentation to figure out what kind of authentication (if any) is needed. Sendmail can handle most, maybe not in the orientation you are thinking. Like sometimes you need the ssh port, other times it will leave everything visible.
There is some documentation about connecting to gmail at:
http://forums.fengoffice.com/ index.php?topic=190.10;wap2
If it isn't working, run the sendmail command using the strace. Something like:
strace sendmail cozytom@gmail.com -f sender@example.com -S smtp-server.tx.rr.com -au senderusername -ap senderpassword < mail.txt
The output will be pretty chatty, but you should be able to see any errors or find clues as to where it is quitting.
There is probably more to consider, but that will get you started anyway.
How did I load my software?
You can start up an SSHD on the Chumby. Go to the about device screen in setup and click on the pi symbol in the upper right corner. Using something like putty on windows, or ssh on linux/mac command line, you can connect as the root user. On my chumby, I connect by typing:
ssh root@192.168.2.10
or
ssh 192.168.2.10 -l root
By default there is no password. You can add one, but on reboot, the sshd turns off, and no one can connect. There are instructions for adding passwords on chumby tricks web site. Actually that page has lots of useful links.
I am an emacs user. It is a wonderful tool/IDE/editor. There is no emacs on the stock chumby. I used my laptop to enter the code, this provided me a place to backup the code, so now it is on both the Chumby and my PC. I then cut-n-pasted to a simple vi session on the chumby.
Of course Perl is already there, and all I needed to do was write some code it could interpret. Yes, interpret, but trust me, well written Perl is stinking fast. I've done some image processing using it, it is fast enough.
Where did I store my app?
There is a micro SD card in the Chumby. It can be removed, and I imagine you could load your code on there. You don't need to, you can use the read write file system /mnt/storage to put your code on. I made a sub directory and called it bin, to be standard with the rest of *nix. (If you want to learn about the philosophy behind Unix/Linux etc, the book The UNIX Programming Environment by Kernighan and Pike, read it study it, and you will be the best programmer ever).
How to start the app?
Every time the Chumby boots up, or any *nix system starts, it runs some fixed sequence. There are some scripts in /etc/init.d that has the scripts. I didn't use them, because that partition is read only. You can do a mount -o remount,rw / on that partition, and put in your script.
I did it the old fashion way; using the command line. Unix is funny, if you start an app on the command line, and the terminal that that app was started from the app goes away also. There are things we can do to get around that. The nohup command is how we ignore the hangup signal when the terminal goes away. Just start the program prefixing the command line with "nohup" and end it with an ampersand "&", and the program will keep running until it gets a fatal error, or the computer reboots.
Another way to make an app keep running after the terminal goes away, involves fork and exec, and a disoconnect. The Stevens book Advanced Programming in the Unix Environment (another book you should be at least familiar with if you want to be a great programmer) has that answer.
Sending Mail
Oh boy, how does mail work. The chumby acts as a client to a mail server. The mail server is usually called the "SMTP" (Simple Mail Transport Protocol) server. Your ISP probably has a SMTP server that you can use, or google users can use the Google one. The sendmail program on the chumby is the client program that talks to the SMTP server program. The SMTP server will help route your message to the appropriate next hop on the way to the mails destination.SMTP servers have many options. Some require authentication, some don't. You will have to read all your server documentation to figure out what kind of authentication (if any) is needed. Sendmail can handle most, maybe not in the orientation you are thinking. Like sometimes you need the ssh port, other times it will leave everything visible.
There is some documentation about connecting to gmail at:
http://forums.fengoffice.com/
If it isn't working, run the sendmail command using the strace. Something like:
strace sendmail cozytom@gmail.com -f sender@example.com -S smtp-server.tx.rr.com -au senderusername -ap senderpassword < mail.txt
The output will be pretty chatty, but you should be able to see any errors or find clues as to where it is quitting.
There is probably more to consider, but that will get you started anyway.
Monday, October 22, 2012
Don't Try This at Home
It isn't dangerous, or anything, mostly just dumb. I wanted a way to know my garage got shut, after I left. Sometimes things happen, and the door doesn't shut all the way, maybe something fell while it was closing, or maybe a cat ran in or out. The optical sensors pick it up, and think it is a kid, so it reverses. I didn't always wait for the door to close, before driving away, then two blocks away, I wonder, did it close.
I used to be really interested in home automation. My previous house had most of the lights controlled by X-10. I had a Unix computer as the hub, allowing a bridge from the X10 to cron jobs, other sensors, and sprinkler controllers. I could be out on my deck, and press a button on the X-10 remote to start a sprinkler. I could turn off the sprinklers by pressing a code on the phone. The Unix machine was a Sun 3/110, mostly because it had a VME serial board, allowing 10 serial ports. The bedroom had a light that would start out low, and get brighter minute by minute, for my morning wake up. It was fun, and I tried to sell this stuff for a while.
I thought if there was a simple board, that had some GPIO, and a WiFi link, for about $50 that would be perfect. I thought maybe there would be some ARM or Pic chip based board that would be perfect. I couldn't find one, not standalone.
To get the message to a smart phone, I thought I'd be able to use one of the free email systems, maybe use an address like tomsgarage@gmail.com or something. The smart phone would be able to subscribe to that address, and I'd know the state of the door. When the door changed states, an email would be sent out.
I asked the DPRG group about such a plan, and got a few ideas. Folks offered suggestions, but eventually what I did find was a Chumby clone, the Best Buy branded Insignia Infocast, on eBay for about $35.
Ok, I am still under $50, let me look around. Sure enough, I found an Insignia Infocast for about $30 so I ordered it. The chumby came, and I messed with it. Dang, my simple power supply didn't have enough current. The diagram says 2.5A, wow! This isn't a green project anymore (that is a few watts). Finally the Infocast showed up with it's power supply. Cool it works for both the Chumby and the infocast.
My kids then stole it. If you don't know what the chumby is, it is pretty cool. A little 3.5 inch LCD touch screen (resistive), and ARM processor (400MHz or something). It is Linux based, and uses webkit for the Gui. You need to be registered to get apps are for it. There are some apps that come with it, including radios both software (IE Pandora) and a true FM receiver. Most of the inside of the case is dedicated to giving the little speaker sound good! It isn't bad, and would make an excellent bedroom alarm clock. The kids loved the radio, I didn't try to explain Pandora or any of that back.
Eventually I was able to steal it back. I kind like it, using it for a radio, and I could see it useful for other stuff, so I didn't want to break it.
A little work with the soldering iron, and I got a ribbon cable connected to the GPIO port. I didn't think a connector would fit. The main LCD cable goes right across the GPIO port (connector for the LCD ribbon is the upper right corner).
I used to solder ribbon cables all the time. I did a bunch of keyboards when I had the old Xerox 820, and the serial cables before I found the press on ones, so I got the technique. How about this:
I thought, I'd keep things simple. I knew to control a switch, I needed ground, thinking that the GPIO pin would float high, and then I thought I would help the pin float high with a pull up. The schematic ended up being something like:
The control pin is that middle pin D3, the one across from the GND, keeping the wiring simple. +3V is on the end. I got a magnetic reed switch, like used for alarms for the switch. The magnet was stuck to the side of the door.
I used regutils command to read the pin. And sendmail to send the mail out. It isn't fancy, or efficient, just something that will run in the background, tests the one pin once a second. here is the code:
#!/usr/bin/perl
#
# setup the chumby for reading, and read pin3.
#
# tgb 10-20-12
#
## setup IO
`regutil -w HW_PINCTRL_MUXSEL0_SET=0x00000003`;
my $curVal="";
my $newVal="";
my $results;
my $ccmp;
my $val;
while (true) {
$result = `regutil -r HW_PINCTRL_DIN0`;
chomp($result);
$result =~ m/Value at.*: (.*)/i;
$ccmp = $1;
$val = hex $ccmp;
print " CMP 00 ".$ccmp." 11 $val ";
if ($val & 0x08) {
$newVal = "CLOSED";
} else {
$newVal = "OPEN";
}
print "$newVal\r";
if ($newVal ne $curVal) {
sendmsg($newVal);
$curVal = $newVal;
}
sleep 1;
}
sub sendmsg
{
my $msg = shift;
#sendmail cozytom@gmail.com -f sender@example.com -S smtp-server.tx.rr.com -au senderusername -ap senderpassword < mail.txt
open MAILFILE,"> /tmp/mail.txt";
print MAILFILE "from: cozytom@tx.rr.com\n";
print MAILFILE "subject: garagedoor $msg\n";
print MAILFILE "Garage is $msg\n";
close MAILFILE;
`sendmail yourgarage\@gmail.com -f "me@email.com" -S smtp-server.yourdomain.com < /tmp/mail.txt`
}
Which part, do the actual project? Well that I discussed already. Wanted to know the state of my garage door. How about, why publish it. Well, I needed to show folks I actually am able to accomplish something. Yes this works, I finally completed something. Once I get around to collecting all the parts I am able to make it work.
What was dumb? Well 2.5A for a silly monitor system. It is much better than the silly Sun 3/110. It isn't doing X-10, or anything, but it doesn't need to. I still have a radio and other uses in the garage for it. Probably no one else will use it, but maybe it will inspire someone to do something similar.
Good Luck
I used to be really interested in home automation. My previous house had most of the lights controlled by X-10. I had a Unix computer as the hub, allowing a bridge from the X10 to cron jobs, other sensors, and sprinkler controllers. I could be out on my deck, and press a button on the X-10 remote to start a sprinkler. I could turn off the sprinklers by pressing a code on the phone. The Unix machine was a Sun 3/110, mostly because it had a VME serial board, allowing 10 serial ports. The bedroom had a light that would start out low, and get brighter minute by minute, for my morning wake up. It was fun, and I tried to sell this stuff for a while.
My Plan
I know Craftsman has a garage door opener that will talk to your smart phone and let you know the state of the door. I thought, maybe it was an add on to any craftsman or other garage door, but it wasn't so. It is only available with the specific assure link models. Thinking what I would pay for such a thing, maybe I'd be willing to go $60. The AssureLink also has an annual fee.I thought if there was a simple board, that had some GPIO, and a WiFi link, for about $50 that would be perfect. I thought maybe there would be some ARM or Pic chip based board that would be perfect. I couldn't find one, not standalone.
To get the message to a smart phone, I thought I'd be able to use one of the free email systems, maybe use an address like tomsgarage@gmail.com or something. The smart phone would be able to subscribe to that address, and I'd know the state of the door. When the door changed states, an email would be sent out.
I asked the DPRG group about such a plan, and got a few ideas. Folks offered suggestions, but eventually what I did find was a Chumby clone, the Best Buy branded Insignia Infocast, on eBay for about $35.
The process
I got on eBay, and someone had an actual Chumby, for under $20. A closer look showed it came without a power supply. Well, it is open source hardware and software, what can be so hard about getting a power supply for it. I bid on it. Then I started looking for a power supply. Ooops, the official Chumby power supplies are $15-20 on eBay. So much for saving money, I guess I don't need the official power supply, I can use the bench supply until I can source something else. hmmmmm.....Ok, I am still under $50, let me look around. Sure enough, I found an Insignia Infocast for about $30 so I ordered it. The chumby came, and I messed with it. Dang, my simple power supply didn't have enough current. The diagram says 2.5A, wow! This isn't a green project anymore (that is a few watts). Finally the Infocast showed up with it's power supply. Cool it works for both the Chumby and the infocast.
My kids then stole it. If you don't know what the chumby is, it is pretty cool. A little 3.5 inch LCD touch screen (resistive), and ARM processor (400MHz or something). It is Linux based, and uses webkit for the Gui. You need to be registered to get apps are for it. There are some apps that come with it, including radios both software (IE Pandora) and a true FM receiver. Most of the inside of the case is dedicated to giving the little speaker sound good! It isn't bad, and would make an excellent bedroom alarm clock. The kids loved the radio, I didn't try to explain Pandora or any of that back.
Eventually I was able to steal it back. I kind like it, using it for a radio, and I could see it useful for other stuff, so I didn't want to break it.
A little work with the soldering iron, and I got a ribbon cable connected to the GPIO port. I didn't think a connector would fit. The main LCD cable goes right across the GPIO port (connector for the LCD ribbon is the upper right corner).
I used to solder ribbon cables all the time. I did a bunch of keyboards when I had the old Xerox 820, and the serial cables before I found the press on ones, so I got the technique. How about this:
I thought, I'd keep things simple. I knew to control a switch, I needed ground, thinking that the GPIO pin would float high, and then I thought I would help the pin float high with a pull up. The schematic ended up being something like:
The control pin is that middle pin D3, the one across from the GND, keeping the wiring simple. +3V is on the end. I got a magnetic reed switch, like used for alarms for the switch. The magnet was stuck to the side of the door.
The Software
I was surprised, someone said just use GCC. Nothing to it, right, I use it everyday, there are instructions to download gcc and program the chumby natively. It didn't work, not sure if the chumby folks gave up on it, or I did it wrong. I noticed there was a perl interpreter included. Why not, this won't be very complicated, read a single pin, when the state changes.I used regutils command to read the pin. And sendmail to send the mail out. It isn't fancy, or efficient, just something that will run in the background, tests the one pin once a second. here is the code:
#!/usr/bin/perl
#
# setup the chumby for reading, and read pin3.
#
# tgb 10-20-12
#
## setup IO
`regutil -w HW_PINCTRL_MUXSEL0_SET=0x00000003`;
my $curVal="";
my $newVal="";
my $results;
my $ccmp;
my $val;
while (true) {
$result = `regutil -r HW_PINCTRL_DIN0`;
chomp($result);
$result =~ m/Value at.*: (.*)/i;
$ccmp = $1;
$val = hex $ccmp;
print " CMP 00 ".$ccmp." 11 $val ";
if ($val & 0x08) {
$newVal = "CLOSED";
} else {
$newVal = "OPEN";
}
print "$newVal\r";
if ($newVal ne $curVal) {
sendmsg($newVal);
$curVal = $newVal;
}
sleep 1;
}
sub sendmsg
{
my $msg = shift;
#sendmail cozytom@gmail.com -f sender@example.com -S smtp-server.tx.rr.com -au senderusername -ap senderpassword < mail.txt
open MAILFILE,"> /tmp/mail.txt";
print MAILFILE "from: cozytom@tx.rr.com\n";
print MAILFILE "subject: garagedoor $msg\n";
print MAILFILE "Garage is $msg\n";
close MAILFILE;
`sendmail yourgarage\@gmail.com -f "me@email.com" -S smtp-server.yourdomain.com < /tmp/mail.txt`
}
Why did I do this
Which part, do the actual project? Well that I discussed already. Wanted to know the state of my garage door. How about, why publish it. Well, I needed to show folks I actually am able to accomplish something. Yes this works, I finally completed something. Once I get around to collecting all the parts I am able to make it work.
What was dumb? Well 2.5A for a silly monitor system. It is much better than the silly Sun 3/110. It isn't doing X-10, or anything, but it doesn't need to. I still have a radio and other uses in the garage for it. Probably no one else will use it, but maybe it will inspire someone to do something similar.
Good Luck
Thursday, October 4, 2012
I am trying get fire myself up
I've sadly been neglecting this. Life is busy again, or still, or whatever. Shoot, I'd love to have a couple hours a day to work on this, but I don't. Between kids and homework, normal home repairs and other distractions, I haven't been too consistent.
SDR
I did get the SDR receiver, and I played with it. Not sure if it is the antenna, or what, but it only kinda works. It works well enough that I can say the vendors charging more than $100 for a UAT or 1090ES ADS-B in are charging too much. Here is another blogger working on the same idea: http://www.sharebrained.com/2012/05/10/progress-on-my-sdr/
Why do you want an ADS-B only receiver? Not only can you see where the other planes are, but FIS-B will give you weather, and NOTAMS and other good info. It is all broadcast the same way, and it is free to everyone in the air. (XM might be in trouble).
Arduino
Holy cow, people who did know about open source stuff are suddenly finding out about Arduino's and wanting to put them in airplanes. They can be very useful, with the UAV autopilot stuff, and IMUs and all. Lots can be done, we just have to get to it. There are ARM boards that will host the Arduino shields, and developer software coming soon, so you can have even more power, for only a little money (less than $100).
IMUs
There have been lots of IMUs around for a little while. Some better than others, and most aimed at the RC plane market. STM is coming out with a dev board that has all the hardware for an IMU. Developer market is all they are shooting for, but the board is supposed to be about $10! http://www.st.com/internet/com/press_release/p3323.jsp . Maybe they will be available by Halloween, and I'll have yet another distraction.
stuff
I had a spike in viewers this week. That is good I guess. Maybe eventually all of what I've built will generate enough traffic to pay for some of this stuff.
Write Soon!
SDR
I did get the SDR receiver, and I played with it. Not sure if it is the antenna, or what, but it only kinda works. It works well enough that I can say the vendors charging more than $100 for a UAT or 1090ES ADS-B in are charging too much. Here is another blogger working on the same idea: http://www.sharebrained.com/2012/05/10/progress-on-my-sdr/
Why do you want an ADS-B only receiver? Not only can you see where the other planes are, but FIS-B will give you weather, and NOTAMS and other good info. It is all broadcast the same way, and it is free to everyone in the air. (XM might be in trouble).
Arduino
Holy cow, people who did know about open source stuff are suddenly finding out about Arduino's and wanting to put them in airplanes. They can be very useful, with the UAV autopilot stuff, and IMUs and all. Lots can be done, we just have to get to it. There are ARM boards that will host the Arduino shields, and developer software coming soon, so you can have even more power, for only a little money (less than $100).
IMUs
There have been lots of IMUs around for a little while. Some better than others, and most aimed at the RC plane market. STM is coming out with a dev board that has all the hardware for an IMU. Developer market is all they are shooting for, but the board is supposed to be about $10! http://www.st.com/internet/com/press_release/p3323.jsp . Maybe they will be available by Halloween, and I'll have yet another distraction.
stuff
I had a spike in viewers this week. That is good I guess. Maybe eventually all of what I've built will generate enough traffic to pay for some of this stuff.
Write Soon!
Sunday, April 15, 2012
Another Distraction
Of course last weekend was the holiday, and this week was full of adventure. I got to ride a new airplane up to Chicago (new for the airline, not new to the world). It was full of employees, so the rules were a little relaxed. Everyone was taking pictures, and the cockpit door was open the whole flight. Really fun for that part of the flight. I had to make my own way home, so that was frustrating and all the normal fun of non-revenue travel.
I ordered a EZ430 Chronos about a week ago. I needed a watch anyway, but this was too good a deal on tideals.com. $25 for the whole kit. That showed up when I got home from my trip to Chicago. Been using it as a watch for the week, but last night I tried to get the development environment going. Well the laptop has shut me down again....
The CCSv4 needs to run in eclipse. Guess what, it didn't install again. I rolled back to helios from indigo, and that was no help. I am so frustrated with this laptop, probably vista, but who knows. I'll probably go ahead and load everything on the desktop, and it'll work.
I did load eagleCAD on the laptop while waiting for a flight in Chicago, and started getting the schematic drawn. Ran out of time, and still haven't finished that. Maybe I'll have some time next week.
Stay in touch.
I ordered a EZ430 Chronos about a week ago. I needed a watch anyway, but this was too good a deal on tideals.com. $25 for the whole kit. That showed up when I got home from my trip to Chicago. Been using it as a watch for the week, but last night I tried to get the development environment going. Well the laptop has shut me down again....
The CCSv4 needs to run in eclipse. Guess what, it didn't install again. I rolled back to helios from indigo, and that was no help. I am so frustrated with this laptop, probably vista, but who knows. I'll probably go ahead and load everything on the desktop, and it'll work.
I did load eagleCAD on the laptop while waiting for a flight in Chicago, and started getting the schematic drawn. Ran out of time, and still haven't finished that. Maybe I'll have some time next week.
Stay in touch.
Monday, April 2, 2012
Android vs iPad
Uh Oh, religion...
Well, to some people what I am talking about is heresy. Forgive me, and listen. Both Apple and Android make fine tablets for different purposes. Actually, for the common use, both are probably equal. Maybe for watching movies on a portable device, the new iPad is better. For word processing, I don't think either is suitable for long term use, but for occasional, they each are probably equal.
We aren't watching movies or word processing. We are trying to monitor something. Does a retina display help that? Not really.
The place where the iPad completely fails is in Bluetooth profiles. The iPad comes out of the box without the serial port profile (SPP). Apple rightfully says you don't need it. Not to watch movies, answer email, play angry birds or word processing. You can add it, but that is a challenge. The are things like the BlueSnap Bridge, but at best I'd call that a kludge. It only sends ASCII, no problem, but it is another box to maintain (battery charge, etc).
The Android has SPP as a standard. Many people realize this is a huge feature of the android, and are building their products to take advantage of this. There are automotive engine monitors that will do this today, and won't support iOS because of the lack of SPP.
So you say "all the aviation companies support iPads". That is true, to an extent. Certainly Jeppesen, WingX and others support iPads. WingX also supports Android, and there is a whole site dedicated to Android aviation apps. Flightplan.com, flightaware.com and others also have nice Android apps.
How about form factor. Say you have a big panel, and you want to fill it with tablets. No problem, get a couple 10 in displays, and you are good. How about a small panel, maybe 2 7inchers, and a 4inch for backup. But you say iPads only come in one size, how do they compete? (you might be noticing a pattern).
Then the argument about the enterprise. iPads work great in the enterprise, they sync email and scheduling. Okey doke, but not a 10,000 over eastern Montana they don't. You want to sync with your engine, and maybe your air data computer. That is what matters. If you need to sync with your office, you'll need a data connection to the ground (row44 maybe?). By the way, Androids' sync to email and scheduling just as well.
Licensing and releases, well the android probably will win that. Apple comes along and thinks what is best for iTunes, not your charts. Remember the iOS4 trouble when the iOS would clean up your "old" files for you, thinking they were old movies or songs. That low altitude enroute chart that was 25 days old didn't survive, and you had to scramble to find a sectional or high altitude chart to cover for you. You can vette out the system that works for you, and take or not upgrades for your display.
How about RIM or Windows. Maybe, they will work. I still haven't seen a windows tablet, and the PlayBook is only available in one size. If someone has time, we could work on it together (you want to send me one, I'll play with it, I promise :-). Critical mass is the magic here, are they available, can I get one, and what do I need to develop for it?
The SDK for the iPad and Android seem to cost about the same thing, nothing. Writing for the iPad is in Objective-C. The Android is Java sorta. Both languages are object oriented, with a C base. There are many people in the world who can develop for them, so that wouldn't be a reason to pick one over the other. Apple tends to control the iTunes store, and that is about the only way to deliver apps to the iPad. Android allows others to host and distribute apps, you aren't locked in to the Android market. There are risks getting apps from a non-android or non-apple market, but most are honest, so they work. There are malicious apps in both market places, and they get cleaned up fairly quickly.
For me, I have chosen the Android eco-system because of the openness, or at least appearance of openness. I havn't spent a dime on software, I have a demo cooking, and it'll work with my stuff as I designed it. Your mileage may vary, and I'll listen to any argument.
Keep on soldering.
Well, to some people what I am talking about is heresy. Forgive me, and listen. Both Apple and Android make fine tablets for different purposes. Actually, for the common use, both are probably equal. Maybe for watching movies on a portable device, the new iPad is better. For word processing, I don't think either is suitable for long term use, but for occasional, they each are probably equal.
We aren't watching movies or word processing. We are trying to monitor something. Does a retina display help that? Not really.
The place where the iPad completely fails is in Bluetooth profiles. The iPad comes out of the box without the serial port profile (SPP). Apple rightfully says you don't need it. Not to watch movies, answer email, play angry birds or word processing. You can add it, but that is a challenge. The are things like the BlueSnap Bridge, but at best I'd call that a kludge. It only sends ASCII, no problem, but it is another box to maintain (battery charge, etc).
The Android has SPP as a standard. Many people realize this is a huge feature of the android, and are building their products to take advantage of this. There are automotive engine monitors that will do this today, and won't support iOS because of the lack of SPP.
So you say "all the aviation companies support iPads". That is true, to an extent. Certainly Jeppesen, WingX and others support iPads. WingX also supports Android, and there is a whole site dedicated to Android aviation apps. Flightplan.com, flightaware.com and others also have nice Android apps.
How about form factor. Say you have a big panel, and you want to fill it with tablets. No problem, get a couple 10 in displays, and you are good. How about a small panel, maybe 2 7inchers, and a 4inch for backup. But you say iPads only come in one size, how do they compete? (you might be noticing a pattern).
Then the argument about the enterprise. iPads work great in the enterprise, they sync email and scheduling. Okey doke, but not a 10,000 over eastern Montana they don't. You want to sync with your engine, and maybe your air data computer. That is what matters. If you need to sync with your office, you'll need a data connection to the ground (row44 maybe?). By the way, Androids' sync to email and scheduling just as well.
Licensing and releases, well the android probably will win that. Apple comes along and thinks what is best for iTunes, not your charts. Remember the iOS4 trouble when the iOS would clean up your "old" files for you, thinking they were old movies or songs. That low altitude enroute chart that was 25 days old didn't survive, and you had to scramble to find a sectional or high altitude chart to cover for you. You can vette out the system that works for you, and take or not upgrades for your display.
How about RIM or Windows. Maybe, they will work. I still haven't seen a windows tablet, and the PlayBook is only available in one size. If someone has time, we could work on it together (you want to send me one, I'll play with it, I promise :-). Critical mass is the magic here, are they available, can I get one, and what do I need to develop for it?
The SDK for the iPad and Android seem to cost about the same thing, nothing. Writing for the iPad is in Objective-C. The Android is Java sorta. Both languages are object oriented, with a C base. There are many people in the world who can develop for them, so that wouldn't be a reason to pick one over the other. Apple tends to control the iTunes store, and that is about the only way to deliver apps to the iPad. Android allows others to host and distribute apps, you aren't locked in to the Android market. There are risks getting apps from a non-android or non-apple market, but most are honest, so they work. There are malicious apps in both market places, and they get cleaned up fairly quickly.
For me, I have chosen the Android eco-system because of the openness, or at least appearance of openness. I havn't spent a dime on software, I have a demo cooking, and it'll work with my stuff as I designed it. Your mileage may vary, and I'll listen to any argument.
Keep on soldering.
Friday, March 30, 2012
Another SDR Post
I started putting together the hardware for the thermocouple amplifiers, but quickly realized I didn't have everything I needed. I needed some reasonable sized capacitors (0.47uf 10V or so) and a trimmer resistor. The closest I could find in my collection was a .10uf at 25V or .33uf at 1000V. I thought, crap, for less than a dollar, I should get what I need. That 1000V cap, while close to what I needed, was bigger than the chip. Board real-estate would be a challenge. I know it is just a proof of concept, but I needed something better. I have some surface mount caps, but even those were all over the map, like 47uf, or 100pf, nothing kinda medium.
I was thinking a quick order at Mouser or Digi-Key and I would have what I need by Wednesday. Well, it would take a $25 minimum order, and I'd obsess over what else to buy for 5 days, and I wouldn't get what I need until next week. I had a coincidence happen on Tuesday. Traffic was awful, and I needed to try a different way home. I ended up in Farmers Branch. Tanners Electronics is right there. I thought I am close, maybe they stay open until 6pm. IT was about 4:50pm, and I was close, so I thought I'd go for it.
They are open until 6 Monday through Saturday. I could pop in there and get what I needed. When I got there, I was surprised. They had about the same collection of small capacitors as I did, .33uf at 1000V and some surface mount ones. I did find a couple medium ones, one disk, and one film and a small one, mylar I think. I bought an assortment, at least 2 of each, and a couple trimmer pots, spending all of $3, and I had them.
I haven't had time to do anything with them though. I hope to this weekend.
I've been thinking what a full system might look like. How about the Arduino as the engine controller and monitor. This is for the full FADEC system. Then a USB connection to a central hub, maybe an ARM controller running Linux. Another Arduino running DIY Drone air data computer, and IRS gyro package connected to the central controller over USB. Each Arduino would have their own blue tooth connection for sending to the display computers. Display computers would be Android tablets. I am not sure what the central system would do other than data collection. I guess it should share information, with the two Arduino's. Like putting in a TOGA button, the FADEC would run the engine up for takeoff power, then the autopilot would fly the missed approach procedure. The central computer would have some GPS and mapping software, unless that was outboard also (Android tablet may have that?).
Lots of planning and dreaming.
I said this was an SDR post. Well, here is the SDR info. Suddenly SDR hardware is down to about $20! You can buy USB tuner cards for PC's that have untuned front ends for $15-25 on EBay. There is software available to use them, and they are quite popular. They can tune anything from about 64-1700MHz and should work in almost any mode (even TV, since that is what they are designed for!). Reddit has a hardware compatibility chart.
I ordered one, maybe, I'll have time to play with it. It sounds like it has most of the software written. All I need to do is plug it in and run some code.
I also found the LinuxCNC website. That might be my answer to the 3D printer I've been wanting to work on. Again, when I get some time, I'll take another look at it.
I was thinking a quick order at Mouser or Digi-Key and I would have what I need by Wednesday. Well, it would take a $25 minimum order, and I'd obsess over what else to buy for 5 days, and I wouldn't get what I need until next week. I had a coincidence happen on Tuesday. Traffic was awful, and I needed to try a different way home. I ended up in Farmers Branch. Tanners Electronics is right there. I thought I am close, maybe they stay open until 6pm. IT was about 4:50pm, and I was close, so I thought I'd go for it.
They are open until 6 Monday through Saturday. I could pop in there and get what I needed. When I got there, I was surprised. They had about the same collection of small capacitors as I did, .33uf at 1000V and some surface mount ones. I did find a couple medium ones, one disk, and one film and a small one, mylar I think. I bought an assortment, at least 2 of each, and a couple trimmer pots, spending all of $3, and I had them.
I haven't had time to do anything with them though. I hope to this weekend.
I've been thinking what a full system might look like. How about the Arduino as the engine controller and monitor. This is for the full FADEC system. Then a USB connection to a central hub, maybe an ARM controller running Linux. Another Arduino running DIY Drone air data computer, and IRS gyro package connected to the central controller over USB. Each Arduino would have their own blue tooth connection for sending to the display computers. Display computers would be Android tablets. I am not sure what the central system would do other than data collection. I guess it should share information, with the two Arduino's. Like putting in a TOGA button, the FADEC would run the engine up for takeoff power, then the autopilot would fly the missed approach procedure. The central computer would have some GPS and mapping software, unless that was outboard also (Android tablet may have that?).
Lots of planning and dreaming.
I said this was an SDR post. Well, here is the SDR info. Suddenly SDR hardware is down to about $20! You can buy USB tuner cards for PC's that have untuned front ends for $15-25 on EBay. There is software available to use them, and they are quite popular. They can tune anything from about 64-1700MHz and should work in almost any mode (even TV, since that is what they are designed for!). Reddit has a hardware compatibility chart.
I ordered one, maybe, I'll have time to play with it. It sounds like it has most of the software written. All I need to do is plug it in and run some code.
I also found the LinuxCNC website. That might be my answer to the 3D printer I've been wanting to work on. Again, when I get some time, I'll take another look at it.
Sunday, March 25, 2012
Reeling in Some Scope.
I was getting all excited about ordering all the parts I need to get to the finished design. Well, I realize there is more to it than just firing up Eagle, and laying out the board, ordering it, having a B.O.M. ready and assembling a couple proto boards.
I am needing a good solid proof of concept. Can I really measure C.H.T's and E.G.T's with the simple design, and a multiplexer? Well, lets try it and find out. Otherwise I need to build something different. Will the various analog inputs work with a Tack and other inputs? Well, lets get them other inputs working, and then try a tachometer.
For now, I am going to use at least one of the LTC1050s that I have for the CHT's. I'll just set it up like the example on page 9, the 500degree battery powered temperature sensor. If that is working, with reasonable accuracy, then I'll add a multiplexor in front of that. I'll probably need a different amplifier for the EGTs since they will get to something on the order of 1500degrees.
For the oil and fuel pressure senders, I have something like the The Mitchell 80# sender. This will ground some of the supplied voltage, and we need to measure the current going through the sender. We can do that with a transistor, and some resistors.
I've also got a hall effect current sensor that I want to use. I think it is an Allegro. I got it as a sample a couple years ago. I'll finally get to try that out. That is supposed to handle up to 100Amps with no shunt, all power is available.
The one worry I have is about board layout. I may have to look into getting another board, and modifying it (electronically). That is be beauty of open source, people share, and allow fixing things. People share, and make things available for the rest of us.
Anyway, you can see I am getting more active. A little success will do that for a guy.
I am needing a good solid proof of concept. Can I really measure C.H.T's and E.G.T's with the simple design, and a multiplexer? Well, lets try it and find out. Otherwise I need to build something different. Will the various analog inputs work with a Tack and other inputs? Well, lets get them other inputs working, and then try a tachometer.
For now, I am going to use at least one of the LTC1050s that I have for the CHT's. I'll just set it up like the example on page 9, the 500degree battery powered temperature sensor. If that is working, with reasonable accuracy, then I'll add a multiplexor in front of that. I'll probably need a different amplifier for the EGTs since they will get to something on the order of 1500degrees.
For the oil and fuel pressure senders, I have something like the The Mitchell 80# sender. This will ground some of the supplied voltage, and we need to measure the current going through the sender. We can do that with a transistor, and some resistors.
I've also got a hall effect current sensor that I want to use. I think it is an Allegro. I got it as a sample a couple years ago. I'll finally get to try that out. That is supposed to handle up to 100Amps with no shunt, all power is available.
The one worry I have is about board layout. I may have to look into getting another board, and modifying it (electronically). That is be beauty of open source, people share, and allow fixing things. People share, and make things available for the rest of us.
Anyway, you can see I am getting more active. A little success will do that for a guy.
Thursday, March 22, 2012
Simple Round Gauge
So for grins, I started a simple round gauge for the thing. It has variable radius, and location. I can instantiate multiple of them, and I can override it to make it a different shape or something. The beauty of and object oriented language. Actually I should design this better, make an interface, and multiple implementations. Graphs can be fun, and round gauges come in all sorts of shapes and sizes.
Some round gauges are 135 degrees and start at the bottom (speedometer or tachometer are examples), others the left and still others the right. Some round gauges are only 90 degrees and start left or right (fuel gauges are like that). Implementing multiple of these could be quick and simple, and useful.
Hey how about that, I was able to upload a picture. The have to be not much bigger than this to work. Sorry.
On the right is my Arduino stack, the main board is on the bottom, then a prototyping shield with my home made pass through connectors, and then the top board is the bluetooth board.
Looking on the screen (maybe it is too small), in the upper left, you can see a round gauge. Yes, that is displaying the temperature right now in the room I am in! That transistor thing sticking up on the prototype shield is the LM34 sensor. The USB connector on the Arduino is only there to power the board. I am not doing anything tricky.
Now we are cooking, more sensors, more graphs, and we are on our way. I'll try to keep things documented. So far I haven't veered too far from the original sensor graph code, but it is what it is. You could probably get where I am using these notes and and getting the original sensor graph code.
Good Luck.
Some round gauges are 135 degrees and start at the bottom (speedometer or tachometer are examples), others the left and still others the right. Some round gauges are only 90 degrees and start left or right (fuel gauges are like that). Implementing multiple of these could be quick and simple, and useful.
Hey how about that, I was able to upload a picture. The have to be not much bigger than this to work. Sorry.
On the right is my Arduino stack, the main board is on the bottom, then a prototyping shield with my home made pass through connectors, and then the top board is the bluetooth board.
Looking on the screen (maybe it is too small), in the upper left, you can see a round gauge. Yes, that is displaying the temperature right now in the room I am in! That transistor thing sticking up on the prototype shield is the LM34 sensor. The USB connector on the Arduino is only there to power the board. I am not doing anything tricky.
Now we are cooking, more sensors, more graphs, and we are on our way. I'll try to keep things documented. So far I haven't veered too far from the original sensor graph code, but it is what it is. You could probably get where I am using these notes and and getting the original sensor graph code.
Good Luck.
Wednesday, March 21, 2012
Thinking and Planning
After last night, I almost didn't go to bed. I was pretty excited. Almost a year of frustrations and now it is showing progress. Cool, well sorta. I still have a bit to do. The sensor graph just barely shows what is possible.
The pictures never showed up, I'll take another crack at it here:
(I don't get it.. I've uploaded them before?)
I was thinking of being really creative with OpenGL gauges, I could make 'em look just like the analog gauges in the plane, with 3d moving needles and all. Of course what would be the point, I already have that, and they work. No, I want something better. I was thinking the non-linear guages (the ones that show a lot of detail around the normal range and less detail out of normal. And again I can get all fancy, with moving needles and such. I think for now though, I'll try something simple, get that working, and comeback and make it pretty.
I need to maintain the MVC (model view controller) pattern. The phone or tablet screen is the view/controller and the Arduino is the model. All the data comes from the Arduino, the screen will allow some control from the screen, if I move toward a FADEC system. For now, this will be monitor only. (it has all that potential! I should use it ;-).
I need to dig into the whole GUI part, and understand what Android can and can't do graphically. I need to get more hardware hooked up.
More when I get there.
The pictures never showed up, I'll take another crack at it here:
(I don't get it.. I've uploaded them before?)
I was thinking of being really creative with OpenGL gauges, I could make 'em look just like the analog gauges in the plane, with 3d moving needles and all. Of course what would be the point, I already have that, and they work. No, I want something better. I was thinking the non-linear guages (the ones that show a lot of detail around the normal range and less detail out of normal. And again I can get all fancy, with moving needles and such. I think for now though, I'll try something simple, get that working, and comeback and make it pretty.
I need to maintain the MVC (model view controller) pattern. The phone or tablet screen is the view/controller and the Arduino is the model. All the data comes from the Arduino, the screen will allow some control from the screen, if I move toward a FADEC system. For now, this will be monitor only. (it has all that potential! I should use it ;-).
I need to dig into the whole GUI part, and understand what Android can and can't do graphically. I need to get more hardware hooked up.
More when I get there.
Tuesday, March 20, 2012
Now we're cooking!
Like I said, I thought I'd try installing the Android Development kit on the desktop. It took several hours, downloading JDK, Eclipse and the the SDK. Then there were all the other devices (I forget what they are called, anyway the modules for the various versions of stuff). I finally was able to see sensor graph working in the emulator about 8PM Sunday evening, but I was encouraged. Before I disappointed myself, I shut everything down. My family had just gotten home, and I didn't want to nerd out on them.
So tonight I thought I'd try it, and see how successful I was. A couple quick lessons in uploading apps to the Android (I needed the Sensor Graph app to be running). I needed to set the Bluetooth address in the application, so I needed to plug in the Arduino and run the Amarino app to see what the address is. Ok, it is 00:11:04:15:10:87, and I put that in the SensorGraph.java file in eclipse, ran compile, uploaded the .apk file to the phone, then ran the app installer on the phone. It connected.
I forgot a crucial step. The Arduino is still probably running my quad stepper app. I need the Sensor Graph app running on the phone too. I open the Arduino app and it wants install a software upgrade. I figure yea sure why not. Well, once it was installed, I remember why, the lib and sketches aren't there. Fortunately it didn't overwrite my original stuff, so I went back to the 0-22 version, and everything was there. Load library Hello Android and get my sensor graph running. Still nothing.
I open the serial monitor, and all I see is gibberish. Dang, baud rate is wrong. I change the baudrate to 9600, and I see "179 172 178 176 174" scrolling across the Arduino serial monitor screen. Cool! I had connected an LM34 temperature sensor to pin 15. It is doing something, but I should try something faster. There is some complicated instructions on the iTread studio stackable bluetooth shield web page about sending the AT commands to change the baud rate. I can't get it to work, but will be happy if 9600 baud works. I change the sketch to use 9600 baud, and upload that, I switch the switch from FT232 to board and viola! something is happening.
Well I get things looking good on the screen, I see the same numbers and the graph is a little jiggly, but mostly straight across the screen. I put my finger on the sensor, and it goes up. Thinking about how this works, and what the data sheet says, 10mv per degree F. What is the full range of a sensor (12bit or 8bit?). I got some research to do.
For those who might not believe, here are some crummy pictures (very hard to read, and big too).
So tonight I thought I'd try it, and see how successful I was. A couple quick lessons in uploading apps to the Android (I needed the Sensor Graph app to be running). I needed to set the Bluetooth address in the application, so I needed to plug in the Arduino and run the Amarino app to see what the address is. Ok, it is 00:11:04:15:10:87, and I put that in the SensorGraph.java file in eclipse, ran compile, uploaded the .apk file to the phone, then ran the app installer on the phone. It connected.
I forgot a crucial step. The Arduino is still probably running my quad stepper app. I need the Sensor Graph app running on the phone too. I open the Arduino app and it wants install a software upgrade. I figure yea sure why not. Well, once it was installed, I remember why, the lib and sketches aren't there. Fortunately it didn't overwrite my original stuff, so I went back to the 0-22 version, and everything was there. Load library Hello Android and get my sensor graph running. Still nothing.
I open the serial monitor, and all I see is gibberish. Dang, baud rate is wrong. I change the baudrate to 9600, and I see "179 172 178 176 174" scrolling across the Arduino serial monitor screen. Cool! I had connected an LM34 temperature sensor to pin 15. It is doing something, but I should try something faster. There is some complicated instructions on the iTread studio stackable bluetooth shield web page about sending the AT commands to change the baud rate. I can't get it to work, but will be happy if 9600 baud works. I change the sketch to use 9600 baud, and upload that, I switch the switch from FT232 to board and viola! something is happening.
Well I get things looking good on the screen, I see the same numbers and the graph is a little jiggly, but mostly straight across the screen. I put my finger on the sensor, and it goes up. Thinking about how this works, and what the data sheet says, 10mv per degree F. What is the full range of a sensor (12bit or 8bit?). I got some research to do.
For those who might not believe, here are some crummy pictures (very hard to read, and big too).
Saturday, March 17, 2012
I remember my frustrations now...
I have this HP laptop, that I want to do my development on. It is a tx-1000 series, a tx1220us specifically. This seemed to be the best choice at the time I bought it. It was a convertible to notepad (screen rotates to cover the keyboard), and it has a touch screen. I thought it would be a great navigation tool in the airplane. I already had a bluetooth GPS. I just need some moving map software, and I'd be all set.
As it turned out, this laptop didn't live up to my expectations. The screen was very glossy, looked great in the store, but when I got it outside, it was unreadable. If you look around the web, you'll find this laptop is problem ridden. The WiFi and Bluetooth cards just quit! The screen sometimes just quits. The repair from HP is not permanent, so when they quit, you only get usability for an even shorter period of time. So far my laptop has lost the WiFi and Bluetooth. The screen has held up, but I am not using it as a notepad hardly ever. If you look back a few posts you'll see the hard drive gave up, and had to be replaced. I've been using various USB WiFi connections, but none has been 100% reliable either.
It runs Microsoft Vista. I don't know how much of the weird stuff is that OS and how much is the flakey hardware. Dumb things like Firefox locks up when playing videos, and keyboard just flakes out. If I am using firefox, and want to play a movie, I have to open IE (eeew!) or Chrome.Software updates scare me, since sometimes they make me revert to a prior update, and a 1 hour productive session takes two hours to make the computer at least functional, without any productivity.
Before the HD crash, I was running Linux on it (dual boot). It was setup well, always reliable, and only had background updates that worked. Once the WiFi problems started, I was kinda stuck, since most of the USB WiFi connections didn't work without a kernel recompile, so again, productivity was going backwards. I do have an ASUS WiFi connector that works out of the box on Linux, drivers were included, but the distro just worked without 'em. But by now, I don't have the Linux side working 100% now, it seems I gained something and lost something with each kernel change.
Before the HD crash, I had the Android development kit installed, and working. It is COTS software, why would I back that up, I can just get new, and start over. Besides, a newer version would be better anyway. Talk about confusion, the SDK doesn't work with some version of eclipse, and others need this or that version of Java. Last summer, I struggled with getting the Android SDK installed. I set it aside for a while and worked on my 3D printer idea. I got real familiar with the Arduino.
So the last couple days, I have been struggling to get the SDK installed. Things are unreliable, and I can't run the simulator. It runs, it never gets past the boot up screen. The console was showing a bunch of errors, this version not compatible with that library. More updates, and more install issues. Now it comes up, the console stays clean, but it still never gets past the startup screen. Is it the laptop, the OS, the installation, or something else?
Now I want to put it aside again. Maybe if I get some time this evening, I'll try installing on this ancient desktop. I don't know if this thing is up to the task, but it might be another viewpoint.
Wish me luck.
As it turned out, this laptop didn't live up to my expectations. The screen was very glossy, looked great in the store, but when I got it outside, it was unreadable. If you look around the web, you'll find this laptop is problem ridden. The WiFi and Bluetooth cards just quit! The screen sometimes just quits. The repair from HP is not permanent, so when they quit, you only get usability for an even shorter period of time. So far my laptop has lost the WiFi and Bluetooth. The screen has held up, but I am not using it as a notepad hardly ever. If you look back a few posts you'll see the hard drive gave up, and had to be replaced. I've been using various USB WiFi connections, but none has been 100% reliable either.
It runs Microsoft Vista. I don't know how much of the weird stuff is that OS and how much is the flakey hardware. Dumb things like Firefox locks up when playing videos, and keyboard just flakes out. If I am using firefox, and want to play a movie, I have to open IE (eeew!) or Chrome.Software updates scare me, since sometimes they make me revert to a prior update, and a 1 hour productive session takes two hours to make the computer at least functional, without any productivity.
Before the HD crash, I was running Linux on it (dual boot). It was setup well, always reliable, and only had background updates that worked. Once the WiFi problems started, I was kinda stuck, since most of the USB WiFi connections didn't work without a kernel recompile, so again, productivity was going backwards. I do have an ASUS WiFi connector that works out of the box on Linux, drivers were included, but the distro just worked without 'em. But by now, I don't have the Linux side working 100% now, it seems I gained something and lost something with each kernel change.
Before the HD crash, I had the Android development kit installed, and working. It is COTS software, why would I back that up, I can just get new, and start over. Besides, a newer version would be better anyway. Talk about confusion, the SDK doesn't work with some version of eclipse, and others need this or that version of Java. Last summer, I struggled with getting the Android SDK installed. I set it aside for a while and worked on my 3D printer idea. I got real familiar with the Arduino.
So the last couple days, I have been struggling to get the SDK installed. Things are unreliable, and I can't run the simulator. It runs, it never gets past the boot up screen. The console was showing a bunch of errors, this version not compatible with that library. More updates, and more install issues. Now it comes up, the console stays clean, but it still never gets past the startup screen. Is it the laptop, the OS, the installation, or something else?
Now I want to put it aside again. Maybe if I get some time this evening, I'll try installing on this ancient desktop. I don't know if this thing is up to the task, but it might be another viewpoint.
Wish me luck.
Wednesday, March 14, 2012
I may finish this yet...
I've quit and come back before, but not so long. Actually, I got some feedback a month or so ago. Someone was offering a suggestion on the thermocouple hardware. Bill offered:
Analog Devices chips that make thermocouple interface a whole lot easier. What
are your thoughts on this.
PS I like the Dangerpants ADI(air data system) http://www.dangerpants.com/ labs/adi/
I think the analog devices are about the only ones I didn't consider. They are about $5.00 each, and only available in SMT packages. They sure look like they are easy to use, but at that price, it might be a challenge without multiplexing the the inputs.
There is the Arduino Thermocouple Multiplexer Shield that will take 8 K type thermocouples in (4 cylinder EGT/CHT monitoring eh?). Well, $49 puts it in the 8 individual interface chip price range. It is already assembled, so it might be a solid option. The page shows the chips that are used to do the conversion are the MAX6674/6675 chips which are about $12each, and they talk SPI (not supported directly by the Arduino). But the multiplexer the board uses is the ADG608, which is about $5 in homebuilder PDIP packaging.
Over the summer and into the fall I was thinking I'd like to build my own 3D printer. I get the Sparkfun 4 channel stepper controller. It works, but not in bus mode. My thinking was, bus mode would save a lot of wiring, but alas, I had to use a lot of wire to get even 3 steppers going. It isn't a shield, it was all point to point wiring.
I am trying to get the Android SDK components installed on my laptop while I type this in the other window. That is taking a while, so I can go back to working on this blog. The download speed is screaming along at about 125K ick! Anyway, that will get installed, and then I can start working on the GUI for this.
I still want to do the 8 thermocouples, for the CHT/EGT monitoring. If I had a 6 cylinder, I'd still do 8 channels for thermocouples, 6 for the CHTs, and 2 for the EGT. The actual EGT doesn't really matter in a carburetor equipped engine. You want to see peak temperature, and adjust the mixture around that. Knowing if there are differences isn't really important, other than maybe to know if there might be something up with the sensors. (I know, in a fuel injected engine, the EGTs will tell the state of the individual injectors).
I want to also monitor RPM. This can be done multiple ways including:
Pressure sensors are already available on the engine to measure fuel and oil pressures. These will output between 0 and 12volts. The sensors will need to be calibrated, and probably can run in parallel with the analog gauges to do so. Same with the oil temperature sensor, it exists, and can probably run in parallel to allow calibration with the new system.
Again any thoughts or ideas, let me know.
Analog Devices chips that make thermocouple interface a whole lot easier. What
are your thoughts on this.
PS I like the Dangerpants ADI(air data system) http://www.dangerpants.com/
I think the analog devices are about the only ones I didn't consider. They are about $5.00 each, and only available in SMT packages. They sure look like they are easy to use, but at that price, it might be a challenge without multiplexing the the inputs.
There is the Arduino Thermocouple Multiplexer Shield that will take 8 K type thermocouples in (4 cylinder EGT/CHT monitoring eh?). Well, $49 puts it in the 8 individual interface chip price range. It is already assembled, so it might be a solid option. The page shows the chips that are used to do the conversion are the MAX6674/6675 chips which are about $12each, and they talk SPI (not supported directly by the Arduino). But the multiplexer the board uses is the ADG608, which is about $5 in homebuilder PDIP packaging.
Over the summer and into the fall I was thinking I'd like to build my own 3D printer. I get the Sparkfun 4 channel stepper controller. It works, but not in bus mode. My thinking was, bus mode would save a lot of wiring, but alas, I had to use a lot of wire to get even 3 steppers going. It isn't a shield, it was all point to point wiring.
I am trying to get the Android SDK components installed on my laptop while I type this in the other window. That is taking a while, so I can go back to working on this blog. The download speed is screaming along at about 125K ick! Anyway, that will get installed, and then I can start working on the GUI for this.
I still want to do the 8 thermocouples, for the CHT/EGT monitoring. If I had a 6 cylinder, I'd still do 8 channels for thermocouples, 6 for the CHTs, and 2 for the EGT. The actual EGT doesn't really matter in a carburetor equipped engine. You want to see peak temperature, and adjust the mixture around that. Knowing if there are differences isn't really important, other than maybe to know if there might be something up with the sensors. (I know, in a fuel injected engine, the EGTs will tell the state of the individual injectors).
I want to also monitor RPM. This can be done multiple ways including:
- Spark Plug Firing
- Mag/EI outputs
- Pulse measuring with sensors on the engine
- Optical measuring the propeller.
Pressure sensors are already available on the engine to measure fuel and oil pressures. These will output between 0 and 12volts. The sensors will need to be calibrated, and probably can run in parallel with the analog gauges to do so. Same with the oil temperature sensor, it exists, and can probably run in parallel to allow calibration with the new system.
Again any thoughts or ideas, let me know.
Subscribe to:
Posts (Atom)