Monday, June 22, 2015

Plane of the Ecliptic

This post has nothing to do with engineering, interfaces, brains, or Nicaragua, but I thought it was cool nonetheless. I took these photos tonight (6/22/2015, Philadelphia) and Friday evening (6/19/2015, Managua). You can see that the angle of the plane of the ecliptic is very different in the two pictures. I tried to measure the angle in both pictures (very rough estimate) and they seem to be about (62.5-28.3) = 34.2 degrees apart. This number should be roughly the same as their differences in latitude, which google tells me is (40d [Philly] - 12d [Managua]) = 28 degrees. That's pretty close considering my non-scientific measurement approach. Pretty neat!!!



Saturday, June 13, 2015

Nicaragua - Day 27

We finally reached the end of the program. Well, at least the first month, which is where my contribution ends. The last week was filled with a handful of interesting labs. One of them involved us picking through a big box of old medical equipment that someone had left in the school supply closet for us to look at. We took apart a blood pressure cuff, a nebulizer, and a few other odds and ends. The nebulizer was fun because it seem to follow the same basic pattern that all other suction and pressure devices follow. We tried to strip it down to its barest minimum, but were foiled by a lousy screw that stripped itself into smithereens and would not budge. In another lab, the students programmed a PIC to interface with a thermal probe to measure temperature and to set an alarm in case the ambient temperature was too low or too high. The students had to attempt to calibrate the system by mapping the arbitrary units from the analog to digital converter into degrees Celsius. The thermal sensor wasn't exactly the most accurate gizmo ever, so it was a challenging lab, but still enlightening. One highlight was the various methods students took to raise the temperature of their probe in order to calibrate it. One team put their probe in a ziplock bag and dipped it in the coffee pot only to discover that their ziplock bag was not exactly waterproof!

A thermal probe unit in a very leaky ziplock bag.


Yesterday, Friday, I took three students back to Nandaime hospital where we attempted wh tie up some loose ends. First thing on the agenda was the fetal doppler unit which I screwed up a couple weeks ago. Thanks to some friends of ours who flew in Thursday night from the United States, I had brand new mini USB Type B connectors in hand, and we were able to desolder the old connector and put in the new one without too much fanfare. unfortunately, I think we must have damaged some of the traces on the board during our first attempt to fix it and we were unable to get it working. I tried to guess where the broken traces might be so that I could short them but no luck. Well, at least we gave it everything we had. We also started working on an electric heater. We added a power cord (which somebody had cut off) but that didn't seem to be the only problem. We didn't have time to get to the bottom of it, but I'm pretty sure the heating coil needed a massive scrub because it was completely rusted through. For comic relief, we were handed a floor lamp that looked pretty new but we were told it didn't work. In trying to diagnose the problem, I happened to pull on one wire and the whole lamp snapped into life. I guess we got lucky! As the director of the hospital wryly noted, well at least you fix the lamp today. A bit of a hollow victory, but a victory none the less.

My biggest "engineering" victory of the week was replacing a light switch at my old homestay. You take your victories where you can!

The students are officially sufficiently trained to spend a month working in hospitals. They are a great bunch, and I expect they will all learn something and find some way of being of service to their various hospitals. I'm looking forward to keeping up with their exploits once I'm back home. And naturally, I take credit for all their successes and none of their failures :)

I'm off to the beach for a few days before heading back to Philadelphia. See you all soon.

Tuesday, June 9, 2015

Nicaragua - Day 23

Our third week in Nicaragua went really well. For the most part, students seem to be progressing well and making the most of their weekly hospital visits. In lab, we've been combining technical with non-technical experiences. One of our technical labs involved using our variable power supply to recharge a battery. Although successful, it was a little frustrating since the battery voltage does not vary much between discharged and charged. one of the non technical as we did was disgusting the nature of poverty and what it means to be a developing nation. We challenged are students and to define poverty and to discuss whether the existing metrics for being a developed nation or biased and if so how. We had some really nice conversations about whether poverty is an absolute or a relative benchmark, and the extent to which personal liberty and freedom are indicators of wealth. If you have money but you aren't free to spend it how you wish, then what's the point?

