• Tag Archives Hardware
  • Winter project Philco 48-214 AM Tube Radio

    Hello, been awhile.
    I finally have some time to work on projects, and this one can be incremental where I can put 5 mins here, or 10 mins there to work on this. My goal is to restore this radio to working condition, replace all the old capacitors, refinish the wooden cabinet, and replace the speaker clothe.

    I have already started to strip and sand the cabinet, and I have found decals to replace the Philco Transitone decal that’s on the front.

    So far I am really looking forward to finish this by Christmas.

  • RFID + Back door = Easy Access

    Lately I have been lazy about getting into my home, early in the morning I dislike rummaging through my pockets to get out my keys just to go through 2 doors just to get in and sit down.Ā  So I fixed this issue by making my patio door RFID accessible. With a few parts on hand and a whole bunch of time, I made a “patio un-locker”, because it only unlocks the patio door but does not lock it.

    Continue reading  Post ID 1713

  • 430 work shop links and source code

    source code zip of all the projects that were demoed at workshop 88 http://www.workshop88.com/
    (the code is in mspgcc format and may need alterations to compile for CCS & IAR)

    Sources code for Shift register demo
    original code here

    servo demo
    original source

    Music demo
    Original source here

    The RGB demo was not there
    source http://justinstech.org/projects/msp430-rgb-flower-pot/

  • TTL/MOS timer experiments

    I have this dual 556 timer that i have wanted to use, just because it can take 15V and work with out an issue and as low as 3V. (thanks TI) So i was thinking that this had some potential to be used for RF or a fixed PWM signal. (personally i would like to pick up a few digital POTs and a digital cap to to create a DCO of some sort)
    So far i have played with it and found some interesting things out.

    TLC556 Dual Cmos Timer Data Sheet

    My first goal was to get a 50% duty cycle from the chip, this was pretty easy just choosing the correct values for Ra and Rb, but you will have to do some math and you should use the equation out of the data sheet for your chip. My equati0n Period = tH + tL ~= CT (RA + 2RB) In 2, but if you need values closer to what is measured, you will have to break out the TI 8x and plug in tH = Ct (Ra + Rb) ln [ 3 – exp(-t PHL / Ct (Rb + Ron) ) ] + t PHL and Tl = Ct (Rb + Ron) ln [ 3 – exp(- t PHL/ CT(Ra + Rb)) ] + tPLH.Ā  I know these equations look difficult but as long as you plug in your values you will get close to what you measure on your oscilloscope. but i did this the fun way, use the first equation to get close to what you need then tweak the rest of the values until you get something close to what you want.

    The values that i chose first were the Ra and Rb, I chose Ra =Ā  220 ohms and Rb =Ā  100 ohms and Ct = .0047 uF.Ā  Rl and Cl i did not choose a value nor did i hook up those components, i will have to look into the reason they are there, but i’m sure they are there for good reason. This first Test was just to make sure i can get a good square wave and be able to shape it.

    the new values that i used are – will update later, but frequency is near 1 Mhz

    My second goal was to try and make a sine wave or shape the square wave to be better for RF transmission. I added a Pi Network to the out put to shape the wave and below is what i got for half of the pi network, i will have better pics of the final wave form once my circuit is a little more complete.

    another pic

    and another

    If all goes well and i can create a pretty stable transmitter i will be hooking up a small modem chip to the circuit and create a cheap digital modem . Another thing that would be nice would be a pair or transmitters and receivers so i can send and receive at the same time.


    R1 100 ohms

    R2 220 ohms

    C1 .0047uF

  • MSP430 RGB V0.1

    A different take on how to create a PWM signal. I decided to go the interrupt route using the WDT+ peripheral. I did this by setting it to the interval timer and putting all my counters and logic within the interrupt. The funny thing isĀ  i have read that you shouldn’t put too much code into your interrupt, or something bad will happen.

    the resistors on the left, are 100 ohm resistors and the one on the right is a 470 ohm resistor to limit current for the RGB LED. connections on the uC that are used are pins 1.3, 1.4, 1.5 i have not decided which pins are what color, i will decide that on my final build.

    The test code will be improved this is just the compile and see if it works.- The best part , the code works lol .

    so let me know what you think on creating PWM with the interval timer instead of timer A.

    #include <msp430x20x2.h>
    #include <signal.h> //add for interrupt
    #define UP 0x00
    #define DOWN 0x01
    volatileĀ  int millsecs = 0;
    volatileĀ  int counter2 = 0;
    volatileĀ  int led_red = 0;
    volatileĀ  int led_green = 199;
    volatileĀ  int led_blue = 199;
    volatileĀ  int dir = UP;
    void main(void)
    WDTCTL = WDT_MDLY_0_064;
    P1DIR |= BIT5 + BIT4 + BIT3;
    P1OUT |= BIT5 + BIT4 + BIT3;
    IE1 |= WDTIE;
    }//end main
    interrupt(WDT_VECTOR) watchdog_timer(void)
    if (millsecs == 200) { millsecs= 0; P1OUT |= BIT0 + BIT6; ++counter2; }
    if (millsecs == led_red ) { P1OUT ^= BIT3; }
    if (millsecs == led_green) { P1OUT ^= BIT4; }
    if (millsecs == led_blue ) { P1OUT ^= BIT5; }
    if (counter2 == 25 ) { counter2 =0;
    switch (dir){
    case UP: ++led_red; --led_green; --led_blue;
    if (led_red == 199) {dir = DOWN;}
    case DOWN: --led_red; ++led_green; ++led_blue;
    if (led_red == 0) {dir = UP;}
    }//end switch
    }//end if
    }//end interrupt

    To change the Period length – change the 200 value to the period you want, you can also change it by setting the WDT interval to different intervals to change the period.
    to change the Duty cycle, change the led_[color] variable to anything between 0 and period length

    I am still working on trying to get it to cycle through all colors, and fade better when led_[color] is close to 0
    by far this project is not done, the board will be soldered up and pics will be presented. The end result should be code for WDT PWM, which could be used for servos, LEDs, or possibly communication, and i will have my flower pot back!

  • msp430- coding interrupts for mspgcc

    I am just an idiot, but thats my opinion. For those with MSPGCC compilers, we have a more difficult time finding code examples, and many of the code examples given either don’ explain very well (cryptic Coding, un-commented code) or they are for the CCS or IAR, and they dont use the same syntax as the MSPGCC compiler. So here is how to create an interrupt handler for non-PUC/POR interrupts.

    I will not go into interrupt vector masking, that is beyond me at this moment, but im not saying that i wont cover it later on, once i understand why you would want to mask it…..
    So lets start at what headers and other setup items you need before, creating the interrupt handler.
    First the signal.h has to be included into your code. #include<signal.h>
    this will give you access to the special function of
    interrupt(VECTOR ) service_routine (void) {/*interrupt code*/ }

    this is the same as #pragma vector=WDT_VECTOR
    __interrupt void watchdog_timer(void){ }

    These are the Defined vectors for interrupts right from the header files.(mspgcc headers)

    #define PORT1_VECTOR 4 /* 0xFFE4 Port 1 */
    #define PORT2_VECTOR 6 /* 0xFFE6 Port 2 */
    #define USI_VECTOR 8 /* 0xFFE8 USI */
    #define ADC10_VECTOR 10 /* 0xFFEA ADC10 */
    #define TIMERA1_VECTOR 16 /* 0xFFF0 Timer A CC1-2, TA */
    #define TIMERA0_VECTOR 18 /* 0xFFF2 Timer A CC0 */
    #define WDT_VECTOR 20 /* 0xFFF4 Watchdog Timer */
    #define NMI_VECTOR 28 /* 0xFFFC Non-maskable */

    all the interrupts should be self expainatory, vector = the source of the interrupt.

    since now we have all the basics we can now right a small program that uses interrupt, we will just create a small WDT interval timer.
    /*WDT interval timer- code based on msp430 examples*/
    #include<signal.h> //interrupt service routine
    #include <io.h> //usually included on msp430 header, but for sfr register access.
    void main(void) {
    WDTCTL = WDT_MDLY_32; //~30mS intervals
    P1DIR |=BIT1;
    IE1 |= WDTIE; //enable interrupt
    _BIS_SR(LPM0_bits + GIE); //not low power mode and enable interrupts
    }//end of main
    //interrupt service routine
    interrupt(WDT_VECTOR) watchdog_timer(void)
    P1OUT ^= BIT1;
    }//end of interrupt

    this should give you a good start on your Interrupts but there is still one thing that you may need. Changing the power modes when a interrupt is being serviced, the power mode will revert back to the power mode that it was in when the interrupt was called.
    There are 2 functions that we can use to clear or set power modes while in an interrupt.
    First one is to set the mode on exit of the routine, this is done by changing the copy of the status register that is saved to the stack. _BIS_SR_IRQ( ... )
    you would use this the same way you would use the _BIS_SR(…)

    The second one will clear the bits you select _BIC_SR_IRQ(...) same usage as the other, except it will just clear the bits not modify them.
    ***the use of _BIx_SR_IRQ() should only be used in an interrupt service request, the compiler will give you a warning but will produce the correct code if you use it anywhere else.***
    ****remember to enable Interrupts by using BIS_SR(GIE) or eint()****

    Edit 6-23-2011

    MSPGCC Uniarch branch of mspgcc has been released, It supports newer chips like the msp430G2453 (the newer 20pin DIPs) This is an initiative to unify the current branches of mspgcc. Interrupts for this version is slightly different. Once I test it or get confirmation from another user I will post the correct format for uniarch branch……but what would be better would be unify the branches so we don’t have so much confusion with these version discrepancies and nuances of the trees.

    As of right now uniarch is still being worked on and there and is not fully recommended unless you need support for the newer 20pin Dips (G2x53 G2x52).Ā  Please don’t let my opinion dissuade your choice of compiler, mspgcc works great for me but uniarch may work better for you.


    Thank you Tissit for your Comment

    “In current gcc, you can (should) include msp430.c instead of the specific header and use the -m switches (in a Makefile) to tell the compiler which chip youā€™re using. It will find the right headers automatically. “

    If I forget something let me know and I will update

  • BPM Counter Display update

    I finished the display for the bpm counter!! Its amazing what you can do with a few transistors.Ā  I’m currently using 10 of the 14 digital pins on my board, but running three 7 segment LED displays.Ā  Parts include 10 NPN 2n2222 transistors and NPN 2n3904. 7 x 3.7K resistors and 2 dual 7 segment displays (only 3 being used).

    Thanks to Codekiller, im going in a slightly different direction, he suggested to create a VU meter first and get a good reading, then start to create the algorithm to find out the bpm is. Timing will be essential to get an accurate calculation, and also to visually look at the graphed data the arduino puts out will help in creation of the bpm algorithm, from my experience in audio editing and mastering, I am pretty certain I can pick out the Beat and measure the time it takes for the next peak, doing this visually should not be to hard but putting it into a programming language and having it work may be a little challenging.

    I am currently coding a quick gui to read and graph the values using The processing programing language(very easy to build visualization software and gui interfaces using a C like programming language). This may turn into a start of a simple oscilloscope later this year since i do need one for my bench.

    Pics comming this morning whenĀ  I get home from work(lol)and maybe a video if i can get it to work correctly. I am so happy that I have a radio shack within 5 mins from my place, and only have to wait till 9 am till they open.

    Thanks Codekiller for the great help and ideas—> his site http://smfinc.web.elte.hu/ruckus/index.html

    and the site Im using as a starting point —>http://interface.khm.de/index.php/lab/experiments/arduino-realtime-audio-processing/

    at the time of this post the last link had a Database connection error in German, I will check in a day or so and if its still down, I will post the PDF and code that I’m using from there project.

    Look for more updates Soon!!



    my camera is not function at this moment, im working on getting it fixed and recovering some of my pics, but work is continuing on my days off. (not to much time on work days) the audio circuit is done, just need to test .

  • Sugru? This stuff looks awsome!


    I recently found this site selling this weird putty that reminded me of Mighty Putty, But this stuff is so much better than that.
    It dries flexible and stays flexible at all temperatures. So i decided to buy some here http://sugru.com/ . So i bought 2 of there multi colored multi hack pack. I just hope it ships before February 2010. Next i will have to find a place that sells polymorph.