wiredfool

Archive for the 'Electronics' Category

Pi day

It’s Pi day. My poor little raspberry pi is hanging out, finally connected to the controller board for the chicken coop door. It’s only waiting on a final enclosure and some programming. And then the poor pi will be shown to the coop and left there to sit. And raise the door. And lower the door. It’s probably going to sound like the bored computer from Hitchhiker’s Guide to the Galaxy.

No comments

More hardware hacking

One of the joys of this house is that the appliances are all more than 15 years old. That used to not be a problem, but appliances being what they are these days, it means that they’re starting to be just a little bit tempermental.

The oven part of the range failed before – the element went in a most sparkly and disturbing way. Thankfully that didn’t fry anything else, especially the controller. At the time I thought that the controller was an expensive part, probably about half as expensive as just replacing the whole range. But the only part required was the element, and it’s easily and cheaply available.

This morning, part of the controller broke. The up arrow button just didn’t trigger. Timer, useless. Temperature on the oven – good for less than 350.

So, I pulled it apart, looking for obvious signs of failure and a part number. There were many numbers on the part, but none of the turned up the right part on the google. Thankfully, the failure was obvious, and it was just the little plastic piece that connects the membrane to the button on the curcuit board. Just. The plastic button is part of a frame with all the other buttons, and that is part of the clock module. Which is only available (if that’s the word) as a unit from the factory. Which has stopped making them. In the day, they were about $300, maybe a little less than I had estimated a few years back. So, now, this bit of plastic is essentially the value of a new range.

This button presser is currently glued back into place along the hinge line to the frame. I’m skeptical about the long term durability here, since glue on a flex line is kind of iffy. But if that fails, there are other things that could do the job. A 3d printed piece might be able to snap into the hole that’s left, provide some springiness, and a post to press the button. It might even be an upgrade.

Someday, when parts like this go out of production, I hope that the 3d models will be vailable, so that people can print their own. It might take a good bit of time to do the whole face plate, but it wouldn’t be that bad. Materials might be tricky – this feels like ABS, not the standard thermoplastic. But that’s a detail. An individual button would be way faster, and probably just as effective.

No comments

Refurbishing a power adapter

A week for hardware hacking of one form or another. The old laptop’s power cord got shredded in a keyboard tray slider. One day, it’s fine, the next, a cut in the cable, then a discolored cable around the cut, and then, no power to the laptop. I’m not really into paying for a $70 adapter for a computer that’s approaching 8 years old.

Amazon’s got magsafe cables for cheap (<$10) and prime, so armed with the parts and an instructable, I gave it a shot. The worst thing that could happen is sparks, magic smoke, and a even more dead power adapter.

I didn’t have a whole lot of success using pliers to open the casing – they did a bit, but a pair of putty knives, one thick, one thin made a lot more progress. (interestingly enough, I bought one of the putty knives to open the case of my old mac mini to install ram. It’s still running, most of the time.)

It’s not that bad of a repair, it’s just a litte tight getting into it without taking both halves of the shell off and all of the shielding. Once you have access to the solder joints, it’s a quick hit from the iron to desolder the old wires, and another touch of heat to slide in the new ones.

Too late in the process I realized that I didn’t have any glue to resecure the shell, but that’s what electrical tape is for. It’s also a convenient mark to let me know not to trust this adapter without supervision till it’s proven itself for a while.

(images to come, once I get my image processing and posting pipeline back in action following the mavericks upgrade. System python considered harmful)

No comments

iOS 6

Just updated to iOS 6 on the iPad. Nice enough, except…. Maps.

Langley is not on Hat island, and it doesn’t take over an hour and two ferries to get there from Freeland.

20121014-224107.jpg

20121014-223453.jpg

No comments

Adventures in Powerline Networking

One of the little issues with the house is that the wifi and the DSL are on one end of the house, where everything is nicely networked with Gig-E, and most of the wireless clients are on the other end, where there’s no data wiring at all. And, there are either a couple of exterior walls or a really solid door in the way. So, in the main living area, I’m seeing 300k/second transfer speeds over a wireless A/B/G/N network. Enough for a iTunes stream to the airport expresses, but not enough to reliably do streaming movies.

While it might be possible to get into the little attic spaces and run some ethernet, it’s not for the faint of heart or those sensitive to confined spaces. So, I was hoping that I’d get powerline networking (HomeAV) to the rescue. Picked up a Netgear XAVB1004-100NAS, as it seemed to get decent reviews from Newegg. Nominally, it’s 200Mbps, or full duplex 100. Practically, it’s… less than that.