On Thursday we went back to the hospital in Nandaime. the first thing we tried to do was fix the microscope from the previous week which we thought only needed a new fuse. We install the new fuse and plugged it in and there was smoke and sparks! So we took the microscope apart again and took out the circuit board and discovered that it had been burned completely through. Charred to a crisp!
One seriously cooked microscope circuit board
In retrospect, I don't think that burning event was from our fuse attempt. I think that burning was a more significant event that happened when the gecko met its fiery end (see last week's post if you have no idea what I'm talking about). so that was a bummer, not much we can do there. on the plus side, we were able to fix several centrifuges and to put both autoclaves that we started working on back in service.
Fixing centrifuges is challenging because they typically contain three very stiff springs that must be wrangled back into place
We also cleaned and calibrated some more scales and even tried to fix a blender.



When you need parts, you must visit the local ferreteria, or hardware store.


On Friday we visited a central repair facility in Managua. There are a handful of engineers there who attempt to repair all the broken medical equipment from across hospitals in Nicaragua. some equipment is brought to their facility and some is fixed on site at the hospital. They are massively under staffed but they do some amazing work. The engineers are not formally trained, but rather learn in an apprentice style manner. But this system seems to work incredibly well, and everyone we interacted with could run circles around me with their eyes closed. They had a very well stocked machine shop, where they can engineer just about any widget of any size they need. they are also very creative in terms of rewiring and redesigning electronics is necessary.
An old school mercury thermostat that we spotted in a heater at the facility in Managua.
We showed them the picture of the fried microscope circuit board and they laughed and said that even if they had to redesign it from scratch with a reduced set of features, they would still get that microscope to turn on somehow. Super impressive. I'm not sure how much actual good we were able to do, although they gave us some work to keep us occupied. but we definitely learned a ton, and that's all that really matters.

So we have three lectures and three labs remaining, and then one more hospital visit on Friday. and that's it! The students will have officially finished their training and will move to hospitals across Nicaragua next week. I for one will be moving to a beach for 5 days where I intend to do very little engineering, and maybe try surfing again!

Wednesday, June 3, 2015

Nicaragua - Day 17

We are now officially past the halfway mark in our program, and the students are coming along really well. We are going through the trickiest of the labs, and the students are struggling and learning pretty effectively I think. Last Friday, I asked the students to take some time over the weekend to reflect on the first two weeks, and to think about what they still want or need to learn in the second half of the course before we unleash them into the wild. Judging from their weekend activities, I'm not sure how many of them took that message to heart, but at least I tried!

Our most recent labs included creating a variable DC power supply, and then using it to charge a rechargeable battery. The variable DC supply turned out to be fairly troublesome for many of the groups, since it involved a lot of soldering and a lot of components.  The DC supply consisted of a full wave rectifier, a handful of capacitors, a voltage regulator, and a potentiometer. A lot of students tried to compact their components tightly, but that often made for wiring headaches, especially since we were using untinned perfboard. To help out one of the teams, I rewired their board, being careful to arrange the components exactly as they were on the wiring diagram. This significantly simplified soldering job, as most of the nodes that needed to be soldered together we're all laying in a neat row. It occurred to me that simplifying the layout of the circuit elements is roughly equivalent to practicing good coding style in that you are massively reducing the likelihood of a mistake and making the overall design much easier for other people to follow. We had a nice classroom discussion about importance of good engineering practices in order to stack the odds in one's own favor for success.
Our variable power supply with circuit elements all laid out in a row, just like in the circuit diagram.

The resulting solder work is fairly easy to follow. You can see the ground bus going from left to right across the bottom.

For yesterday's lab, we used the variable supply to charge a battery. This was an interesting challenge, as students had to select both the power supply voltage and the current limiting resistor value. They had to make sure that they pick a power supply voltage that we could actually generate, a resistor value that we actually had, keep the power below what the resistor could safely dissipate, and keep the total charging time between 10 and 100 hours. That last constraint is because we were attempting to create a trickle charge. Overall the lab went well, but it was a little anti climactic, since battery voltages don't vary all that much between being charged and discharged, so there wasn't a whole lot to observe over the hour or so that we let our batteries charge up.

