During disassembly of some old CD/DVD drives, I stumbled across a pair of *really* beautiful laser diodes. Not much use for them right now, except practicing macro shooting – pretty hard to get good pictures of the structures inside and the dichroitic filter blue at the same time.
A few days ago, a friend came over to talk about some microcontroller related projects. One of the topics was distance sensing, or rather proximity/movement sensing with low technical effort.
The basic idea was to detect movement of an object or person within a short distance to trigger events. Typical sensors for this kind of application would be passive infrared (PIR) modules, radiowave sensors (microwave or radar) or active infrared distance sensors. All of these can be quite pricey, perhaps with the exception of the PIR, which cannot detect objects very well.
So, I thought about how the goal could be accomplished with standard parts. Active infrared is the most simple choice. Continue reading
So…it’s been a while. Somehow I thought, I’d have finished the CNC writeup by now, as well as my plans for continuing work on my plasma-bar meter project. Things turned out different.
I got into my Bachelor’s thesis after completing the preceding seminars, which kept me busy since june ’13. The topic is centered around signal power based speech DOA estimation using directional microphones, very interesting stuff from the domain of signals processing. I had a very interesting time learning lots of new things, and somehow I also wanted to get hands-on with the matter since attending several advanced DSP courses during the last two terms.
While working on the thesis, I realized that microphone array systems are really nice things to have to play around with. I decided to make my own, which I did in my free time in parallel to the thesis. Let me at least show some pictures as long as I still don’t get around to working on other stuff.
A few technical details follow below.
The CNC mill got into a working state right before christmas eve. I know it’s not a present in that sense, but still! :3
Some parts of it are still fixed with a lot of glue and tape (or zip-ties ^^), but for now that’s perfectly sufficient. Right now. it can already mill hard wood and MDF, so I will be redoing some critical parts that lack in precision and/or quality before I write up the whole project as one. Unfortunately, I fear that the original plan about using an (older) EPIA 800 board as a controller can not be followed, EMC2 just refuses to start on that thing. Grrrr…
More pictures and text will follow in a few day’s time. Until then, enjoy the holidays and have a nice and safe start into the new year!
Oh, right, and two Stellaris Launchpad eval-kits from TI that I ordered back in September arrived JUST ON the 24th. How great of a timing is that? I don’t care about the wait, it was well worth it and I knew up front – but thanks again to the girls and guys of the TI support, for solving all the technical difficulties along the way :-)
I picked up some unusual plasma displays from ebay some weeks ago, which I have been searching for quite some time now. The picture above shows an illuminated Burroughs PBG-12201 plasma bargraph display. They are pretty hard to get by now, and if available, prices are a real shocker. Some shops in the US that carry them ask for 230 USD and some even more. Sometimes they appear on ebay for about 50 USD, but you have to be real quick to get some. Best chances are with surplus stores that sell off leftover production stocks or disassembled devices that originally contained such tubes. A few very retro and very popular mixing consoles for audio applications used them as main VU meters (eg. made by Lexicon), as well as some current professional grade standalone meters (eg. RTW, one of those is where I first saw such a display and was absolutely fascinated by the deep orange hue). As they eventually get old and start flickering or burning in if not properly cared for, spare parts have become rare, and since Vishay – the most recent producer of these displays – has discontinued the product line in early 2012, I would expect the market to dry up even more.
Mine were obviously scavenged from some kind of device by a Hungarian ebay seller, he offered some 10+ pieces of the PBG-12201 type display for 8 Euros each – a real steal! I just couldn’t resist and got myself three of them, together with matching sockets. Thinking back, I don’t get why I ordered three instead of four…oh well, it’s done. The tubes show some signs of wear, like glass chipped off around the edges and burn marks on the cathode traces, but they all work fine. Continue reading
Work on the CNC continues…the end draws nearer. I am currently disassembling the whole thing as far as necessary to clean up all the edges and burrs and fix the positions of the parts relative to each other using hammered-in stainless steel pins. After that, it is just coupling the threaded rods to the moving parts and bring the stepper drivers alive.
A follow-up on the recent DNS-related stuff:
I figured out today that my router had a hand in those weird random connection problems. What made me especially nervous was the almost systematic way that DNS and other random UDP packets vanished from the ‘net during browsing or testing with various tools. The requests were shown to be sent in both the Wireshark protocols and the router packet capture, but an answer never arrived. As it turns out, Enterprise-class devices have their firewall preconfigured to block UDP flood from inside the local network.
The definition of “flood” used here is:
“20 simultaneous, active UDP connections from a single computer on the LAN”
Now, somehow my setup managed to step over that line, and from what I gather on the ‘net I am not the only one experiencing this. Sometimes the system will run clean for a few days, then bug in increasing frequency until I get fed up with it and kill the whole DNS process plus cache. Apparently, this fixes the problem for some time as a good reset almost always does, but it is no permanent solution.
To debug, first turn on the attack-related logging functions in the router and clear the logs. Then call up “nslookup” on Windows based systems and fire some random URL DNS requests in fast sequence. In my case, after four requests the firewall kicks in and UDP flood warnings appear in the log. Maybe Windows 7 just leaves the ports open a little too long, I don’t know and I haven’t checked. However, since this feature has been turned off in the firewall settings I had no further DNS problems, and the speed of browsing has increased a little. Hopefully that was all there was to it.
Another point of interest: Some Netgear devices have developed a habit of kicking lots of NBSTAT-packets on the LAN, one about every 5 seconds or so. Seems to belong to some type of NETBIOS detection mechanism, though the sense escapes me. The packets are of unicast-type and therefore disrupt everything one could possibly have in the way of wake-on-unicast, which linux supports to wakeup devices from standby if they are talked to directly. NETBIOS features are nowhere to be found in the configuration menu, so I guess at some point the checkbox for that must have gotten mislabeled. The one responsible is “ARP broadcast” found with the LAN settings. Turning it off quiets things down a lot.
But: You lose the capability to show unknown devices in the LAN clients list for simple management of DHCP fixed leases. You can still turn on ARP for a few minutes if you need to detect anything, though.
I’ve been having some problems connecting to IRC through the miranda client on Win 7 lately.
Miranda features several “serverlists” for different IRC networks – QuakeNet in my case. Some of the lists work, some don’t, some work at some times. Now, upon clicking edit only one fixed web address shows up. The way this works is, the DNS server knows multiple IP subentries for those servers. You can check with some web-based lookup tools that show all of those entries. Windows’ own command (“nslookup <address>”) only shows the one delivered by the server, as it needs only one precise IP to communicate.
Multiple entries exist to balance load between servers, they are delivered round-robin. If you flush your dns cache locally (Win 7 wants you to do “ipconfig /flushdns” on the console in admin mode, for example) a new IP is acquired – and this one is ideally different from the one before. Now, because Windows does not clear the cache between requests for several logical reasons (it’s a cache, right?) the client program obviously also knows only one of the possible IPs. All the better if exactly that IP is down.
It took me quite some time to figure out where the problem was (all the while thinking there may be something wrong with the router or the net is just in a weird mood today). After checking the DNS entries sequentially using ping and a connection attempt through Miranda, I found to my surprise that while some lists work partially others are simply dead.
|irc.quakenet.org||1/8 working||Compilation of all subranges|
Remember that this data is momentary from the time I checked the servers. The status might be different now. Anyways, this is some russian roulette!
The lists may fluctuate though, I am pretty sure I got a connection using the german list at some time. It is also possible, that the lists are updated dynamically from time to time, but I haven’t seen it so far.
Fixing this mess is quite easy: just edit or add a list in Miranda for the corresponding network and enter the exact IP. You best find that one yourself by pinging, start with one of the shorter lists you are comfortable with. You will experience trouble if that server goes down, but at least then you will know what the heck is wrong right from the start. Saves time and nerves.
So much for the current status of the CNC milling machine. I have made some first experiments with L297/298 motor drivers and found out the hard way that these are quite overloaded with such strong motors. Burnt out in a matter of seconds. But, as BJT driver bridges are not state of the art anyways, and I want to take a lesson from this project, I decided to finally get myself some of those specialized ATMEL controllers (AT90PWM1) and try to design my own FET bridge driver.
I even have one in spare that I can use for experiments with a self-designed high intensity discharge lamp driver – I have attached an image of an early prototype to the gallery for your entertainment. Worked quite well for some time, but the driving was very crude – there are some logic gates on the bottom of that small pcb that generate half-bridge signals for the two FETs, but no care taken about anti-shoot-through and so on. VERY crude. I will report how well the new controllers work out, seeing that very few experiences are found :-)
As for the CNC, I am quite confident that I will finish the mechanics part within the next holidays (around easter). Then, all that remains is the ‘intelligent’ part.
Last but not least, I notice that I still do not manage to describe my projects in my self-desired level of detail. Thus I will focus more on taking pictures during the process and explaining from now on.
Today, I want to write a few words about another of my older projects.
A while ago, I started building this DIY UV exposure box. The electrical part consists of a self-designed count-down timer based on an AVR Tiny2313 CPU, 4x8W PHILIPS UV tubes, ignition/driver circuits from cheap fluorescent bulbs, a multiplexed numeric LED display, a rotary encoder and some wiring. A piece of ~4mm aluminum serves as a faceplate, picture frame glass as the exposure surface. We’ll have a look inside in a moment.
When turned on, the controller presents the configuration menu first. All options are preset – or should I say ‘preprogrammed’ because the preset cannot be changed, as of yet – to the values I use most frequently. Configuration includes the time (up to 9min 59sec), a variable tube preheat time up to 59 seconds and a zone selection. The zone selection does nothing at the moment, but the pcb features a mounting spot for a second solid state relais which I have not yet installed. Which means, all four tubes are activated.
Press the selector one more time and the process starts. To stop again, either press the button again, switch off the mains or wait patiently until the time runs out.
Now, on to the inner values. After undoing 7 torx screws, the lid can be removed to access the elecronics compartment behind the front panel:
Inside the compartment is the four-fold ballast circuit, which consists of four board found in the sockets of fluorescent energy saving lights. These are pretty cheap compared to commercial electronic or inductive ballasts and they can be used right as they come. The only crucial number is the power rating – my tubes are rated for 8W while the ballasts came from 9W bulbs, which works just fine. Care has to be taken when opening the sockets, though. The bulbs should be left lying around for some time prior to “dissection” because they contain a pretty juicy capacitor. The circuit inside is basically a simple switchmode current supply. When that’s done, an easy way is to cut them open along the circumfence about in the middle of the socket’s height with a fine saw blade. Don’t cut too deep or you will damage the pcb. Once the casing is open, mark the pairs of wires coming from each end of the tube before cutting them. These pairs need to go to the ends of the UV tube, don’t mix them up or you’ll short out the circuit. How the two wires connect to the two pins of the tube on each side is completely up to your choice, though.
As always, remember the hazards involved when dealing with mains equipment, especially such that was never designed to be opened or even run in the open. Also, don’t go breaking any fluorescent tubes as they might contain traces of mercury.
The four ballasts are wired in parallel to the mains, with just a fuse, the power switch and a solid state relais in series. Fuse-wiring got a little complicated because I forgot to place separate fuse sockets for controller and drivers onto the pcb, but nothing dangerous here. A connection between faceplate and protective earth is also present for safety reasons, seeing that there is lots of live wiring very near. You may have noticed the absence of any cooling fan or holes – these are not necessary as the device is run for a few minutes at a time and never unobserved. The ballast circuits are designed for operation in a very tight unventilated space anyways, so no trouble to that end. After ~5 minutes of exposure the glass surface becomes just noticeably warm.
To the right is the control circuit, consisting of said ATTiny2313, a small 6VA transformer-powered 5V supply, the solid state relais (SHARP S202S02) and three npn transistors as segment drivers for the LED display. I still have some pictures from back when I made the pcb (about a year ago now):
I have used this exposure box several times now and am pretty content with the results. There still remains some creepage of light between the layout print and the photosensitive layer, resulting in fuzzy edges of traces and larger groundplanes sprinkled with small holes. This is partly thanks to an absolutely ridiculous laser printer made by HP (Color LaserJet 2600nse). No matter what settings are used (even in the expert options), the printer will never do dense black withing planes and very often blur traces on either the leading or trailing edge. Text works fine, though.
You may download the schematics in Eagle 6 format at your leisure. I do not guarantee correctness of the layout, though. There was a small problem in an earlier version (Pin 1 of ribbon cable connector was not connected to ground) which I have fixed now.
I do not take any responsibility for whatever happens to you. It’s up to you to decide if you want to and are able to build something like this.
* NOTE: Make sure that pin 1 of the front panel connector is really connected to ground, the traces were etched away in my case. The result is erratic behaviour of the rotary encoder.