I’ve just finished watching Maison Ikkoku [めぞん一刻] and I really love that anime. It’s not one of my all-time favourites like Full Metal Panic or Neon Genesis Evangelion but nevertheless is, by far, the best romance drama (some would say it’s a comedy, but I digress…) without magic, science fiction or anything outside of the ordinary that I’ve ever seen.

I can’t deny this show is long… veeeeery long… with 96 episodes is the longest anime series I’ve seen so far (Urusei Yatsura and Ranma ½ are both in the backlog of things to see, but maybe next year).
Extraordinary long by the today standard of 12 or 24 episodes per serie.

So.…I really love the plot, the characters’ development, I found the two main characters to be enjoyable and relatable (Kyoko-san is such a lovely character, ahhh…) and since I lived (when I was young at least) in an era before cell phones and pervasive wireless high-speed internet access… the era when you had to put coins in a public phone in order to communicate with someone while you where on the street or at a train station or somewhere far from home, I can perfectly relate to a story set in the ’80s because I know first hand how things were going at that time.

… and that’s the problem.

The problem is that this is a show I love, a show most of my friends around the same age as me would enjoy (if they enjoy the genre of course) but it’s a show that is and will continue to age bad.

Really bad.

It’s not science fiction: I can picture myself watching today Star Trek – The Next Generation (Gundam if talking about anime) because… well… it’s Star Trek (or Gundam).
It’s not a two-hour comedy movie you can enjoy on tv, something like Wilder’s Some like it hot or Kubrick’s Dr. Strangelove.
It’s not a war/action movie (a-la Die Hard or Terminator).

It’s a serie someone born in 2000/2005, a perfect age to relate to the main characters, will probably struggle to watch and even to understand.

And that’s sad, really sad, because it really is a masterpiece, maybe as some said, Rumiko Takahashi’s more mature and best work, but to really appreciate it, more than anything, you have to relate to the characters.

Something I feel will be difficult for the generations to come.



Just kidding of course, but I’m always puzzled by all the type of Intel’s stock coolers existing today.

Numbers doesn’t help much as they’re not used to code the type, features, etc. of the heatsinks.

So here they are…

(This is a continuos work-in-progress blog post: bear with it)

Unless otherwise specified, they’re all equipped with a 4 wire, 12Volt, PWM fan.

D34017-002: TBA

D34223-001: TBA

D60188-001: Your stock “Full-Height” LGA775 copper-core heatsink with a Delta fan (mine came with a Core 2 Duo E6600)

D95263-001: TBA

E18764-001: According to this Phoronix Review, this should be the stock “Low-Height” copper-core heatsink of the Core 2 Duo e8400.

E29477-002: Your stock “Full-Height” LGA1366 copper-core heatsink with a Foxconn fan (mine came with an i7-930)

E30206-001: TBA

E30307-001: Your stock “Low-Height” LGA775 copper core heatsink with a Foxconn fan (bought mine used… don’t know with which CPU was bundled)

E33681-001: TBA

E97379-003: have fun! This is a “Low-Height” LGA1150/1/5/6 all-aluminum heatsink with a Foxconn or Nidec fan
I have two of those: one came with an i3-6100, another with an i5-7500. Same number but slightly different heatsinks.



With the arrival from Hong Kong of the last adapter, I was finally able to finish my upgrade!

USB B panel mount connector

USB B panel mount connector

I enlarged the hole for the original cable and mounted there the panel connector. I can now use whatever USB cable (long or short) I like.

Joystick with USB B port mounted

Joystick with USB B port mounted

In the end, this was, after all, a ‘test project’. I’m not gonna use this joystick a lot because… well, I just bought a Thrustmaster Hotas Warthog, and it’s worth every cent I paid.

