Learning About Flux

I’ve read that flux is a useful thing to use when soldering, but I never really knew what it does or what the real uses were. I was aware that it helps solder stick, and that the usual soldering tin I used contained flux, but I just wasn’t sure exactly what it was or when to use additional Flux. The advice I read most often was when you try to solder an SMD chip, flux is really handy to drag solder pins. However, that just tells me when to use it, but not what it does. However, I saw a simple video that really drove the point home to me. It simply shows examples of soldering with and without flux, and changes some variables around so you can directly see the effect. Now that’s some educational material!

Pomodoro r2 Working Prototype

Yesterday, I managed to solve the pause button issue that I was facing. My main problem was running two timers at the same time so that I could use one to poll the button at a much shorter interval than the second timer for the lights. It took quite some fiddling, after I first tried to use the B timers to do this. However, I couldn’t get the compare timer working on the B timer, despite it having a compare register. I’m not too sure how it works yet, but I figured that the B timer compare register is actually for other purposes (such as using it to generate output), rather than an internal timer.

After quite some fiddling, I realized a much simpler solution to my issue than trying to get a B timer working on Timer 0: I just use the A timer on Timer 1. Now, Timer 0 is 8-bit and Timer 1 is 16-bit, so at first I thought it seemed a little wasteful but, then again, what else am I using that timer for anyway? So, I rewrote the program to have an A timer poll at a very high frequency (not even using a prescaler, if I recall), and found a little script online to debounce the button. Essentially, it just involves checking if the button is pressed, waiting for 25ms, and seeing if it’s still pressed. It seems to make use of the fact that a human being physically will not be able to push and release a button in that short a timeframe, and waiting to process it will also skip over the bouncing inbetween.

That still left me with an unsolved problem: the original version of this had two options for the button: a short press was a pause, and a long press was a reset. Right now, I don’t have that implemented. It would take a greatly different approach to the problem, as I did that using Arduino’s millis() function, and I have nothing similar on this firmware. However, the way I figured it, I have an ISP interface on there anyway, so I can get to that later if that’s still so important to me. ISP is awesome!

Next up came the soldering. Now, my first designs were for a PCB, so that I could make it in a nice little package that looked cool. However, that would have involved having that made in China, waiting a few weeks, and then possibly finding out that the footprints weren’t good because I changed this or that. So, I just figured to cut some perfboard and use my newly-learned solder bridge skills to make it. It was a good thing I did too, because I found out that some things were absolutely wrong. The button I was using for pause/reset, for instance, had two pins spaced two spaces apart, though by PCB design had it as one space apart. Similarly, the buzzer was slightly different than the footprint. On top of that, the ISP pin header I’d chosen was bigger than the header pin on the PCB. So, if I had ordered the PCB, it would not have worked for me in all likelihood!

Below you can see some pictures of the finished product. You’ll notice some of the adjustments I had to make in the side-by-side of the prototype and the design. The final picture shows a working model of the Pomodoro Timer r2. I have to tell you: I am so damned proud of myself for this one. There’s things to improve, like always, but this has got to be the cleanest, most complex working product I’ve made to date. Most of all, I built this up from scratch and learned so much from doing it.

Figure 3: The topside of the finished prototype

Finally Learned to Make Solder Bridges

Yesterday, I tried my hand at soldering a new prototype HV programmer, with much success. After watching some YouTube videos on soldering, I had a strong theory on what may have been my problem in making solder bridges: I was using a rather wide tip at a high temperature, which resulted in spreading too much heat around. That’s why I kept running into issues where the surface tension kept working against me. I read a tip that lowering the iron’s heat to about 300C (some even suggested as low as 250C) would help a lot on making bridges. On top of that, I switched to my smallest tip to help reduce the heat transfer. Those two changes combined now allowed me to add some solder to existing connections without melting too much.

Figure 1: An intermediate soldering bridge

Above you can see the first tryout of making solder bridges. As you can see, some are better than others. The line on the left is quite sloppy, but still effective. I’m much more pleased with that triple row of solder bridges in the middle, for instance. Nevertheless, as I was soldering the set, I would use my multimeter to check the connection as soon as I had finished a line.

In the end, I was quite pleased with the final product. It doesn’t look as clean as I would like, but it looks neat, at least. It’s also a great first attempt at doing this properly. This is something I can build on, and I feel quite proud of myself.

Figure 4: The topside of the finished product.

The topside of the board looks quite neat, now that most of the connections are solder bridges on the underside. Apart from learning to make those solder bridges, I also improved on my method of laying jumper wires on top of the board. Partly thanks to my new wire stripper, and partly due to being a little less parsimonious, I ended up with exact straight wires. Before, I tried to cut them perfectly to size to start with. Now, rather, I strip more than I’ll need from one end, cut the insulation exactly to size, and then use a wire cutter to get the jumper. This way, I use a little more copper wire, but it’s also far easier to cut to exact size by just trimming the excess leads. There are only two things I’m less happy about: firstly, the resistor on the top-left is not flush with the board. While trying to solder it down, it slipped and I just couldn’t easily get it back down. Secondly, the LM7808 is slightly askew. It works fine, but it’s just a little sloppy.

