Electronics thinking
Jul. 10th, 2011 09:57 pmNow that I have a proper place to work, I'm trying to get my electronics neurons started up and firing.
I wired up a cable from the computer at the lab bench and measured the output from the annoy-o-tron that Tulio gave me a year or two ago. Reproducing it with a microcontroller doesn't look too hard. I'll be working on that later.
I was just LED shopping, and I had a realization slap me upside the head; for some stupid reason I had it stuck in my head that you couldn't charlieplex common anode/cathode LEDs (like RGB LEDs). A part of my brain said "of course you can, you dolt." I had to go sketch for 5 minutes to prove it to myself, but of course, you can. I think I was just thinking linearly, wanting the mapping between output lines and row/column to be uniform between different colors. This is just silly.
Totally my fault for allowing a stray thought getting into my head and blocking up stuff for a long time.
There are, of course, a few limitations. The rule for number of LEDs runnable per output line doesn't hold exactly since you have to get enough lines to run groups of 3 (for RGB LEDs) at a time, but that's fine.
There are some RGB LEDs on the market for relatively cheap (20 cents each or so), so I'm going to start playing with some. The only thing is that the 3v lithium cell ain't going to work for blue LEDs, but I have a plan for that as well.
I really need to get a solid charlieplexed PWM fade subroutine developed. Developing more knowledge of interrupt routines is in order.
I also need to start toying with driving some alternative output devices like motors and voice coils, and using some input devices like microphones, accelerometers, light sensors and such. I've got ideas for stuff that will need all of those things (not all at once though).
I wired up a cable from the computer at the lab bench and measured the output from the annoy-o-tron that Tulio gave me a year or two ago. Reproducing it with a microcontroller doesn't look too hard. I'll be working on that later.
I was just LED shopping, and I had a realization slap me upside the head; for some stupid reason I had it stuck in my head that you couldn't charlieplex common anode/cathode LEDs (like RGB LEDs). A part of my brain said "of course you can, you dolt." I had to go sketch for 5 minutes to prove it to myself, but of course, you can. I think I was just thinking linearly, wanting the mapping between output lines and row/column to be uniform between different colors. This is just silly.
Totally my fault for allowing a stray thought getting into my head and blocking up stuff for a long time.
There are, of course, a few limitations. The rule for number of LEDs runnable per output line doesn't hold exactly since you have to get enough lines to run groups of 3 (for RGB LEDs) at a time, but that's fine.
There are some RGB LEDs on the market for relatively cheap (20 cents each or so), so I'm going to start playing with some. The only thing is that the 3v lithium cell ain't going to work for blue LEDs, but I have a plan for that as well.
I really need to get a solid charlieplexed PWM fade subroutine developed. Developing more knowledge of interrupt routines is in order.
I also need to start toying with driving some alternative output devices like motors and voice coils, and using some input devices like microphones, accelerometers, light sensors and such. I've got ideas for stuff that will need all of those things (not all at once though).
Lab progress (G+ post)
Jul. 10th, 2011 01:18 pmDecided to turn the unused room in the basement into a lab, built this bench. Got a computer set up there and drivers working for AVR programming. Gathering all the random bits and pieces from all over into one place.

