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?
Random thoughts about software, hardware and electronics. And other things too...
keskiviikko 1. heinäkuuta 2020
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.
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.
lauantai 18. huhtikuuta 2020
Finding extremely rarely occuring bugs
Sometimes I get reports of issues that I just don't seem to be able to replicate in my office. These can vary from mild inconveniences to fatal corruption issues. Either way, I still at least try to figure out what is going on. It is not uncommon that these happen just to very few people, and with very long time in between. And of course report usually has very few details to use as starting point.
Sometimes the issues may be of external origin - supply voltage fluctuations, EM fields and what not - but they can also be very subtle bugs too. Or in worst case combination of both, bug triggered by some outside influence. It's just that rarity makes them very, very difficult to track down.
Over time I've developed a process I often use to find these bugs in my embedded devices. Note that these steps require that you either can write custom software for the system and that the system allows you at least monitor it from outside (debug prints are sufficient), or have sufficient access to system via JTAG or other such means.
- First, figure out how you can determine the problem "from inside" - so either device software or JTAG debugger can detect the issue and react (for example stop) on it. This may involve adding data checksums, code flow tracing (such as "if current state is XYZ and previous was HGR, we have issue here") or other such means. If the problem is system crash, system like I described before might help.
- Problems usually don't happen when device is just idling, so you may also need to implement a way for the system to run itself in a loop to shake out the problem. This obviously is highly device- and problem-dependent process so not much can be said about that in your specific problem case.
- Sprinkle your code liberally with traces (like debug outs) to allow you to see what was and is going on when system runs. If you can take an educated guess on where to focus, all the better.
- Run system until you run onto the issue. Sometimes code from (2) may need refining if it isn't triggering the issue. Either way, this may take a few iterations of refining.
- Now the hard part. Based on prints from (3), see what was going on before the issue. If you happen to have really good hardware emulator that can show you the exact instruction history system ran - the code path - this might be a breeze. I don't have one (and I don't like using embedded debuggers anyway) so I use debug prints.
- Based on (3) and (5), refine your traces so that they tell you more what was going on. Add traces to promising locations, remove ones that don't appear helpful. Then repeat from (4).
- Eventually you should be able to lock onto the main issue and fix it.
Some time ago I finished locating one issue like this and it took me three days - mainly because I had very good start guess to work with so I was able to focus on most likely code first and make code of (2) do exactly right things on the first attempt. Often I am too busy to allocate this much time for this kind of issues, but guess this entire Covid-19 situation is kinda mixed blessing in this sense - without all the typical office work, working at home while also taking care of kids' homeschooling and all that leaves me just enough time to work with this kind of issues, especially since this is the exact type of process that doesn't suffer from being interrupted - system happily keeps trying to hang itself while I walk away from it.
lauantai 8. helmikuuta 2020
More time for thinking
Place I live in, Oulu, is somewhat far from the most populated areas of Finland, and therefore from most of the clients. Helsinki, the capital, or about 600 km away by car and about 6 hours by train. Either way is less than convenient. There is also flying, which actually works well for day trips but I'd rather lower my co2 figures than raise them.
Next major town, Jyväskylä (if going towards Helsinki) or about 350km or 4 hours away by car, and I find myself driving that road quite often. Some time ago I took my first longer road trip - 1300km total in two days - with my Kona Electric, and despite it being relatively cold (-5 to -20 C), there weren't any major issues with it. Granted, shortened battery range makes forced me to have some less than perfectly places stops on the way, and I was back home with just 30km range remaining (last charging point I used being just over 200km away), but still it is far less difficult than gasoline-enthusiasts claim. But all that is not what I'm trying to write about here now.
I've driven enough so that the highway driving is mostly happens on autopilot now (on light traffic and normal weather conditions, obviously more demanding conditions require more attention).
I've written before about giving your mind some time to work. I find that driving also gives my mind a break. Not as well as walking, I can't "zone out" completely since road obviously requires some attention all the time, but still the "background processing" I spoke about can take over. Unfortunately there's usually only so many things to ponder and road ends up being much, much longer than I'd need for such processing, but, well, you can't win all the time.
During this latest trip I was also thinking about self-driving cars. While this car has lane keeper assists and such, they are long, long way from system I'd consider trustworthy. Especially since snow covers lane markings so car doesn't really know of those any more. But assuming there were full self-driving capability so I wouldn't have to even pay attention. Would it be possible to let my mind relax well enough for that background processing to occur? I suspect not.
Does it make any difference, though, is another matter. Maybe it really doesn't.
Just thinking aloud here.
Tilaa:
Blogitekstit (Atom)







