21 June 2015

Adjustable Voltage Regulator

Originally, I wanted to make an adjustable voltage regulator with an LM317, 1k ohm potentiometer (variable resistor... same thing), and a 10k ohm potentiometer. Unfortunately, we didn't have any 1k ohm pots at work, but I had found some old 100 ohm pots - exactly nine of them. I thought it was great, since I can put them all in series with a 100 ohm resistor and be able to adjust the resistance between the adjustment leg and voltage out of the LM317. The 10k ohm pot I found was enough for the resistance between the adjustment leg LM317 and ground, since I don't really work with anything over 12 volts. I also used some old prototype boards to make it easier to assemble, but even with that it took some time to figure out and make certain that the paths were correct.

For the main board, I used some salvaged 0 ohm jumpers to make a couple jump to be able to use a couple of the through holes, but was quite pleased that I was able to fit everything that I needed to fit on it. And for the secondary board, it was nice taht I only had to use half of the salvaged board, as the hole placement allowed two pots to be fitted per section.


The finished "super" adjustable regulator.
Unfortunately, the actual size of the image is blurry and unfixable at this point.

It worked quite well and gave me good results, but then I found that all the 100 ohm pots weren't really doing much in terms of adjustment, so then I decided to remove the nine 100 ohm pots and make the necessary changes. Since eight of the pots were on the secondary board, I just de-soldered the jumper wires to/from the main board to save time.


The second version adjustable regulator.
You'll be able to read all the notes I've written on the board to make it easier for myself.

After testing it, it worked okay, but was a bit wonky when I turned the 10k pot down too far (since the 100 ohm resistor actually measured below 100 ohms). At this point, I decided to try one of the extra 470 ohm resistors I had in place of it, and it worked much better. Since the only thing that changed was the resistor, I didn't take a picture of it.

I slightly figured out that a larger resistor between the adjustment leg and output voltage legs made it easier to fine tune the voltage than with a smaller resistor, and once I was able to get hold of a 1k ohm resistor, I swapped the 470 ohm for it.


The finished adjustable regulator.

Once I tested it, I found that I was indeed correct, as it was even easier to fine tune the voltage. After using an LM317 voltage calculator I had found sometime before this project (so that I could understand how to use an LM317), I found that 1k and 10k were all I really needed, since it would (theoretically) give me 13.75 voltage output maximum (assuming I have an input of roughly 15 volts or greater). With a 12 volt source, I get an output range between 1.255 and 11.33 volts (according to the multimeter I have anyway).

About a day or two after putting the 1k ohm resistor in, I took a look at the equation for calculating the output voltage from the resistors used, and the resistor(s) between the adjustment and output voltage legs of the LM317 (aka R1) is the divisor, so it would make sense that using a larger resistance for "R1" would give a lower variance for the output voltage when the pot (R2) is changed.

Along with gaining a voltage regulator to make it much easier to test designs and whatnot (I was limited to using a AC/DC transformer with an output voltage close to whatever I needed it at), I learned that I should just use a 1k ohm resistor for "R1" if I'm going to be using a pot for "R2", because an adjustable R1 doesn't do much good.

I do want to also say thank you to the folks at the reuk site for making such a nice page for the LM317/LM338, as it was quite handy on several occasions along with being simple.

I don't remember when off the top of my head, but I plan on buying some LM350 to allow me to properly utilise my breadboard once I have an adjustable power supply. I'll probably be making a fixed voltage output for 9, 5, and 3.3 volts (the adjustable power supply will be outputting 12 volts), but I'll probably the last "channel" as an adjustable voltage (probably using the above project) for anything arbitrary.

18 May 2015

Updates & PWM Circuit

I haven't been writing recently, but I have been working on the projects I mentioned in previous posts; the reason why I haven't actually written about the current projects is because I think it'd be more efficient to write about them once they're complete.

NTPi (aka TestPi) is nearly complete, but I just need a clear day to double check the offset

