Archive for the ‘Electronics’ Category

Sima SPV-1 Capacitor Replacement

October 31, 2011 Leave a comment

I’ve used a Sima SPV-1 140 Watt Power Inverter in my car for years and only recently had a failure when plugging it in to my car’s 12V outlet. The purpose of this post is to show that it’s easy (and cheap) to fix. I picked out a capacitor with the same ratings, 1000μF, 16V (a little taller, but it fits the package and costs $0.67/ea) and soldered the replacement part in place of the original Nicon capacitor.

10 screws, including two hidden beneath the product label, hold the case together.

Safety valve ruptured on capacitor

Replacement capacitor, Panasonic EEU-FM1C102

Desoldered capacitor location: Note marked positive and negative markings on circuit board silkscreen

Soldering replacement capacitor

Capacitor has been replaced


Categories: Electronics

Identify Busy Wi-Fi Channels in Windows 7

June 15, 2010 1 comment

When several wireless networks and other wireless devices operate at the same frequency, there can be a significant amount of noise and crosstalk that result in lost packets and network disconnections. To identify channels with larger numbers of networks and higher signal strengths, there are several programs available to display this information in a graphical interface such as:

  1. Vistumbler
  2. WirelessNetView
  3. inSSIDer

It is also noteworthy that the wireless channel bandwidths overlap, since channels are 5 MHz apart and the bandwidth of each channel is 22 MHz. To avoid overlap, channels 1, 6, and 11 are used most often.

802.11 b/g Wi-Fi Channel Bandwidth Overlap

Often times it is desirable to perform this task quickly without installing new software. The wireless channel and signal strength of nearby wireless networks can be displayed in Windows 7 or Vista by entering the following command in the command line:

netsh wlan show networks mode=bssid

This results in the following command line output:

Interface Name : Wireless WUSB600N
There are 5 networks currently visible.

SSID 1 : 2mix
Network type            : Infrastructure
Authentication          : WPA-Personal
Encryption              : CCMP
BSSID 1                 : 00:22:6b:73:aa:5a
Signal             : 100%
Radio Type         : 802.11g
Channel            : 1
Basic Rates (Mbps) : 1 2 5.5 11
Other Rates (Mbps) : 6 9 12 18 24 36 48 54

SSID 2 : BELL078
  Network type            : Infrastructure
  Authentication          : Open
  Encryption              : WEP
  BSSID 1                 : 00:26:50:34:1e:51
       Signal             : 36%
       Radio Type         : 802.11g
       Channel            : 1
       Basic Rates (Mbps) : 1 2 5.5 11
       Other Rates (Mbps) : 6 9 12 18 24 36 48 54

SSID 3 : linksys
    Network type            : Infrastructure
    Authentication          : Open
    Encryption              : None
    BSSID 1                 : 00:18:f8:ef:93:af
Signal             : 32%
Radio Type         : 802.11g
Channel            : 6
Basic Rates (Mbps) : 1 2 5.5 11
Other Rates (Mbps) : 6 9 12 18 24 36 48 54

SSID 4 : Killa
    Network type            : Infrastructure
    Authentication          : WPA2-Personal
    Encryption              : CCMP
    BSSID 1                 : 00:1c:df:39:81:f6
Signal             : 16%
Radio Type         : 802.11g
Channel            : 11
Basic Rates (Mbps) : 1 2 5.5 11
Other Rates (Mbps) : 6 9 12 18 24 36 48 54

SSID 5 : 5mix
    Network type            : Infrastructure
    Authentication          : WPA2-Personal
    Encryption              : CCMP
    BSSID 1                 : 00:22:6b:73:aa:5b
Signal             : 100%
Radio Type         : 802.11a
Channel            : 149
Basic Rates (Mbps) : 6 12 24
Other Rates (Mbps) : 9 18 36 48 54

Open Source Router Firmware

If you are able to use open source firmware on your router, it is also helpful to use the Tomato firmware to perform a wireles survey. The device web page gives a detailed report like the one below:

Tomato Wireless Survey

Tomato Wireless Survey


Categories: Electronics, PC Software

Real-time USB in Matlab (2 of 2)

December 24, 2008 1 comment

Posting history:

Real-time USB in Matlab (1 of 2)

Real-time USB in Matlab (2 of 2)
Last month I had started a project using a TI MSP430 to communicate over USB with MATLAB and Simulink, and today I finished the real-time display of room temperature in Simulink.

Here is the end result. It’s a simple display and scope at the top level, but I used a roundabout method to choose data from the stream of USB data.

The completed files for displaying temperature from the USB MSP430RF2500 can be downloaded here:

Real-time USB in Matlab (1 of 2)

November 8, 2008 3 comments

The TI MSP430 wireless development tool (eZ430-RF2500), pictured on the right, can communicate with a PC using a virtual serial port over USB and also use wireless ZigBee communication to communicate with other low power modules.
The development kit comes with a demo program to show how both the wireless and serial communication can be used. The eZ430-RF2500 Sensor Monitor Demo displays the temperature, voltage, and signal strength (~distance) of all nearby modules.
Today I’m interested in establishing real-time communication between the USB-adapted device and a PC using MATLAB Simulink.
Virtual serial port communication with MATLAB
* Note: When the MSP430 drivers are properly installed, the device is listed in the Device Manager  under Ports (COM & LPT) as MSP430 Application UART (COM11).
The following MATLAB *.m file code is used to read the transmitted serial signals from the MSP430 device:
s = serial(‘COM11’);
set(s,’BaudRate’,300000,’DataBits’,8,’Parity’,’none’,’InputBufferSize’, 128);

