The Microsoft wireless mouse takes two AA batteries in parallel. Tests show that it can start at 0.8V and run down to 0.7V provided that there is enough current, which is generally not available when the batteries are drained to this low. The voltage has to be boosted to run the optical mouse sensor, the LED and the EEPROM. There is a boost converter, a 10-pin SSOP IC U2 that I could not identify. But I believe it is a synchronous boost converter. The output of the converter is measured to be 1.8V.
Thursday, November 17, 2022
Microsoft Wireless Mouse Power Circuitry
Friday, August 12, 2022
Multi-Slope ADC on PSoC5
High-resolution multimeters use multi-slope ADC to digitize analog voltages. Here we implement a multi-slope ADC on a PSoC5 device; all the circuitries are inside the PSoC except for a capacitor and resistors. The design is based on the description given in AoE3.
The bandgap reference provided is 1.024V (+/- 0.5%); it is measured 1.019V, or 0.5% from the nominal, just within the spec. This reference is doubled to be the upper reference and the ground is the lower reference; so the ADC range is [0, 2.048] V. The upper reference is measured to be 2.060V; the PGA gain error can be +/-4%. The circuit switches between the upper and lower reference to keep the integrator output near 1.024V. One counter counts up and down according to the switch position. At the end of the conversion, the counter value is captured and a 12-bit SAR ADC measures the residue. The combination is the multi-slope ADC output.
We test it by stepping the input from 0 to 2.5V in 0.1V step and convert only counts to voltages. We get the following results. The step size appears correct, but there is 0.1V offset, which we'll look into.
Monday, July 25, 2022
Data Acquisition through Microphone Input
We like to make use of the PC audio device for data acquisition. Here we'll do some testing to understand the capability. Most of the recent laptops have only one 3.5mm 4-contact jack; the connection is normally tip: left audio, 1st ring: right audio, 2nd ring: return, sleeve: microphone input. The common 3-contact headphone plug shorts out the microphone input. The microphone input supplies a small current to power microphones with a FET amplifier. For the laptop that I have, the open circuit microphone input voltage is 3.168V and short circuit current 1.46mA; the source impedance is about 2K Ohm. A typical microphone draws about 0.15mA.
Python sounddevice module can be used for acquiring the signal from the microphone input. The output seems to be limited to [-1, 1]. The microphone properties settings of output level and boost affect the gain. For 100 output level and 10dB boost, the gain seems to be x50; 20mVpp input has value of 1 peak-to-peak and above 40mVpp input returns 2 peak-to-peak. Interestingly, although the output is limited to [-1, 1], it does not show clipping effect. We do a frequency sweep from 20Hz to 20KHz and look at the power spectrum density. The sample rate is 96KHz.
Wednesday, July 20, 2022
Fluke 87
We've looked at a few of very cheap multimeters (1, 2, 3, 4). How do they compare with the venerable Fluke DMM? Here we'll look at an older model of Fluke 87 DMM, which costs hundreds of dollars.
The date code shown on the PCB is 1986; so perhaps Fluke 87 was first released in 1987. The service manual is available; it contains the full schematics and parts list. Besides the main ASIC (which does dual slope A/D conversion with a16-bit counter for 4.5-digit resolution) , there are a few ICs, a reference voltage (LM285), a RMS to DC converter (AD737), a dual opamp (TLC27M21), and a hex inverter. The rotary knob switch is more robust than those sliding on the PCB tracks. The input overload protection circuit is much more comprehensive, including 1500V spark gap surge protector, 910V MOVs, thermistor, a fusible resistor (1KΩ), fuses and the PCB has slots for creepage. The DMM has a CAT III rating (1000V working voltage and 8000V transient). Split jacks are used to detect if probes are plugged correctly for the current measurement. Also a number of film capacitors are used and as well as a precision resistor pack. There are two adjustable resistors and capacitors for calibration.
One factory test feature is the ultrasonic data communication. The DMM can be put in the ultrasonic data mode by holding the HOLD button while powering up. A periodic burst of buzzing can be heard. We sample the speaker output at 100KHz for 2 seconds. We see it has a burst of 350ms every 600ms.
Zoom in; we see the structure of the data.We will look into how to decode it later.
Sunday, June 12, 2022
MSP430 Bootloader over I2C on RaspberryPi and BeagleBone Black
MSP430 has a built-in bootloader (BSL), that communicates with a host through UART or I2C to update memory. TI released the code described in "MSP430TM Firmware Updates Over I2C Using Linux®". This code compiles without modification on Raspberry Pi.
First we try the hardware entry sequence on the TEST and RST pins to invoke the BSL. "The BSL program execution starts when the TEST pin has received a minimum of two rising edges (low-to-high transitions) and if TEST is high while RST/NMI rises from low to high." From the RaspberryPi 40-pin header, we connect RPi Pin-3 (SDA) and Pin-5 (SCL) to MSP430 P1.2 (SDA) and P1.3 (SCL) for I2C and Pin-13 and Pin-15 GPIO to RST/SBWTDIO and TEST/SBWTCK. After applying the sequence using Python RPi.GPIO, we can probe the I2C bus with "i2cdetect -y 1" and see a response at the expected address 0x48. Now we can try "msp430-i2cbsl-tool" to update the firmware. The firmware file is generated using MSP430 Hex Utility hex430 with --ti_txt option. Note that the BSL times out in 10 seconds. When we run the command, we get an error message, "Attempting to unlocking device with password... Fail!". It looks like ioctl I2C_RDWR failed, "Connection timed out". The next troubleshooting step is to take a look the I2C traces on the scope.
Before we do that, we'll do a test on BeagleBone Black that TI has tested on. We connect Pin-19 (SCL2) and Pin-20 (SDA2) to P1.3 and P1.2, Pin-12 (GPIO_60) and Pin-15 (GPIO_48) to TEST and RST. We control the GPIO pins using SysFs. This works,
./msp430-i2cbsl-tool -f ~/BlinkLED_MSP-EXP430FR2355.txt -i /dev/i2c-1 -n
---------------------------------------------------------------
TI MSP430 I2C Linux BootLoader 01.00.00.00
---------------------------------------------------------------
INFO: Firmware file /home/debian/BlinkLED_MSP-EXP430FR2355.txt specified
INFO: I2C BUS /dev/i2c-1 specified
INFO: Opening TI-TXT firmware file firmware.txt... done!
INFO: Password file not found, defaulting to 0xFFs.
INFO: Skipped software invoke.
INFO: Attempting to unlocking device with password... Fail!
INFO: Device could not be unlocked. Resetting password and trying again.
INFO: Skipped software invoke.
INFO: Attempting to unlocking device with password... done!
INFO: Programming attempt number 0
INFO: Programming @0x8000 with 220 bytes of data... done!
INFO: Programming @0xff80 with 12 bytes of data... done!
INFO: Programming @0xffa0 with 2 bytes of data... done!
INFO: Programming @0xffce with 50 bytes of data... done!
INFO: Programmed all memory locations successfully.
INFO: New firmware successfully downloaded to device.
INFO: Reading the reset vector contents and setting the PC to this value.
INFO: This should cause the device to reset.
INFO: Reset vector read as 0x80c0
INFO: New program downloaded and reset successfuly!
Note that the default password is used, which is not the correct password the first time and triggers a mass erase that clears the password so the it succeeds in unlocking the second time. If the proper password (32 bytes from address 0xffe0 - 0xffff) is used, it is unlocked the first time.
Tuesday, May 17, 2022
Notebook PC Power Adapter - Dell 90W
Many years ago, I wrote about my experience with the "smart" power adapter. As I changed my work notebook computer from Dell to HP, despite of same power rating and same 3-pin barrel plug, the HP computer would not detect the Dell power adapter. It seems such a waste not to have a common standard of power adapters. (The move towards USB C PD for all mobile devices should make thing better.) So I decide to crack one open to see what exactly the center pin does. This is a 90-watt dell power adapter (19.5V 4.62A); it is not too hard to crack the case open. The power adapter is made in China by Delta Electronics, a Taiwanese power product company. The date code is "0731". The three wires go connections labelled VO, GND and DATA on the single layer PCB. The DATA trace is connected to a 3-pin TO-92 device, with marking "75M518E BYE TI". No information is found on this device, so it is likely a proprietary device. The DATA signal has an 130-Ohm resistor in series and is clamped by a Zener. The device is powered directly off the 19.5V.
The primary is switched by Infineon SPA15N65C3 650V 0.28-Ohm N-channel MOSFET. The secondary side is Vishay Siliconix SUP60N10 100V 0.02-Ohm N-channel MOSFET. The controller has the marking "DAP6A", which seems to be a custom specific device from ON Semi with the part no. DAP006, PWM Current−Mode Controller for Free Running Quasi−Resonant Operation and is equivalent to NCP1200. On the secondary side, there is an 8-pin IC with marking, "DAS001 ST", which appears to be equivalent to TSM103W, a dual opamp with 2.5V voltage reference.
When the power connector is plugged into the computer, the center pin is pulled up to about 3.3V. Then there is data activities on the line. If the center pin is not connected to the power adapter, the center pin from the computer toggles every 3 seconds with 2 seconds high.
When the center pin is not connected, the power draw drops to 20W and the computer runs at a slow clock rate (about 800MHz).
Tuesday, April 19, 2022
Aukey DR01 Dash Cam
It features SonyIMX323 with 1936 (H) × 1097 (V) active pixels, with pixel size of 2.8um, Novatek NT96655 with 128MB DDR3 SRAM and 2x 2.7V 3.3F super cap. It produces reasonable good quality video for most lighting conditions.
Recently, it kept resetting the time. And the dash cam does not record until the date/time is set. It is suspected that the time keeping battery is faulty. The coin battery appears to be FDR rechargeable lithium battery, ML621, 5.8mAh, 3.3V, 6.8x2.1 mm. The number of charge/discharge cycles are rated for 300 at 23C. The voltage at the end of capacity is about 2V and 2.5V at the half capacity. The standard charging method is constant voltage of 3V with 1KOhm.
The battery voltage is measured at 2.8V. Interestingly, the dash cam started working fine after it was opened and continued to work after it was put back. Perhaps something was shorting the battery?
Tuesday, February 22, 2022
Tek Scope Screen Capture
I've been taking scope pictures with my phone, but sometimes the pictures do not have good focus and the picture size is large. The Tek scope has a serial port which commands and data can be sent and received. But I have had a lot trouble to get the Tek's own software to work. For screen capture, it is actually a lot simpler: just set up the hardcopy to output to RS232 and choose a format such as PNG, then just hit the hardcopy button, the data come out on the serial port. Now it is just a matter of capturing it on the PC, which can be a simple Python script using pyserial. A null modem cable is necessary; the maximum baud rate is 38400. It takes about 3-4 seconds to get the screen shot, which is much better than you can capture with your phone.
Monday, January 31, 2022
USB Hub
This is a 7-port USB hub with 4 USB3 ports and 3 USB2 ports by Zoweetek, ZW-H355. It essentially is consisted of two ICs, GL3523 by Genesys Logic is a 4-port USB3.1 compliant hub controller and HS8836 which appears to be a 4-port USB hub controller but very little information is available online. It appears that one of the USB2 signals goes from GL3523 to HS8836 and HS8836 has 4 pairs of USB2.0 signals going to 3 USB2 ports and one of the USB3 ports. The PC board is not well cleaned especially around through-hole connections, perhaps the switches and connectors are hand soldered. It is not clear if the high-speed traces are matched. There is a footprint for input USB3 connector, but here the wires are directly soldered to the board.
Friday, January 21, 2022
RaspberryPi Zero W
I came across a RaspberryPi Zero W, the older generation RPi Zero with WiFi. For $10, it is a great little board. Although it can run the desktop environment, it cannot really be expected to run the memory intensive applications such as internet browser because of limited memory. But 512MB is a huge amount of memory for embedded systems. To run the camera, it needs to allocate 128MB to the GPU (perhaps 64MB if only still picture).
It is straightforward to wiring up a display module. And with the python module luma.oled, the display is up and running quickly.
Wednesday, January 5, 2022
Starter Motor
I recently had to replace a starter motor, so I got a chance to look the interior of the starter motor assembly. The starter motor assembly is consisted of a DC brushed motor, a solenoid and gears.