( G+ comments after cut )
( G+ comments after cut )
New lab (G+ post)
Jul. 8th, 2011 06:17 pmI decided to turn what was supposed to be a media room (years ago) into a lab. Yesterday and today I built a lab bench, now I'm collecting all the random bits I have scattered all over, trying to organize them. I may also spend a few hundred bucks on eBay to build a proper stock of parts for experiments.
Once again...
May. 13th, 2011 08:35 pmI picked up another used Sansa Fuze (a red 4G this time) from the same eBay vendor, for $21+shipping. He sells 4 to 6 of them a day, I watched for several days but they kept hitting $30 and up, so I just waited.
I'm now using the silver 8G (RockBox'd) I picked up from him two weeks ago, Tom has my old blue one after having lost his Sansa Clip in DC last week (just after I got the 8G spare). I want at least one spare because they don't make this model anymore. I may try for yet another just for good measure.
The battery on the blue one is definitely on its way out; the 8G lasts at least 2 or 3 times longer on a charge. The blue one still lasts a good 6 hours so it's not horrible. I have a replacement battery for it but I don't know if I can get it apart and back together again cleanly so I'm waiting until it really needs replacement. I wasn't sure if it was the battery's fault before because in the time that it got really bad I'd started using RockBox with features that probably ate up CPU, mainly playing audiobooks with both speed and pitch adjustments (I'm listening at between 140 and 185% speed, and sometimes crank the pitch of the reader's voice up or down a bit).
In case you hadn't figured it out, I really love this player. I've never found a better model. The new version of the fuze is touch screen and it stinks. They went and fixed something that wasn't broken.
I'm now using the silver 8G (RockBox'd) I picked up from him two weeks ago, Tom has my old blue one after having lost his Sansa Clip in DC last week (just after I got the 8G spare). I want at least one spare because they don't make this model anymore. I may try for yet another just for good measure.
The battery on the blue one is definitely on its way out; the 8G lasts at least 2 or 3 times longer on a charge. The blue one still lasts a good 6 hours so it's not horrible. I have a replacement battery for it but I don't know if I can get it apart and back together again cleanly so I'm waiting until it really needs replacement. I wasn't sure if it was the battery's fault before because in the time that it got really bad I'd started using RockBox with features that probably ate up CPU, mainly playing audiobooks with both speed and pitch adjustments (I'm listening at between 140 and 185% speed, and sometimes crank the pitch of the reader's voice up or down a bit).
In case you hadn't figured it out, I really love this player. I've never found a better model. The new version of the fuze is touch screen and it stinks. They went and fixed something that wasn't broken.
Blinkie boards
Jan. 22nd, 2011 09:52 amThe board house sent me an email that they'd reviewed the order, found no problems and scheduled it for production. They say "delivery on Feb 10" - I don't know if that means they ship on the 10th or they expect me to have it on the 10th.
Normally they'd have it to me much sooner than that, most people seem to get their orders from them in 10 days worldwide, and that they pretty much always beat their estimates, but the Chinese spring festival is Feb 2-8, so I don't know. If they show up ON Feb 10, I will be able to solder together a few boards before packing for Capricon.
Oh well, they'll get here when they arrive. I do need to order up some other parts though, I originally only ordered enough parts for 100 kits.
EDIT: on lighter news, after hours of looking for someone who even HAD the LEDs that I want, it turns out that not only does DigiKey have them, but in 1000 quantity, they significantly undercut the Hong Kong/eBay sellers.
Normally they'd have it to me much sooner than that, most people seem to get their orders from them in 10 days worldwide, and that they pretty much always beat their estimates, but the Chinese spring festival is Feb 2-8, so I don't know. If they show up ON Feb 10, I will be able to solder together a few boards before packing for Capricon.
Oh well, they'll get here when they arrive. I do need to order up some other parts though, I originally only ordered enough parts for 100 kits.
EDIT: on lighter news, after hours of looking for someone who even HAD the LEDs that I want, it turns out that not only does DigiKey have them, but in 1000 quantity, they significantly undercut the Hong Kong/eBay sellers.
blinkie boards ordered
Jan. 19th, 2011 05:44 pmI'm used to stuff from China, even in-stock stuff, taking 10 days to arrive. I'm seeing threads online that PCBCart delivers stuff in 10 days even though they have to make it first. Hopefully this is the case. I don't need most of them until June, but I'm supposed to have a few demos by Capricon to show off at the Duckon party.
Looks like I'm in just under the wire. They have a holiday Feb 2-8, and they say they knock off a couple of days before that, and won't be doing anything during that time. I should hopefully have my boards in hand before then.
Guess I'd better get moving on programming new patterns.
( PCB rendering here )
Looks like I'm in just under the wire. They have a holiday Feb 2-8, and they say they knock off a couple of days before that, and won't be doing anything during that time. I should hopefully have my boards in hand before then.
Guess I'd better get moving on programming new patterns.
( PCB rendering here )
Fingers crossed
Jan. 18th, 2011 08:31 pmI did some final, niggling touch-up on the CAD files for the 2011 Duckon blinkie tonight. It's the first board I've ever sent out to have made, and the first board I've designed using CAD - in fact the first time I've used CAD for anything. I was pleasantly surprised at how trivial EagleCAD is to learn, and how pretty much impossible to screw up it makes board layout.
I've been through a bunch of tutorials on EagleCAD and been through design rule checks a dozen times and have everything cleaned up. It's a dirt simple board, but I'm nervous I've screwed something up. But I have a friend from work who's done boards before and he's looked at the Gerber files and assures me that it looks fine, and the prototype that I etched myself works fine.
I sent him a final copy, incorporating the last few nits that he had to pick, and assuming he doesn't come up with any show-stoppers, tomorrow I should be sending the files off to China to have the boards made. With luck there will be show-off boards at Capricon.
I guess I'd better get on eBay and order a whole crapload of LEDs now. And plastic bags to bag up the kits. Then at some point I'm going to have to write assembly instructions, but this is a damned simple blinkie so that should be easy enough.
I've been through a bunch of tutorials on EagleCAD and been through design rule checks a dozen times and have everything cleaned up. It's a dirt simple board, but I'm nervous I've screwed something up. But I have a friend from work who's done boards before and he's looked at the Gerber files and assures me that it looks fine, and the prototype that I etched myself works fine.
I sent him a final copy, incorporating the last few nits that he had to pick, and assuming he doesn't come up with any show-stoppers, tomorrow I should be sending the files off to China to have the boards made. With luck there will be show-off boards at Capricon.
I guess I'd better get on eBay and order a whole crapload of LEDs now. And plastic bags to bag up the kits. Then at some point I'm going to have to write assembly instructions, but this is a damned simple blinkie so that should be easy enough.
And there it is
Jan. 2nd, 2011 01:38 pmI haven't put together all the patterns for it yet, I have some ideas. The area around the chip is wretched because of the home-etched double-sided board; there's no feed-through so I had to disassemble an IC socket and solder the pins from both sides, which is really pretty difficult. I should buy some wire-wrap sockets to facilitate soldering on both sides. Either that or do all the chip stuff on the bottom and go to the other side with vias.