I'm looking forward to tomorrow and Friday, as it's back to the hospitals! Tomorrow we will return to Nandaime, and Friday we will be visiting a new facility in Managua which is run by the National Ministry of Health. Its not a hospital per se but rather a large central facility where they collect equipment from around the country to be repaired. Stay tuned for updates.

Friday, May 29, 2015

Nicaragua - Day 12

Hello again from Nicaragua! The weather has been getting steadily hotter and so our daily trips to the pool feel less like an indulgence and more like a necessity. On days that I teach, I typically spend my morning at home with my family. We spend the time playing Uno, reading, and going to the playground. In the afternoons while I go to class, they usually go to the pool or have some other type of adventure. On hospital days, my schedule is pretty different as I'm typically out of the house by 7 a.m. It's hard to believe that we are already halfway through the program. Two weeks down and two to go.

This week in class, we did lectures on a variety of equipment such as ventilators, oxygen concentrators, electrocardiograms, and defibrillators. We also did some pretty nice labs which get the students accustomed to dealing with hands-on electrical circuits. We did one lab where students had to construct a flashlight from a battery, a switch, and an LED.
a basic flashlight!
Not all of our students are electrical engineering majors, so this can actually be very helpful. We constructed a power supply using a transformer, a full wave rectifier, and a capacitor. We also got to blow a fuse with a battery, just to see what what happened. The students are asking lots of really good questions, and as always I'm probably learning more than they are in the process.

Yesterday I took 12 students back to the hospital in Nandaime. This is a small hospital in a village which doesn't have an engineering staff. This means that when things get broken or fall out of calibration, there is really no one to help them. Therefore, they had a huge inventory of things for us to look at. These ranged from the somewhat mundane, like a floor lamp, to tediously complicated, like an autoclave.
the control panel on the autoclave is simply a metal rod with some screws in it that open and close a series of switches when it is turned.
We successfully recalibrated about eight standard scales, and also repainted them because they were pretty grungy. We fixed 3 or 4 blood pressure cuffs which weren't working for various reasons. A couple just had some minor tubing problems that weren't too hard to fix. We were given a nebulizer which basically worked OK, except it was chock full of dust, which was taxing the motor. We clean it thoroughly, and returned it to the floor. We re-tackled the two autoclaves that we started working on last week. We took them all apart and washed out all of the copper tubing with vinegar, hoping to dissolve any mineral deposits inside. Even though these things are frighteningly complicated, we succeeded in putting them back together properly, which was a victory in and of itself! One of them appears to have been completely fixed! We still need to do a little testing, but it successfully pumped water into the chamber, heated it up, and then pumped it out afterwards. The biggest problem seems to have been that someone mis-wired the power supply switch. The other autoclave still doesn't work quite right, but it gets much further in its cycle than it used to, so I guess that its own little victory for now. Hopefully we will get another crack at both of those next week.

In one of the more bizarre things that I have ever seen, one of our students was taking apart a microscope that wouldn't turn on. She discovered that a lizard had crawled into the microscope and shorted out the power supply. The fuse had successfully blown to protect the electronics, but the lizard didn't fare so well and was found petrified on the circuit board!
a petrified lizard!
As if that wasn't enough, we found a clutch of lizard eggs in the microscope, and then we accidentally discovered that one of those eggs still contained a live baby.
a clutch of lizard eggs found deep inside the microscope
Unfortunately, we accidentally cracked that egg open, so the baby was born right in front of us, albeit somewhat prematurely. If you aren't squeamish, be sure to check out the video. Anyways, that was a first for me. Good luck seeing that in the university classroom!


