OsziFox / ProbeScope in Xubuntu 14.04 LTS

2014-07-01_21-02-19_CH1On my system, it runs with wine and a USB to serial adapter and the FoxiOsz program (originally for WinXP), by Michael Butschkau, to be found here: http://www.mikrocontroller.net/topic/167705. Thanks and Kudos to Michael for this! The site offers 3 versions, just get the latest one (v1.1 at the time of writing).

You probably have to tell wine to use /dev/ttyUSB0 (or whichever number) as COM1 (or whichever number) and make sure that your humble userness has the right to access it: Make yourself member of the group “dialout” and add a symbolic link in ~/.wine/dosdevices:

ln -s /dev/ttyUSB0 com1 (or whatever)

If in doubt where your USB2Serial device might show up, you may check it with “ls /dev/ttyUSB*”.

 

 

 

Advertisements
Posted in Uncategorized | Leave a comment

Repairing an LED light bulb

One of my beloved power saving LED light “bulbs” suddenly stopped working, far before it had reached the end of it’s promised and assumed 50.000 hrs lifetime.

A good occasion to dissect the poor device and to try to repair it, or at least: trying to understand how it works!

The dissassebled "Lightbulb"

While the LEDs were accessible by removing some screws and could be verified to be ok with the diode testing function of a cheap DVM (they lit up slightly), it was a bit tricky to access the actual electronics (in the socket, the device that is converting mains AC to about 9.5 Volts of DC (measured) – the LEDs are in series). I finally was successful with a drill (see picture), making holes into the socket pins at 2 positions each: First, in order to sever the wires to the PCB to get it out and also to create new holes to enable the rewiring with new leads later.

The extracted power supply

The extracted power supply

Some basic tests (signs of burn, fuses, rectifier, diodes) did not reveal any faults. Interestingly, when connecting the opened device to AC (actually, to perform some in situ checks), and after I started worrying about obtaining an MJE13003 in a TO-251 case (TO-220 is too big, TO-126 might not fit, too) or an AP3706 for a reasonable price), the light simply worked as nothing had happeed. Seems, the problem was a bad “mechanical” connection of one of the wires at the socket. Added some new wires to connect to the socket and reassembled the whole thing.

Now I am enjoying my resurrected light bulb and am happy about having saved some money and prevented  premature electronic waste.  Although in terms of economics, it was not “reasonable”, the whole project took me several hours. But it’s one of the things you can do to lift up your spirits while you’re waiting for your work permit being processed :).

View on the AP3706

View on the AP3706

Some background: The whole circuit is constructed around an AP3706 controller (3rd picture), a driver for switching power supplies. For a prinicipal schematic, see the application note e.g. here: http://www.diodes.com/_files/products_appnote_pdfs/power/sw_reg/AN1028.pdf. Not many things that actually can break down: A 1A fuse, the AP3706, a MJE 13003 NPN power  transistor and 2 diodes. In any case, it might be worth not to discard such a device, just because it has stopped emitting light.

For soldering on the LED plate and on the sockets, you’ll need a high power soldering gun (mine has 1kW) or something similar. A standard 50W soldering iron won’t work, due to the high heat capacity of the aluminium (cooling) plate that holds the LEDs and of the socket contacts. However, to fix the new leads at the green PCB, a standard iron is the better choice.

Although it won’t make much sense to buy replacement electronic parts as you’ll spend almost as much as a new light bulb will cost you, it should make sense to keep “burnt” ones and use theirs parts as spares.

Posted in Uncategorized | 1 Comment

Adapting a 230V/50Hz Washing Machine to 110V/60 Hz

Moving around in the world like a snail with it its house, we brought our beloved washing machine (because it’s in best working order, can heat up to 95degC and doesn’t use as much water as the Asian style top-loaders without heater) from Europe to Asia. First, we had 230V/50Hz, so it was no problem, as the supply was like at home (that’s why we put it into the container), but after our next move to 110V/60Hz, we were facing serious problems: The water removal system was not working anymore, it simply didn’t drain the water from the machine as desired. Opening the sump valve and releasing the lye on the floor of our ‘working balcony’ and controlling the machine manually? Nope. Too tedious, too inefficient and wasting resources, too.

First a note, as you probably already are wondering how we can operate a 230V machine in a 110V grid? That’s no real problem, as usually, there are 2 phases with a differential voltage of 220V (or so) which are actually designated to drive the outdoor unit of the AirCon. We asked an electrician to attach a separate outlet to that line on the balcony (and on that occasion, also attach the emergency supply outlets which are in the kitchen, living room and the bedroom to the same system. Thus we may use our 230V appliances there, too). So there might be still/just a problem with the 60Hz in some cases.