( very short video behind the cut )
( very short video behind the cut )
Blinkie prototyping
Jan. 1st, 2011 11:22 pmI just had my first go at etching a circuit board in about 25 years. Last time I did it, I laid the board out on translucent grid paper using sticky pads and tape, and transferred to photosensitive boards.
This time I used Eagle CAD, and blue press-n-peel. I tried using a method that's been documented online, where you print onto cheap magazine paper and then dissolve that away in water. Screwed around for about 3 hours with that. I'm sure someone got it to work, but not me. It turns out I bought some press-n-peel blue transfer material about 12 years ago, and amazingly enough I actually stumbled upon it 2 days ago.
My printer (brother color laser) is really finicky about nonstandard paper, and wound up crunching my sheet of press-n-peel when it finally fed it; it took 5 tries to get it to pick it up. Finally I found a solution online, which is to print on plain paper, then cut out a piece of press-n-peel an inch or so larger than the pattern and tape it over the printed (centered) image on the paper (using the previous print as a location guide) then feed that piece of paper through again so the image is now printed on the press-n-peel. This also allows you to cut out and use only a small amount of press-n-peel. You must use masking tape, others will wreck the printer.
I etched using 1 part hydrochloric acid and 2 parts hydrogen peroxide. This worked great. In contrast to the traditional ferric chloride, this mixture does not stain everything it touches and it's fairly clear so you can watch progress more easily. The fumes are fairly irritating to the mucous membranes from what I've read, though not actually toxic as such. I just cracked a window and had no problems. Another advantage is that apparently this stuff can be refreshed by bubbling air through it; it becomes acid cupric chloride.
The etch isn't perfect, but I learned a lot and hopefully the next time it'll go better. Double sided is a real pain this way. I probably should drill a couple of holes in blank areas of the board in opposite corners and print fiduciaries on the board to line them up properly.