In conclusion, what I learned from this project?

  • When ordering more than one piece of electronic from eBay, especially from Hong Kong, it’s better to try everything when the items arrive, not just when one needs them.
  • Without both good gimbals and good springs there is not a good joystick. I did this upgrade because I’m attached to this joystick as it was my first “good” flight controller like 17 years ago and I didn’t want it to stay on the bottom of a box with other useless things. I don’t recommend anyone to buy this joystick with the purpose of upgrading it like I did. Maybe it’s better to buy an FCS Mark II or an X-fighter (better gimbals and better springs if what I read it’s true).
  • Cheap pots are cheap (Department of Redundancy Department here). What I mean is that I opted not to upgrade the pots with newer parts or hall sensors, partly because I’m lazy, partly because I think it was completely pointless (gimbals and springs). This means a lot of “garbage” on the analog inputs. Also, this means that the highest and lowest voltage levels change for various reasons (humidity, heat, planetary alignment…).
  • Flight Simulators are a niche product nowadays but the community is still alive and is doing fine. Cheap $5 Arduino’s clones are extremely versatile. They’re great, really great. Making the electronic parts for a flight controller (sensors excluded) has never been this cheap.
  • MMjoy2 is one hell of a software. It’s incredible, does everything, it’s free and open source (hosted on GitHub). I can’t be more grateful to the developer for making this fantastic work.

In the end,  my next project will be focused on the same upgrade to a Suncom F-15E Raptor joystick I bought used for €20. I’m also currently looking on eBay for old Thrustmaster TQSs (but the Hotas Cougar throttle it’s more appealing).

After all… it was fun. I’m not gonna use it very much, but I’m fine knowing I did this upgrade.



With two axis and one throttle the stick is suitable for a lot of activities (like flying a Cessna, with a set of rudder pedals), but not for military purposes. We need at least a trigger and a weapon release button (the trigger is used only for the gun, while the weapon release button, well release – or drop, or launch, or whatever – the selected weapon, except when the selected weapon is the gun) to use this joystick for combat sim.

Anyway, first things first: MMjoy2 allows two types of button’s connection.

  • Buttons connected via shift registers (any number up to 128 per device or a little less)
  • Buttons connected via button matrix (up to 100 via a 10×10 matrix but with some limitations because of the high number of I/O pins used)

If you want to connect a single button, you have to create a 1×1 matrix (silly concept, I know, but that’s the way it works). MMjoy2 guidelines states that over about 10 buttons, shift registers are the way to go. I agree, maybe not with 10, maybe over 16 I’d go with shift registers too.

Back to the Top Gun Platinum (by the way I’ve seen Top Gun – the movie – in a cinema recently for the 30 years anniversary! In – almost – 3D!), we have 4 buttons and a “China Hat” switch.
Let’s have a look to the “DASH 1” of the McDonnel-Douglas F-4E:

Stick functions from the T.O. 1F-4E-1

Stick functions from the TO 1F-4E-1

So we have the aforementioned trigger [TRG], weapon release button [WPR], an Air-Refueling Disconnect button [ARD] and a nose-wheel steering button [NWS]. Then we have the “China Hat” 4-way switch that is used for pitch and ailerons’ trim control.

In the Top Gun Platinum, as I already wrote in the first post of the serie, the hat switch was connected as an axis. I – more or less – destroyed the PCB under the switch to leave the four push buttons in the hat disconnected. Total numbers of buttons for the new configuration: eight.

After a quick glance at the MMjoy wiki to check how to connect the buttons in a matrix using as less cables as possible, I decided to go with a 2×4 matrix, 2 rows and 4 columns.

How to connect a button matrix to the MMJoy

How to connect a button matrix to the MMJoy

The diodes are used to prevent ghosting and masking. I found a rather interesting article about those two problems with really simple to understand images. You can read more here [link]. For the diodes, I found eight identical signal diodes. They worked and so I decided to use them. 1N4148s are good to go.

Here is the grip with the new connections:

Inside the grip


wp_20160921_07_21_45_pro Inside the grip

Once the buttons were connected to the Arduino, I started to setup the MMJoy settings for the buttons:

MMJoy setup utility

MMJoy setup utility

The really good thing about MMjoy is that any button in the matrix can be assigned to any button on the device. For instance, I like to assign [TRG] to button 1, [WPR] to button 2, etc. Also, any button can be assigned to the “Hat” up-left-down-right press.

