Wednesday, January 4, 2017

Calibrating a Stanley Power Meter EM100

So I've got one of these Stanley EM100 power meters. It works fine, but it's got a completely inaccurate calibration.

I put it on my fridge and it was telling me that it only costs $17 per year. Either my fridge is awesome or something's quite wrong.


Hooking it up to a Kill a watt is pretty easy as it redirects the plug in the rear to a socket on the side of the EM100.

After a few days, it's pretty easy to find what the multiplier should be and factor that into the cost per kilowatt hour. The only thing is that the EM100 only goes up to 0.50 per kwh, so if electricity goes up much more I won't be able to do this. So instead of say .12 per kwh, I enter .46 per kwh to get correct cost readings.




I've actually got it hooked up to 2 different kill a watts, one of the older ones and a newer kill a watt EZ.

It's been hooked up for 825 days on the EM100 calculating a cost of $57.67 per year, I wonder how many days the EM100 can keep track of?


The kill a watt EZ has gone over 9999 hours and won't display anything timewise except a flashing 9999.

The Stanley EM100 is kind of neat in that it has a small battery so if the power goes out you don't lose your readings. The Kill a watt EZ has a battery back up as well, but the old kill a watt will reset itself in the case of an outage.


PT-D600 mystery screen

I wondered if the PT-D600 had an information mode, and held down the POWER and the preview (MAGNIFYING GLASS) button and got this:

The newer units don't have a CODE key so you can't do CODE+k.



I wonder if it's some kind of flash update mode.

Wednesday, December 28, 2016

P-touch info mode diagnostic

So I found a service manual for the PT-1900 and it says that it has a "diagnostic mode." With the unit powered off, hold code and k, then press the power, release the power, then release code and K you get into the INFO diagnostic mode, and the display will say "INFO MODE."

Note that it won't go into info mode unless the buffer is empty.


The page from the manual says:


Starting the Inspection Mode
First, press the “ON/OFF” key while pressing the “Code” and “R” keys, and release the “ON/OFF” key, then “Code” and “R” keys so that the RAM is cleared, and the machine performs normally. Then, when the power is OFF, press the “ON/OFF” key while pressing the “Code” and “K” keys and release the “ON/OFF” key, then the “Code” and “K” keys so that the machine goes into the inspection mode.


Once you are in "INFO MODE" and you type the number keys you get:




1 = Info mode (show the country settings and test the display)
2 = Cassette diagnostic (if you push the cassette identification pins with your finger, it will update in real-time)
3 = key (test the keyboard)
4 = cut (test the cutter)
5 = print 1
6 = print 2
7 = motor (runs the motor until you turn it off, best to take out the cassette first or you will waste your p-touch tape)
8 = AD (test the Analog/Digital conversion)

r = motor
m = print head
f = feed and cut

so hit ENTER and it will go into the various modes, when you've cycled through all the options for a given mode, it will go to the next mode.


I find the AD kind of interesting, as it will display the Voltage and Temperature sensors in real time:

VOLT TEMP
BA 8A


for the m=PRINT HEAD, if you then type y, it will cycle through Di,STR,CLK,LAT, w will go to OFF, then e will go to END, then 1 (one) turns the unit off. I have no idea what this means...perhaps it is to test the signals on the print head connector as there are signals on the connector that are named DI, STR, CLK and LAT.



My cool discovery of the day.







