Category Archives: Electronics

Grandfather’s Power Supply Repair

My grandfather recently passed away and I was honored to inherit some of his electronics equipment. I could write a book about my grandfather and no blog post could do justice to how amazing his life nor how unquenchable his love of building and creating was. Included in what he left to me were several power supplies, one of which wasn’t working when I got it home:

20130719_153236

It’s got a switch for changing between 14V and 28V and there’s a label indicating that it’s a 9A power supply he created in 1998. I decided it would be a pretty fitting task to repair it and so set about taking the thing apart. Here’s a picture with the casing off:

20130718_195920

You can immediately see the transformer and rectifier as well as a very large smoothing capacitor. Alongside that there’s a board with the voltage regulation circuitry with the current sense resistor and trimpots for tuning the voltage to 14V and 28V. Along the bottom is a large heatsink where the power transistors are, which look like this:

20130718_192823

I suspected these or the capacitor first. I don’t have much experience working on power supplies but figured they were the most likely culprits to fail. After some testing though, I started to suspect the voltage regular chip itself. A quick google for the chip got me the data sheet  and I was able to toss together a quick test circuit using parts I knew to be good.

20130716_191639

This turned out to be the right track as I wasn’t able to get things working, so I was hopeful when I found a modern replacement for the chip for $0.60 and ordered one up. With that on the board and everything reattached the power supply was working again.

20130718_192858

20130718_185824

This was only one of the power supplies he left behind and I’m hoping to take some pictures of the others and their insides for a future post.

Kitchen Table Robotics

This past Christmas was an Arduino Christmas for me. I got a couple of Arduinos and some accessories and it’s taken off into quite an obsessive hobby, completely taking over my kitchen table (We live in a small apartment). Anybody who gets into electronics through the Arduino will probably decide to build some kind of robot at some point in their adventures. For me the goal was to provide some kind of structure to my electronics/microcontroller tinkering. Similarly, when I’d like to learn a new programming language or framework, I pick a project to implement. To test the waters I picked out the cheapest kit/parts I could find and dove into seeing what I could do with it.

Basic Platform

I started with the Tamiya Tracked Vehicle Chassis and the Tamiya Twin Motor Gearbox. Eventually I swapped out the motors for the higher voltage Solarbotics RM3 and picked up a couple of Tamiya Universal Plates to support the electronics and batteries.

A tracked chassis seemed easier to start with due to the differential drive. To learn as much as possible along the way I decided to build my own basic motor controller based on the SN74410. I then added some back-emf sensing after stumbling upon this post. The post explains the details, but basically on each motor there’s a pair of voltage dividers connected to an analog pad on the Arduino. Every 100ms the software stops the motors, pauses for 2ms so things can settle and then samples the voltage on that motor for 2ms more. That average is proportional to the physical speed of the motor and with some calibration we can match speeds of the motors, among other things.

Power

My brother in law is addicted to RC helicopters so I consulted him on some LiPos. He suggested a receiver pack because my current requirements weren’t insane. I went with the Zippy FlightMax 2100mAh 2S which has worked great. For charging I got the Thunder AC6. I wasn’t interested in anything more serious until I was sure I’d get my moneys worth and so far it has worked great. Because I fried one of my voltage regulars due to a polarization mishap I grabbed a set of Anderson Powerpoles and attached those to the batteries and made a few utility cables. I’m very happy with them, though I wish they were a little smaller as they’re kind of big for my needs. Also, I used solid core hookup wire on power system and next time I’d use stranded for the extra flexibility, frequently disconnecting and connecting the battery is annoying with rigid wires. Also, I’m using the Pololu D24V6AHV to step the battery voltage down to 5V to drive the Arduino instead of using the on board linear regulator.

Tread Encoder

I attempted a simple encoder system using SparkFun’s SEN-09299. I mounted them under the second story of the chassis, hoping the beam would sneak through the tiny holes in the tread allowing me to see them tick by.

Unfortunately, this proof of concept didn’t produce a reliable square wave as the tread moved. I think there’s still merit to the idea though, especially if the photo interrupter could be mounted tighter to the tread so that the IR isn’t leaking around  the outside. I opted to just hold off until I could do a proper encoder on the motor’s shaft.

Pololu IMU

I’m a big fan of Pololu. They’ve got a ton of very useful stuff on their website with great documentation. It’s also nice that they’re nearby (Las Vegas, I’m in Southern California) so everything arrives quickly. I picked up their MinIMU-9 to toy around with, you can see the part mounted on the picture below.

With the help of their sample code I pieced together a feedback loop to maintain a heading. This was very successful as it would do a great good job of turning back to its original heading if bumped off course, for example. It’s a great little board, especially with the DCM library they link to on their site. I’ve since broken the MinIMU-9 and an ATMega328P out onto a separate, configurable board that’s running the DCM algorithm and can speak I2C. I’ll do a post on that later.

Final Product And Thoughts

Here are a few more pictures of the robot. It’s been dismantled now so that I could use the parts, as is the circle of robot life.

You may have noticed the IR detector on the servo in the front for obstacle detection. That’s just a tiny peak into the autonomous behavior I’m getting into now. More on that in a future post.

So yeah, that’s about all I got on this project, hehe. I’ve already bought my next platform, the DFRobot 4WD so there will be more to come on that. I’ve also gotten out of the motor controller business and am using an off the shelf one so that I can focus more on autonomous behavior. Making my own simplified/naive one was great fun though.