Saturday 13 December 2014

Free samples of Electronic Components and semiconductor chips

Hi everybody,

          Ever thought of doing your projects without involving a single rupee..? oh yes.. it is possible.. I will share my experience of ordering free samples from industries…

Just a few months before, while surfing through the internet, I came to know that most of the semiconductor industries provide free samples of their components to individuals like me.

I ordered some voltage regulators and a wifi chip from Texas Instruments (TI). While ordering I was not sure whether they will approve my request. For two weeks there wasn't any notification from TI, and I really forgot it. Then a mail came stating that the order has been shipped through FedEx.

           At first I was surprised that my order was shipped but then I was worried about the customs tax and duties charges. In TI’s website, it says like “TI will pay the customs and duties only if the destination countries rules allow that”. I am staying in TamilNadu, India and I calculated the approximate customs and duty taxes to pay when the order arrives. When the shipment arrived to my home, to my surprise I wasn’t charged any taxes.  Hence I got my order without a single rupee, all the way from US to my home.

Not only Texas Instruments, but also many other industries provide free samples to individuals. You can even order free samples of resistors from industries. But the thing is not to exploit the opportunity. Order only the quantity that you need and make good use of it.






I will just provide the names of semiconductor industries here… just go through their website and find whether they provide free samples to individuals (because mostly they provide free samples only to corporate people and not to individuals).