This time I used Eagle CAD, and blue press-n-peel. I tried using a method that's been documented online, where you print onto cheap magazine paper and then dissolve that away in water. Screwed around for about 3 hours with that. I'm sure someone got it to work, but not me. It turns out I bought some press-n-peel blue transfer material about 12 years ago, and amazingly enough I actually stumbled upon it 2 days ago.
My printer (brother color laser) is really finicky about nonstandard paper, and wound up crunching my sheet of press-n-peel when it finally fed it; it took 5 tries to get it to pick it up. Finally I found a solution online, which is to print on plain paper, then cut out a piece of press-n-peel an inch or so larger than the pattern and tape it over the printed (centered) image on the paper (using the previous print as a location guide) then feed that piece of paper through again so the image is now printed on the press-n-peel. This also allows you to cut out and use only a small amount of press-n-peel. You must use masking tape, others will wreck the printer.
I etched using 1 part hydrochloric acid and 2 parts hydrogen peroxide. This worked great. In contrast to the traditional ferric chloride, this mixture does not stain everything it touches and it's fairly clear so you can watch progress more easily. The fumes are fairly irritating to the mucous membranes from what I've read, though not actually toxic as such. I just cracked a window and had no problems. Another advantage is that apparently this stuff can be refreshed by bubbling air through it; it becomes acid cupric chloride.
The etch isn't perfect, but I learned a lot and hopefully the next time it'll go better. Double sided is a real pain this way. I probably should drill a couple of holes in blank areas of the board in opposite corners and print fiduciaries on the board to line them up properly.
blinkie testing
Dec. 25th, 2010 01:44 pmSo, I've been testing my blinkie prototype for Duckon 2011. I'm switching to coin cell batteries (CR2032) because honestly these days they're cheaper than four LR44s, and they have the same power capacity, is more compact and you can easily buy holders for them that are easily soldered on.
I chose a really low power microcontroller and put some nod in the firmware to power savings, and wanted to let the prototype run until it killed a battery.
This could take a while. So far it's been running for 32 hours, and though it's not as bright as when the battery was fresh, it's still going fine. It ran very bright for probably a good 18 hours.
Edit: 60 hours and it's still running, though dimming noticeably. For some reason the green is dimmer than the red.
I chose a really low power microcontroller and put some nod in the firmware to power savings, and wanted to let the prototype run until it killed a battery.
This could take a while. So far it's been running for 32 hours, and though it's not as bright as when the battery was fresh, it's still going fine. It ran very bright for probably a good 18 hours.
Edit: 60 hours and it's still running, though dimming noticeably. For some reason the green is dimmer than the red.
2011 blinkie
Nov. 27th, 2010 09:51 pmThis was goal #3 in getting this blinkie up and running. This was the last significant hurdle as far as the software is concerned. Now I just need to develop some nifty patterns. I may add one more thing, which is a simple pushbutton for on/off and modes, rather than just an on/off switch. Depends on how the patterns go.
I was kind of dreading this step because interrupts on this chip was one thing I knew nothing about, and I must admit I was dragging my feet on getting to it, but I finally decided I'd better get moving. I was tearing my hair out for about an hour because the compiler kept optimizing out all my pattern generation code. Finally I realized that I had to define the values as volatile, and it started right up.
Of course the board needs to be laid out but I have a friend who will help with that (I don't know the CAD software used and he's done a ton of this stuff). I also need to determine how long it will run off a CR2032 battery (I did test that it DOES run off one today) - and also I need to see if I can decrease the duty cycle of the LEDs without a lot of difference in brightness - that will increase battery life.
Depending on battery life, I may have multiple options. Two AAA cells on the back would run it for quite a long time but would be too heavy for earrings, OK for a necklace.
CR2032s in quantity are QUITE cheap, on the order of 12 cents, but I don't know what my runtime would be with them. A single CR2032 has very nearly the same energy as the four LR44s that the previous blinkies have been using (3v x 225mAH = .675 watt hours, vs 6v x 120mAH = .72 mAH) but it's a lot smaller and lighter and both the battery and the holder are cheaper.
I was kind of dreading this step because interrupts on this chip was one thing I knew nothing about, and I must admit I was dragging my feet on getting to it, but I finally decided I'd better get moving. I was tearing my hair out for about an hour because the compiler kept optimizing out all my pattern generation code. Finally I realized that I had to define the values as volatile, and it started right up.
Of course the board needs to be laid out but I have a friend who will help with that (I don't know the CAD software used and he's done a ton of this stuff). I also need to determine how long it will run off a CR2032 battery (I did test that it DOES run off one today) - and also I need to see if I can decrease the duty cycle of the LEDs without a lot of difference in brightness - that will increase battery life.
Depending on battery life, I may have multiple options. Two AAA cells on the back would run it for quite a long time but would be too heavy for earrings, OK for a necklace.
CR2032s in quantity are QUITE cheap, on the order of 12 cents, but I don't know what my runtime would be with them. A single CR2032 has very nearly the same energy as the four LR44s that the previous blinkies have been using (3v x 225mAH = .675 watt hours, vs 6v x 120mAH = .72 mAH) but it's a lot smaller and lighter and both the battery and the holder are cheaper.
Blinkie work
Nov. 22nd, 2010 08:21 pmThe charlieplexing code is now 100% working. I'm getting some ghosting but that's a circuitry problem and I suspect that it actually has to do with the prototyping board that I'm using. Next time I work on this, I'm going to take the chip off and put it directly on the board and see if the ghosting remains. If it does I have some head scratching to do because my code is pretty much identical to other code I've seen online.
I'm going to order up some Tiny85 chips - I ordered Tiny13s because that's what I'm familiar with, but the Tiny85 is the same chip with 8x as much RAM, which means probably 20x more patterns (lots of the first chunk of RAM will be taken by just the basic code, not pattern code). The difference is only 25 cents ($1.33 versus $1.08). Total parts for this unit may be as low as $3, though the board will probably cost a couple of bucks.
I'm going to order up some Tiny85 chips - I ordered Tiny13s because that's what I'm familiar with, but the Tiny85 is the same chip with 8x as much RAM, which means probably 20x more patterns (lots of the first chunk of RAM will be taken by just the basic code, not pattern code). The difference is only 25 cents ($1.33 versus $1.08). Total parts for this unit may be as low as $3, though the board will probably cost a couple of bucks.
October 28, 2010 - blinkie progress
Oct. 28th, 2010 09:41 pmI have a preliminary charlieplex display driver written, and it mostly works. One line is not being driven properly, so there's some little bug in it somewhere. Fairly promising though. I'm writing this in C so it's a hell of a lot quicker and easier to program - so far it's only about 50 lines of code. It isn't doing patterns yet. Those aren't hard but they're time consuming.
The code isn't interrupt driven yet, I want to do that so that I can totally ignore display timing and write code that does nothing but worry about pattern timing. Totally separating the two will make things easier to program.
I also have to learn about sleep mode and prove the concept of using a single pushbutton switch and deep sleep mode as a substitute for "off" mode.
I may have something in rough prototype (still on breadboards and development boards) at Windy.
Once I get it on stand-alone breadboards, I need to try to do some current measurements and see how long it runs off various batteries, then I can think about starting to lay it out.
I also need to decide whether to try to make it reprogrammable in circuit.
The code isn't interrupt driven yet, I want to do that so that I can totally ignore display timing and write code that does nothing but worry about pattern timing. Totally separating the two will make things easier to program.
I also have to learn about sleep mode and prove the concept of using a single pushbutton switch and deep sleep mode as a substitute for "off" mode.
I may have something in rough prototype (still on breadboards and development boards) at Windy.
Once I get it on stand-alone breadboards, I need to try to do some current measurements and see how long it runs off various batteries, then I can think about starting to lay it out.
I also need to decide whether to try to make it reprogrammable in circuit.
Blinkie step one
Oct. 18th, 2010 09:37 pmI fixed the wiring bug that I had in the basic charlieplexed prototype that I put together over the weekend. The wiring is confirmed OK. I also drew some charts by hand to make sure I understood what was going on.
Then I got the STK500 development board powered up and a ATTiny13 chip installed and jumpered properly, and wrote a 4 line test program to just blink the first 5 LEDs on and off.
The major issues are:
- figure out how to do deep sleep mode and how to wake from it with a switch on an input
- build an interrupt driven charlieplex display driver.
These are really the only two issues. Doing the patterns and stuff on top of this will be pretty trivial.
Then I need to learn how to use Eagle CAD to lay out the board. I do know a couple of guys at work that have done that before though so I have a resource.