In the end, under Windows, this is a screenshot of the device check screen under Windows 10 control panel:

Windows 10 Joystick Control Panel

Windows 10 Joystick Control Panel

This pretty much sums up almost everything I’ve done. Next and final step will be about the finishing touches (but I’m still waiting for a pair of cables to arrive from Hong Kong).

Bye



With the arrival of two “Pro Micro” Arduinos from an eBay seller in Hong Kong (fast shipping, just two weeks, but one, unfortunately, is not working), work has started on the Top Gun Platinum!
My choice was to use the MMJoy2 firmware that is a really nice software. With MMJoy2 a compatible Arduino is seen as a HID device, so no drivers are needed and compatibility is assured 100% with every software. It’s a really powerful software and I really like it. Links here: MMjoy wiki (en).

Pro Micro Board

Pro Micro Board

The first step (at least for me) was to re-wire the pots (potentiometers) for the two axis and the throttle. The older game port connection worked as an ohm-meter by measuring the resistance of the pots used as variable resistance. The ATMega32U4 integrated ADCs simply read a voltage value between 0 and 5 Volts, from pots, hall sensors, external sources. That means that the pots have to be connected between Ground and 5V (Power or USB +5V) with the cursor connected to one of the ADC pins.

How to connect inputs to the MMJoy2-programmed board

Connecting inputs to the MMJoy2-programmed board

I decided to use wires from a CAT-5 Ethernet Cable for both the axis’ pots and the throttle’s pot.

Axis' pots rewired with wires from CAT 5 cable

Axis’ pots rewired with wires from CAT 5 cable

The throttle's pot with the new wires

The throttle’s pot with the new wires

I also put some grease on the gimbals and on the throttle axis. I used some teflon grease that should last some years (I hope).

I then connected all the wires to a sort-of “shield” so I can easily swap the board, just in case…

Ghetto shield for axis connection

Ghetto shield for axis connection

Just to make a simple test, I decided to close the base, leaving the board outside.

Board hanging outside the joystick base

Board hanging outside the joystick base

And then a final picture before connecting the base to the PC to test the pots and their connections.

The base closed before a quick test

The base closed before a quick test

The quick test went fine. Next part will be about connecting the grip’s buttons and China HAT (POV) switch.

Bye



(Part 1 of X as, honestly, I have absolutely no idea of how many parts this series of articles will last, anyway).
Oct. 1, 2016 update: Part 1 of 4 😉

If you’re reading this you probably know which company Thrustmaster is, what’s its main business and what are their most known products. Probably you’re a simmer.

If you’re not a simmer, that means a person which is interested in simulation (usually flight simulation), then maybe you don’t know Thrustmaster. This is their website: Thrustmaster.com (US).

Some Thrustmaster products really made history and any good simmer knows them:

  • Pro Flight Control Stick
  • X-Fighter Joystick
  • Rudder Control System
  • Weapons Control System – a programmable throttle controller
  • F-16 TQS and FLCS – full size programmable replicas of the F-16C’s throttle and stick
  • F-22 PRO – a full size programmable replica of the YF-22 stick (almost exactly the same as an F-16C, F-22A’s stick is different)
  • HOTAS Cougar – a renewed F-16’s HOTAS replica controller
  • HOTAS Warthog – a replica of the A-10C’s HOTAS

Back on topic, around year 1998/1999 my father bought me a Thrustmaster Top Gun Platinum joystick. The original “Top Gun” (the joystick, not the movie) was an X-Fighter joystick with simpler gimbals and directly attached potentiometers (from now on pots for short). The Top Gun Platinum added a throttle to the base of the controller with an all-black colour style.

Thrustmaster Top Gun Platinum

The joystick we’re talking about

Top Gun and Paramount logos on the joystick

The joystick model with a big logo of Paramount