The Banana Pi & Raspberry Pi 2 box (dubbed as "2(DrivePi)" is mostly complete. If I haven't mentioned this, I kinda did now....

That's all I can remember for the moment, so if I did forget any aforementioned projects, it's not complete and still a work in progress.

One of the projects I have planned is a hold-open latch for the door of my entertainment room, which will be attached to a motorized pulley, so that I can press a button to lift the latch and let the spring hinge close the door.

My main problem with the motor is that the RPM is too high, and with the proposed latch being plastic (about 4mm thick), I'd have to hold the button for less than a second before the string is at it's shortest length (and could possibly break).

A couple days ago, I had though of using a PWM circuit to control the speed of the motor (the alternative is to reduce the voltage, which doesn't exactly help much), and I searched for one, finding a fairly simple one.

I first looked at an old IC that I used for a correspondence electronics course (I was trying to make a remote-controled "flashlight"), and found that it was the 555 timer IC that I needed for the PWM, which was nice. I then thought about the 100nF (.1uF) capacitors that I would need and remembered that I can reduce the capacitance of capacitors in a series - unfortunately though, it's impossible to make 100nF from values 1uF and over.

At work, I had found some stray 100nF SMT capacitors in 0603 and 0805 case codes and took them home with me to see if either would be large enough to use, and luckily, the 0805s were. I also grabbed an unused 10k variable resistor even though the schematic on the page uses 100k (I figured it wasn't going to be a big deal).

The schematic also called for 1N4148, which I was very lucky to find in the pile of salvaged diodes I have (I thought I had substituted for T4148, but it's the same thing).

After getting it built, I first tested the circuit with an LED to make sure the 555 IC wasn't dead, and luckily it wasn't, then changed the LED out for a 5.9V motor (I was using USB power, so I was under-volting it a bit) to check the actual PWM cycle. Needless to say, it worked and I could tell the PWM was working because of the screeching noise at the lower setting (anti-clockwise). While I could take it to work and test it on the oscilloscope, it's not really necessary, since I already confirmed that it works.

The board I used was the same RadioShack board from the previous 555 IC, and although it works, it's a cheap board (the pads come off with just the right circumstances. I also used some salvaged 0 ohm SMT resistors and some 24 AWG wire (from a Cat5e cable) to make the necessary jumps.

I'd like to make a good board for it, but from my experience with the PCB Artist program from Advanced Circuits, it still seems a bit daunting. I probably will eventually, since it'd be nice to have the capacitors on their own solder pads instead of between the solderpads on the underside of the board (not to mention I can just have traces running around the board instead of jumpers). Once I do though, I think OSH Park would be my best bet price-wise.

The PWM circuit page says that I can adjust the frequency by changing C1, but it'd be easier to just stick with the 100nF... Though I might play around with it later.

While the circuit itself is complete (in a usable state), the project that it's part of is not.

That's all for now, hopefully the weather will clear up enough soon so I can get the NTPi project up here.

19 April 2015

New Theme!

Well, just a change of background and middle layer along with a bit of colour tweaking, nothing else otherwise.

Logitech MX Master & Logitech Product Rant

The article I read is: Logitech MX Master Wireless Mouse Unveiled.

I'll give a fair forewarning for this post will be quite long, as I'll be covering a lot.

It has an interesting design and style, and as much as I'd like to have one, I wouldn't need or have much use for it. While it does allow me to control 3 devices with it, the only place it'd see use is my bedroom - it would connect to the  Raspberry Pi 2 and Banana Pi via Bluetooth and then to Mei-chan via the Unifiying receiver. The problem is that it's a regular mouse, so I'd need some sort of space to move it around to control the cursor, and with the limited space, that's not exactly entirely possible. The other reason why I wouldn't want it for my bedroom is because I have already bought a Logitech M570 to replace the Cordless Optical TrackMan for Mei-chan. What I'm planning is that the Raspberry Pi 2 is going to use the Cordless Optical TrackMan and the Banana Pi will be using the V470 that's paired with Taiga at the moment (the Banana Pi will be taking over Taiga's duties). I may get it in the future, but that's about all I have left to say about it.

I own and have owned numerous Logitech products over the past 15 years, and I've never had any reason to switch to any other company. I'm not exactly sure when I began my brand loyalty to Logitech, but perhaps it was when the MX1000 was released.

The first Logitech mouse I owned was the Value Optical Mouse, which I eventually gave to a friend, because of my adaptation of the "first" generation of Logitech's Marble Mouse.

The third mouse would (probably) be the MX1000, as it was quite interesting to have something that used a laser instead of an LED light for surface tracking, but the battery eventually degraded to where it didn't hold a charge very well (perhaps it was a bad thing that I had it on the charger if I wasn't using it?). I eventually gave it to my best friend as a mouse for backup/test rig/something else.

Next would be the Mini Optical Mouse Plus for Sae-chan, which I used for quite a while until I didn't have Sae-chan for a couple years, and during that time, I gave the mouse to my best friend so that he can bundle it with a laptop he was selling.

After that came the white V470 for Shizuma, which I used for a while until it was replaced with the Performance Mouse MX (more on this mouse later).

I bought another V470 for the netbook, but in the blue colour, and this one went to my best friend again, until he retired and (possibly) sold it.

While I'm not sure exactly when I got the "third" generation of the Marble Mouse, I bought it to replace the "first" generation because of the button count increase. For those wondering, the "second" generation is the same as the "first", but with different colours, and the "fourth" is like the "third" with different colouring as well. Generation numbers are in quotes, as I can't say for sure if that's how Logitech released them.

I've also bought an M310 for something, but I don't recall what - though I do know that I gave it to my parents to use on the Intel build and the VAIO it replaced.

The Performance Mouse MX was very interesting to me because of it's ability to track on 4mm (and thicker) glass, and I bought it to use with Shizuma along with a N305 for numeric entry (the Unifying receiver is quite nice). I originally had a couple Bluetooth (non-Logitech) numeric pads, but the first one died after I accidentally spilled a bit of water on it, and the second one was just kinda cheap and annoying to use.

When I got Triela, I also got the Anywhere Mouse MX (first generation), since it uses the same Darkfield technology and my best friend had a glass desk at that time (though I only tested it on glass for fun and used it seriously on a mousepad).

When I got Sae-chan back (I think this was when I had the netbook) and "modded" her to have Bluetooth, I bought another white V470, since the other was paired with Shizuma.

For Lie-chan (when she became a Media PC), I bought the M505 because I wanted laser mouse that had Unifying (so I could pair it with the K360).

I also got the Cordless Optical TrackMan at some point, just not sure when (I think when Ziggy was my bedroom compy).

And the latest mouse would be the M570, which is still a bit weird to get used to, since it's a thumb-controlled trackball instead of the index finger-controlled trackball (using the middle finger in concurrency for more precise movement). The first week or two was the hardest, because my brain had been so hardwired to using the Marble Mouse and Cordless Optical TrackMan, so I had to slow down a bit to make my hand control the M570 correctly (instead of making clicks/scrolls when trying to move the cursor).

A total of thirteen Logitech mice, but that only concludes the list of mice. For keyboards, I own/have owned a total of 5. For speakers, I've own the X-540 and owned the X-530. For miscellany, the HD Pro Webcam C920 and the Harmony 650 Remote.

I'll more than likely continue to buy Logitech products when I need/want them, keeping myself from early adoption to avoid any possible issues that may arise (the G910 would be a good example).

Linux 4.0

The article I read is: Linux 4.0 brings Skynet closer to existence, offers reboot-free kernel patching.

While it probably won't be mainstream all that soon, I do look forward to reboot-free kernel upgrades, since it will make things a bit more convenient than it already is (considering that a Linux user can reboot/relog at their own convenience without a nag message).

The other thing that will be nice about 4.0 is the audio over HDMI with the open-source AMD Radeon driver; this will be quite nice for a media PC or HTPC, since it doesn't require the workaround. To make it work with 3.x, you would have to tweak a setting or two, but it can cause issues (I tried it once for the heck of it, but it was a long while ago, so I don't remember all that much of what happened).

As for the numerical numbering, it doesn't matter to me if it's 4.0 or 3.2 because it's just a numerical sequence after all.

10 April 2015

Micro SD Card Adapter

I recently bought GeauxRobot Raspberry Pi Premium Low-profile MicroSD (TF) to SD Card Adapter and received it yesterday.

After writing Raspian to the 4GB micro SD card, I stuck it in the adaptor, stuck the adaptor into the Testpi, then plugged it in. Pi didn't boot and I cycled the power before using the stock adaptor, which worked.

I did a continuity test on the parts of the board that I was able to and found nothing conclusive. After the initial Raspbian setup, I decided to try again, with no new results. I then decide to pop the hood up enough, and eventually one of the solder joints for the hood broke, and enabled me to access the micro SD contact pins. At that point as well, I lost a piece for the click-lock retention/ejection, but I wasn't paying too much attention, since my focus was trying to diagnose the adaptor.

I'm not sure what I did, but I took it to my soldering iron to remove the hood by melting the solder of the other joint for the hood, and then ran another continuity test with the pins itself, which is when I found that one of the pins wasn't properly soldered - probably a bad reflow. I checked the rest of the pins (which turned out fine) before double checking the bad pin again. I took the adaptor back to my solder station and heated the joint a couple times to make sure the solder reflowed well enough.

I went back to my room to stick the micro SD card into it to find that the hood didn't want to stay on, and so I had to keep pressure on the hood as I did a quick boot test. Once confirmed, I took the micro SD card out of the adaptor and soldered the hood back on. Unfortunately, the initial tinkering of the hood (where it popped the solder joint) also shaved off the retention clips on that side of the micro SD card holder (thin metal, thin plastic, and some force does not mix well), and at that point I was at a loss of how to fix it.

After a minute or two of looking at the adaptor, I saw the weird solder joint that the hood makes contact with when a card isn't present (the joints aren't connected to anything), which could just be a stabilization or positioning thing, I don't know for sure. Anyway, I had saw the thing before and found it slightly weird when it didn't connect to it via continuity test, but I found that to be the only way to hold that corner of the hood down; I went back out to the soldering iron to solder the hood to the solder joint. I accidentally soldered the contact arm along with it, but the micro SD card fits and reads just fine, so I left it.