A first, quick, workaround was changing the tubing for the wastewater: lowering the air-removal system (and disconnecting the foam duct -> causing a lot of luan78zao, so it wouldn’t work well indoors) to about 1/3 of it’s initial height, so the pump had much less load to drive, and was doing the job. You already may guess the reason: The power of the lye pump was too low at 60Hz. That’s because of some basic electrics/physics: In short, the power delivered by a motor that has been designed for 50Hz, when operated at 60Hz is (50/60)², thus approximately 60%. For some lucky reasons, this problem doesn’t significantly affect the main motor that is driving the drum at various speeds (probably, as its speed is controlled by some electronics and converting the mains to DC somewhere in that process).

There were 2 solutions available: 1) obtaining a pump designated for the South Korean market (240V/60Hz, about 250USD) or 2) making up my mind and compensate for the power loss at the lye pump! We chose the latter. To this end, I obtained a custom made transformer to adapt the voltage for the pump motor from 230 to 280 Volts (6/5*230). The data of the transformer are: 30W (according to the power consumption of the pump, taken from its label) 900 windings primary, 1100 windings secondary. Costs: less than 100USD. I inserted it into the supply lines of the lye pump and fixed it with several cable straps in a place where the spinning drum can’t reach. That’s it. Works already for at least 10 washloads. Celebrate!

Posted in Uncategorized | 1 Comment

Repairing my Solis Crema SL90 Espresso Machine

From one day to the other, the machine was not heating anymore. There was power, some LEDs were on as usual, and if I remember correctly, the pump started operating, when the steam valve was opened.

Some quick checks (any cheap DVM will do):

  • the heater was ok (conductive between A and B)
  • the thermofuse (T) was ok (conductive between A and C)
  • the thermoswitch (D) was on (conductive between the two leads)
  • the NTC-thermosensor (N) had a resistance of about 110 kOhms (measured unplugged at D)
  • There was no mains voltage between A and B after power-on (as it should be).

These findings suggested that the critical parts of the machine were ok and that the problem was somewhere on the green PCB at the right. It turned out by a visual check that one of the contacts where the relay R had been soldered to the board had gone bad (see the 2nd picture, red arrow), there was no connection between the pin and the pad. This was easily repaired with some solder and a hot iron. No need to get a new PCB (if it is still available at all) or even to discard the machine as broken and not serviceable.

BildBild

Posted in Uncategorized | Tagged , | 6 Comments

How to save videos from ARTE +7 on your computer to watch them offline

[Edit (20141105)]: The old stuff below probably does not work anymore (at least, it’s pretty tedious to follow these weird instructions). ARTE has changed their web site makeup. What to do? -> Search for “ARTE greasemonkey” wih your favorite Google, then you should find a very convenient solution that is running within your browser. Case you are living in Linux, iOS or Windows, Mediathekview might be even a better friend. Enjoy & have fun!


[old stuff starts here]

If your internet connection is too slow to watch the videos on ARTE +7 in a decent resolution, you might want to download them and watch them offline. Unfortunately, the common video downloaders that work for e.g. facebook and youtube do not work here. But there is a workaround, that’s probably why you are here: The trick of course is to retrieve the URL that points to the actual video fiel. Actually, this is very easy and all you need are a simple a text editor that writes plain text files and a browser. I have used Notepad and Firefox for this. Finding out how took me less time than writing this tutorial.

Here it goes:

On the ARTE +7 website, click in the Video image to produce an overlay showing code for embedding the video into another webpage.  You will get something like:

<script type="text/javascript" src="http://www.arte.tv/playerv2/embed.php?json_url=h ttp://org-www.arte.tv/papi/tvguide/videos/stream/player/D/044129-000_PLUS7-D/ALL/ALL.json&lang=de_DE&config=arte_tvguide"></script>

Mark the URL that follows “json_url” (highlighted in blue above), paste it into the address bar of a new window of your browser and load it: A long line of code will show up.

There, search for the tag “StreamURL” and copy the URL that follows. In our case, it’s

h ttp://www.arte.tv/papi/tvguide/videos/stream/D/044129-000_PLUS7-D/ALL/ALL.json

Paste it in a new browser window and open it. A very long line of code will show (not shown here).

