Some Helpful Development Guidelines For Embedded Systems

Guess you’d thought you’d never see me come back from such a long hiatus!? I’ve been doing some writing on my other blog, in case you didn’t know, and before I knew it. I also had to make changes to my career – quite drastic ones. So you can see why I never found the time to share anything nerdy I’d been working on lately. This time I want to leave you with some quick and dirty tips while planning your next embedded project. My last one was an MP3 player that I’d last worked on over a year ago and I haven’t explored the hobby since, so let’s get talking.

1. Software architecture: I’m staunchly minimalist – always going for the minimax approach whenever possible. And who doesn’t love transparency. Despite layers of abstraction – from HAL (Hardware Abstraction Layers) to third-party libraries running your application – I like to maintain easy access to the low-level drivers and processes and even hardware registers to maintain transparency. As you can see, I’m clearly no Arduino guy. Be sure to organise your libraries, APIs and any linker scripts you may be using to interface the high-level libraries to the low-level HAL/drivers, always maintain transparency. You want the end application to access and work on any of these levels of abstraction – from hardware to high-level software. I don’t like making calls to some fancy function when I can set up and manage peripherals and what not from my application code.

A terrible example would be that of Windows’ DirectSound. I hate the fact that you have to set up an external software ‘bridge’ just to route things to an low-latency (ASIO) driver.

Continue reading

Clocks

Time-keeping. Clocks. Oscillators. These are some key aspects of time I shall be discussing in my latest post. While the simpleton finds time important to get to job on time or show up for a date, higher-level applications such as computing and communication (between computers) require clocks and time-keeping of high precision. Industries like aviation are very sensitive to time and not keeping time well can cause conflicts and losses of a significantly large scale.

Let’s start off with oscillators – the heart behind clocks. Oscillators are mechanical, electrical or electro-mechanical devices that generate some sort of oscillations at the output. The accuracy of the oscillator is given by how well the oscillations can maintain a fixed time period over various operating conditions and time. For most enthusiasts in IT or electronics, you’re probably already familiar with crystal oscillator circuits, RC circuits and PLL systems used for timing and/or time-keeping.

Continue reading

The Need For An International Treaty on Energy

Let me skip the formal greeting to my blog/post for once and jump right into the subject matter. We need a treaty and we need it right now. Why you ask? To keep the polluting countries in check on activities such as and not limited to sourcing fossil fuels and investment in renewable energy sources.

Countries have to agree to some treaty on these matters to sustain our planet. Right now, the norms countries operate on these fronts can only be described as ‘outrageously barbaric‘. Countries who account for a fourth of all greenhouse gas emissions are free to do whatever half-baked actions they want. If this was Vulcan and we operated under Vulcan logic, these people would be sterilized. You know who I’m talking about and also, no more Star Trek references, I promise!

I agree that the switch to renewable or other sustained energy sources (like nuclear) is not possible overnight. It’s not as simple as flipping a switch. It is one that needs extensive negotiations, agreements, and collaboration between parties over a large period of time. Which brings me to my opening statement calling for an international treaty mandating all countries follow protocols on these fronts.

Continue reading

Common chemical compounds + I try formulating a soap and perfume :D

Hello people of the internet!

I must tell you I’m no chemist, in fact I’ve been taking a profound interest in chemistry only over the past couple weeks. I’ve had this friends who coincidentally, also happened to be taking an interest in chemistry so I decided we decide on topics of common interest relating to the various disciplines of chemistry to discuss over the phone to get ourselves interested in this science. I suggested we talk about drugs and their physiological effects. What makes pharmaceutical drugs so interesting is that they have really complex structures, typically lots of functional groups together. Their structure is specially designed to attack the active site of an enzyme. When we realized that proposal lacked a certain practical touch, I suggested we formulate a soap. Yes, soap! We use soaps as bathing bars and shower gels everyday to keep ourselves clean. The chemical compounds that make them up are commonplace in most households. With that said, we started our research…

Continue reading

Engineering Everyday #1: The ‘pop’ noise annoyance

Greetings people! Introducing the “Engineering Everyday” series where I explore and engineer our typical everyday problems which you and I may run into at home, work or play. I’m initiating and hoping to keep up this series. I however, will not establish a publishing schedule at this moment as my blogging trends are fairly irregular.

