keskiviikko 30. syyskuuta 2020

Crimp connectors


Crimped connectors are nice for production, but for hobbyist or even prototyping a real pain in the behind. While crimps and crimp housings are cheap, the tools to actually crimp them usual may cost several hundreds of euros easily. 

In this case I wanted to test a module which used Molex Micro-Fit type crimp, which I of course had not used before so I didn't have tools for it. Since I needed to make exactly one cable (to test that the cable drawing is correct before pushing it to production who have proper tools ready), I didn't feel like paying 150€ for tool I was going to need for just one connector.

Fortunately it is possible to "manually" crimp these by using suitable pliers. Place wire so that exposed part of wire is on inner contacts and insulation on outer and bend one side after other so that exposed wire is wrapped inside, and after that, bend outer contacts over insulation. Make sure that crimp contacts are properly wrapped around wire; if they point outwards, crimp will likely not fit in housing.


Here brown is ground that is in two places in connector, which is reason for ugly split there. And, again, this is one-off, for-quick-test-only cable so I didn't give a hoot about quality, only thing I was interested was whether designed connections are correct so that production can built it in volume without need of (expensive and annoying) rework afterwards.

You may want to also solder the wire to crimp too, to make sure that wire has proper contact. Only use just enough solder to make sure wire is soldered as a large solder glob will also prevent crimp insertion to housing. (above picture is taken before soldering)

A crimp made this way is way inferior to properly made crimp in just about every way, including but not limited to current handling capacity, mechanical reliability, aesthetics, and environmental reliability, so keep that in mind. 

This quick crimp job was nevertheless sufficient for me to test cabling (and yes, make corrections to drawing), and hopefully it will be useful for you too.




keskiviikko 19. elokuuta 2020

Testing new design

Whenever I design a new circuit, I order set of prototype boards (those 10 boards for 10 bucks or so services are really useful) and hand-assemble the first one testing it as I go. This means that I usually start from "outside" - power converters and thus are first parts so I can test them without risk of blowing up PITA-to-solder MCU due to bad output voltage, then proceeding inwards adding components. This is when I am building full board and not just testing specific parts of it separately, like building just MCU and parts it requires to see that JTAG works and MCU runs.

This is the main reason I don't use BGA packages - I don't have suitable tools to solder them, so I would have to order manufactured boards which can cost easily thousand or so for even small batch.

I just recently made a small new board which works as "glue" part for larger interoperating system, containing just power converter and needed connections to both directions. So as usual I built it up and tested it quickly. First attempt is success - I get correct output voltage from device so I am happy. But then it was time to go home for the day.

On morning I arrive and fire up my BK Precision 8540 electric load. As a side note, this kind of load is incredibly useful if you even semi-routinely design power supply parts. No more fiddling with resistors or lamps as load, I can actually properly test the damn thing so very easily on various voltages and loads!

For this design I used a buck converter chip I haven't used before as I needed more output current as usual, meaning this is "all new design" (well, as new as basic buck converter can be) so I start easy. 50 milliamp load? Ok. 100mA? Still ok. Up to 300mA ... and regulation just falls completely apart. And this is design that is supposed to handle up to 2A loads. Fsck.

I start probing the circuit, trying to figure out what is wrong. Bad inductor? It was quite small one, just 1.5uH, which I though to be too small for rated current, so switch 10uH one in. Issue continues. Diode? Feedback? All good. Damn it.

Finally - after hour or so - I remember to the check power supply. Which is set to 13v, but limited to just 100mA or so. Just like I always do on first try - if I expect new board to consume specific amount of current, I set the first try limit to just above that to make sure nothing blows up if there is for example short somewhere. I happily managed to forget this limit over night.

Now up goes the current limit and what do you know, now the boards works just fine up to 2.5 amps output current, well past rated maximum output (I upped inductor to 3.3uH from original, though, as tests told me that it gives better overall efficiency than originally calculated one. Might try 4.7uH if I had one to test it with.)  