It was nice that I was able to fix a "dead" unit, since it's a very simple design - with nothing more than contact points and some PCB traces - and I didn't want to try a different brand (along with the fact that I was unable to return it once I opened the hood). It also saved me the disappointment of a DOA product looming around until I forgot about it.

It was definitely one of the more interesting turnouts for a potentially bad product.

31 March 2015

Sound Card Switchbox Version 2

After finding a nice, new box and the type of audio jacks that I was originally wanting, I decided to remake the sound card switchbox for Melty. The project took about 140 minutes (about 7 days and about 20 minutes per day) since I needed access to the heatshrink and heat gun at work (I'd rather not have to use the soldering iron or a lighter on the heatshrink) - I obviously worked on it a bit at a time during my lunch break, but I did drill out the holes and trim away part of the inside plastic at home; the 140 minutes does not include the amount of time that I spent planning it out.

I reused the cables (and switches) from version 1 along with using 27cm lengths of extra stereo cable to increase the length a bit, which turned out to be slightly excessive. The heatshrink I used around the cable splice didn't turn out too well, but I didn't want to waste time cutting all the heatshrink off to try the smaller-sized heatshrink. When I drilled the holes for the cables, the plastic chipped a bit, so I was forced to countersink the imperfections away, which ended up making it look kinda nice (it's very hard to see the hole past the countersink).

I used some scrap pieces of ribbon cable to connect the switches to the jacks, which makes it look much cleaner than the previous version. The ground/sleeve wires (whatever you want to call it) from the cables are not covered with heatshrink (except for the ribbon), since it wasn't entirely necessary and none of them are touching one another.

While I wanted to take a picture of the switch loose like I did with version 1, I didn't want to waste any time, so it wasn't possible at work, and disassembly wasn't an option because of the thread-locking compound on the switches (and jacks).

Sometimes it's surprising how nice something can look with some new parts.

Finalized schematic (which was originally done in pencil, but had to be inked due to smudging). "Scuffed" refers to the side I scuffed a bit while filing excess plastic away on the box and lid.


Insides and close-up view.


Front and rear 3/4 view (apologies for the massive glare on the rear 3/4 view).


Rear view (apologies for the lens flare). I decided against making/placing a "P" label since I'm one of those that can extrapolate from incomplete data.


View of the splices and a close-up view of the gap between the heatshrink and cable.


Front and rear 3/4 view after "installation" (The side with the "Lin/M$W" label will be visible to me when I move Melty into the closet of the other room).