Alright, let’s jump straight in, I have been noticing my power amplifier makes this ‘pop’ sound every time I turn on a fluorescent light or fan which shared the same AC line. This amp is hooked up to the surround speakers and is part of the entertainment system. It didn’t take much thinking to figure out these noises were caused by EMI or voltage fluctuations in the line introduced by the ballasts and surge capacitors of the fore-mentioned appliances. This was clearly a case of conducted EMI.

Without further ado, I  CAME  TO  THE  RESCUE! *Star Wars theme* I was clearly the only engineer in town who could fix this! Not to mention my unprecedented record of projects in the past failing so perfectly, almost every time testifying how the law of infinite probability does not hold true for my work. One shocked me, not once but twice (Electrically, not emotionally). One even had the courtesy to annihilate itself from physical existence (or maybe I just lost it). Most of my creations are put to no good use and are retired to be stored indefinitely at grandparent’s place.

Continue reading

Microcontroller based mood light

Don’t we all love that feeling we get when we walk into a lounge or perhaps, an airplane cabin or a freshly-made hotel room. Psychology can be a sucker by making our life miserable, constantly affecting our ability to make decisions and work with consistency. However, it doesn’t turn out to be bad after all as you just read in the instance mentioned above. Lights and color can affect the perception of our surrounding and control our thoughts associated with it at subconscious levels. This is exactly why the color of cabin lights is adjusted during different phases of flight and while serving meals. You’d often see restaurants use the colors red and yellow excessively, and the reason turns out to be no different. They’re playing with your brains. One’s mood also succumbs to these external influences. I’ve been a big fan of the PIC16F877A 8-bit MCU from Microchip and here I’m trying to develop a mood light around it. Mood lights require certain parameters to work on. Mine works on time of day and adjusts the color of lighting to match with phase of day. You’ll greet the mornings with an enchanting glow of azure, afternoons with an energetic outburst of white or purple, evenings with a comforting flush of orange and nights with a mysterious tinge of blue. I apologize for the excessive use of adjectives. Colors are up to you.

Continue reading

Designing a model airplane from scratch [theoretical]

-more to come- Hey everybody! It’s been quite a while since I posted on this blog. I’ve been taking an interest in aircraft design lately and thought I’d put together a model airplane. I am taking a completely theoretical approach, which implies no wind tunnels and no testing or experiment data to supplement the design process.

Airplane configuration and requirements:


Tail: Conventional

A conventional tail config was chosen after considering the benefits to fabrication and design process over its aerodynamic disadvantages. There will be some level of stream interaction compromising elevator effectiveness. The vertical tail is placed right above the horizontal tail to make moment arm assumptions easier. The rudder effectiveness and spin recovery might be compromised due to wake from horizontal tail at high angle of attacks.

Fuselage: Conventional cylindrical with conical tail-cone

Like most planes, a cylindrical fuselage is designed with fixed diameter and length determined during the tail design process. The nose cone is designed without theory.

Landing gear/ Undercarriage: Tricycle arrangement

The main gear is slightly extended outward from the underbelly to provide lateral support on rough terrain.

Wing: Low wing, rectangular planform

Engine: Front mounted, single engine

A motor-propeller combination capable of producing 60 N of static thrust is required.

Wing:

Continue reading

Our flawed education system

Now my readers will notice that I had published another post titled “Is our education system flawed?” last year where I questioned our system of testing in school. So what makes this post any different? Last post I questioned, this post I state.

We’ve got loads of standardized tests and tests we take in high school which I believe don’t test what you’re good at or how well you can do something. Now is a good time for Einstein’s good ol’ quote:

Education is not the learning of facts but teaching of the mind to think.

Lately I visited SeaWorld at Orlando where this show with sea lions (Sea Lion High) made me nearly give a standing ovation, but why? They emphasized on using your creativity and imagination to make things happen but I’d like to put it a bit differently for the big ones out there, use your passion to make your dreams happen. Lets get back to where I left off, education. What makes someone who knows only the fact any different from one who knows to do something with what he knows. Don’t you think it is totally pointless to learn something without also learning how to use it? Are we learning just to please score-obsessed colleges or society maybe? If that’s the way it is, I wouldn’t want to go to school anymore! Standardized tests aren’t any different, but hopefully test-takers from June 2016 will take the new SAT without all the obscure ‘SAT words’ which have a 1 in a million chance of being used in college and the much dreaded negative scoring.

In today’s world, we learn to take tests, and not because it’s there and that we want to know about it.

My opinions may be affected by the high school I go to or the people I run into, if you think our current system is not like what I’d mentioned, leave a reply.