Figure 5: A comparison of the first prototype to the second.

Clearly, when comparing the first to the second prototype, the second is much cleaner by far. For one, of course, it has fewer components, so it’s easier to look less cluttered. Secondly, though, just not having that mess of wires makes all the difference.

Now, the big downside is that I haven’t seen it confirmed to work yet. From what I can see, all the connections should have been correct. So, to troubleshoot, tomorrow I’ll first have to compare my schematic to the original version to see if I made a mistake there. Secondly, I’ll have to one-by-one check my connections to the schematic. After that, I’ll check the voltages and continuity on each connection with my multimeter to see what’s happening. If that doesn’t give me any answers, I’ll have to use my logic analyzer to see what’s happening when I press the button. (EDIT: while I previewed this post after drafting, I noticed what is the most likely issue. Pin 4 on the master IC is not connected to the ground bus – the long vertical line. Comparison the soldering job to the schematic shows this quite clearly).

However, even if it doesn’t end up working, I really am proud of the neatness of the solder job. I felt so much more comfortable doing that, and it was incredibly enjoyable to do now that it was working well. I’m sure that with more practice, I’ll get those lines looking neater and neater as time goes by.

Messed Up Soldering

I tried soldering together that perfboard prototype I mentioned the other day, though it did not go well. My main issue is that I still can’t properly make those nice, clean solder lines on the underside of a board. As a result, my entire plan backfired, and so I tried using multiple jumper wires on the topside of the board. Let me tell you, improvising while soldering rarely works out for me. Perhaps it’s easier to do when you’re far more experiences, but for me it results in a large mess, and right now the board does not work.

In all likelihood, I’ve made some soldering error as I tried retooling the schematic on the fly. Some other day I’ll try tracing all the wires to see which one(s) I forgot, or which ones aren’t connected properly. Far more relevant, though, in my consideration, is that I’ll need some solid practice into making nice solder lines. Either I’m struggling against the surface tension of the solder or I’m accidentally bridging gaps between adjacent pins (while I’m struggling against the surface tension). Yet when I see some videos on YouTube, some people seem to have no problem with it at all. I just don’t know what I’m doing wrong here yet, and I think I may juat start soldering some random wires just to practice this better. It seems to me that this is a major factor holding me back in doing better projects right now.

DSO138 Mini build

When it comes to standard equipment for the electronics hobby, everybody and their neighbors list an oscilloscope as a necessary tool to have. I’ve been on the fence about getting one, however. I can absolutely see it’d be useful for some tasks; however, I’ve never run into a situation where I particularly needed one yet. I’m sure that day will come but that nevertheless has held me back from actually buying one. That, and, of course, the hefty price tag for oscilloscopes: most oscilloscopes that are considered “beginner” or “hobbyist” still cost around 300 euro. Recently, I ran across the DSO138mini by JYE Tech that seemed like a perfect midway solution.

The DSO138mini has many people divided on the topic of its quality. If you search online for just that tag, you’ll find an equal number of people writing vehemtly on how it’s an absolutely waste of money as you’ll find people saying it’s a perfectly serviceable little toy for 30 euro. I figured to buy it as exactly that – thirty bucks worth of soldering practice that ends up with me having a handy little oscilloscope that does very basic things. That way, I figure I can also get experience using an oscilloscope for some tasks as well as learning what situations I could use an oscilloscope for. I figure that by the time I run across more situations where I’d need a real one, then that’ll be the time I invest in a solid beginner’s scope.

When I started assembling it, I figured I’d document the journey. Very quickly, though, I realized I’d gotten into the flow and had so much fun soldering that I’d forgotten to take pictures in the meantime! So, well, here’s a very incomplete set of photos of the construction:

When the build was complete, I ran into an issue testing it. As you can see in the last picture in the gallery, the result seems to be maxed out. What should be visible is the top of the signal about three squares away from the center (each square should represent 0.5V, and the signal is supposed to be around 2.5V). The other issue I ran into is that I’m supposed to be able to adjust trimmer capacitors to make the wave nice and square. Right now, you can see that the vertical lines go down in a slope, rather than straight down. However, no matter how I’ve been trying, I haven’t been able to adjust the trimmers easily. When I try to move them, my screwdriver slips and it seems as though I’m ruining the screw in the trimmer.

As I retested the resistors, I see it might be resistors R2 and R4: R2 should be 1.8M Ohm but it’s 1.5M Ohm; similarly, R4 should be 2M Ohm but it’s 1.8M Ohm. I’m totally guessing, but that might be the reason why the waveform is too high. As for the trimmer capacitors, I have no idea why they’re so hard to adjust. I’m probably going to post on Reddit as well to see if somebody has some advice.

Pomodoro Breadboard, Modified

As I discussed in my previous post about my pomodoro project, there were a few issues with the board as I’d soldered it. The first main issue was that the pomodoro LEDs weren’t lighting up. Well, as it turns out, there were two broken connections there. For one LED, the wire from the IC wasn’t connecting to the resistor, and for the other two, the wire to ground didn’t connect properly. A quick little resolder, and off we were.

