Friday, April 18, 2014

CIE Co-ordinate Calculator DRAFT

You can download program from here


PL Data File Format

First save photoluminescence data in text format. Usually these files have the format as shown below

 

Tuesday, February 25, 2014

Laser Cutter Tutorial

Safety First

- It is very easy to start fires with the laser cutter, never leave machine alone while cutting
- The laser cutter can also produce dangerous fumes (e.g. chlorine) if used with improper materials. Never cut PVC, or other chlorinated plastics.


User Laser cutter for 
- Cutting acrylic, wood, paper and foamcore. You can not cut metals with 100W laser cutter.
- You can raster (image) engravings into above materials as well as glass, stone, slate, etc.


Driver Software
You can use either fab modules or CorelDRAW software for laser cutter.

Fab modules

CorelDraw Software
- Import 2D .dxf files, Postscripts files and general pixmaps
- All the lines in 2D design sign should have minimum width hairline ("0.04") to be preserved as "vector" cuts
(lines/arcs). Wider lines will be automatically rasterized.
- Line colors are mapped to different laser speeds, powers, and PPI by the CorelDraw laser cutter driver.
- Load or import your drawing into CorelDRAW and change the paper size to the dimensions of the laser cutter. "Layout...Page setup", page size should be 32" x 18"

Procedure 


Step - 1: Turn on Laser Cutter 

The switch is in the rear-right of the unit. The cutter takes approximately 30 seconds to power-on/boot.

Step - 2: Clean Lens

When the cutter is used with a dirty lens, particles can ignite and destroy the lens. So it is important to clean the lens before using laser cutter. Follow this procedure - 
- Unscrew the three thumbscrews and remove lens assembly.
- Soak cue-tip with one or two drops of cleaning liquid and gently clean the lens using it.

Step - 3: Set bed to focus height

 If not properly focused, the laser cutter won't properly cut. This will results in a poorly cut part, as well as produces lots of extra material residue and gas, which is especially problematic with acrylic and other plastics.
- Put the sheet you want to cut on laser cutter bed.
- Bring the laser cutter head near to center of your cutting area.
- Put the plastic focusing tool below the laser cutting head.
- Increase the height of the bed until the head touches the shoulder of plastic focusing tool. Press "Select" to toggle between Fast and Slow z-adjust and use Up and Down arrow to move laser cutter bed.

Monday, February 24, 2014

STM32 Evaluation Board

Introduction

Description of the board and all the necessary documents can be found here 




USB Device and Host using Eval board

1) Download the library from here
2) Download the user manual for library. In the project folder read "readme" file on how to run the code.

For VCP example

Connect TX and RX pins: PC10 and PC11 (with a cable or a jumper). PC10 is UART4_TX and PC11 is UART4_RX. The micro-controller in the kit is in UFBGA176 package. In the board PC10 is in connector CN4 pin no 36 and PC11 is in connector CN4 pin no 35. A jumper can be used to simply connect them.

Jumper JP22 should be connected in position 1-2 (Rs232)

Wednesday, February 19, 2014

Getting Started with STEM32

We are going to use STM32F4 Discovery Board. 

Things you need


1) STM32F4-Discovery Board
2) Keil uVision

STM32F4DISCOVERY board includes an ST-LINK/V2 embedded debug tool interface. The embedded ST-LINK/V2 supports only SWD interface for STM32 devices

Documentation


The library documents, examples etc are difficult to find even in ST website. For library documentation, you can check this website.

All resources in general here


Discovery Board support library
http://web.eece.maine.edu/~hummels/classes/ece486/docs/libstm32f4_doc/modules.html

STM32F4 Peripheral Library
http://web.eece.maine.edu/~hummels/classes/ece486/docs/libperiph_doc/modules.html

To document follow this guide line

Features of STM32F4 uC


- Three 12-bit ADCs. They can be used separately or combined. When used in combined mode sampling rate unto 1MSPS can be achieved.
- Two DACs
- One low-power real-time clock (RTC)
-  Twelve general-purpose 16-bit timers including two PWM timers for motor control, two general-purpose 32-bit timers. a true random number generator (RNG). TIM1 and TIM8 are advanced timer.

Note on RX/TX pins of Discovery board:  Discovery board has uC which has LQFP100 pin-out. PC10 is pin 78 which is UART4_TX and PC11 is pin 79 which is UART4_RX. 


VCP using CDC Library

The buffer reseaving data in STM32F4 part is defined as uint8 so whatever data you send from MATLAB or any other serial port device should be of the form character or uint8. If you want to set some value of register (say DAC register to set some output value) send it as uint8 in matlab (check interpret data as hex..) in tmtool. Use the following command

fwrite(obj1, [hex2dec('B')], 'uint8');

If the register is uint16, then find a way to use two uint8 to make one uint16
uint8_t d1=0x01; 
uint8_t d2=0x02;  
uint16_t wd = (d2 << 8) | d1;