And now some (interesting?) technical details:

  • The stick is really similar to (but not exactly a replica of) a B-8 grip. The B-8 was a very widespread grip that was used on many US and NATO aircrafts, like the F-4 “Phantom II”, the A-10A “Thunderbolt II”, the Bell 206 “JetRanger III”, the Aermacchi MB-339 and many others.
  • The stick, as usual for that time was connected via game port.
  • It has 3 axis, four buttons and a four way “china hat” switch, usually used in simulators for changing the player’s Point of View (and therefore sometimes named HAT/POV) while in real airplanes is used for pitch and roll trim.
  • Thrustmaster used a “hack” for connecting the hat switch on this and many other joysticks before USB became the standard connection. Because game ports allowed to connect a total of 4 axis and 4 buttons, and the hat switch usually is implemented with 4 microswitches, there was a shortage of buttons that can be connected. Thrustmaster used an axis line and some resistors to send various resistance values to the game port. An “ad-hoc” driver inside the game or the operating system decoded the resistance values and used it as if 4 different buttons were pressed. The drawback is that only “up”, “down”, “left” or “right” directions were allowed (both mechanically and electrically) as it wasn’t possible to combine two commands simultaneously.

Now the project itself is about completely rewiring the joystick and converting it to USB using a cheap Arduino reprogrammed as a HID device.

Part 2 of X will follow when work will actually start.

Bye



