Sunday, July 28, 2013

Medical Electronics For Chronic Illness

Chronic illness is defined as a person that has a disease more than three months such as cancer, arthritis,diabetes, HIV/AIDS, etc.  According to World Health Organization (WHO) the mortality rate in the world due to chronic illness was reported to be 60% of all death.  This rate was reported in 2005 this mean that the rate in year 2013 will be higher based of our pollution rate and all.  In US alone the 70% death rate is due chronic illnesses such as heart disease, cancers, stroke, chronic respiratory disease, diabetes, Alzheimer's disease, mental illness and kidney diseases.  90% of the seniors have at least one chronic disease. 

The mortality rates can be reduces tremendously if we could have early detection and response to be sent to
the respective health institutions.  With our modern technology this can be done easily especially using embedded technology coupled with communication technology (Bluetooth, GSM, etc.).  Different type of sensors can be attached to a person body and the sensors are constantly monitoring the person. All the sensors' reading are sent to a base station located at home via wireless such as Bluetooth, etc. The reading will be transmitted to a remote location (hospital, health institution, etc.) via GPRS network, internet, etc.  There are many ways to send the sensors' reading to a remote location.  One of the method is to transmit the data via GPRS network and for those location where wireless data network is unavailable, Power-Line-Carrier (PLC) can be used to transmit the data.  PLC considered a full proof method of transmitting the data to remote location as power grid is available even though at some remote area. With this method, the infrastructure costs is much more cost effective; as long as power grid is available the communication to remote location is possible.  One only need the PLC transceiver to do so.   Power-Line-Carrier is very interesting topic and there are many types of protocol for PLC.  Next, I will cover some of the PLC technologies.

Tuesday, July 16, 2013

Smart Light Bulb

I guess we all are familiar with smart home automation with smart appliances where your refrigerator could
tell you supply shortages inside the fridge and smart enough to produce grocery list for you.  Who will think even a small light bulb is also smart?  Well, it is coming soon and most lighting manufacturers are making their lighting products smarter.  It will be much more easier to do so with the use of light-emitting-diode or LED technology.  Solid State Lighting (SSL) has come a long way and it has been a privilege for me to witness the evolution of its development till now. 
The traditional Edison bulb requires no additional circuitry to burn the tungsten.  In fact, the hotter its get the better its illumination.  Unlike the Edison bulb, LED requires DC current to operate and the cooler its get the better its illumination; the direct opposite of incandescent lamp. 

How do we operate the SSL on AC power line?  Simple!  We need an AC to DC power supply squeeze into a tiny housing.  The LED driver chipset has improved over time and now even the designer includes a single stage power factor correction internally that makes the power factor as close as possible to 1; most of the time measurement will shows around 0.95~0.99.  Not only that but overall bill-of-materials also been reduced in order to reduce the driver printed circuit board (PCB) size to reduce the overall system costs.  How about AC LED?  Are this LED really operate on AC?  No!  Diode is always a Diode. Thomas Edison discovered the principle of diode during its light bulb discovery but he is not aware of its application until later.  There are several ways to operate the LED on direct AC line.  One of the technique is to use high voltage VF (forward voltage) LED, as high as possible, in order to reduce the power loss from the additional voltages.  One can use a current source either at the front- or back-end; there is advantage and disadvantage by doing so.  This is a straight forward technique without any control and monitoring that may affect the power factor and system efficiency.  By putting intelligent into this technique, one could monitor the AC line and switch a string of LED accordingly to make sure the Current Phase and Voltage Phase are aligned; high power factor.  As the AC goes up and down, different array of LED will be switched on / off.  One drawback of this technique is more LEDs are required in order to achieve the same brightness compared to conventional AC-DC driver and linear AC LED.  Other techniques are existed......soon to be discovered.

Now, we have the power supply smart enough, what else can do to make the light bulb smarter?  Communication? YES! By adding communication to it one will be able to communicate with the light bulb and tell it what to do or how is it doing?  I stop here for now as the rest is trade secret :).  I leave it to the reader to imagine what else he/she could put into his/her light bulb. 

Monday, July 8, 2013

Using Microchip MCU Timer 1/3/5 Module with Gate Control

Previously, I covered the Timer 0 module which is much easier to use and configure.  Timer 1, 3, or 5 module is more complicated and lots more to configure as it provides more features.  

Timer 1/3/5 Module Block Diagram

Timer 1/3/5 module is quite similar to Timer 0 except it is a 16-bit timer and an additional Gate Control input feature.  What is Gate Control?  Timer 1/3/5 module can be configured to count freely or disabled/enabled counter via Gate circuitry.  The Gate circuitry can be driven from multiple sources selected via TxGSS<1:0> bits in TxGCON register (refer to block diagram upper corner top left).  They are,

Timer 1/3/5 Gate Pin
If TxG gate pin is selected as the source, an external source will be used to enable/disable the count.  

Timer 2/4/6 Match to PR2/4/6
The free counter Timer 2/4/6 register will increment until it matches with user set value in the PR2/4/6 register (Period Register).  When match happens the Timer 2/4/6 will reset to zero on the next increment and a low-to-high pulse will be asserted to the Timer 1/3/5 Gate circuitry.

For example, user set the PR2 = AA55h.  Assume Timer 2 counts from 00h, once Timer 2 match the preset PR2 value AA55h, the comparator in the Timer 2 module will generates a match signal which will be used to assert the Timer 1/3/5 Gate module circuitry if this source is selected.

Comparator Output sync_CxOUT
Comparator module output (sync_CxOut) can be selected as one of the Gate circuitry source.  When the comparator condition is met, sync_CxOut will be asserted to Timer 1/3/5 Gate circuitry.  The asserted signal will be latched on the falling edge of clock source whereas the timer increment is latched on the rising edge of clock source in order to prevent from race condition.

Unlike Timer 0, Time 1/3/5 is a 16-bit timer where the timer value is accessed through TMRxH and TMRxL.  Writing to TMRxH or TMRxL will update the timer.  One can choose either internal or external clock source.  When internal clock source is chosen the timer increment on every instruction clock cycle compared to external clock source where the timer increment on every rising edge of clock input to the TxCKI pin.  Some Microchip MCU do support secondary low-power 32.768 kHz clock oscillator which is normally used for real time clock.  

Monday, July 1, 2013

BEAGLEBONE BLACK

The BeagleBone Black is the latest board of the Beaglebone board family.  With its credit-card-size
Linux computer, BeagleBone Black is a truly open hardware and software development platform.  It includes all the necessary accessories to start developing, providing a truly low cost embedded systems compared to the nearest competitor.  Furthermore, it is built on a proven ecosystem that speeds up development time for project, product or prototype.  

BeagleBone Black is built around the Sitara 1GHz AM335x ARM Cortex -A8 processor from Texas Instrument.  It provides a more advanced user interface and up to 150% better performance than ARM11.  Besides the powerful processor, BeagleBone Black has built-in 2GB Flash on-board helps to boost the overall performance.  It comes pre-loaded with Angstrom Linux distribution.  Large memory will also free up the use of microSD or used of additional storage.  Besides Flash memory, it has also comes with blazing speed 512MB DDR3 memory that helps to enhanced the user experience.  Other peripherals such as microHDMI, microSD, 10/100 Ethernet, USB host, etc. are available on-board.  It has an expansion header that provides access to digital I/O, analog input, serial communication port, and much more.

Developing on the BeableBone Black is similar to Arduino and the development software is available free-of-charge and open source.  BeagleBone Black is only selling for USD45.  This is a MUST TRY!!!