Archive for August 2010

CAN is now transmitting on a default SID 0x7FF. Got it working from the CAN Lib posted by BobTheBass on EDAboard. Since my CAN Transceiver(SN65HVD251) was 5V so I am struggling now to make this into 3.3V again for ease of interfacing the SD Card. Just ordered Sample of SN65HVD231 but its SOIC, looks like need to build a Board. Updated code posted on the Source Forge.
- Try out Reception with Custom Filters and Transmission with Different EIDs
- Make arrangement for 3.3V interfacing to the SD Card till the 3.3V CAN Transceiver arrives.
- Look out for Battery Backup Solutions

Let me know your suggestion to make this project Better.
Warm Regards,
Today I was able to make some more progress. The SD card interface is now operational. Firmware is capable of Write to the 1GB Micro SD card. Also the UART interface is working at 57600 BAUD with the Internal CPU clock of 16MHz. The UART conversion if done using a FT232 Module. Here is a picture of my Setup:

The SD Card insert that was built using the Micro SD Adapter works fine even without the pull up. However in the final schematics would like to use them for reliability sake. Uploaded new Software in Source Forge.

- Check for RTC with Calender operation to be used in the File System - For Future
- Check optimality of using External RTC - For Future
- Test SD card interface at 3.3V and using level shifter, update schematics based on the choice. - Need to check if the CAN Transceiver also works on 3.3V
- Check for Time based File write - Time is at present with auto Write and would be checked as above in Future
- Implement UART based UI for updating parameters - Need to see the Cycle requirement for the Logging
- Add CAN related Header and framework from VSCP.
- Check for Battery Backup for the system since the SD Card write might be effected by Power Failures

Let me know your suggestion to make this project Better.
Warm Regards,
I had always wanted to play and decode the WAVE file properly. I had little success on this using the Microchip's MDD File System in my Project L.A.T.H.I. Recently I came across a wonder full article and am publishing the same for benifit of the readers.

Original Article :
Many Thanks to Scott Wilson for his Insight.

The WAVE file format is a subset of Microsoft's RIFF specification for the storage of multimedia files. A RIFF file starts out with a file header followed by a sequence of data chunks. A WAVE file is often just a RIFF file with a single "WAVE" chunk which consists of two sub-chunks -- a "fmt " chunk specifying the data format and a "data" chunk containing the actual sample data. Call this form the "Canonical form".

Offset Size name Description
RIFF Chunk Descriptor
0 4 ChunkID Contains the letters "RIFF" in ASCII form (0x52494646 big-endian form)
4 4 ChunkSize 36 + SubChunk2Size, or more precisely:
4 + (8 + SubChunk1Size) + (8 + SubChunk2Size)
This is the size of the rest of the chunk following this number.  This is the size of the entire file in bytes minus 8 bytes for the two fields not included in this count:ChunkID and ChunkSize.
8 4 Format Contains the letters "WAVE"
(0x57415645 big-endian form).
Fmt Sub-Chunk
12 4 Subchunk1ID Contains the letters "fmt "
(0x666d7420 big-endian form)
16 4 Subchunk1Size 16 for PCM.  This is the size of the rest of the Subchunk which follows this number.
20 2 AudioFormat PCM = 1 (i.e. Linear quantization)
Values other than 1 indicate some form of compression.
22 2 NumChannels Mono = 1, Stereo = 2, etc.
24 4 SampleRate 8000, 44100, etc.
28 4 ByteRate = SampleRate * NumChannels * BitsPerSample/8
32 2 BlockAlign = NumChannels * BitsPerSample/8
 The number of bytes for one sample including all channels. Well, wonder what happens when this number isn't an integer?
34 2 BitsPerSample 8 bits = 8, 16 bits = 16, etc.
(void) 2 ExtraParamSize if PCM, then doesn't exist
(void) X ExtraParams space for extra parameters
Data Sub-Chunk
36 4 Subchunk2ID  Contains the letters "data"
 (0x64617461 big-endian form).
40 4 Subchunk2Size = NumSamples * NumChannels * BitsPerSample/8
This is the number of bytes in the data. We can also think of this as the size of the read of the subchunk following this number.
44 * Data The actual sound data.