In a more humbling moment, we were handed a handheld ultrasonic fetal heartbeat monitor. The doctor told us that it worked but gave noisy measurements and that the measured heart rates were definitely off. She told us to be careful since it was their only working one. The problem seemed pretty clear in that the connector between the ultrasonic wand and the base unit were hopelessly frayed and degraded.
the frayed ultrasound wand cable
We tried to re-shield the cable from the ultrasonic wand using some tin foil. Then I decided that we needed to replace the connector where the wand plugged into the base circuit board. After much effort, we were able to desolder and remove the connector.
The USB style connector was in pretty bad shape. At least two pins were probably not consistently making contact.
Unfortunately, after visiting about six or seven different shops, we were unable to buy a replacement connector. Finally I decided it was time to put the original connector back into the circuit board. However, no matter what I tried, the connector wouldn't go back in cleanly. After an incredibly aggravating couple of hours, it was time for us to leave, and I had to accept the fact that the connector wasn't going back into circuit board properly. We tried turning the device on, but it no longer recognized the wand. With my tail between my legs, we went to hand it back to the doctor. It's hard to tell whether she was really upset or not, but she thanked us for trying and sent us on our way. I feel pretty guilty that we ruined their sensor, and now I'm consumed with trying to get them new one, which will apparently involve a trip to Managua at some point. In hindsight, I should have taken a much more conservative approach with this instrument since it was their only working one. I think my hubris got the better of me, and I really only considered the best case scenario. I will try to communicate this lesson to my students today. I think it can be instructive when students see their instructor fail, and try to learn from that failure. Perhaps some good will come of this.

Anyways, despite that, it has been a fairly successful few days, and everyone seems to be learning and having fun. Hopefully next week we will get to visit a facility in Managua where they collect broken medical equipment from across the entire country. I am really looking forward to that!
Our hard work was rewarded with a nice pile of coconuts which we had to learn to open ourselves with the hospital's machete!

Tuesday, May 26, 2015

Medical Research Ethics

This op-ed appeared in today's NY Times:

http://nyti.ms/1BmMmHJ

Pretty interesting. Academics like to see ourselves as being trustworthy, upstanding people. But I guess is that the reality is we're just human in that we're corruptible by money, power, and pressure, just like everyone else...

Saturday, May 23, 2015

Nicaragua - Day 6

The autoclave in the
 Granada hospital. Note
the two pieces of wood
holding up the autoclave door!
Well, my first work week has come to an end. On Wednesday, I did a lecture about batteries and power supplies, which was pretty straightforward. We also did a lab where students got to make some basic circuit measurements including on a transformer. The students always get a kick out of watching someone stick the multimeter probes directly into the wall outlet to verify whether we are getting the correct line voltage. This is especially relevant since some of the outlets in our class don't seem to work quite right, which means that the transformers won't work right either!

But I digress. By far the most fun we had was hospital visits on Thursday and Friday. On Thursday, we took half the class to the local Granada public hospital, which is the same hospital he worked at last year. The technicians and engineers were super excited to see me again, and it was a happy reunion. They gave us a tour of the hospital, and also gave us some equipment to take apart, clean, and in some cases repair. We took apart and repaired a handful of nebulizers that weren't working for a variety of reasons.
A nebulizer under repair. The
two-sided pressure chamber is
opened up (bottom right).
One of them seem to have just been clogged with some debris. Another one had a frayed wire that needed replacing. These experiences are helpful, because the students gain confidence opening and troubleshooting the various pieces of equipment while having someone around to supervise. We also got to take a look at the hospital's autoclave, which is an enormous piece of equipment that can sterilize maybe cubic yards worth of supplies at once. Although the control electronics and mechanics look complicated, method of operation is fairly simple. Water is boiled into steam and forced into the chamber at pressure. The temperature and pressure do the job. We also took a look at some electrosurgery devices, and even did a fair amount of menial work such as cleaning ceiling fans! All of it is good experience, especially the social aspects wherein our students learn how to interact with staff, how to work at their pace, and how to work at their direction. 
A team effort!
At some point after lunch, I got roped into helping the technicians carry an enormous water reservoir bucket up a long ladder to place on a scaffolding. This is fairly commonly used as a water backup tank around here. How five of us got that tank up the ladder is anyone's guess, but nobody fell off and I felt pretty good about it afterwards!