Texas Instruments - www.ti.com
Maxim - Dallas Semiconductors -- http://www.maxim-ic.com/
Microchip -- http://www.microchip.com/
Sensirion -- http://www.sensirion.com/
ATMEL -- http://www.atmel.com/
Fairchild -- http://www.fairchildsemi.com/
Ramtron -- http://www.ramtron.com/
Analog Devices -
Bourns -- http://www.bourns.com/
National Semiconductor -- http://www.national.com/
Clare -- http://www.clare.com
RF Microwaves -- http://www.rfmd.com
FTD -- http://www.FTDIchip.com (USB Chips)
Allegro -- http://www.allegromicro.com
VLSI Solution -- http://www.vlsi.fi (mp3 chips)
MicroSemi -- http://www.microsemi.com
Princeton -- http://www.princeton.com.tw/index-e.htm
AVX (only passive components) -
- http://www.avxcorp.com/RequestSample.asp
California Micro Devices -
- http://www.steward.com/Sample_Request.asp
Supertex -- http://www.supertex.com
Reptron -- http://www.reptron.com/di/Sample.asp
Bivar -- http://www.bivar.com/html/contact.html http://www.larsenassociates.com/cac.html
Ria Electronic -- http://www.riaelectronic.com/samples.asp
SunLED -- http://www.sunled.com/RequestInfo/SamplesRequest.htm
Above Board Electronics -- http://www.aboveboardelectronics.com
Mill-Max -- http://www.mill-max.com/home/index.html
Chesrep -- http://www.chesrep.com/page2.htm
Raltron -- http://www.raltron.com/products/request.asp
Meritek USA -- http://www.meritekusa.com/sample.php
Murata Europe -- http://www.murata-europe.com/contact/samples.html
Clarostat -- http://www.clarostat.com/SampleRe.nsf/SampReq?OpenForm
Molex -- http://www.molex.com
Kycon --  http://www.kycon.com/Form_Samples.html
AZ Microtek -- http://www.azmicrotek.com/samples.html
Astrorep -- http://www.astrorep.com/NYsubweb/orderform.htm
Xicor -- http://www.xicor.com/form_sample_requests.php
FMG Electronics -- http://www.fmgelectronics.ie/sample.htm
ElecTec -- http://www.electec.com/samples.html
BHEL Electronics -- http://www.bhelectronics.com/transformer-qtrpak-request.html
Sager -- http://www.sager.com/
Marshall -- http://www.marshall.com/
Lambind -- http://www.lambind.com/request.shtml
Edgecards -- https://www.edgecards.com/ordersamples.php
Onsemi -- http://www.onsemi.com
Tamweb -- http://www.tamweb.com/Samples,%20Literature.htm
Promor -- http://www.promor.com/requesta.htm
Crystal -- http://www.crystal.com/design/products/samples/
Burr-Brown -- http://www.burr-brown.com/
Philips Logic -- http://www.philipslogic.com/order/sample/
CentralSemi -- http://www.centralsemi.com
Cirrus -- http://www.cirrus.com/design/products/samples/
LittelFuse -- http://www.littelfuse.com/Products/samplesElect.asp
Fox Online -- http://www.foxonline.com/forms/noncryqu_4X.asp
Vitelel Electronics -- http://www.vitelelectronics.com/ulinear.htm
SemTech -- http://www.semtech.com/press/pa_082401.html
OKW -- http://www.okw.co.uk/catalogue/sample/sample_form.htm
CarlingTech -- http://www.carlingtech.com/contact/quote.asp
MXCom -- http://www.mxcom.com
Allegro -- http://www.allegromicro.com/control/prodline.htm
Agere -- http://www.agere.com/pmap/requests.html
Heyco -- http://www.heyco.com/sample.htm
Elantec -- http://www.elantec.com/pages/samples.html
TekNational -- http://www.teknational.com/form_response.html
FCI Connect -
- http://www.calmicro.com/contact_us/samples_request.html
Catalyst Semiconductor -- http://www.catsemi.com/need_a_sample/index.html
Sipex -- http://www.sipex.com/products/samples.aspx
Supertex -- http://www.supertex.com/contact_form/sample_request
Clare -- http://www.clare.com
Zilog -- http://www.zilog.com
Coilcraft -- http://www.coilcraft.com/
Hittie -- http://www.hittite.com/index.cfm
CML Micro -- http://www.cmlmicro.com
Holtek -- http://www.holtek.com/english/contact/contact.htm
System General -- http://www.sg.com.tw/semiGP/sample_E.asp
Bivar http://www.bivar.com/
MillMax -- http://www.mill-max.com
Chesrep -- http://www.chesrep.com
Avnet -- http://www.avnet.com
Promor -- http://www.promor.com
TAM -- http://www.tamweb.com
Central Semiconductors -- http://www.centralsemi.com
SMD INC. -- http://www.smdinc.com
Pericom -- http://www.pericom.com
Elesta -- http://www.elestarelays.com
Pacentec -- http://www.pactecenclosures.com
Sensitron -- http://www.sensitron.com
Bergquist -- http://www.bergquistcompany.com
Cooperet -- http://www.cooperet.com
NorthWest Components -- http://www.northwestcomponents.com
ERG -- http://www.ergpower.com
EM Microelectronics -- http://www.emmarin.com
Eswitch -- http://www.e-switch.com
ON Shore -- http://www.on-shore.com
AAVID Thermal Alloy -- http://www.aavidthermalloy.com
Epcos -- http://www.epcos.com
Fordata -- http://www.fordata.cn
TRA CON -- http://www.tra-con.com
WJ Communications -- http://www.wjcommunications.com
NJR -- http://www.njr.com
Wurth Elektronix -- http://www.we-online.com
Spectra Symbol -- http://www.spectrasymbol.com
Cirrus Logic -- http://www.cirrus.com
FreeScale -- http://www.freescale.com
Tyco -- http://www.amp.com
Elfa (Not sure they give samples) -- http://www.elfa.se/en/

Comment here about your experience on free requests...

See this link for a detailed info on industries free samples - http://www.ladyada.net/library/procure/samples.html

Tuesday 11 November 2014

Bluetooth Operated Robot

         Here is a simple robotic vehicle that can be operated by using Bluetooth connection. The Bluetooth module that is used here is HC-05 Master/Slave module. The robot can be controlled using both Android smart phones and Computers via a serial terminal.

         For computers we can use Teraterm, Putty, etc and for Android phones we can use Blueterm or a dedicated Robot Control App (Several such apps are available in PlayStore).


Components Required:

      1.      Arduino Compatible Board – GR Sakura
      2.       HC-05 Bluetooth module
            3.       L293D Motor Driver
      4.       DC motors and Wheels
      5.       Battery


Working:

                Connect power supply to the circuit. Open the serial terminal software/app after turning On the Bluetooth – Teraterm/Putty in terms of computer or Blueterm in terms of Android phones. Search for the HC-05 device and pair with it by giving the default password of HC-05 ‘1234’. Below are the control signals,
                                                                8 – Move Forward
                                                                4 – Turn Left
                                                                6 – Turn Right
                                                                2 – Move Back
                                                                5 – Stop


Note – You can change the control signals as you wish by changing the code

Code Structure:

#include 'rxduino.h'
#include 'iodefine_gcc63n.h'
char a;

