Fan Repair

This post is for anyone else trying to determine how the four wires (common, low, medium, high) of an A/C induction motor of a pedestal fan are connected to the windings. I happened to have one pedestal fan with a bad motor (Orient fan) and another fan pedestal fan with bad controller circuit (Usha fan).... Continue Reading →


Raspberry Pi CCTV

After my dad passed away last year, I needed to keep an eye on mom, who's living alone in our native home in India. So in this trip, I set up a remote CCTV for my native home using two Raspberry Pi's. This post is a note of all the steps for anyone else trying... Continue Reading →

Engineering Ethics

"Lund's first response was to repeat his objections. But then Mason said something that made him think again. Mason asked him to think like a manager rather than an engineer." That fatal decision resulted in the Challenger Disaster that cost the lives of all 7 crew members. Was it because Lund was thinking like a... Continue Reading →

Freaky Assembly?

After a looong time, I was debugging some embedded C code and thought I found something freaky: C code for (i = 0; i < 1000000; i++); ARM code disassembly (as generated by GNU ARM gcc) 0x0000019c <main+196>: mov r3, #0 ; 0x0 0x000001a0 <main+200>: str r3, [r11, #-16] 0x000001a4 <main+204>: b 0x1b4 <main+220> 0x000001a8... Continue Reading →

Balancing Robot

Botka, The Barely Standing Robot. This is one impressive balancing robot. Not even a bit of jitter. Midway through the video the thing takes on some solid whacks and still standing. For comparison: NXTway-G (the Lego Mindstorms NXT uses the Atmel AT91SAM7S ARM processor). Botka probably uses some sophisticated PID control? fuzzy logic enhanced or... Continue Reading →

ARM Assembler

My ARM assembler cheat sheet. ARM7: Load-and-Store Architecture Von Neumann Architecture ARM7TDMI-S: T - Thumb architecture extension ARM Instructions are all 32 bit Thumb instructions are all 16 bit Two execution states to select which instruction set to execute D - Core has debug extensions M - Core has enhanced multiplier I - Core has... Continue Reading →

ARM Toolchain – Crosstool

Was able to get an arm-elf toolchain built and working fine, but not so much luck in building an arm-elf-linux toolchain. It cross-compiled programs without errors, but the compiled executable crapped out at runtime. So googling for answers... I came across Dan Kegel's crosstool - a really cool GNU toolchain builder. It downloads all the... Continue Reading →

ARM Toolchain

Updated (April 26, 2008) Here's my cheat-sheet for building a 64-bit GNU ARM toolchain (cross-compiler x64 to ARM). So far this has been working well for me on an LPC2148 (ARM7TDMI-S), i.e. gcc and gdb via OpenOCD JTAG. Notes: Some builds (like binutils-2.18 and newlib-1.15) needed the setting MAKEINFO=/usr/bin/makeinfo to be passed to the make... Continue Reading →

Create a free website or blog at

Up ↑