Then I got the STK500 development board powered up and a ATTiny13 chip installed and jumpered properly, and wrote a 4 line test program to just blink the first 5 LEDs on and off.
The major issues are:
- figure out how to do deep sleep mode and how to wake from it with a switch on an input
- build an interrupt driven charlieplex display driver.
These are really the only two issues. Doing the patterns and stuff on top of this will be pretty trivial.
Then I need to learn how to use Eagle CAD to lay out the board. I do know a couple of guys at work that have done that before though so I have a resource.

Blinkie prototyping, etc
Sep. 25th, 2010 12:16 pmI'm supposed to be coming up with a new blinkie design for Duckon 20, so I picked up an Arduino LoLShield. This is a 9x14 grid of LEDs, charlieplexed, the max that an Arduino board can drive without extra driver chips. I figured it'd be good for prototyping blinkie patterns, etc before actually building anything.
I just got it together and ran the basic test and then the "game of life" demo.
Heck, this is a pretty cool blinkie just as it stands. Of course, $55 ($30 for the Arduino, $25 for the LoLShield) is a bit much for a blinkie, but over half of that is the Arduino, which is highly programmable and can do about anything. Some people may go for it, or may already have an Arduino. It does take some patience to solder up 126 LEDs though.
No, I'm not planning to make this the next blinkie, but I think it's very likely that it'll be what *I* am wearing around cons, assuming that I'm not wearing the next blinkie for advertising.
I just got it together and ran the basic test and then the "game of life" demo.
Heck, this is a pretty cool blinkie just as it stands. Of course, $55 ($30 for the Arduino, $25 for the LoLShield) is a bit much for a blinkie, but over half of that is the Arduino, which is highly programmable and can do about anything. Some people may go for it, or may already have an Arduino. It does take some patience to solder up 126 LEDs though.
No, I'm not planning to make this the next blinkie, but I think it's very likely that it'll be what *I* am wearing around cons, assuming that I'm not wearing the next blinkie for advertising.
Card reader
Mar. 7th, 2008 07:59 pmAnother installment in the "John Digs Cheap Electronics" story. ( in case you don't care )
New scanner
Feb. 13th, 2008 12:34 pmThanks to a memory nudge from the GT list, I went up to Best Buy and found that the excellent Epson V500 scanner is on sale for $199 again.
kevinnickerson bought one a few months back and likes it, that's good enough for me. I didn't buy one before the sale was off then, but I have one in hand now.
I looked at other scanners, but once you've used a Digital ICE capable scanner, the rest are just pure garbage and a waste of time. This has the latest version, probably v4 or v5, whereas the Nikon had v1. Supposedly the new software does an outstanding job of automatically correcting age-related film color shifts. http://en.wikipedia.org/wiki/Digital_ICE
I've put off my slide scanning project for several years now, because the Nikon LS30 scanner that I have, while quite nice, only scans one slide at a time. I had actually gotten the LS30 out of the basement a couple of months ago, and 2 or 3 weekends ago I installed the SCSI card. Then it's only a matter of about an hour of wrestling with installing just the right driver in just the right order and rebooting a few times to get the scanner running. I was thinking about getting started on the project again this weekend while half the house was out at Capricon.
I also got to use up the Best Buy gift card which I thought I'd never use, because I don't do Best Buy anymore. (a couple of years back they came right out and said they didn't want the business of bargain shoppers; that's me, so to heck with them. Unless there's a really good sale going on...)
Now to put my Nikon and my old Canon flatbed on eBay and see if I can recoup the $199. It's a bummer the ADF for the V500 is also $199. Supply and demand I suppose.
![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
I looked at other scanners, but once you've used a Digital ICE capable scanner, the rest are just pure garbage and a waste of time. This has the latest version, probably v4 or v5, whereas the Nikon had v1. Supposedly the new software does an outstanding job of automatically correcting age-related film color shifts. http://en.wikipedia.org/wiki/Digital_ICE
I've put off my slide scanning project for several years now, because the Nikon LS30 scanner that I have, while quite nice, only scans one slide at a time. I had actually gotten the LS30 out of the basement a couple of months ago, and 2 or 3 weekends ago I installed the SCSI card. Then it's only a matter of about an hour of wrestling with installing just the right driver in just the right order and rebooting a few times to get the scanner running. I was thinking about getting started on the project again this weekend while half the house was out at Capricon.
I also got to use up the Best Buy gift card which I thought I'd never use, because I don't do Best Buy anymore. (a couple of years back they came right out and said they didn't want the business of bargain shoppers; that's me, so to heck with them. Unless there's a really good sale going on...)
Now to put my Nikon and my old Canon flatbed on eBay and see if I can recoup the $199. It's a bummer the ADF for the V500 is also $199. Supply and demand I suppose.