This is the Table Showing the Format Structure with Offset for WAVE File Format.As an example, here are the opening 72 bytes of a WAVE file with bytes shown as hexadecimal numbers:

52 49 46 46 24 08 00 00 57 41 56 45 66 6d 74 20 10 00 00 00 01 00 02 00
22 56 00 00 88 58 01 00 04 00 10 00 64 61 74 61 00 08 00 00 00 00 00 00
24 17 1e f3 3c 13 3c 14 16 f9 18 f9 34 e7 23 a6 3c f2 24 f2 11 ce 1a 0d

Here is the interpretation of these bytes as a WAVE sound file:

•    The default byte ordering assumed for WAVE data files is little-endian.
      Files written using the big-endian byte ordering scheme have the identifier
      RIFX instead of RIFF.
•    The sample data must end on an even byte boundary. Whatever that means.
•    8-bit samples are stored as unsigned bytes, ranging from 0 to 255.
     16-bit samples are stored  as 2's-complement signed integers, ranging
     from -32768 to 32767.
•    There may be additional subchunks in a Wave data stream.
      If so, each will have a char[4] SubChunkID, and unsigned long SubChunkSize,
      and SubChunkSize amount of data.
•    RIFF stands for Resource Interchange File Format.

General discussion of RIFF files:
Multimedia applications require the storage and management of a wide variety of data, including bitmaps, audio data, video data, and peripheral device control information. RIFF provides a way to store all these varied types of data. The type of data a RIFF file contains is indicated by the file extension. Examples of data that may be stored in RIFF files are:
•    Audio/visual interleaved data (.AVI)
•    Waveform data (.WAV)
•    Bitmapped data (.RDI)
•    MIDI information (.RMI)
•    Color palette (.PAL)
•    Multimedia movie (.RMN)
•    Animated cursor (.ANI)
•    A bundle of other RIFF files (.BND)

At this point, AVI files are the only type of RIFF files that have been fully implemented using the current RIFF specification. Although WAV files have been implemented, these files are very simple, and their developers typically use an older specification in constructing them.
For more info see

       RIFF Format Reference (good).


Content Locations:
1. Canonical Wave File Format Picture
2. Example of Byte Interpretation of the Wave File
3. Word Document Containing the Complete Article

Let me know in case you find any more data on this File Format.

- Add the Structure for Reading the Data buffer containing this header info
- Add Code for Generic Interpretation of the data
- Possibly implement in some micro and try to demonstrate as a complete project

Warm Regards,
I had taken up a small project from the VSCP Pool. For thoes who dont know about this wonder full project VSCP stands for Very Simple Control Protocol. I started a becoming a member of the developer group in March,2009 . However I was not able to contribute much at that time.
Kosh hardware is basically a data logger for the CAN network. It would interface to an SD card and keep logging the data flow on the CAN. Also a future proposal was to enhance it so that we can have individual nodes storing data on to the Kosh Module and then fetch it back.
Today I made a little progress by freezing on the Final schematics:
I would try to post the first version code on the Source Forge.
- Check for RTC with Calender operation to be used in the File System
- Check optimality of using External RTC
- Test SD card interface at 3.3V and using level shifter, update schematics based on the choice.
- Check for Time based File write
- Implement UART based UI for updating parameters
- Add CAN related Header and framework from VSCP.

Let me know your views and comments to improve this design.

Warm Regards,
Lyric's Error Correction Chip for Flash Memory Lyric Semiconductor

