Thursday, December 8, 2016

Reflow!

Finally got around to an attempt at reflowing some SMD components. I had some PCBs I got made at OSHPark and the half the parts to populate it about two months ago, and the last half of parts a couple of weeks ago (the part I needed was back in stock). It's supposed to be a header-less version of the Particle Battery Shield from Sparkfun.

I used some bismuth solder paste (featured on this CNLohr video) since it had a low reflow temperature of around 138 °C (~280 °F). I applied it using a toothpick, then placed all the components. The fuel gauge IC was in a rather unfriendly TDFN-8 package, and I was a little unsure of using in my first solder paste job. Oh well.
Applying paste and parts.
Skillet deals.
I put the PCB on the electric skillet, bought new from Sears for about $10 on Black Friday, and dialed in the temperature to 300 °F. After about a minute, I saw shiny joints being formed, and soon enough all the parts were secured. I turned off the skillet and let everything cool.

It wasn't as difficult as I thought it was going to be:
Done! :D
I could have definitely used a bit more solder paste on some parts, but the whole thing came out really well, even the TDFN-8! Probably could have left the board on the heat for a bit longer too.
It also works!
Well, the circuit mostly works. The battery charges, but the charging indicator LED flickers uncontrollably when done charging instead of turning off. If I push on the board in some places, the blinking stops. I think there might be a bad joint somewhere, but this is pretty good. I haven't tested if I can communicate with the battery gauge yet.

Time to use more SMD components in projects to further shrink PCBs, and save more money! Also time to practice more.

Saturday, November 26, 2016

Return of the Barn Door Tracker

After last time's rather lackluster tracking, I decided to try out the barn door tracker again. I used essentially the same hardware as before, but greatly simplified the electronics. I added another 1:3 gear reduction stage so the final ratio was 1:15, allowing me to run the drive motor faster. Instead of having closed loop feedback with the PID like before, I just used a cheap buck-boost converter from eBay to provide a constant voltage that should keep the motor turning at a fairly constant rate.

I adjusted the voltage so that the final gear rotated at one revolution per minute. Power came from a small LiFePo4 battery.
Battery, buck-boost, and LEGO gears.
With this much simpler setup, I was able to mount everything to the tracker so that when it was running I didn't have to any physical contact with it, which could introduce vibrations.

I took the setup for a spin in my front yard. This time I was able to do a somewhat proper polar alignment since Polaris was actually visible. After a bit of eyeballing, I decided the hinge was close enough in line. I tested taking photos with and the tracker on and off, and after a bit of fiddling, sure enough, the tracker was working. Sure, the stars weren't nice pinpoints, but the trails were significantly reduced.

Tracking off. 135mm f/5.6 20" ISO 400
Tracking on. 135mm f/5.6 20" ISO 400


Finally!

However, the setup was not without its flaws. The whole thing lacked any rigidity, so after handling the hinge I had to wait about five seconds for the whole thing to stop wobbling before taking a photo.

I initially had the drive direction close the hinge over time, but the threads would get stuck in the hole in the wood and the hinge wouldn't close. I swapped the polarity on the motor to drive the hinge open since this would guarantee that the hinge has to move.

There is also periodic error in the drive mechanism. Looking at the movement of the stars in each photo, it's clear the hinge is moving very slightly in axes other than the polar axis. The movement repeats itself every minute (the drive gear turns once per minute hm...), leading me to think that the main drive gear is not concentric with the threaded rod. I did just eyeball the position of the nut and hole on the main gear so it's no surprise.
Wobble wobble.
I tried to do some imaging of the Orion nebula, but only a few frames didn't have any extreme streaking. I stacked the twelve "usable" frames, did some basic editing in Photoshop and got this:
135mm f/5.6 12x10" ISO 800 (and 21 darks)
To improve the setup, I would likely need a much more rigid hinge that wouldn't allow any movement other than opening and closing, so any other wobbling movement from the threaded rod wouldn't be able to actually affect the setup. I also need a better tripod so any movement from the wind is minimized.

Sunday, November 13, 2016

Supermoon

Tomorrow is supposed to be a supermoon, and thought it would be nice to get a photo of it. I don't have any fancy equipment, but a handheld shot is perfectly fine because of how bright the moon is. Also, the moon is quite big so an ordinary telephoto lens will do.

Let's have a go:

Pretty normal.

Saturday, September 17, 2016

Photoshop Controller: Prototype

I decided to make a small controller for my sister so that she would have more intuitive controller over some functions of Photoshop when drawing. It's rather cumbersome to have to press keys to control canvas rotation or brush size, when they are best mapped to a rotational input.