For rest you can use %c\n or %s\n for communication.








Once the code is successfully uploaded, use the reset button to run the code.



Using STLink/v2 for Debugging and Programming

1 - Download and install STM32 ST-Link Utility
2 - Connect the discovery board via USB. Reset board
3 - In 


Using DACs

First ready DAC section in refernce manual to get a little idea. Then read stm32f4xx_dac.c get idea about various functions available to program DACs.
DAQOUT = Vref*(DOR/4095);   
note: 4095 is in decimal (0FFF in hex);In discovery board
DOR value -  DAC output
0x0FFF (4095)  - 2.87
0x0800 (2048) - 1.41
DAC conversion can be triggerd by counter, or software or external trigger line.

DACs have ability to DMA and use data there to convert. It needs to be periodically triggered (using say counter) to continuously generate waveform. Period of the waveform is obviously determined by the period with it is triggered.

General Procedure

Configure the GPIO pins using
GPIO_InitStruct->GPIO_Mode = 
GPIO_Mode_AN for DAC/ADC


Source Code documentaiton

The peripheral library provided by ST is documented using DoxyGen. Things like @param etc are for doxygen. It integrate doxygen to Keil to generate documentation using Doxygen, follow the following steps-

1 - Download Doxygen from here and install. 
2 - Instructions here










Matlab + STM32F4


Download package for STM32F4 Discovery board from here

To install package go to MATLAB toolstrip and click Add-Ons > Get Hardware Support Packages.During installtion "Support Package Installer" will ask to install third-party software "CMSIS" which you can download from ARM website. Copy paste the downloaded folder to C:\ and rename as CMSIS. Matlab will identify this folder and add into the package.

Could compile the code and blink green LED in board.



Simplifying code

Example code from ST website are usually everthing hoch puch together for example they have code for all evaluation board in one project to simply it simply go to project - manange - component..  and remove all other targets.

Monday, December 30, 2013

DI Workshop: Grassroot Engineering

Co-instructor
- Transferjet engineer, Consultant - rural technology, semiconductor and solar energy.

Workshop Tentative Schedule

Day - 1: Project management, documentation (blogging)
Day - 2: Technical Sessions
            - CAD/ 3D Printing
            - Make your own Microcontroller Kit
            - Android session and  Transferjet (TOSHIBA)
            - Input/Output Devices (??)
            - Image Processing, Signal processing
            - MATLAB (??)(general, GUI, Image processing, Data acquisition - Analog,Digital I/O)

Day - 3: Field trip
- Field trip briefing:
- Observation
- Need statements
- Filtering need statement
- Ideation of solutions
- Filtring one solution
- Making Prototype
- Documentation and Presentation

Day -4:
- 30s pitch (Students presentation)
- Start presentation with GIRAFFE (a word)
      - ask audiance/students for feedback.
      - Give feedback on presentation (individual).
      - Start with positive hook.
      - talk about custumer experiance. (tecnology flaw into plus point)

Resources required for ~50 students

 
 

Total Cost ~ $2200
 - Field visit suggestions
- Curriculum
-

Define problem first
Which techonoloyg to use

Topics - Education, healthcare, transportation, banking, finance, agriculture (villagers willing to pay), Information and energy.

Toshiba community space (social orientation). Where bussiness and enterprenures can use the technology created and make money. Replicate such community space to other places.

- Villagers wants to provide information to outer world.
- Internet at village (FabFi?)

- Village - Ratnagiri
- NGO started a different kind of school which teaches skills to solver local problems
- They (teachers) are developing prototype with LEDs. Desk (like laptop) with LEDs.
- Working today based on future projection.

- Near field communication device

////









Monday, December 23, 2013

Innovation and Entepreneruship Workshop

Sunday 22nd, 2013


- Report on field trip from Yesterday.
- Session on IOIOIO Board by Dan.

01/07/13

Entrepreneurship - Identifying the opportuniy other don't see, taking risk, build with whatever you have
MBA is a manager.
- Train kids

Round - 2

Step - 1: Field Trip Observation
Step - 2: Identify couple of problems
Step - 3: Analyze each problems (why it exist, how much impact, finicial gain, stack holder - who will benefit and who will suffer) and narrow down to one problem.
Step - 4: Potential solutions.
Step - 5: Finalize one solution and conceptualize it.
Step - 6: Make a prototype.


Round - 3

Seed ideas for project. Don't spend much time on finding problem in round-3.
Business analysis.
- Experience of working with people. Technical skill in blog.
- Call students and ask to present.
-
Give them 20 need statement.
Technical entrepreneurship.



Pre-Workshop

Kits
- Bluetooth 

Tutorial Sessions
- PCB prototyping
- Make your own uC Board/Arduino
- Arduino
- Sensors
- Android
- Matlab (general, image processing, interface with android, interface with arduino)