I’m doing some experiments with OpenWrt (http://openwrt.org), in particular, I need to build a custom firmware for a cheap router (a TP-Link WR-841N).
OpenWrt is modular enough to install packages on an already installed image, but when your flash memory size is 4MiB, you want to strip everything unnecessary and add everything you need inside the SquashFS file system.

Building a custom image doesn’t require recompiling anything, there is an ImageBuider package that just create the complete firmware image with a custom build script.

The ImageBuider package has been designed to run on an x86_64 Linux distro.

So I installed Centos 7.0 on Hyper-V on Windows 8.1, everything was working out great except for the screen resolution, that was stuck at 1152×864 (X.org is smart) in the Display Settings in Gnome, and my notebook display is 1366×768.
I would be pretty satisfied at running Linux with a resolution of 1024×768, it’s not that I really need 1366×768 at the moment, but even if 1024×768 is a lower resolution compared to 1152×864, X.org doesn’t allow to select any of the lower VGA, SVGA or XGA resolution.

It’s not that the VM is unusable, but it’s very frustrating dealing with scrollbars even in full-screen mode. The funny part is that Linux already include the Hyper-V integration services since kernel 3.3 or 3.4 or something like that and RHEL 7.0 currently use 3.10 (a giant leap forward from the 2.6.32 kernel of RHEL 6.x), but there was no way X.org recognized the Hyper-V framebuffer.

With the xorg.conf file gone a long time ago, we are in the era of autoconfig, monitor hotplugging, etc.

Microsoft state that the best way of connecting to a VM running in Hyper-V is via RDP, this requires having a stable network connection between the host and the guest OSs and having a RDP service running in the guest OS: pretty easy on Windows, a bit more complicated on Linux where xrdp, an RDP server, works but it’s not an easy solution and always require a stable network connection.
If the Hyper-V server is in the DataCenter, this surely is the best solution, but on a notebook this is a bit an overkill.

Looking at the output of lsmod, the hyperv_fb module is already loaded, so there is no reason for it not to work.

After following various guides with all the sort of commands, like adding a modeline to xrandr (doesn’t work), adding video=1366×768:24 to the kernel boot arguments (doesn’t work), adding resolution=1366×768 always to the kernel boot arguments (needless to say…), I’ve finally found the first alf of the solution in a forum about SUSE.

TL;DR

Adding in GRUB2 the kernel boot argument:

video=hyperv_fb:1366x768

finally allowed me to use the VM in full screen @ 1366×768!

Bye


Fahrenheit 896

posted by Viking
Apr 13

Paper burns at 451° F (~233° C). Ray Bradbury decided to title one of his novels after this temperature.

Solder melt at 370° F (~188° C). No one titled a novel after this temperature, and the reason is pretty obvious: it isn’t always true.

The most common solder was, when I was small and Xmas trees were tall (Bee Gees anyone?), the alloy made of tin and lead.
More precicely, the alloy made 60% from tin and 40% from lead.
It was cheap, it was good, it was easy to use for the average electronic use, that is building a circuit from scratch or repair a factory-made device (they used more or less the same alloy).

Now we are tall, and Xmas trees are small (“First of May”, by The Bee Gees) and lead is nowhere to be seen anymore. Not in gasoline, nor in solder alloys used in factory-made devices.
The problem is that when a component (maybe a SMD) is soldered on the ground plane of the circuit board with a ROHS-compliant solder, not even 896° F (~480° C) are able to melt the d**n thing!

I will make d**n sure not to buy any ROHS-compliant solder for the following decades.

Bye



A fast update just to say that the adapter is fully working on the Raspberry Pi running NetBSD 6.99.
Connection parameters are 115200-8-N-1 with flow control OFF (ON by default on PuTTY).
The adapter should work also on Rev. 1 Raspberry Pi B models, but there is no P6 (soft reset) header on that revision.

As standalone serial interface, works flawlessly with my old D-Link DSL-G624T wireless modem router. Being a rather old device, it use a slower 38400 bps connection (38400-8-N-1), but, nevertheless, works pretty well.

At last, just to leave no doubts about the SP3232 IC, as mentioned in this article (http://www.fullmeta.it/?p=379):

Sì, sono proprio quelli

Bye



2012 was the year of the Raspberry Pi. This credit card sized computer has become a huge worldwide success.
Running GNU/Linux or other operating systems is an easy task, it just requires to flash an image on an SD Card, put it in the Raspberry and switch on the power supply.

The Raspberry Pi version B sports two USB 2.0 ports (only one on vers. A), a Fast-Ethernet connection (no network on vers. A), HDMI, Composite Video and stereo audio output.
It seems there’s nothing missing on the connection side. You can just plug a TV/monitor, a keyboard (and a mouse) and you’re ready to use the system.
You can also access it via SSH if you’re using Raspian or another OS that automatically enables the network connection and runs sshd or some telnet server at startup.
But, if you don’t have an available TV/monitor and you can’t connect to the Raspberry via network (because there is no DHCP server on your current network or there are no SSH/telnet servers running on the OS), your last chance is a serial console.

I’ll leave the basics to this simple and short article by Joonas Pihlajamaa: http://codeandlife.com/2012/07/01/raspberry-pi-serial-console-with-max3232cpe/
In a nutshell, the Raspberry Pi does have a serial port and a serial console is usually enabled by default by the OS on it, but there isn’t a standard UART/RS-232 connector. Two pins of the GPIO header must be connected to a level shifter like the Maxim MAX3232 in order to have a fully working RS-232 connection.

While the solution by Joonas Pihlajamaa works pretty well, I decided to make some changes:

  • I wanted an interface circuit with a standard DB-9 male connector. This way I can just change some settings, disable the serial console and use the circuit as a simple serial port for the Raspberry PI.
  • I wanted something like an Arduino’s shield, to just plug over and be ‘solid’ with the Raspberry.
  • I wanted the other GPIO pins to be available for other connections, like displays, I2C devices, RTC modules, etc.
  • I wanted the two pins of the soft-reset headers to be available for use even with the circuit plugged over.
  • I also wanted to use the circuit as a standalone RS-232/3.3V level converter to be able to connect to other embedded systems’ serial consoles (like the serial console found in many routers).
  • In the end, I came out with this solution, made with a MAX3232 compatible IC (the cheaper and more versatile SP3232ECP), some stackable headers, the usual five 100nF capacitors and a DB-9 male connector coming from a scrapped old motherboard.

    Serial Port Circuit mounted over a Raspberry Pi B rel. 2

    The P6 header “repeater” (as I call it) also serves to support the circuit on the side of the DB-9 connector.
    A four pin AUX header is also provided for standalone use, with 3.3V, GND, RX and TX connected.
    24 out of 26 GPIO pins are present on the circuit. Of course GPIO pins 8 and 10, TX and RX, are not available for other connections.

    Serial circuit P6 header detail
    Serial circuit AUX header detail

    I’m currently trying the adapter on the Raspberry and seems to be working well. On the PC I’m using an old Prolific USB-to-Serial adapter with a null-modem cable.

    Bye