The basic idea was that the controller would emulate a keyboard, and by rotating encoders the appropriate key from before would be "pressed." If I can figure out how to map inputs directly to specific commands in a program (e.g. a volume control knob can't emulate a keyboard, it needs to send the right HID codes to control volume up and down), that would be better. For now, I'll just stick with the key presses.

I began drafting up some possible designs, and many of them really looked like MIDI controllers. I keep thinking of more and more functions, each bound to sliders, knobs, and buttons. I was even thinking of adding a small screen to... I'm not sure what it would be really useful for, but it could describe each input's configuration and show a list of presets so the controller could be used for different programs.

In the end the most important factor is user-friendliness. Someone was going to use this, and it had better not be uncomfortable to use.

For a future project.
More realistic.

She needed control over four commands:
  • Brush size
  • Brush density
  • Zoom
  • Undo (Ctrl-z!)
I planned to have three rotary encoders, and two buttons to the right of them. The first three commands are mapped to the encoders, and undo to one button. The last button could be be free for whatever other command might be useful.


I'm using the Beetle controller from DFRobot since it has a Atmega32u4, which has native USB and can emulate HID devices. It's has just enough pins broken out from the controller for my project, and isn't that expensive. (It's also because it was the only suitable controller that was cheap enough from Jameco, where I got the knobs and buttons from.) It's also programmable with Arduino, which is nice because keyboard emulation is already built in and this is only supposed to be a quick project. (I'm not too concerned that this isn't pure C code. I'll learn how to use and setup USB with C and register fiddling later when I have more time.)

Source: https://www.dfrobot.com/index.php?route=product/product&product_id=1075
The encoders are 50 mm apart, and the button on the right is 40 mm from the last encoder. I forgot that the encoders that I had on hand also could be pushed in as buttons, and realized how much better it would to be able to use the press function to use as coarse/fine adjustment toggle. As a result, I only have one I/O pin left for use with the external button. The ICSP pads are also exposed, and I think I can use some as more I/O but I'll come back to that another time.
6-pin ICSP pads exposed on the right of the PCB.
I'm also using the Beetle controller from DFRobot since it has a Atmega32u4, which has native USB and can emulate HID devices. It's has just enough pins broken out from the controller for my project, and isn't that expensive. (It's also because it was the only suitable controller that was cheap enough from Jameco, where I got the knobs and buttons from.)


I planned out a prototype by first using a scrap piece of plywood as the front plate.


The hole on the right is for one button. The button isn't installed because I didn't have a big enough drill bit for the button to fit.


I also got some sample pieces of purpleheart and black walnut wood from Woodworkers Source. At six inches long, they are the perfect size for a small project. The purpleheart looks really, really, reaalllly, nice.


The wood piece is just long enough for the three knobs. I might just stick with only the knobs. Without the other buttons there are still more than enough functions and I can use the remaining I/O to control LEDs for backlighting the knobs.

Tuesday, August 16, 2016

FTC: Designing a Drivetrain

In preparation for the next FTC season that will be revealed next month (which hopefully will be one that involves launching things into the air), my team decided we should begin planning out the most basic parts of our robot. Last year, our drive system was extremely cumbersome and not that easy to fix. Swapping out a burned out motor was difficult because they were wedged between all the compact electronics.

In an attempt to fix these issues, I began designing a modular drive train. This time I would also use CAD first, then begin build afterwards.

I had several designs in mind, each of which involved having the axis of the motor be in the same plane as the wheels. I didn't like having the motors stick into the robot, and having the motors closer to the outside would make swapping in new motors easier, in the event that they burn out (hopefully this system solves that problem too). To get this to work, I needed to either use bevel gears or a worm gear to change the axis of rotation from the motor to the wheel. Worm gears would create too much reduction, and were removed from consideration.

I thought about having the motors oriented vertically, but this would make the design wider again.

Eventually, I saw an image of the FRC RAW Box gearbox with two motors oriented towards each other, and perpendicular to the output shaft:

Dead source: https://www.chiefdelphi.com/media/img/bb2/bb21e809691ce201313d00aed3241f3d_l.jpg

Aha!

Saturday, June 11, 2016

Barn Door Tracker

I don't think a barn door tracker works this way.
In an attempt to get longer exposures of deep space objects, I decided to build a barn door tracker. This would help track the stars so there is no trailing created by the rotation of the earth, The general concept behind the tracker is that the camera is mounted on a hinge, and the axis of the hinge is pointed toward the celestial pole (the apparent axis of rotation for the earth; it's near the star Polaris in the norther hemispehere). The hinge would rotate at the same rate as the earth, so to the camera the stars appear to be fixed in place. About a month ago I tried making a hand-cranked one, but there many severe problems with it. I didn't have a second ball head, so I couldn't aim the camera, and the setup lacked any rigidity, so any attempt to compensate for the rotation of the earth was negated by the wobble created by my hand. Not to mention I didn't have a real way to properly align with the celestial pole.