Most people with even the most fundamental knowledge of how computer chips work are familiar with binary logic — the system of ones and zeros that enable modern computing to occur — in which an input always results in a solid result (either a one or a zero). Now, a Boston-based startup is rewiring the basic concept of computation with a probability processor that deals in chance rather than binary logic, creating a chip that could speed all kinds of processes from flash memory in smartphones to better decision-making software for machines.
Lyric Semiconductor’s chip accepts probabilities as inputs instead of ones and zeros, and the output is also a probability — the odds that the two input probabilities match up. Rather than the usual NAND gates characteristic of conventional transistor schemes, the chips employ what are known as Bayesian NAND gates, named for the statistician Thomas Bayes whose field of thought is the basis for the idea.
I dug up some more and found about who this mathematician was from Britannica. Fortunately I was able to interpret what these people are trying to do. I found some thing really interesting. I found that in our Bharteya(Indian) Hindu scriptures, the magnifificent अथर्ववेदः (Atharvaveda) contains the theory of Probability and Discrete Mathematics also. This includes a kind of Boolean algebra(सामजस) and other abstract mathematics (विरल गणित) that discretized the functions of each of the operators and some times the complete number system itself, such as irrational algebra. Possibly I would suggest that there must be some mysterious but certain link between the Bayesian idea and our Vedas. I would also suggest that the later might be the source after all.
Its been long since I wanted to have a countdown timer. This finds use in many of the daily activities such as warming the water with a fixed timeout or boiling the milk or soaking the white cloths and the list goes on. Finally few days ago I gathered up all that I had and tried to start on this Project Samay1. The name litrally means "Time" in Sanskrit. This project is based around MSP430F2013 the famous dip version of MSP430. The reason I chose MSP430 is because of its High Code Density and Ultra Low Power. Well both became essential since I needed some thing that could work for a long time. In order to speed up my development I used the CookHa(MSP430 based Cooking Helper) board and modded it to help me build this prototype as shown below.
I also needed to display time information and prominently, so I took help of the trusty old 7Segment Display. But there was a problem of interfacing it to MSP430 so I used SN74HC595. This is a Serial In-Parallel Out type Shift register with Output Latches. Using this helped to shift in the data and then issue a load command to set the data into the Output latches. Thus the bit pattern needed for the 7Segment is sent out through the MSP430's SPI(USI) port and latched by a pulse to the output. There are two buttons also provided to help in setting the timing and to stop the timer. There are preset duration for the timing since there is no up-down button facility, only a single button is used for this. The set timings are in 1minute to 30minute duration and can be changed in software provided the array containing the values.
I have included the Schematics into the source code itself. Here is a Link to the Software of Samay1.
This software is based on a State machine for proper operation and enable the Count down, alarm and proper sleep mode controls.

TODO: Updated !! 22-AUG-2010
- Post Video on the operation of the unit.
- There is still a flaw in the button denouncing which is not working as expected but hope that I would be able to fix that soon.Fixed it by 50mS De-bounce -22/AUG/2010
- Need to make Battery measurement using ADC for alerting when its below the thresholds of operation.
- Possibly measure the Temperature using the Cook-Ha's temperature sensor Works Now with button 2 pressed. The Temperature Read out is Hundredth Digit First and then tens Digits. This is displayed 5times.- 22/AUG/2010
- Automate timing control with temperature display for the Water heating application + timeout. Not Possible due to Lack of space - 22/AUG/2010
- Check possibility of incorporating a complete RTC showing time on the same hardware.

Let me know your views and ideas on how I can improve on the design as well as the software.
Warm Regards,
I came across an innovative application of Wireless, Accelerometer and Microcontrollers. Its called the TI's Flying Mouse.

This is built around the Chronos Ez430 RF Development kit.
This basically is a 868MHz/915MHz RF band link with the CC430 based watch. The USB dongle provided in the kit is used as the receiver on the PC side. The Accelerometer built into the watch is used to detect the movement by the Hand and then transmitted over to the PC to detect it as a Mouse move operation. This can be of great help during presentations and demos.This also is a great gaming joystick, watch its video to find more.
In all a great innovative and efficient use of the Wireless and Accelerometer technologies. 
I was once planning to have one of these, but now I have some more justification to buy one.
Welcome to Boseji's Blog

Popular Post

Blogger templates


Creation by Electronics Hobbyists from Bharat(India) to encourage & help people. This blog hosts the numerous innovations, discoveries and projects we provide.
Our Research Wing Adhar Labs
Contact Form | Email Address
We Support Open Source Hardware Definition v1.0
Creative Commons License
All works on this blog are licensed under a
Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at and

Permissions beyond the scope of this license may be available at
Thank you for all your support.

© A.D.H.A.R Labs Research 2008-2013 . Powered by Blogger.

Follow by Email


PCB Unit Converter


- Copyright © Electronics for Bharat -Robotic Notes- Powered by Blogger - Designed by Johanes Djogan -