The second main issue was that I hadn’t put in an ISP interface, because I’d messed up the first one, and didn’t have any easy pins available. However, as I considered later, what I did have was some tinned 0.6mm wire that is rather sturdy, so I figured to just solder those to the board. As you can see in the rightmost picture below, a sloppy soldering job later and the ISP is connected in green (along with a VCC and GND wire on there).

And, as you can see in the picture below, it’s up and running, now with a functioning ISP interface. That’ll be handy, because there is still that odd delay between pomodoros and pauses to sort. On top of that, I noticed that my code doesn’t actually use the third pomodoro. Normally, in a traditional pomodoro technique, you put a checkmark on some paper after each activity; once you reach four, then you take a bigger break. So, I’d set up the lights to have four “checkmarks” on. However, in my current code, it doesn’t put on the checkmark until you start the next pomodoro. That’s a sequence thing to fix as well.

The front side of a breadboard, showing the pomodoro timer with three LEDs lit up, and a prominent ISP cable at the top.
A shot of the pomodo timer in action, with the power coming via the ISP interface.

Fortunately, with the ISP interface in place, I can now quite easily reprogram the IC, and do a little bit of testing with each iteration of the program.

EDIT: well, that didn’t take long to fix at all. First of all, I programmed in my own little off-by-one problem. The reason that there was this extra minute between each state change was because I’d put it there: because I’d coded in an update to the LEDs only after an interval was elapsed, meant that the first minute was never displayed. My initial solution was to add an interval + 1 – that way, when the interval started, it started at the right number. Of course, when I was testing this, I was testing it at high speed, so I never noticed that the timing was so off. Now that I ran it at it’s proper minute interval speed, that little off-by-one second became an off-by-one minute. Fixed before you know it.

As for that binary 4 pomodoro LED that wasn’t being used? It actually is. Except I didn’t solder the right resistor to it . . . Instead of 220Ohm, there’s a 10kOhm resistor there. It’s on, it’s just very, very dim. Guess it’s time to replace that resistor!

Pomodoro Prototype Soldered

After the last failures of trying to bridige connections using a tinned wire, I spent some time browsing tutorials on soldering and point-to-point connections online. Most were not that useful, but I ended up finding one handy tutorial that showed a decent way to do wiring on the copper layer (sadly, it was hard to find and I didn’t save it, so I can’t retrace it right now). So, I went back to my perfboard and tried to solder again, resulting in the wiring you see below.

So, it’s not the cleanest of jobs, but it gets it done. Because I didn’t have any more connector pins of the right size, I couldn’t solder another ISP interface on the board; hence, there’s that odd gap in the components there. Secondly, you can notice a burn or two on the wires on the underside – I had to change soldering around a time or two, and wasn’t paying too close attention to my iron placement, resulting in a little melt right there. Lastly, in the topside picture, you may notice that the three small pomdoro lights aren’t lit up – tomorrow, I’ll have to track down the issue with my multimeter.

A last thing I noticed when testing it out is that there’s an odd bug: there’s a minute gap between every state change. So, once it runs through 25 minutes in one pomodoro, it waits a minute before it initiates the 5 minute pause. I’m sure that’s just a little bug in the software. Of course, when I was testing it, I tweaker the timer to count in seconds rather than minutes, to see all the state changes. Clearly, that also obscured the state-change bug, as it seemed a natural delay. However, now that it’s a minute long, it’s far more noticeable an error.

I’m quite pleased. Even though the soldering is sloppy, I learned so much doing it that I’m pretty sure I can do a much better job next time. Furthermore, it was quite relaxing to do all the soldering. And, lastly, I learned so much doing this, that I’m looking forward to my next project. I’m not too sure what it’ll be, but I’m sure I’ll come up with something soon enough.

Point-to-Point Pomodoro

Today I tried laying out the pomodoro timer on a small breadboard I had lying around.In the end, I could fit everything on the board, so that was good news. There are two major drawbacks to this, however: firstly, as you may notice, there’s no power laid out here yet; and, secondly, I’m going to have to solder this point-to-point.

Components of the pomodoro circuit on a breadboard
The initial layout for my pomodoro timer. At least, this seemed like a decent way to have everything on a breadboard I had lying around. It looks reasonably functional, though the downside will be that I’ll have to do a point-to-point soldering, as there’s too little room to properly place the wires on the board.

As far as power is concerned, I’m planning to use a 3.3V coin battery, which I was hoping to mount somewhere on the back. However, given how tight everything is mounted, that may not be an option. I’ll pretty much be using every little bit of real estate there. Firstly, of course, for the leads of the components, but as they’re all placed so close to each other, I’ll have to do point-to-point soldering, I’m assuming right now. That will also imply I won’t have a surface left to glue a coin battery mount to. I may have to resort to leaving that just trailing on a side.

Either way, I’m looking forward to soldering these components on soon, now that I have a basic layout going.