s.ByteOrder = ‘bigEndian’;
data = fread(s);
values(:,1) = data;

clear s

This is the output of the MATLAB script, which corresponds to the signals sent by the MSP430 device.
Node:HUB0,Temp: 79.1F,Battery:3.6V,Strength:000%,RE:no  
This method allows real-time communication with the device by simply looping this code to display signals as they are received.
Applying this concept to Simulink
The same results can be achieved by using MATLAB Simulink if the INSTRUMENT CONTROL TOOLBOX is available.
The Simulink model uses only the “Query Instrument” block from the “Instrument Control Toolbox.”
The only trick to using the virtual COM port at COM11 is that the block’s drop down menus only allow serial COM ports COM1 through COM4. The workaround is to define the variable ‘s’ used in the *.m file version of the communication above, which points to COM11. This is done by running two lines of code when the model starts in the following way:
1.  When viewing the Simulink model, open the Model Properties at File > Model Properties.
2.  Look at the “Callbacks” tab.
3.  Add the following text to the InitFcn callback:
s = serial(‘COM11’);
set(s,’BaudRate’,300000,’DataBits’,8,’Parity’,’none’,’InputBufferSize’, 60);
4.  Double-click on the Query Instrument block in the Simulink model.
5.  Choose the “Use interface object from the MATLAB workspace” radio button and type in “s” (no quotes).
This procedure displays each byte received from serial communication with the MSP430 as received in the MATLAB *.m file version. I’d like to go further to condition the received data and identify battery voltages and temperatures to be plotted independently, but that will have to be left for a future project.

Using Simulink to find equivalent resistance

February 23, 2008 3 comments

Matlab Simulink can be used to find the equivalent resistance between two nodes.

This model finds the equivalent resistance between the opposite corners of a cube where each edge is a resistor with an equivalent value.

The simulation calculates the equivalent resistance between two nodes in a complicated circuit.
Here all resistors are equal values and the equivalent resistance from node A to H
is .8333 * R (5/6*R), where R is the resistance of one resistor.

My method uses resistors from the SimPowerSystems toolbox in Simulink all given resistances of 1 ohm. A 1V source spans the resistors and the inverse of the current is the output value, the ratio of the equivalent resistance to that of one resistor.

Alternatively, this calculation is not really very hard by hand. You can see the steps to do so here:

You can download my Simulink model here:

USB Gamepad Priority in Project64 Nintendo 64 emulator for PC

January 8, 2008 3 comments

I have been using Project64 to play Nintendo 64 (1996) games on my laptop. This works amazingly well, and it is great fun to connect the computer to a TV or projector screen using an S-Video cable and a 3.5mm stereo to right/left mono plugs.

Recently I found some cheap gamepads online for $3 each and tested them today. It’s difficult for people to convince me that I should spend money on these things, because these controllers work exceptionally well.

I did encounter a problem, though, when I tried to keep track of which gamepad corresponded to which player in a N64 game. I labeled the gamepads with numbers 1-4, but each time I plugged them in they seemed to be assigned random player #’s again. I was wrong about this, but I’ll discuss my process for finding a good solution anyway.

I originally thought the player order was based on the order in which gamepads were connected. This was proven to be incorrect when I disconnected a controller and when I reconnected it a controller which had not been moved had changed from one player to another. My next thought based on research was to try the JoyID tool described next, but this was not the solution either.

Wingman Team JoyID tool

From searching forum posts, I found references to this JoyID
swapper program for changing the ID order of gamepads. This was not useful for my purpose, but it does change the JoyID’s, though not used by Project64. It turns out that Project64, and probably many other games, use Hardware ID’s rather than JoyID’s to identify the priority of USB gamepads.
Besides not being the solution to my problem, I also find it inconvenient that the swapping program has no way to associate which gamepad currently corresponds to which number. It would be useful if a gamepad was highlighted when a button was pressed, or something like that.

Download or research Wingman Team’s JoyID swapper program

Hardware ID’s
Microsoft descriptoin of Windows Hardware ID’s for Human Interface Devices (HID’s) is found here. This turns out to be the solution of the problem. As described in the link above, the hardware ID is based on the physical USB jack where the gamepad is plugged in. To make my system easily usable, I labelled the USB hub where I connect the gamepads to keep the same order of players. This can be seen in my first image on the top left. To summarize, the physical location, not the connecting order in time, defines the order of players associated with gamepads.
Categories: Electronics, PC Software

Battery made of quarters

October 30, 2007 Leave a comment

Making a battery out of quarters is a neat little project that a lot of kids do, but I had never done this before. I have a few pictures to show how impressively well it works.
For this battery, I used aluminum foil, 10 quarters, and blotting paper soaked in salt and vinegar. I measured 4.18 volts across the completed makeshift battery. I was impressed. The battery was able to light the LED shown on the right overnight.

Categories: Electronics