That is, until converter chip gets to 130+ degrees C and starts cutting power output. This was not unexpected either, since this chip has thermal pad on bottom which is PITA to solder (read: it very likely isn't soldered at all) so thermals aren't as good as they would be on properly manufactured board. Unfortunately that isn't something I can check until I get first batch of said properly manufactured boards, so that will be the next step.



keskiviikko 1. heinäkuuta 2020

Different kinds of holiday travelers

Travel-related stuff follows.

Some ten years ago I was on a package tour in Sri Lanka, in a hotel that catered primarily for all inclusive tourists. We were there mostly because at the time the selection available via our local travel agency was severely limited, I might have otherwise chosen somewhat different hotel.

This was two-week trip. As usual, we went out just about every day to see what's around us, and for lunch and dinner at some nearby restaurant - breakfast we had in hotel. We did also book some local tour trips, especially one single-day animal-sighting tour to jungles at the center of the island. And damn, those leeches there were something else! But I digress there..

After a week, halfway through the trip we had group trip to southern part of island. What was exactly visited is not important, but part of that trip was lunch at local restaurant there. A couple next to us though that food was too hot - to me it was kinda bland, and guide confirmed this, they had especially made extra mild portions for our group. I don't blame this couple, not everyone likes their food hot, but I started discussing with them of other things, and found out that they had not left the hotel - not even once! - during that entire week. They were just there enjoying their all inclusive catering.

For me this is absolutely baffling. I could not imagine staying in a hotel for week or two, as for me sightseeing - on our own, that is - and eating out is essential part of the travel. And part of the latter is to just walk around, looking for a nice restaurant where to eat this time. Preferably different each time.

This is how we have always traveled. Before kids, and even with small kids. They follow along, in stroller when small, and we bring their food (if they can't eat "normal" food) with us. After growing a bit they follow on foot. We have never had any problems there. Yes, kids are too tired sometimes and I have to carry them back to hotel, but that's just normal.

Some other people I know on the other hand prefer all inclusive traveling with kids. Hotel absolutely must be 'all inclusive' kind and they rarely, if ever, go restaurant outside hotel to eat or do anything else either. "Too difficult" they say, but as far as I know, they have never even tried. But that's okay, it's not my problem. It's just weird to me, to me these people are missing half of the travel experience!

Of course there are not two exclusive types. Some like to rent a room/condo/apartment and even cook themselves. And that's perfectly okay too. To each their own.

I am a bit bothered though because these days it seems that at some locations you can't even get anything but all inclusive-type places (when going through agency, wife isn't too excited with idea of doing arrangements ourselves.) This itself isn't an issue, but often these are located far away from towns, locations where there is nothing but other all inclusive places nearby. So nothing to go to. I once accidentally booked a trip at such a hotel once, so we had to get all inclusive at the location, which was a bit of a bummer.

What kind of traveler are you?


keskiviikko 24. kesäkuuta 2020

ATV Electronic conversion: Final part (part 2)


Previously in the story, I had finished winter-long update of cheap Chinese kids' ATV whose 2-stroke engine gave up way too soon to electric one, and then kid overloaded and burned out electric motor in less than 20 minutes of driving.

So I ordered a few more parts. I got new motor, 300 watt one now (previous 350 watts) to lessen load to battery a bit, and larger (104-tooth IIRC) rear sprocket to replace previous one, to bring gearing down even further (and to reduce load to motor, also upping drive torque a bit).

Sprocket was more challenging to change, as compatible sprockets with three-point attachment at radius I needed wasn't available in larger sizes. In the end, I just driller holes to old sprocket (original one, for different chain) and bolted that together with new one. This moved chain line a bit, but adding a spacer to motor sprocket fixed this.

Replacing motor was also simple, take old out, new in. This time I however added a thermal fuse in between motor and controller and zip-tied it against motor housing. Thermal fuses are handy as they permanently blow out when temperature rises too high, protecting the motor from overheating. Of course I used handily available Abiko connectors for that so it can be easily changed (also, soldering thermal fuse to a wire is very, very difficult; heat from soldering iron will blow it very easily!).

And now we're rolling again. Thermal fuse blew relatively soon (30 min or so), but that's okay; I used fairly conservative (low) temperature value at first. And it's easy to change so I think we're good to go now.

Now, for next iteration (if I were to make one, I'm not planning to anytime soon!) I'd look for more powerful engine; 500w 48v or something like that, and try to work out gearing so that top speed would be about the same (20 km/h). This would hopefully make the load on engine lower, allowing driving in more difficult terrain.

I did dream about converting a motorbike, something old 250-500cc bike like Suzuki GS500 to electric, but based on my calculations I'd need about 10kW of power to have nice "city-bike" with top speed of around 100km/h. I'd be okay with that power figure, but such motors, along with suitable battery packs for it, are just impossible to get here, so guess I'll be buying a ready-made bike sometime in the future - when they start bringing those here, that is.

tiistai 2. kesäkuuta 2020

Vacation that won't be


I've said this before, but American (as in US of A) work culture never ceased to puzzle me. Culture appears to worship working, with expense of everything else. So many people work long hours, take no vacation and come in work when sick. I get that often it's about fear of losing the work for not being "busy enough", but really, such attitude is self-defeating.

It's well known that humans can't just work and work without losing efficiency. Working long hours seems productive, but with absolutely no exception, at some point the productivity will fall of sharply. If you don't have sufficient time to rest, productivity will plummet. Eventually you are only occupying a seat while producing even less than theoretical someone that work for four hours a day, four days a week schedule.


And then there is vacation. Some even seem to take a pride of never taking one - or they just fear being left behind. Like the work hours, this will backfire eventually. We aren't robots, we're not wired for working so much. A good vacation - week minimum, preferably two, without any work - will reset your brain and make you much, much more productive afterwards.


I have a small business, and because of it I can very rarely be fully away from work for longer time. I have unofficial personal policy of never bringing laptop with me when on vacation to force myself to keep away from work. I still have phone with me to answer calls, and email on phone, but I purposefully use very minimalistic email client to make using it as painful as possible to keep myself away from it, aside for things that just need to be addressed immediately.


It also helps that I have somehow managed to train my mind to drop trivial phone calls from my mind immediately. A customer may call to ask for something, I answer, and just minutes after the call wife can ask who was it and about what. And I have no recollection of that call. It was not something that I need to remember so I don't.

This makes vacations to work very well for resting. I usually bring a tablet (no email or work there, just games), loads of books and just relax. Swim, read, eat, drink, sleep. It works miracles.



All this is came painfully obvious to me just now, as first time in 15 or so years we aren't taking a vacation at Mediterranean or elsewhere further away. Partly because of Covid, partly for other reasons, but either way we aren't going. That appears to bother me way more than it should, and I came to realize that I always look forward of that week or two of just being away, relaxing. It just seems so impossible to do "back at home".

All the photos here are taken by me during our travels (from top: Söll, Austria; Dubrovnic, Croatia; Rethymnon, Crete/Greece; Angkor Wat, Siem Reap, Cambodia) . At least I can browse them and dream of relaxing vacations on upcoming years... (and yes, I also do very painfully realize the environmental costs involved...)




tiistai 26. toukokuuta 2020

TV repair


We've had Samsung LE37M86BC LCD full-HD TV for more than 10 years now, and it has served us surprisingly well. If things had gone as originally planned, it would be obsolete already as DVB-T transmissions were supposed to be replaced with DVB-T2 (which this TV doesn't support) few months ago now, but there was some serious disagreements between companies doing the signal transmissions and that was postponed - so far indefinitely.

At the moment this was already serving as secondary TV, as we got a new one as our primary TV, but since this is still used, I was not happy when it lost TV signal and started rebooting itself every 30 seconds or so just recently. HDMI still worked - except for 10 seconds every 30 or so when it was rebooting. Not exactly fun to watch.

Due to its age the first assumption obviously was capacitors so I brought it to work and opened it up. This thing is built to be surprisingly maintainable, which was nice.


There are two main PCBs there (lower middle and right here), and two more under metal sheets (left and upper middle). Latter ones are very likely both LCD and backlight drivers so nothing too interesting there.

Date codes of components put manufacturing date to late 2007 or early 2008, we I'd guess age of this TV would be some 12 years, with quite active use. Pretty good, considering how badly electronics typically seems to age these days.


Immediately I noticed this capacitor that was obviously goner, at upper right corner of the power supply board. This was to be replaced.

Note on thermal management here. This TV is passively cooled, with cold air coming in from bottom, passing above there boards and coming out from top. Whoever designed this power board did otherwise nice job with layout but this specific capacitor is right next to heat sink and airflow is effectively blocked with those two large inductors. Note that other caps are near heat sink too, but at least they have some air flow going, and they weren't showing bad aging so far (even when measuring voltages)

So I replaced this one (1000u 35v 105 degrees C) with one I happened to have handy (reserved for some other repair, I think, I don't keep this type of caps typically handy). Unfortunately this wasn't enough to fix the TV.

Time to focus on main PCB. Since none of those caps showed obvious signs of pending rupture (unfortunately common with SMD caps, it seems), I went with next plan - measure the voltages. With one hand very strictly behind my back - the powered-up power board is uncomfortably near to main board I was trying to probe.

Nothing immediately obvious showed up, but one capacitor was kinda suspicious - its voltage read at 1.3 volts. It might be okay, but my hunch said it wasn't - that seemed to be way too low for typical electronics. But I also noticed few capacitors underneath that large metal shield next to card slot that might be bad too.

That shield needed to come out.  Unfortunately it was soldered in. Fortunately the solder was very, very easy to pull out. Way too easily for it to be unleaded solder, in my opinion. Slightly suspicious... But hey, don't look in the mouth of gift horse; the shield might have as well had been a real PITA to pull off!

The metal shield apparently functions as combined heat sink and EMI shielding, as main application processor and (I guess) display processor were underneath, as well as two more large capacitors. Voltages of these were okay but showed some ripple, so I chose to replace them too (due to their location underneath the shield - likely very hot location), along with the one I found suspicious before. They are marked red in picture below, and shield location is highlighted with blue here.


If that shield was easy to take off, these things were completely the opposite. Even with two soldering irons set to 370 C they stubbornly refused to come off easily. Hot air wasn't an option due to nearby other components - those would come off first and I absolutely, positively didn't want that. Eventually they gave and I managed to lift them off without damaging copper underneath.

Solder in new caps (all were 1000u 10v, a type which I do keep handy) and TV is working again. The two under the shield still show same ripple, but at least they're fresh now. And voltage of last one - the one that read 1.3v or so before - rose to more correct sounding 1.8v. I think that was the main culprit here.

All together this took me some hour or two of active work and several more waiting (while doing other things) to see what TV does after changes. I'd say this was well worth the effort - with this the TV will likely serve us for several more years, and by then the DVB-T2 situation might be clarified so we can re-evaluate whether this thing is past its prime or still able to serve as media display still.


keskiviikko 13. toukokuuta 2020

ATV electric conversion: final part (or not)

This project has been on hold for a while, mainly due to me being incredibly busy with other things. But finally I found time to put this together and test it. But not without one final modification which I a bit dreaded from get go.

The rear sprocket I originally had had 54 teeth, and combined with motor's 11 teeth this gives relatively low down gearing. I feared that this might cause issues getting the ATV moving as motor might not be able to generate enough torque to get moving.

It certainly wasn't powerful enough to move me, even on perfectly flat terrain, but with kid's weight this wasn't too bad an issue (as we tested outside) but I wasn't too happy with it either. This ratio also gave me theoretical maximum speed of 30 km/h, which I deemed a bit too fast for comfort, even if it could not realistically be reached in real world.

So I ordered new chain and rear sprocket, this time with 68 teeth. This dropped max speed to 20-ish km/h (according to my notes, it's been a while since doing the calculations) and gave nice boost to zero-speed torque. It isn't exactly powerhouse still but it should move nicely in slightly uneven terrain too.

Time for test drive!


Well, it worked. For a while. Then, as battery was getting near-empty, kid tried to drive on upward slope on wet-ish mud, overloading the engine and eventually burning it out. So my fears about gear ratio were completely justified, but mitigation with larger rear sprocket was not enough.

Back to the drawing board.