Update(24-07-2015): Every day is another testimony to my hypothesis. I was thinking about the complex variables a test-taker is subjected to on or in the days leading up to test day which ultimately led me to wonder how a simple performance benchmarking software for a semiconductor could vary its results every time I ran it. Just in case you haven’t heard of benchmarking software for computers, I’ll go on and name a few: Furmark, Passmark and 3DMark. I first ran one of these on my newly built rig and my computer scored something in the 13,000s (I guess) with Passmark. Another fine day, it yielded figures that could only roughly tally with what my rig had scored earlier. I ran 3DMark on my Nexus 5 and got the same erroneous scores every time. I wondered, well temperature can mess with a semiconductor’s resistance and consequently its overall performance in everything from simple integer math to the more complex physics and multi-thread processing. Now, if a simple and primate variable like temperature can affect a semiconductor’s performance, (mind you semicons come sans emotions and feelings) try putting that in contrast with a human being.

I was working on my college applications today and I happened to notice an interesting trend. Every body gives a big deal about SAT scores and GPAs. Well, how well can a SAT define you? Is it (in any way or form) a reliable indicator of your success in college? Then one day while I was dining in a restaurant at Union Station, with crimson sauced pasta to devour in front of me came the horrors, a ding-ding on my phone: I’d scored a 1500 on the SAT. I was let down but then hey! what’s the big deal anyway. I still came back home and moved on doing what I love. That score didn’t deter me (and never will it) deter me from my passionate work. I’d done and learned so much after those dreadful scores came out. To give you a jist: I’ve learnt a lot on aircraft design, learned to fly the PMDG 777 in Flight Simulator, learned about using the Aerospace Toolkit functions in MATLAB and used it once to solve a challenge that involved Mach numbers (I used the ISA model), submitted an idea to NASA via Innovcentive on a flexible sealing device, learned a bit about solvable quantum mechanical systems and approximation techniques, and learned a great deal about inertial navigation, dead reckoning, GPS triangulation, azimuth/elevation calculation for antennas, etc.

Here is a sea lion to cheer you up (and me up)
Here is a sea lion to cheer you up (and me up)

Bienvenue!

Hey everybody, I haven’t posted in a really long while and you should see less posts coming up in near times. I could go on with reasons after reasons to justify the decline of my blogging activity but here’s something I want you to know, well there’s not much of anything but just being caught up with project work beside high school and exam prep. Most bloggers on here know I’m a science aficionado and like anybody else, I needed some inspiration to get on with my projects which I’ve been searching for lately. Wednesday today, and first thing to devour my attention was a Singaporean 777, well if you still decide to ignore one of these birds, their engines won’t let you do that : )

And now, I would like some applause on this because I managed to spot the VOR station at my hometown airport, and even if God forbid, that thing was hidden in the mist and you’d never really figure out its location without an actual VOR instrument, I also managed to get a ride on an ATR 72-500 this week inbound to VOMM. I haven’t been on turboprops for a while and this was a pretty good one. I’ve heard that ATR introduced the Thales glass cockpit into this ATR series at the Farnborough Air Show and it looks like a good improvement over the array of round-dial instruments we have on these planes today (and don’t try and bring Airbus and Boeing into this discussion, they’re out of this league). And something caught my attention in the air, this continuous whining noise from below the cabin floor and I’m wondering something like a hydraulic pump that runs on demand.

I would like to do a fun comparison between what a normal passenger thinks/does and what an aviation enthusiast does, here goes nothing :

Normal person #                        Enthusiast passenger +

Continue reading

My take on Germanwings A320 crash

Lately at a Reuters press conference, it was revealed that the German First Officer might’ve deliberately tried to crash the plane. Reports and speculations suggested that the A320 made a sudden, and rapid descent to an altitude around 6000 ft. It also suggested that the FO must’ve pressed a button in the flight deck that caused the plane to do this. I suspect that ‘button’ is the EXPED button on the autopilot’s flight control panel. After a little research online, it seems to fit into everything I’d thought of. The Expediate mode on the Airbus is used rarely and its primary function in layman terms: To increase the rate of climb or descent in a way (maintain pitch) that the green dot speed is maintained. For the Boeing flyers out there, green dot speed is the same as clean speed (flaps up speed) which gives the best lift to drag ratio for the wings, making it something to consider when you’re gliding without engine power. The altitude-speed graphs from the online flight tracker website, FlightRadar24 supports this theory. The speeds seem to stabilize (ground speed I suppose) nearing 350 KT.

Continue reading