int main()
{
                Serial.begin(115200,SCI_SCI0P2x);
                delay(1000);
                /* give the pin details here that controls the dc motors via L293D */
while(1)
                {
                                if(Serial.available())
                                {
                                                a=Serial.read();
                                                if(a=='8')
                                                {
                                                                /* give the pin configuration to turn on the dc motors such that the robot moves forward */
             }
                                                if(a=='4')
                                                {
                                                                /* give the pin configuration to turn on the dc motors such that the robot turns left */
            }
                                                if(a=='6')
                                                {
                                                                /* give the pin configuration to turn on the dc motors such that the robot turns right */
            }
                                                if(a=='2')
                                                {
                                                                /* give the pin configuration to turn on the dc motors such that the robot moves backward */
                                                 }
                                                if(a=='5')
                                                {
                                                                /* give the pin configuration to turn off the dc motors such that the robot stops */
                                                }
                                }
                }
}
                                      

Video Demo:



                                                                
For info on L293D - Driving DC motors
For info on HC-05 - Interfacing HC-05

Monday 15 September 2014

Guide to Timer units and example programs:


In this post you will learn to work with timer and to trigger required interrupts.
                Every micro controller has at least 2 (maybe wrong..!) timer units - Timer0 and Timer1. The RX-63N processor in GR-Sakura has 4 Timers Timer 0 – Timer 3 (8 bit). Also Timer0 and Timer1 as well as Timer2 and Timer3 can be combined (cascaded) to provide two 16 bit timer units.
  
              Timer speed is based on the clock source provided to it. An 8 bit timer/counter counts from 0 to 255 (2^8), whereas a 16 bit timer/counter counts from 0 – 65535 (2^16). A clock source defines in what speed the timer counts (increment/decrement) these values.

For example,
                Consider an 8 bit timer with clock source as 20MHz. Then the timer will increment (from 0) for each 1/20000000 =  0.05u Sec. And thus the total time for the timer to count 255 is given by,
1/2000000 * 255 = 0.05u * 255 = 12.75u seconds

Similarly for a 16 bit timer,
1/2000000 * 65535 = 0.05u * 65535 = 3.27m seconds

                Since the timer units are within the microcontroller, you may think that whatever clock is given to microcontroller is available for the timer units. The microcontroller’s clock input is referred as Primary Clock (PCLK). Either you can use this clock or change the clock source to a timer unit. This is achieved with the TCCR (Timer Counter Control) Register as in Sakura’s case. The clock source can be PCLK, PCLK/2, PCLK/4, ……, PCLK/8192 (Refer datasheet).

We will see what is the use in dividing the clock source..,
                If you select the clock source to be PCLK/4, then clock will be 5 MHz (For PCLK = 20MHz) and the time to count for a 8 bit timer will be
1 / 5000000 * 255 = 51u sec
Thus you can increase the timing.

Ok.. The timer starts and finishes its counting.. what’s in there for us and what to do with that.?
1.       delay() functions can be replaced with such timers. Because delay() functions make the processor to do nothing and just simply wait. Whereas if you use a timer, you can perform other functions when the timer is counting (probably multitasking).
2.       Can be used to trigger certain on chip peripherals such as ADC, periodically using interrupts.

A timer either

1.       counts from 0-255 for 8 bit timer and 0-65535 for a 16 bit timer and Overflows

2.       a specific value can be written and the timer counts from that specific value

3.       a specific value can be written and the timer counts up to that specific value

8 bit Timer Overflow Interrupt:

         A simple timer program for GR-Sakura – The following code involves enabling Timer0 (8 bit). Once the timer overflows, it generates Timer0 Overflow Interrupt which increments the cnt variable. And once the value of cnt reaches 50, it changes the state of the on board LED.

Note:    GR-Sakura’s clock source (PCLK) is 48MHz.
--------------------------------------------------------------------------------------------------------------------------
#include <rxduino.h>
#include <iodefine_gcc63n.h>

#include"intvect.h"

void Excep_TMR0_OVI0 (void) __INTTERUPT_FUNC;
void init_tmr();

int cnt=0;
volatile int state=0;
 