On a single extension cord, with both halves on opposite sides of the same plug, I got about 8.5 MB/sec, which is within spitting distance of fully saturated. Unfortunately, that’s with only about an inch of copper between them. On the same branch circuit, it’s not bad, and you still retain most of the performance. But once you cross the breaker box, it’s all downhill from there.

The most convenient plugin spot had only marginally better performance than using Wifi, using one of the airport expresses as a repeater. (That’s the 900k/second spot). I was planning on running the powerline networking there to give the airport express an ethernet connection to extend the wifi, but there was very audible interference through the stereo speakers.

So, falling back to plan B, I mapped out the bandwidth of the powerline networking to all the outlets in the main room. The next most convenient locations all had worse bandwidth, including one location that only got the occasional ping through, but no data to speak of.

Plan C, the final idea, was to put the Airport base station in the entry way, and connect it to the fastest outlet that isn’t in my office. At least that gets it through the door and in a near line of sight to most of the wireless clients. It’s a run of less than 20 feet, and still I lose about half the available bandwidth. But it projects the wifi into the living room far better than before. It’s also enough to get Facetime into the far corner of the house, at least, if you set the iPad on the right part of the table. There’s still a little interference with the stereo noticable only when the house is quiet, but a ferrite bead on the power cord cuts it by half or more. It’s only when there’s a bunch of network traffic, not constantly on the carrier like when the powerline networking plug was on the same outlet.

Ultimately, the solution is to climb into the attic, crawl through some small person sized holes, drill some cable sized holes, and run some cable. But that’s not going to be an easy or clean job that I can do in an hour in the evening.

No comments

Building a computer

So now, I have inflicted linux on the kids. They seem to be adjusting well enough.

Their old computer, a PPC mac mini from before Ben was born, started having issues. The most frustrating one was shutting down when flash was playing on several Very Important Websites (like lego.com), but in general, it was just acting like an old creaky machine. It was set up with the parental controls on safari and mail, and a limited set of applications that they could access, just so that things didn’t get too messed up. I would have liked to replace that machine with an imac, so that it was all in one, less cables to muck with, and generally just fewer pieces. Or a mini, and they could have had the same interface again. But those were all 600$ or more solutions.

So, the lowball approach. One barebones atom MB + case, a stick of memory, usb wifi dongle, and a dvd drive from newegg. Add a drive from my extensive collection of small to med sized hard drives, Monitor, keyboard, mouse, speakers from the old computer, and suddenly, there’s a linux box. I was planning on using the netbook remix from ununtu 10.04 for the interface, but I wanted the wifi to work and some of the more modern stuff from edubuntu on there, so I’m on 11.10. The atom isn’t the most powerful machine, but it’s roughly the equivalent of a decent computer from 4 or 5 years back, and it was only $150.

Which is a little unfortunate. 10.04 was stable, and solid, but the interface there is a dead end and not going to be supported. The netbook remix launcher is gone from any later version, and the whole gnome2 interface is gone as of 11.10. Growing pains it has. It’s mostly ok, just a little confusing. I think the kids might be better at adapting to different interfaces than I am. I’m hoping that the unity interface stabilizes a bit, I’ve seen my share of bugs — layering issues, unity not working for one user anymore, crashes, 600 copies of gnome-screenshot attempting to run at once.

Web filtering is running through a combination of privoxy’s trusted whitelisting and iptables rules to redirect any untrusted user connection on ports 80 or 443 to the privoxy proxy. Firefox is also configured to use the proxy, just to make the connections cleaner on SSL, but it’s not strictly necessary. (github) Mail filtering is going to be whitelisted on the server with procmail or something similar.

I’ve also patched out the unity dash listing of applications for download when searching for an application to run on the machine. They can’t install apps, so there’s no reason to show options to install. Also, there’s no reason that this can’t be a preference somewhere, except that it seems to conflict with the goals of Canonical.

VLC plays movies ripped for the iPad just fine. (At least on the trusted user accounts. Other accounts don’t have access to the movies) Firefox hosts flash just fine, no shutdowns or other issues. Scratch runs well enough that it’s fun to play with. TuxPaint is just like it was on the mac.

No comments

Arduino Starts

I’ve now got an arduino to start on the automation of the chicken’s door. It’s only been 6 months since I put in the sliding door, and 10 months since they’ve been in the outside coop, so it’s time to do a little hacking.

Day 1, the blink example works.

Day 2, I’ve got a basic light sensor running with a random sensor from American Science and Surplus, a pull up/current limiting resistor, and the analog in ports. Helpfully enough, there’s a pretty simple example to get it all running with very little programming.

