Solar CDX

Reading a rotary encoder with ATmega328

There are a bewildering number of examples, libraries, and opinions about how to write routines to read values from a rotary encoder. I found one that that looked particularly elegant and easy to generalize, so adapted it to the Atmega328 that I’m using for my current project. I used a pretty popular rotary encoder, Adafruit #377, although I think the demo code would work with other quadrature encoders.

Most of the work in done in a relatively light interrupt service routine that receives information from both directional pins on the rotary encoder. I did not do any addition software or hardware debouncing and I didn’t notice any jitter or erratic behavior.

Continue reading Reading a rotary encoder with ATmega328

The Antananarivoduino

Blue LEDs make everything more spiffy.

Blue LEDs make everything more spiffy.

With wintertime (and remember, it is winter where I am) comes soldering – I can spend more than ten minutes in the garage without being drenched in sweat. I have a three week travel break before going on summer leave, so I’m trying to wrap up various projects. I have one project breadboarded and wired up to my arduino duemilanove, but I needed another arduino to work on another project in parallel, so I built one up on perf board: the Antananarivoduino.

The Antananrivoduino is about a simple as I could make it: an ATmega328, 16Mhz crystal oscillator, and 5V power. The one frill I added was a 28-pin ZIF socket that I’ve had kicking around for a couple years. The socket lets me seat a chip, program it, and eject it. It’s ideal for cranking out copies of a project or a burning a final chip that will go into an embedded project and won’t need any more programming.

Continue reading The Antananarivoduino

Solder Fan

IMG_20150528_144840 IMG_20150529_201936 IMG_20150529_201958 IMG_20150529_202007This project arose from a sudden desire to stop inhaling solder smoke. I just got back from about three weeks of constant travel around Africa with a bad head cold, cough and sore throat. After being away, I was itching to solder up something, but didn’t want to push myself any closer to bronchitis. The solution: a fan to waft away the solder smoke.

I had a bunch of waffle fans removed from computers, but some of them proved very wimpy. One in particular was super-quiet and drew about 200 mA, but was barely able to move air. Since more is always better, I dug into the junque box and pulled out a bunch of fans that I have removed from a commercial server. They were small, but powerful. Alone, each drew about a half amp and when plugged in a 12V battery (or tapped into the bench’s 12V supply), would vibrate themselves around the table. If one fan is good… four is even better.

I created a wood frame with some channels made from angle aluminum. Since the metal impeller blades are like little razors, I stapled metal mesh over both sides. After assembling the whole thing, it occurred to me that all the fans should face the same direction. Luckily, the wood glue hadn’t set by that point, and I was able to disassemble part of the frame, flip around a couple fans, and screw the whole thing back together.

With four fans running full speed, this thing is loud and produces almost enough thrust to take off. So, the interesting part of this project is not the fan itself, but the fan controller. Any sort of rheostat or linear device that would ramp up or down the drive voltage would be very inefficient and produce a lot of waste heat, so I went with a variable pulse width modulator. Rather than reinvent the wheel, I used a design described on the PC Silencio website. Two sections of the quad op amp create a triangle wave, another serves as buffer for a voltage divider, and the final section serves as a comparator to slice off the triangle wave at the level set by the voltage divider. The threshold determines the duty cycle of the generated square wave, which drives the motor at full voltage.

I didn’t have a LM324 in DIP14 layout, so I substituted a TLC271 op amp, which worked fine. For the n-channel MOSFET driving the motors, I went with an STP16NF06 (my old standby, used in previous projects such as the TEAPOT and Texas Topper Amplifier). Regardless of setting, the mosfet remains cool since it’s essentially either on or off and not hanging out in the linear range at all.

In practice, running the fans at near the lowest setting works fine for pulling away smoke from routine soldering. Since the question will inevitably arise — I should mention that in order to solder together the fan, I used a breadboarded version of the PWM circuit to run the fans so I could solder them together — thus getting around this bootstrapping issue.

Internet backup power