int main ()
{
                pinMode (PIN_LED0, OUTPUT);

                init_tmr();

                while(1)
                {
                                if(cnt>50)
                                {
                                                cnt=0;

                                                state=!state;
                                                digitalWrite (PIN_LED0, state); 
                                }
                }
}

 
void init_tmr()
{

   MSTP(TMR0) = 0;  // Timer unit enable
   TMR0.TCCR.BIT.CKS = 0b110;   // Clock Select Bit (refer below image) – PCLK/8192

   TMR0.TCCR.BIT.CSS = 0b01;   //  Clock Source Select Bit (refer below image)
   TMR0.TCR.BIT.OVIE = 0b1;   // Timer 0 overflow interrupt enable bit

   IEN (TMR0, OVI0) = 1; // Timer 0 overflow interrupt Enable MACRO
   IPR (TMR0, OVI0) = 2; // Interrupt priority – Level 2

}

void Excep_TMR0_OVI0(void)
{
                cnt++;
}

--------------------------------------------------------------------------------------------------------------------------
                By executing the code, LED is turned On after 2.176 seconds (1/48000000 * 255 * 8192).



 Compare Match Interrupt Program:


                Other than starting from 0 and count to 255/65535, you can write a specific value to registers TCORA/TCORB, and when the timer reaches that value, it stops and clears the TCNT (Timer Counter) register.
--------------------------------------------------------------------------------------------------------------------------
 #include <rxduino.h>
#include <iodefine_gcc63n.h>

#include"intvect.h"


void Excep_TMR0_CMIA0 (void) __INTTERUPT_FUNC;
void init_tmr();

int cnt=0;
volatile int state=0;

int main ()
{
                pinMode (PIN_LED0, OUTPUT);

                init_tmr();
                while(1)

                {
                                if(cnt>50)

                                {
                                                cnt=0;

                                                state=!state;
                                                digitalWrite (PIN_LED0, state); 
                               }

                }
}

 
void init_tmr()
{

   MSTP(TMR0) = 0;  // Timer unit enable
   TMR0.TCCR.BIT.CKS = 0b110; 

   TMR0.TCCR.BIT.CSS = 0b01;
   TMR0.TCR.BIT.CCLR = 0b01; // Automatic clearing enabled

   TMR0.TCR.BIT.CMIEA = 0b1; // Compare match A interrupt enable
   TMR0.TCORA=118; // write the required value to TCORA register (in this case timer starts from 118 and ends at 255)

   IEN (TMR0, CMIA0) = 1; 
   IPR (TMR0, CMIA0) = 2;
}

void Excep_TMR0_CMIA0(void)
{
                cnt++;
}

 -------------------------------------------------------------------------------------------------------------------------
                Compare Match can be used to provide precision timings. For example, if you need an accurate 1 sec delay, then you can write the required value at which the timer starts so that a 1 sec delay is achieved. Need to do some math…!!!!!

Cascading two 8 bit timers to obtain a 16 bit Timer:


                Here two 8 bit timers namely Timer2 and Timer3 are cascaded to achieve a single 16 bit timer. The concept is that whenever the lower 8 bit timer overflows, then the upper 8 bit is incremented once.

 
In this code Timer2 is the upper register and Timer3 is the lower register.
--------------------------------------------------------------------------------------------------------------------------

#include <rxduino.h>
#include <iodefine_gcc63n.h>

#include <intvect.h>
 
void Excep_TMR2_CMIA2(void) __INTTERUPT_FUNC;

void init();
int k;

main()
{
               Serial.begin(9600);

                delay(7000);

                init();
                while(1)

                {
                                if(k>5)

                                {
                                                Serial.print(k);

                                                Serial.println(" Counted");
                                }

                }
}

 
void Excep_TMR2_CMIA2(void)
{
                 k++;
}

 
void init()
{
                MSTP(TMR2)=0;

                TMR3.TCCR.BYTE=0;
                TMR2.TCCR.BIT.CSS=0b11; // clock source is the a Timer3 overflow signal

                TMR23.TCNT=0;
                TMR2.TCR.BIT.CCLR=0b01; // cleared by Compare Match A

                TMR2.TCR.BIT.CMIEA=1;
                IEN(TMR2,CMIA2)=1;

                IPR(TMR2,CMIA2)=1;
                TMR23.TCORA=60000;  // change this value and notice the change in timings

                TMR3.TCCR.BIT.CSS=0b01;
                TMR3.TCCR.BIT.CKS=0b100;
}

--------------------------------------------------------------------------------------------------------------------------
Hope it helps somebody..!!!