Random thoughts about software, hardware and electronics. And other things too...
perjantai 12. heinäkuuta 2019
USB type C
When I was designing newest board layout, around two years ago, I briefly thought about using USB C-type connector in it. Device itself doesn't use any new USB-C related features, but new connector at least would get rid of "which way up" problem of microB.
After some reading and pondering, I found few schematics showing how to wire USB C to backwards compatibility mode, but even these were somewhat complex and with some gotchas that might have needed changed if I were to run onto them. So I abandoned the idea and used plain old micro B connector instead.
Just now we're hearing that Raspberry Pi 4 boards have problems due to new C-type connector, as they have wired CC pins incorrectly which makes board to not work with some (more expensive) cables due to power negotiating failure.
Eben Upton, co-founder of Raspberry, says; "A smart charger with an e-marked cable will incorrectly identify the Raspberry Pi 4 as an audio adapter accessory and refuse to provide power."
That made me smile - just a bit. Note subtle blame-shifting there? No, it's not charger does identifies Pi4 incorrectly; it's Pi4 that identifies itself as audio accessory by shorting those two pins, and charger quite correctly reacts to this by not providing power to it.
Either way, I think I'll stay away from type C for a bit longer, even if the connector itself is quite nice. There's just a few too many traps there yet.
maanantai 8. heinäkuuta 2019
Meat substitutes
Note; this post was written almost immediately after mentioned IPO and has been sitting in my queue for a while now; I haven't tracked how the stock has performed since.
'Beyond Burger' went public some time ago. If I could easily invest in it, I might actually have throw few grand that way during IPO. Unfortunately I'm a bit (read: very) lazy and couldn't be bothered in finding out how to invest directly across the pond, so I guess I will go for other investment options nearer to me.
There is also another reason why I might just skip this company.
If you haven't heard of this company I don't blame you. They are primarily developing a fully plant-based hamburger "meat", which, if it were to replace real beef, would reduce carbon dioxide output a lot. As far as I know (again: lazy, this time in research front) they are aiming for full replacement. Look, taste, texture and so on. And then other similar replacements too, I think.
At this point I have to stop to ponder this goal. Why go that way?
In western world we have really one-sided view on diets, and these days meat in some form is included in almost every meal. If you look for even vegetarian (not even mentioning vegan) option, you very likely will get something bland, tasteless and possibly even gross to eat. There are exceptions, and situation definitely is getting better, but for the most part this still is too true. If (when) this is your experience on vegetarian options, beef replacement sounds pretty damn good.
On the other hand, people in India on the other hand make absolutely wonderful vegetarian and fully vegan foods. Unfortunately my skill isn't there to replicate them well enough so that is a bit difficult route. If you have tried (and liked, like I do) these, there might not be need for beef replacement.
Back to burgers. I might be an exception, but I don't particularly even like usual beef burgers. To me they're ... bland. Common burger is almost tasteless, to the point that you need to drench them in condiments before it can be eaten (before you protest, have you eaten and liked a burger without ketchup/mustard/mayo?)
Again, I might be exception, but most of the time however I don't really even want a "meat substitute" anyway - especially for a burger - but to replace that protein with something else. Often this implies beans, peas and/or lentils.
Some time ago I found a chickpea-feta recipe that is great replacement for burger patties. It does not taste the same as beef but like I said, I've never been really a fan of beef burger anyway. So this recipe was great, and better yet, tastes good even as-is - although I replaced feta with different type of cheese as others in family are not exactly fond of (strong taste of) feta.
In general I've followed this same path when reducing meat usage. Most of the time simply replacing meat with something and expecting it to taste same is nothing but route to major disappointment. It's almost always better to alter recipe more to suit taste of chosen meat replacement than to expect it to be good with just the replacement. I realize that this is not easy and requires some experimentation and ability to figure out spices or other changes you need to make recipe work. Then again, good things rarely are easy, and cooking isn't an innate gift - it's something everyone can learn. I've practiced for two decades now and still rate myself a passable cook at best.
And this is the reason why I am a bit skeptical with meat replacements. They won't taste the same anyway, so why really bother, when it's usually easier - and cheaper - to adapt the dish itself to suit new ingredients. Last I heard, mentioned beyond burgers aren't exactly cheap.
All that being said, there is one dish I still make with meat as I haven't found even closely suitable replacement for meat in it: chili. But since I make it about once a month or so, for now I allow myself to indulge in it. It's still better to make good effort on the other days and allow that once in a while than to fail there and fall directly back to old habits.
tiistai 2. heinäkuuta 2019
USB scanner
Ages ago I got a Canon FB630U USB scanner. I'm not exactly sure when, exactly, this was, but I'd guess this was around turn of the millennium. It's hasn't been up to current standards for a long time now, but it is still functional. At least I think it is, haven't used it over 10 years now, and it has been just sitting in storage.
So, what's inside?
For once, it's (kinda) easy to see; it's all visible by simply opening the lid!
At right is the control board (okay, hidden underneath that metal), on left scanner head and guide/drive system and... Well, there's nothing else, really.
Scanner head moves across the scan area, guided by metal bar (on left) and moved with chain pulley system driven by a small stepper motor. Here drive mechanism is upside down, usually it's hidden underneath scanner head assembly. Motor was already taken out in this picture as it could prove useful yet.
I am no mechanical designer but the drive system seems pretty robust, with minimal change of slippage or other such failures.
The scan head itself is single row, with light bar and dot scanner built in single, tightly integrated unit.On left here is light source (two leds, it seems; on mechanics assembly there is light bar to distribute light evenly), and on bottom first few scanner units can barely be seen. On top of that was focusing array, essentially large number of short (approx 5mm) light tubes, there to improve pixel resolution.
I don't have equipment for taking pictures with large magnification so this, unfortunately, will have to do. I am not familiar on how exactly this works, but it would appear to be some kind of serially-driven array, as there is only 7 signals (light not included) going to main PCB. Based on PCB it is some kind of three-color CCD row array.
From date codes on PCB I'd expect this to be designed in 1999, and very likely I got this early 2000 or 2001.
Botton left is USB connector, then power filtering and regulation (done with classic 34063 buck converter). Components that are underneath scanning head need to be very low, so capacitor have been angled to 90 degrees, placed in slots on board.
GLUSB97SC08 appears to be USB to IEEE 1284 (parallel printer) converter. If I remember correctly, this scanner was also available as parallel printer port version, so they took that designed and shoved USB converter in there. This was around the time when Windows 2000 and then XP took away applications' ability to access printer port directly so USB was a bit of forced update there.
On top is IS51C1024, SRAM memory chip, and below it LM9830VJD, a built-for-purpose flatbed scanner controller with illumination, motor control and CCD reading all included in single package. I almost feel betrayed here as I was expecting more discrete approach, but guess even then these were already built to bring the price down.
All in all, this is neatly done design, but in case of Canon, I wouldn't expect anything else.
keskiviikko 26. kesäkuuta 2019
Inside another DVR
Our older top-set box/DVR unit was replaced actually long time ago now and this old unit has been sitting on my desk for a while now. Although I expected it to be as boring insides as previous one I opened, I decided to see what's inside it too.
And surprise surprise, it is as boring as I expected.
On top are rear connectors, from left to right power (black one), ethernet/USB, scart, HDMI, audio out, SPDIF and TV antenna in/out.
Under the heat sink is processor. I didn't feel like taking heat sink out; underneath there's very likely another MediaTek all-in-one media processor. And supporting chips around the board.
Curiously board has been divided to squared in silk screen print; from this view it's bit difficult to see but it's there, labeled A-D on vertical and 1-6 on horizontal. At least A and B can be seen at the right edge of the board. My guess is that this is for rework for (machine) visual inspection; "component 6042 missing at B2" or some such. Not something you see often.
Power button, led, front USB and IR reception are on smaller daughter board at the bottom, sitting above main board in a slight angle. I just wonder why they decided to use two cables to connect it to main board, instead of just one a bit wider flex, as other cable adds a bit to BOM price.
But on that daughter board is the most interesting part of this device; CC2533, which is Zigbee RF one-chip remove control solution. Not used, unfortunately, the remote that came with this is usual IR based one.
And nothing much more. Ah well, to trash - well, recycling - this goes.
sunnuntai 23. kesäkuuta 2019
Sold my bike
Herein you will find nothing but some personal nostalgia.
I got my motorbike driving license early 2000s, and since then I've always had a bike. First Suzuki gs500, but it was a bit light for longer two-person trips so I upgraded to Kawasaki ZR-7s in 2005 (2003 model). That bike was great. Simple, nimble and generally fun to drive. And it also looked nice. I've had it ever since.
During few last 5 years or so I really haven't had time to drive it though. I managed to drive only handful of times, for some 200km per year total, which, considering insurances and everything makes it pretty expensive fun. But fun nevertheless. When not riding I look at it and though how useless that bike was and how I should get rid of it. And when riding, I again remembered how much I like to ride, how much fun it is, pushing that uselessness feeling back. I wanted to keep it.
And now I sold it. I wasn't planning to, but I put it in internet sales forum - mostly as an experiment really - and eventually one guy came and bought it straight away.
When he drove away with it, I took a deep breath and swallowed the feeling of loss. I've always had a motorbike (for certain definitions of "always")
Now I suddenly don't have one. And I'm not planning to get one, either; I really can't justify the expense with the extremely low mileage I've put in it lately.
It's weird feeling. Hollow, like a part of me is missing.
Norway, 2006. Side bag removed as camera was in there.
At the moment I'm moving on to electrified traffic; I've got a full EV and a PHEV cars. If (when) I get a bike, it will be electric too. It may take a few years. But I've got a feeling I will get a new one. Sooner or later. They just are too fun.
At the moment there really isn't many electric bikes available (for practical and safety reasons moped class vehicles limited to 45km/h are out), so that might be later.
I'll wait.
perjantai 14. kesäkuuta 2019
Work to die.
Tech sector has been for ages had an obsession for long work days, at least from 80s when personal computing started to take off - it was passion for the tech. Love the job you do and you'll never work a day in your life, right? And that has been a thing ever since. Love the work and work long hours. But it's not just that, not anymore. Passion argument has been taken over and now everyone should - must - have it. And everyone must work long days. Not too long ago Jack Ma praised his underlings' for working very hard, with so called 996 schedule - 12 hours a day (9 to 9), 6 days a week - but bringing on some hard criticism towards the practice.
Long time ago I found out that even typical 8 hours a day for 5 days a week isn't fully productive on creative side of things, and I do believe this applies to repetitive work (like assembly and other such production) as well. On a good day I can do maybe six hours (minus breaks) of creative work, after which my mind seriously needs some recharging time. Sometimes productive time is even less. After that all that happens is just sitting there, staring the screen without getting anything worthwhile done. Fortunately I at least can just get out and go home, instead of being forced to waste both my and company time by pretending to actually do something.
Really, anyone who has done this kind of work who is also not lying to themselves (and others) knows this perfectly well, yet for some reason so many are still willing to "work" insane hours for oftentimes no rewards at all (no overtime pay). These days corporate doesn't even reward this - people are just replaceable cogs in machine that are to be thrown out when they inevitable burn out and break. Only thing this does is to make long work hours without pay a norm and thus not playing the long work hour game becomes a punishable offense. And a new, fresh (and cheaper) cog is brought in to replace that now worthless (to them) cog.
Fortunately I don't have to play that game. In Europe (generally speaking) situation is much, much better so not paying overtime is much harder for corporations to get away with (yet it still happens), and since I own my own business, I can set my own work hours. And I do.
I still do occasionally work for longer days too, of course, but only rarely and then it is to get one single critical thing done, and in general I have set myself a strict 8-16 schedule in office, and work is left in the office at the end of the day, allowing me to relax properly before the next day. Without this I very quickly find myself in highly strung, anxious and even angry state, with blood pressure being through the roof.
Even if I do directly benefit from the work I do over time, it still isn't reason to kill myself by overworking myself right now. Especially when I know I would not be productive working long hours anyway.
And you really should admit this to yourself too. Playing stupid games gets only stupid rewards, and risking ones health for essentially no benefit is one of the stupidest rewards I can think of.
torstai 6. kesäkuuta 2019
What we leave behind
Warning: Although I have tried to avoid preaching tones here, some may be involved.
There is absolutely no doubt that humanity is the reason for massive carbon dioxide increase over last hundred years or so. There also is absolutely no doubt that if this process keeps going, co2 levels will keep going up fast, and the end results will be ugly. It has also come in to light that these issues were already well known by oil and coal companies in 80s; the internal memos from that period that have leaked have climate change predictions that closely match the scientific predictions of today.
Something needs to be done.
Sometimes other issues we successfully managed are brought up as counterexamples to make this issue sound less severe. Ozone layer? We took action and solved it. Acid rains? Likewise.
Issues mentioned above were "fast". They appeared relatively quickly and when corrective actions were taken, situation was observed to improve (relatively) quickly and within decades, they are effectively gone. And worse, mostly forgotten.
Co2 is different as huge amounts of it are needed to have an effect, and equally huge amounts of it have to be removed from circulation again to undo said effects. Currently we're releasing around 36 gigatonnes - that is 36 billion tonnes - of co2 per year, a figure so huge that you really can't even grasp it - and even with that amount the change from year to year is nearly inobservable. Compound that over tens of years and the total amount grows even more incomprehensibly large, but compounding effects start to be visible for all.
Only now we're starting to feel its effects, but still in relatively insignificant way. Few more floods here, some unseasonal cat 5 storms there, drought elsewhere... All still almost normal, although now there's a bit more of them, a bit more often than before. Outside normal, but just barely.
If we stopped all co2 emissions right now, the effects of all co2 emissions so far would still accumulate over next decades, if not centuries, and disasters mentioned above will still get even worse for a while until nature finds new balance.
A paraphrased quote from Sahara (by Clive Cussler) somehow has branded itself in my memory:
We do absolutely have to react now. And fortunately many people are waking up, but there is huge amount of resistance to change. I know, and I can't fully blame most of those who are resisting as the things we need to, have to do are - and will be - painful and difficult.
And now we enter the next issue. Many people are effectively saying "why should I do anything, as those people are emitting more co2 than us?" Or even worse "why should I have to do anything, I will be dead by then!" Especially the selfishness of the latter towards their own children and grandchildren is absolutely disgusting.
But all those are exactly wrong questions or arguments. The correct question is "why should I be able to do nothing to fix the situation?" Everyone must start to do what they can.
There is also "we will adapt so this is no problem" argument. This is a more dangerous, as it sounds plausible and might even be true in the long run, but problem here is that this is the same "I will be dead by then" argument, just veiled better in good sounding argument. "Our children will clean up the mess we've made." Of course they will deal with it somehow, as they have been left with no other option. 36 billion tons of co2 a year. While it is possible that someone makes absolutely wonderful new invention that can remove massive amounts of co2 from air with low enough energy usage to make it actually feasible, it's irresponsible to count on that. And while nothing is done, the world will drown in wars and unrest caused by mass migrations caused by increasingly worse floods, droughts, famines and other catastrophes caused by slow and gradual climate change.
That is not the future I want my children and grandchildren to live through.
Drive less. Fly less. Eat less meat, and instead of beef, have pork or chicken more often. Buy less stuff and use older things longer.
Note that at no point I am saying to stop doing these things, as that will be difficult or even impossibly for many. Just do less of them. And while at it, start requiring for industries to do their part too. Voting with your wallet is always an option there. Single individual's effect is small, but it is still there. With enough individuals change will happen.
Also, do support replacing all coal and as much as oil/gas (or fossil fuels in general) energy production with nuclear. While renewables, especially wind and solar are great, they're horribly intermittent (no sun at night) or variable (wind can drop from 100% to 5% over few hours), so without sufficiently massive energy storage options (and again, numbers involved are so massive that you can't even comprehend them) they are quite simple useless. We do not have time to wait that technology to mature, we need action now.
Nuclear has bad reputation, but even if you count two worst accidents there have been, Chernobyl and Fukushima, we're still talking about thousands of deaths. If we let climate change progress much further, thousands of deaths are something we can only dream of. That death toll will be measured in millions if we let the situation escalate.
Currently nuclear is slow and expensive to build, but if we could, say, standardize for example two to four standard designs, all fully and thoroughly inspected and reviewed, with power output of, say, 100-500MW per plant, it suddenly would get much easier and quicker to build nuclear power plants (with obvious requirement of very strict periodic inspections of every factor of operations of every single plant). This would be exactly what we need to get rid of carbon power with accelerated schedule.
Changing individual habits is always hard, so start easy. About two years ago I decided to reduce the amount of meat I eat, primarily for health reasons but climate was a (smalller) factor in that decision too. I started easy, replace a meal once in a while with plant-based one. It was difficult at first, but got easier, and not long ago now I suddenly realized that we hadn't eaten any meat for several weeks and I hadn't even noticed. Difficult things start that way but they also get easier as time passes.
Every gram of co2 not released counts towards better future, and many people doing small things have significant effect in the long run.
"World grows better when men plant trees in whose shade they know they shall never sit."
Maybe ancient proverb, maybe not. Does not matter; either way, it is still very true. Especially now. Also, do plant non-proverbial trees. More than one. It will also help.
There is absolutely no doubt that humanity is the reason for massive carbon dioxide increase over last hundred years or so. There also is absolutely no doubt that if this process keeps going, co2 levels will keep going up fast, and the end results will be ugly. It has also come in to light that these issues were already well known by oil and coal companies in 80s; the internal memos from that period that have leaked have climate change predictions that closely match the scientific predictions of today.
Something needs to be done.
Sometimes other issues we successfully managed are brought up as counterexamples to make this issue sound less severe. Ozone layer? We took action and solved it. Acid rains? Likewise.
Issues mentioned above were "fast". They appeared relatively quickly and when corrective actions were taken, situation was observed to improve (relatively) quickly and within decades, they are effectively gone. And worse, mostly forgotten.
Co2 is different as huge amounts of it are needed to have an effect, and equally huge amounts of it have to be removed from circulation again to undo said effects. Currently we're releasing around 36 gigatonnes - that is 36 billion tonnes - of co2 per year, a figure so huge that you really can't even grasp it - and even with that amount the change from year to year is nearly inobservable. Compound that over tens of years and the total amount grows even more incomprehensibly large, but compounding effects start to be visible for all.
Only now we're starting to feel its effects, but still in relatively insignificant way. Few more floods here, some unseasonal cat 5 storms there, drought elsewhere... All still almost normal, although now there's a bit more of them, a bit more often than before. Outside normal, but just barely.
If we stopped all co2 emissions right now, the effects of all co2 emissions so far would still accumulate over next decades, if not centuries, and disasters mentioned above will still get even worse for a while until nature finds new balance.
A paraphrased quote from Sahara (by Clive Cussler) somehow has branded itself in my memory:
"Let's say that this algae growth doubles in size every week. Let's also say that it will take a year - 52 weeks - until it has filled every ocean and killed everything in them.This of course is gross simplification of the idea, but the general trend is still there, and not just among the governments - all humans share this behavior, more or less. We tend to not take action until issue gets really bad. I know I am guilty of this too. Climate change so far isn't even close of being bad enough to make us react. But the problem is that if we wait until it gets bad, we don't have even that "week" to fix the situation (quotes because I'm speaking proverbially here, referring to that quote above). By that point we are "months" past the one year marker.
"Governments will not take action until seas are already half full. How much time it leaves for us?
"One. Week."
We do absolutely have to react now. And fortunately many people are waking up, but there is huge amount of resistance to change. I know, and I can't fully blame most of those who are resisting as the things we need to, have to do are - and will be - painful and difficult.
And now we enter the next issue. Many people are effectively saying "why should I do anything, as those people are emitting more co2 than us?" Or even worse "why should I have to do anything, I will be dead by then!" Especially the selfishness of the latter towards their own children and grandchildren is absolutely disgusting.
But all those are exactly wrong questions or arguments. The correct question is "why should I be able to do nothing to fix the situation?" Everyone must start to do what they can.
There is also "we will adapt so this is no problem" argument. This is a more dangerous, as it sounds plausible and might even be true in the long run, but problem here is that this is the same "I will be dead by then" argument, just veiled better in good sounding argument. "Our children will clean up the mess we've made." Of course they will deal with it somehow, as they have been left with no other option. 36 billion tons of co2 a year. While it is possible that someone makes absolutely wonderful new invention that can remove massive amounts of co2 from air with low enough energy usage to make it actually feasible, it's irresponsible to count on that. And while nothing is done, the world will drown in wars and unrest caused by mass migrations caused by increasingly worse floods, droughts, famines and other catastrophes caused by slow and gradual climate change.
That is not the future I want my children and grandchildren to live through.
Drive less. Fly less. Eat less meat, and instead of beef, have pork or chicken more often. Buy less stuff and use older things longer.
Note that at no point I am saying to stop doing these things, as that will be difficult or even impossibly for many. Just do less of them. And while at it, start requiring for industries to do their part too. Voting with your wallet is always an option there. Single individual's effect is small, but it is still there. With enough individuals change will happen.
Also, do support replacing all coal and as much as oil/gas (or fossil fuels in general) energy production with nuclear. While renewables, especially wind and solar are great, they're horribly intermittent (no sun at night) or variable (wind can drop from 100% to 5% over few hours), so without sufficiently massive energy storage options (and again, numbers involved are so massive that you can't even comprehend them) they are quite simple useless. We do not have time to wait that technology to mature, we need action now.
Nuclear has bad reputation, but even if you count two worst accidents there have been, Chernobyl and Fukushima, we're still talking about thousands of deaths. If we let climate change progress much further, thousands of deaths are something we can only dream of. That death toll will be measured in millions if we let the situation escalate.
Currently nuclear is slow and expensive to build, but if we could, say, standardize for example two to four standard designs, all fully and thoroughly inspected and reviewed, with power output of, say, 100-500MW per plant, it suddenly would get much easier and quicker to build nuclear power plants (with obvious requirement of very strict periodic inspections of every factor of operations of every single plant). This would be exactly what we need to get rid of carbon power with accelerated schedule.
Changing individual habits is always hard, so start easy. About two years ago I decided to reduce the amount of meat I eat, primarily for health reasons but climate was a (smalller) factor in that decision too. I started easy, replace a meal once in a while with plant-based one. It was difficult at first, but got easier, and not long ago now I suddenly realized that we hadn't eaten any meat for several weeks and I hadn't even noticed. Difficult things start that way but they also get easier as time passes.
Every gram of co2 not released counts towards better future, and many people doing small things have significant effect in the long run.
"World grows better when men plant trees in whose shade they know they shall never sit."
Maybe ancient proverb, maybe not. Does not matter; either way, it is still very true. Especially now. Also, do plant non-proverbial trees. More than one. It will also help.
Tilaa:
Blogitekstit (Atom)