Na = Nation and it is a US model, H = Head Rank (I don't know what that means exactly), and Vo = Voltage (o for good, x for not good)



Cassette pins status







I'm using a Panasonic PQLV1 telephone adapter that only puts out 9V, but it seems to work. Probably why the Vo reads X instead of O.



Officially, the PT-1900 requires 9.5V.

I was able to get into the info mode on a PT-1750 and a PT-2300. The PT-1750 had some different options, one being a CG that would display the character roms.

Mastermind game

Years ago, I had a coleco digits handheld game. It played the game of mastermind, where it chooses a 4 digit number and you try to guess it. You press a button and it will tell you how many digits are in the solution and if they are in the correct place.

I thought it'd be fun to try and make a mastermind game using microsoft excel.


So you choose a number, put it in A1, then set up a function like this:

=findmatchwrongpos(TEXT($A$1),TEXT(C1)

and your function would look something like this where we mark a "match" with an asterisk so it won't be counted again.

Function findmatchwrongpos(a, b As String) As Integer
  For i = 1 To Len(a)
    If Mid(a, i, 1) = Mid(b, i, 1) Then
      correctposcount = correctposcount + 1
      Mid(a, i, 1) = "*"
      Mid(b, i, 1) = "*"
    End If
  Next i
  For i = 1 To Len(a)
    c = Mid(a, i, 1)
    If c <> "*" Then
        For j = 1 To Len(b)
          If Mid(b, j, 1) = c Then
            Mid(b, j, 1) = "*"
            Mid(a, i, 1) = "*"
            wrongposcount = wrongposcount + 1
            Exit For
           End If
        Next j
    End If
  Next i
  
  findmatchwrongpos = wrongposcount
End Function



And for debugging purposes, why not have a function that returns a variant type so you can see what's going on:


=findmatchitem(TEXT($A$1),TEXT(C1),1)

passing an item number so you can get different return items:



Function findmatchitem(a, b As String, item As Integer) As Variant

  For i = 1 To Len(a)
    If Mid(a, i, 1) = Mid(b, i, 1) Then
      correctposcount = correctposcount + 1
      Mid(a, i, 1) = "*"
      Mid(b, i, 1) = "*"
    End If
  Next i
  correcta = a
  correctb = b
  For i = 1 To Len(a)
    c = Mid(a, i, 1)
    If c <> "*" Then
        For j = 1 To Len(b)
          If Mid(b, j, 1) = c Then
            Mid(b, j, 1) = "*"
            Mid(a, i, 1) = "*"
            wrongposcount = wrongposcount + 1
            Exit For
           End If
        Next j
    End If
  Next i
  
  If item = 1 Then
    findmatchitem = correctposcount
  ElseIf item = 2 Then
    findmatchitem = wrongposcount
  ElseIf item = 3 Then
    findmatchitem = "CORRECT CHECK: " + correcta + "," + correctb
  ElseIf item = 4 Then
    findmatchitem = "WRONG CHECK: " + a + "," + b
  End If
End Function



Maybe after this, I'll dig out a copy of Interplay's Learn to Program Basic and write mastermind in it.

Monday, December 26, 2016

Ear blasting youtube on headphones

I like to watch youtube on my knoppix box and to use headphones. The problem is that so many videos have wildly different audio levels. Some videos are extremely quiet, while others are really loud. So what happens is that you turn the volume way up for the quiet video, then BAM! another video starts playing at an ear shattering level.

I don't really want to experience the full dynamic range of loudness on my headphones.

Windows has loudness equalization built-in, why not linux? Just a simple limiter will do.

Something like this, but for your computer audio:

http://gizmodo.com/245624/tv-volume-regulator-keeps-those-loud-commercials-on-an-even-keel

Sunday, December 18, 2016

Formula for number of dominoes

So I was trying to wrap my head around the formula for the number of dominoes.

It's (n+1)(n+2)/2.

For double 12 dominoes, that's 91. But how to derive it?

Let's look at the simple case of n=2 dominoes.

Plugging n=2 into the formula, we get (3)(4)/2 or 6 dominoes.



but there's tiles that stick out over the top of the triangle. There's (n+1) half tiles. Or (n+1)/2 area, to sum up all the half tile area.



and presto we get our formula:

((n+1)(n+1)/2) + ((n+1)/2)

and simplifying

(n^2+2n+1)/2 + (n+1)/2

to get

(n^2 + 3n + 2)/2

or

(n+1)(n+2)/2.


http://www.domino-games.com/faq/How-Many-Tiles-And-Dots-Are-In-A-Dominoes-Set.html

Math and dominoes...

Wednesday, December 14, 2016

Trs-80 whiz kids


I was going through some stuff today and came across a copy of the TRS-80 whiz kids comic book.

Kids today don't have the experience of growing up with the TRS-80 whiz kids. "Hey, it's a free comic book!"

Stories like "The computers that said no to drugs!" and "The computers that saved Metropolis!"

http://www.trs-80.org/trs-80-computer-whiz-kids/