About the time I am wrapping up in the office, the sun has risen and people are getting into work on the East Coast of the United States. I leave early enough to get home so I can make teleconferences that start at 9 Eastern. I’d have quite a phone bill if I dialed direct, but fortunately, I can make most of these calls over the internet. Although Madagascar is a developing country, we have fiber to the house. The upstream connection isn’t entirely stable, but it is up most of the time, and throughput is surprisingly high. However, I still run into problems when the power blinks off.

The ISP has adequate backup power to maintain the connection, at least for some time, so this is my problem in the house. The house too has a backup generator, but there’s a couple seconds to shift over from mains to generator and vice versa. In that time, the houses’s router goes down and takes a minute or so to reboot every time power switches over. What’s needed is a UPS, but the smallest computer UPS here runs around $150. Also, it seems like a UPS is massive overkill when the problem is just to keep a router happy for about a minute.

I have a good stash of small lead acid batteries for portable ham radio use, and it occurred to me that I could probably use a couple in backup power supply projects. At this point, I’ve come up with two designs built of materials squirreled away in my garage. Schematics are below the cut for anyone interested. Continue reading Internet backup power

Concours IF 2015: Sourire

15391458183_f602481b75_o“Sourire” s’agit d’une courte histoire racontée du point de vue d’une marionnette. Vingt-quatre commandes — 19 de spécifique et 5 juste pour passer le temps — suffissent pour atteindre la solution. Néanmoins, j’ai bloqué quelques fois et de temps en temps j’ai eu besoin de jeter un coup d’oeil au walkthrough.

C’est un imposant défi d’écrire une IF dans laquelle le jouer est littéralement pendu des fils et presque immobilisé. Le joueur apprend immédiatement que ce n’est pas possible de se déplacer dans les directions cardinaux. D’ailleurs, il n’y a beaucoup de voir est les objets vus sont hors de portés du joueur. Qu’est-ce qu’on doit faire? C’est un bon commencement, pourvu que le joueur ne devient pas frustré après quelques tentatives de faire avancer la scène.

Continue reading Concours IF 2015: Sourire

Visit to Zambia

wettertana

Flooding in Madagacar after the most recent cyclone.

This year’s cyclone season has been unusually severe – folks in Madagascar are telling me that it is the worst one since around 1959, particularly from the perspective of the central highlands. However, most of the precipitation has been on the coasts, where towns are literally underwater. Storm systems tend to form over Mozambique, intensify in crossing the channel, land forcefully on the west coast of the island, cut across it, and continue into the Indian ocean, either eastwards towards Réunion or shifting towards the south. Along the way, the storms dumped enough rain to entirely saturate the soil in the first month or two. Now, there is nowhere for the water to go, and it is overflowing dikes, bursting dams, and causing mudslides. Before the rainy season, the government was struggling to keep the wobbly national infrastructure working, but at this point, it is struggling to maintain basic services such as electricity and road maintenance. Continue reading Visit to Zambia

2015 ARRL CW DX

nodakotas

If North America were a toroid, one could pass the windings through the Dakotas.

Having recently put up the G5RV, I gave the ARRL DX CW contest a shot this past weekend. The antenna is up only about 10m and is not resonant on 15m, but it has performed well on 10 and 20m in the past. On the first night, 10m was very quiet, but activity on 20m was brisk, particularly in the early morning hours when I was working two calls per minute.

In principle, 10m should have been open starting the in mid-afternoon on Sunday, but it was slow until around dinner time. Again, 20m was my main band, despite having mostly mined it out the previous day. I managed to get a few contacts on 15m, and even fewer on 40m, where local noise was a problem.

I didn’t stay in the chair the full time, even when I had favorable North American windows. I had to disconnect the antenna for some time due to thunderstorms on Saturday afternoon and on Sunday evening I had a guest in town and went out for dinner. Still, I am happy with the number of contacts I made given my conditions.

I worked a few states that I hadn’t such as Vermont, Rhode Island, Delaware, West Virginia, Nevada and Wyoming — hopefully, those stations will QSL via LOTW. I heard a North Dakota station, but barely, and he was drowning in a pile up. Maybe I’ll take another shot when Sweepstakes or some other convenient contest rolls around and I have the hexbeam up.

My final tally:

Band QSOs Mults
40m 7 4
20m 418 52
15m 18 13
10m 56 26

3A/AI4SV Reverse Dxpedition

Sunset in Nice.

Sunset in Nice.

Living in Madagascar, I have enjoyed operating from a sought after DXCC entity; little did I suspect the same would be true on my recent trip to Europe. I packed along the FT817 on a trip to Nice, France, where I attended a business meeting. I had picked a hotel with an open 8th floor deck and hoped to string up the end-fed to operate in the evening. On the way out the door, my wife asked me, “so I don’t suppose you’ll have any time to visit Monaco, while you’re there?”  I have to admit that I hadn’t really thought about it, but as soon as she mentioned it, the gears began turning. I had meetings in Nice and Lyon, but some free time on Saturday before flying out. On the way to the airport, I double checked that Monaco was a signatory to the CEPT convention.

Continue reading 3A/AI4SV Reverse Dxpedition

How my antenna switch became a loudspeaker

ad4I envision having a few antennas: the hexbeam, the G5RV, lindenblads for 70cm and 2 satellite work, perhaps a vertical of some sort if I can figure out where to place it, and maybe some kind of beam antenna for six meters. To make all that work, I’ll need some sort of way to bring the lines in the shack and to switch among them. I brought four alpha-delta four position switches, which should be enough to both perform this function and switch the lines to the available rigs. With that intention, I laid the switches on the bench and drew out the wiring diagram.

However, I never got there; not yet, at least. After piling up some connectors and coax and wood, I realized that what I really needed in the garage in order to do this sort of work was some kind of background noise to keep me entertained. So, I pushed the very useful antenna switching project to the side and turned back to the computer that I had fried a few weeks ago by plugging it into the 230V while its power supply was set to 110V.

Continue reading How my antenna switch became a loudspeaker

The G5RV is up

G5RVF4The antenna situation has improved. There is progress on the hex beam, but in the meantime I’ve put up a G5RV. It is almost exactly the size of the largest run possible on my property. I had some difficulty getting enough angle on the trees to shoot the line and I am frankly surprised it all worked. The line is tied down to the tree trunk on one end, and the other loops over a tree, then through a metal loop screwed into the property wall, and that end suspends a brick, which maintains tension on the line but has enough give to allow tree motion. The center twin lead is centered over my house and I was not able to get the two arms of the antenna high enough to allow the feed line to hang down straight; this is not ideal as it will change the plane of radiation since the feed line is active in this design. I was also concerned about the feed line coming down too close to the metal roof, so I have arranged another support for the feed line, which pulls it close to horizontal. It also keeps it away from the high power security lights that rim the roof and which put out some RF.

I swept the antenna with an MFJ analyzer in the shack and the SWR is less than 3:1 on 80, 40, 20, 17 and 10m. I have had some good runs on 10, 17, and 20 meters, and a few contacts on 40m. Even on bands where it it not resonant, I’ve had reasonable success using a tuner; being able to run 100W gives me some margin for inefficiency. I worked one EU station after another one afternoon on 30m, and finally had a contact with Alain, 5R8AL, also in Madagascar on 12m. The additional power has allowed me to run a frequency on voice.  I’ve now set up the TS450 for digital communications and have had a few PSK31 contacts as well. I’ve getting some RF back, which is affecting the external USB sound card, so a near term project will be fixing station grounding.

wood mill workers milling the tree into a postAs for the hex beam, I finally have all materials. I visited a local lumber yard and had a 4m x 15cm x 15cm post milled. It arrived at my house on a cart and is now sitting across two chairs on my porch. I’ve given the post a coat of wood treatment (permethrin + cobalt salts) and will paint it for more protection. Meanwhile, an almost 2m deep hole has been dug in the backyard, and I’ve purchased about 200 kg of cement, which with some aggregate will become the base for the wooden support beam.

The plan is to get the base in place and set up a shelf using angle iron to support the G450 rotor. Further up the post, I will install a universal thrust bearing to handle the lateral load. A 10m spiderbeam telescoping mast will support the hex beam, and will itself be guyed at two levels. Finishing this project will await some good weather and enough time to see it through.