Yesterday, Friday, we took the other half of the class to a hospital in Nandaime which is a village about 35 minutes outside of Granada. The hospital was very small, and although the staff seemed fairly knowledgeable, they were certainly resource deficient.
They had no engineering staff of their own, which meant there was a lot of equipment sitting around that needed repairing. They happily handed us a couple of autoclaves, an ECG machine, an infant incubator, and some common scales. We did the best we could and had a good deal of fun in the process. The infant incubator was fairly easy to repair. In fact I'm not even really sure what we did to fix it! We took it apart, cleaned a few ports, put it back together, and the alarm that had been going off magically stopped! The students cleaned and polished it until it looks like new, and we gave it back to the doctor, who was extremely happy. Apparently it was their only one in the hospital, and they hadn't been able to use it for a couple of years.

Sizing up the incubator.
The ECG machine had some sort of quirky electronics problem which we were unable to diagnose or repair. That was a little unfortunate, but to be expected given our relatively meager tools. The students who tackled the scales had a real adventure! They managed to get a decent number of the scales built up and functioning moderately well, but calibrating them was a complete headache. The scales were not very precise, and our efforts to calibrate against our own (known) body weights didn't get us very far. Well, better than nothing I suppose. We learned that once the springs in scales are shot, they're pretty much shot for good.
Calibrating the scales was a real challenge!
The autoclaves turned out to be a real challenge. I spent a lot of time studying the piping and electrical lines in an attempt to sort out how the devices work. Unlike the system in Granada, these were smaller benchtop models. Water from a tank gets pumped into the main chamber where heating elements turn it to steam at high pressure. Once the instruments are sterilized, the steam is released, passed through a condenser, and returned as water to the tank. One of the devices also had a vacuum pump which somehow accelerated drying and/or cooling  in the main chamber. The high pressure piping is a bit intimidating to mess with, and clogs with water scaling are apparently common. Judging from the condition of the autoclaves, both of them need a thorough scrubbing, especially with wire brushes inside the pipes, since there were mineral deposits everywhere. Unfortunately, we didn't have the right tools (and we ran out of time) so we'll have to try again next week when we go back.
The insides of an autoclave. The water tank (grey, left) pipes water into the tank (silver, right). The tubing is all high pressure, meaning we'd better put it back together properly, or else!
The people at the hospital were very good sports and seemed content to have us take apart their equipment and make a mess of the spare room they set us up in. The hospital director was very involved and wanted to know which equipment was fixed and what couldn't be salvaged. A few doctors poked their heads in too to watch the progress and ask questions. We're very fortunate to have our coordinator Inka who speaks very good Spanish, as well as a student who is a native speaker. So language wasn't a huge barrier. One gentleman from the lab hunted me down, telling me he had an electrical problem with his two microscopes. Turns out they just needed light bulbs, which of course we didn't have. I'm going to try to hunt them down in Granada this week and hopefully get him going next Friday. It was an interesting example of the problems EWH tries to solve. The microscopes were beautiful high quality ones, donated from abroad. But once their bulbs burned out, they were basically useless to this guy. Anyways, the hospital director had the lunch ladies treat us to a big meal of chicken and rice which was delicious and filling. I'm looking forwards to being back next week!
A well-earned lunch!

Well it's the weekend now, which means exploring around Granada, and maybe going zip lining tomorrow. Tomorrow is also a very big religious holiday here, the feast day of Mary Help of Christians. There have been a lot of parades and loud music, and fireworks that don't make any light but make these very loud explosion popping sounds. It's kind of nice, except that the firework explosions go on literally through the night.

I'm looking forward to next week's work schedule. We start talking more about specific pieces of hospital equipment, and the labs get more interesting too. I think considering the success we had in the hospital this week, students will be pretty engaged with the lectures as they start to see the physical principles underlying the various pieces of equipment that they saw at the hospitals.