There, search for an URL containing “2200” (or another figure, representing your data rate of desire, most likely 800 or 1500 are the options), starting with “http” and ending with “.mp4”. In front of it, you’ll find the tag “VUR”. Highlight and copy the URL, in this example it is

h ttp://artestras.vo.llnwxd.net/o35/nogeo/HBBTV/044129-000-A_SQ_1_VOA_00568569_MP4-2200_AMM-HBBTV.mp4

Paste it into a new plain text file and create a HTML tag around it as follows:

<A HREF=h ttp://artestras.vo.llnwxd.net/o35/nogeo/HBBTV/044129-000-A_SQ_1_VOA_00568569_MP4-2200_AMM-HBBTV.mp4>link</A>

Save the file with the ending .html (or rename it) and load it with your browser. Point your mouse on the link and save the target on your computer. Wait a while, depending on your actual download speed. The files may be quite huge, up to 1GBytes per hour of video. If you should need a video player to view the .mp4 file, you might consider VLC. That’s it, have fun!

Edit: Meh! Sometimes the wheel gets invented twice: Have a look here, at Florian’s page, he wrote a script that extracts the links for you automatically. There you will get download links for all resolutions just by copy/pasting the URL of the ARTE webpage in question. Have more fun!

Posted in Computers | 14 Comments

Installing the CodeLite IDE and the boost c++ Libraries

At least for the demo at here, and Windows 7, this worked for me. The solution for boost is pretty straightforward and as one would expect:

  • Downloaded and installed the CodeLite IDE including MinGW and wxWidgets from here.
  • Downloaded the boost libraries from here. Extracted them into the root directory as c:\boost_1_53_0\
  • Told CodeLite where to find boost: In Settings > Build_Settings > gnu_g++ > Advanced, added the boost directory to the include path.

To test it, I created a new workspace, started a new project (a simple g++ executable), pasted the mentioned example code into main.cpp and compiled it. Works.

Edit: Installing CodeLite on Windows 7 is not as simple at it seems (and not related to boost): When I tried to build the minimal code patterns for wxWidgets code, in ran into serious problems: On 3 different machines (2x professional and 1x home premium), only one of the professional installations generated a working executable, while on the other two, I got various error messages about invalid directories or segmentation faults in the executable, while a fourth installation on OpenSuse Linux 12.3 worked fine. The culprits probably are ‘invalid’ characters in some directory paths [like ‘()’ and spaces]. Uninstalling CodeLite from the default location at 'c:\Program File (x86)' and re-installing it in c:\CodeLite\ solved the problem [1].

References:

[1] http://forums.codelite.org/viewtopic.php?f=3&t=2077 (retrieved 2013-05-08)

Posted in Computers, Programming | Leave a comment

Serial Communication

The MEGA has a male 25pin serial connector. To connect it to a PC, you will need a cable with a 25pin female and a (most probably) 9pin female connector. TxD and RxD need to be crossed.

The cable of unknown configuration that had come with the machine somehow got lost in one of my relocation (to the fine country) boxes, so I had to make a new one. I made it from a shielded standard serial extension cable by exchanging the male 25pin connector to a female and crossing TxD and RxD (pins 2 and 3), when the control program did not recognize the MEGA. This information is not in the manual I have, it just mentions a 9 to 25 pin both sides female RS32C-V.24 cable.

My cable has these connections:

  Signal | 25pin - 9pin  | Signal
---------+---------------+--------------------------
   RxD   |   2 ----- 2   |  TxD  Transmitted Data
   TxD   |   3 ----- 3   |  RxD  Received Data
   RTS   |   4 ----- 7   |  RTS  Request to send
   CTS   |   5 ----- 8   |  CTS  Clear to send
   DSR   |   6 ----- 6   |  DSR  Data set ready
   GND   |   7 ----- 5   |  GND  Ground
   CDT   |   8 ----- 1   |  CDT  Carrier detect
   DTR   |  20 ----- 4   |  DTR  Data terminal ready
   RIN   |  22 ----- 9   |  RIN  Ring

For details about RS232 (serial) communication, refer e.g. to Wikipedia.

The communication parameters most probably are 9600 baud, 8N1, no flow control: After running a random move diagnostic test, I quit the CP and opened COM1 with RealTerm. Set to 57600 baud 8N1, it reported some characters and communication errors, so I decreased the baudrate (57600 baud is unusually high for a machine developed in the 90s) and no errors were displayed at 9600 baud.

Posted in MEGA: Techincal Issues | 1 Comment