Day 3, I’m looking at the sensor levels, and trying to distinguish between dusk and night. The sensor appears to allow between 10ma and 100ma through, at an apparent resistance from to the meter of between 5k and 100 ohms. The trouble is that most of the sensitivity is in the brighter ranges, and the range where I need the resolution is in the 4.5k to 5k range, or in the 10 ma end of current. (it’s not a simple resistor, so simple approaches aren’t goign to necessarily be correct)

Using a simple voltage divider isn’t going to give me a whole lot of resolution in this range, so I may need to look at some sort of amplifier circuit (either op amp or transistor) and clip or compress the bright end of the spectrum. With one 220 resistor as the limiter, I’m seeing about 3v over the sensor at indoor night light levels, and slightly more (.1v) when covered. If I lower the resistance to 110, I’m seeing more like 3.6v across the sensor.

The basic design I’m thinking of is that if we see ‘dark’ for 15 minutes or so, I’m going to close the chicken door, and if I see ‘light’ (or increasing light) for a similar time, I’ll let it open. Thresholds and delays are TBD, since it’s going to depend on bright moons, dark rainy days, and other weather related light level issues. Also chickens. I suspect that the microcontroller has a larger brain than most of the chickens.

Other observations — I’m probably going to want another one, and probably a mini instead of an uno, so I can just drop it into a breadboard instead of using the wire sockets. On the other hand, the motor shields and comm sheids work better with the original form factor. I’m probably going to want another one to play with for lego or r/c car robotics. Or two.

No comments

Time Machine Troubles

Time Machine is great when it works. I had the chance to do a restore from an existing backup today, and had the original drive not been working, I would have been somewhat out of luck.

First, when importing using the migration assistant, the backup was not found. It just wasn’t there even when the network share that contained the sparse image was mounted.

Second, and likely related was that when I attempted to mount the image in the finder, I got an error that there we’re no valid filesystems on the image. This was a highly distressing thing to google, since most of the advice was to make a new backup. (and the pages without that advice are mainly q/a spam. Really bad search results. Thankfully there’s a new chrome extension for that.). I was pretty hopeful, since the original machine could access and continue to update the time machine backup. It turns out that the image opened properly once I copied it to the local drive and mounted it from there. I’m thankful for gigabit networking.

Finally, and most disturbing, there are missing files. These are files that should have been backed up, as they are the original images imported into iphoto. The databases that reference them were backed up properly, as were the thumbnails. Getting them to backup was a matter of touching the directories from a terminal window, then running a new incremental backup.

This does not fill me with confidence that Time Machine will be there when I need it.

No comments

A Little Too Exciting

Mood: Calming Down.
Music: Burning Down the House (Talking Heads)

Well now. That was a nice little arc welding experiment in the oven just now. And me with a nicely heated stone and pretty well proofed bread. I was getting ready to stick a couple of loaves in, and I noticed quite a bright light from the bottom of the oven. Closer inspection told me that I didn’t really want to look directly at it. It was slowly spiraling the element fading in and out of view. Lots of sparks too. A couple of minutes after turning off the oven, I decided that I’d really rather have it stop. I wasn’t actually sure if it was an arc or just burning aluminum, but after putting a soaked cloth diaper on it and both not seeing it stop and half of the element still glowing red, I had Rose kill the breaker to the stove. That and the wet cloth stopped it. I was prepared to use the dry fire extinguisher, but I really didn’t want to coat the kitchen in the chemicals if I didn’t have to.

I know that we’ve fried the element, as it’s in a couple pieces. I suspect the controller’s dead, since it didn’t kill power to the element when I turned it off. And the bread is quite interrupted. Grrr. I wanted bread.

I doubt it’s going to be cheap to fix the controller, and I really don’t think that it’s going to be cheap to replace the whole stove.

Update — Replaced the main bake element, and things seem ok. The controller seems to work, the oven seems to heat up faster, and there’s no more scary arcing. For now anyway.

No comments

Dear Apple

Dear Apple,

Apparently you’re considering dropping the mini from your lineup.

In the immortal words of some space hero: Noooooooooooooooooooooooooooo!!!!

Seriously. These are probably my favorite desktop Macs ever. I have two PPC minis, and I’ll get Intel ones when I get too annoyed at how much faster/shinier/better my MacBook is. They are absolutely the right size and quietness for my office.

But if you do drop the mini, please consider shipping a Mac Nano in its place. Or a shuffle. I’d totally dig a Mac Shuffle with Wifi and Bluetooth, and only USB, Power and Monitor connectors.

Sincerely,

wiredfool

No comments

Next Page »