Jump to content
43oh

dacoffey

Members
  • Content Count

    14
  • Joined

  • Last visited

Reputation Activity

  1. Like
    dacoffey reacted to username in MSP430 Reflow Oven   
    Hey all,

    Nate here, made a nice little reflow oven to help me in the construction of surface mount boards. Got a video explaining it all here:

    PCBs and Control Boards for sale here: viewtopic.php?f=22&t=2040
    No longer for sale, no time to pump any out.
     

    Project Video:





    Project Pics:







    Schematic:This is my old V1 schematic. Todo if you want a better board:
    -Use a MSP430G2553 MCU (more pins and flash)
    -Use a non EOL thermocouple driver IC: MAX31855KASA+
    -Add in a FT230XS for a USB interface
    -Add flyback protection to relay LSD if a mechanical relay is used.
     
    Full size at link:
    http://forum.43oh.com/uploads/monthly_12_2011/post-4818-135135531417.jpg
     



    Oven: Convection (30 usd)
    http://www.walmart.com/ip/Black-Decker-Toaster-Oven-Stainless-Steel/16913546
     
    Oven: IR (recommended that you use an IR oven of sorts)
    http://www.walmart.com/ip/George-Foreman-Infrared-Countertop-Oven-with-Rotisserie/19411514
     
     
    C# GUI for live plotting:

     

    Here is the BOM:

    Update: Schematic has most Part #s on it
     
    Thermal-couple: (Important that it is low thermal mass and rated for temp range)
    Digikey: 290-1911-ND
     
    Thermal-couple IC:
    MAX31855KASA+
    MAX31855KASA+T
     
    Relay: (this is a mechanical relay. I salvaged a SSR for my V2. I highly recommend you use an SSR for long life and quicker switching times)
    Digikey: T9AS1D22-5-ND (Relay)

    Misc Digikey Part # (Part Discription)
    MC78M05CDTGOS-ND (5V regulator Dpak)
    445-1590-1-ND ( CAP CER 1.0UF 25V Y5V 0805)
    754-1133-1-ND ( LED 2X1.2MM 630NM RD WTR CLR SMD)
    754-1127-1-ND (LED 2X1.2MM 570NM GN WTR CLR SMD)
    CP-102B-ND (CONN POWER JACK 2.5MM PCB CIRC)
    785-1112-1-ND (MOSFET N-CH 20V 25A TO-252 (Relay))
    IRLML6344TRPBFCT-ND ( MOSFET N-CH 30V 5A SOT23 (SSR Load))
    RMCF0805JT100KCT-ND ( RES 100K OHM 1/8W 5% 0805 SMD)
    RMCF0805JT47K0CT-ND ( RES 47K OHM 1/8W 5% 0805 SMD)
    RMCF0805FT499RCT-ND ( RES 499 OHM 1/8W 1% 0805 SMD)
    296-8247-5-ND (IC 8-BIT SHIFT REGISTER 14-SOIC)
    296-28430-1-ND (IC MCU 16BIT 20TSSOP)
    RMCF0805JT1K00CT-ND ( RES 1K OHM 1/8W 5% 0805 SMD)
    CT94EY104-ND (TRIMMER 100K OHM 0.5W TH)
    MCP1700T3302ETTCT-ND ( IC REG LDO 3.3V 250MA SOT23-3)

    + a 16x2 LCD display
    + some dip headers that are used for jumping and programing.
    + 5mm/.2in lead spacing terminal headers for relay and thermocouple input.
  2. Like
    dacoffey reacted to oPossum in Volt/Amp/Watt meter   
    This is a simple voltage and current meter that uses the TI INA219 chip. Voltage measurement range is 0 to 26 volts with 4 mV resolution and current measurement range is -4 to +4 amps with 1 mV resolution (when using a 0.01 ohm shunt). The specs are inferior to a pair of quality multimeters, but it is a fraction of the price and shows wattage in addition to voltage and current. The Nokia 5110 display is used so the firmware could be enhanced to do simple graphing. Sending the measurements to a computer could also be done.
     
    Using the INA219 makes for a very simple circuit.

     
    The normal display is three lines with voltage, amperage and wattage.

     
    Pressing the P1.3 switch will show the 6 registers in the INA219 in hex and signed decimal.

     
    The code is written in C++ and uses templates for the LCD, IIC and INA219. Software SPI and IIC is used for maximum portability.
    vam.zip
  3. Like
    dacoffey got a reaction from jsolarski-backup in USB Controllable 8 Outlet AC Relay Box   
    Here is a project built using a 430 to power a USB controllable 8 outlet AC relay box.
     
    http://david-adam-coffey.com/blog/ac-relay-box
     
     


  4. Like
    dacoffey reacted to SirZusa in Content driven AmbientLight /// LightPack-Clone   
    Idea and description:
    Inspired by this project (Lightpack: http://code.google.com/p/light-pack/) i started to develop my own solution based on an launchpad equipped with a MSP430G2211, later i had to move on to a MSP430G2553 cause i was runnning out of RAM. Now it makes use of the hardware-UART and can theoretically handle up to 375 frames per second.
     
    How to take control over the
  5. Like
    dacoffey reacted to t0mpr1c3 in Quacking oven timer   
    I mashed together a MSP430G2231, a 4 digit LED display, and a quacking blinking toy duck to make an oven timer. Not quite one of a kind - the duck was from a pair of kids slippers, so I made 2 of them to give away as presents. The code is based on SimpleAVR's 3p4w clock. Enjoy.
     
    Please can a mod edit this post to correct the youtube link?
    l
    If possible I would like to link to my blog post http://smokedprojects.blogspot.com/2012 ... timer.html
     
    and the github repository of the code https://github.com/t0mpr1c3/CountdownTimer
     
    Thanks!


  6. Like
    dacoffey reacted to eugenejo in Serial Terminal Hack for eZ430-Chronos   
    Excerpt:
     
    How two small wires can open a [serial] window into the heart of MSP430.
     
     
    I have never been able to stay away for too long from my trusty soldering kit and the chance to shift some bits around. This time I had a simple project in mind, one that involved TI's Chronos dev-kit. MSP430 devices usually provide several convenient debugging channels, but this one was missing a serial connection.
     
    Easy access to whatever is going on inside a microprocessor is a big deal in any truly embedded application. In this case, on a 4K RAM/32K ROM device with no file system logging was not an option. In my other projects serial port was the best means to quickly set up a simple shell-like interface. This was usually sufficient to send a few debugging commands to the CPU and display trace prints. It may seem trivial, but without this debugging an embedded program may quickly deteriorate to blind trial and error.
     
    Studying the schematics for Chronos and its debugging tool revealed an opening...
     
    The full article is on Drop Forged blog by Eugene Jorov. I will post a link as soon as my forum account is no longer suspected as spammmmm...
  7. Like
    dacoffey reacted to The Chilango power in MSP430 and LCD16X2 My first project   
    Hola les muestro mi primer proyecto con MSP430 LaunchPad es un simple LCD 16X2


     

    #include #include "LCD_v1.h" #define LED1 BIT0 #define LED2 BIT6 #define B1 BIT3 //void setup(void); unsigned char i; typedef char* cadena; int main(void) { cadena string; WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer BCSCTL1 = CALBC1_1MHZ; // Set range DCOCTL = CALDCO_1MHZ; P1REN = 0x00; P1SEL = 0x00; P1IE = 0x00; Inicializa_LCD(); while(1){ Comando_LCD(CLEAR); Dato_String_LCDEx(LN1," HOLA MUNDO "); Dato_String_LCDEx(LN2, " **MSP430** "); delay_ms(2000); Comando_LCD(CLEAR); Dato_String_LCDEx(LN1," HECHO POR "); Dato_String_LCDEx(LN2,"=> THE CHILANGO POWER"); for(i = 0;i < 8;i++){ Comando_LCD(SHIFT_DISP_RIGHT); delay_ms(400); } for(i = 0;i < 14;i++){ Comando_LCD(SHIFT_DISP_LEFT); delay_ms(400); } delay_ms(2000); string = "MSP430 LaunchPad "; Comando_LCD(CLEAR); while(*string){ Dato_LCD(*string++); delay_ms(300); } string = "DATE 27/08/2012"; GoToXY(2,1); while(*string){ Dato_LCD(*string++); delay_ms(300); } delay_ms(1000); for(i=0;i<5;i++){ Comando_LCD(DOFF); delay_ms(200); Comando_LCD(DON); delay_ms(200); } Comando_LCD(DON); delay_ms(1500); } }
     

    /* * LCD_V1.c * * Created on: 13/08/2012 * Author: THE CHILANGO POWER */ #include "LCD_V1.h" //********************************************************** /* Inicializacion del LCD segun fabricante */ //********************************************************** void Inicializa_LCD(void){ PDIR_LCD = 0; POUT_LCD = 0; delay_ms(100); PDIR_LCD |= PDIR_BIT1_LCD | PDIR_BIT2_LCD | PDIR_BIT3_LCD | PDIR_BIT4_LCD; PDIR_LCD |= PDIR_PIN_RS | PDIR_PIN_E; POUT_LCD &= ~POUT_PIN_E; POUT_LCD &= ~POUT_PIN_RS; Flex_port(0X03); POUT_LCD |= POUT_PIN_E; delay_us(1); POUT_LCD &= ~POUT_PIN_E; delay_ms(5); Flex_port(0X03); POUT_LCD |= POUT_PIN_E; delay_us(1); POUT_LCD &= ~POUT_PIN_E; delay_us(160); Flex_port(0X03); POUT_LCD |= POUT_PIN_E; delay_us(1); POUT_LCD &= ~POUT_PIN_E; delay_us(160); Flex_port(NIBLE); POUT_LCD |= POUT_PIN_E; delay_us(1); POUT_LCD &= ~POUT_PIN_E; delay_us(160); Comando_LCD(0x28); Comando_LCD(0x08); Comando_LCD(0x01); // Comando_LCD(LINES_5X7 & FOUR_BIT); // Comando_LCD(DON & CURSOR_OFF & BLINK_OFF); // Comando_LCD(CLEAR); Comando_LCD(0x06); /* Entry Mode Set */ /* Incremento del cursor */ Comando_LCD(0x0C); return; } //********************************************************** /* Indica al LCD comandos */ //********************************************************** void Comando_LCD(unsigned char dato) { volatile unsigned char temp; /* variable auxiliar */ //delay_ms(10); /* Retardo de 10 mseg. */ POUT_LCD &=~POUT_PIN_RS; temp = dato; /* Respaldo del dato original */ dato = dato >> 4; /* Corrimiento del nible alto */ Flex_port(dato); POUT_LCD |= POUT_PIN_E; delay_us(1); POUT_LCD &=~POUT_PIN_E; Flex_port(temp); POUT_LCD |= POUT_PIN_E; delay_us(1); POUT_LCD &=~POUT_PIN_E; delay_us(2000); return; } //********************************************************** /* Manda datos al LCD */ //********************************************************** void Dato_LCD(unsigned char dato) { volatile unsigned char temp; /* variable auxiliar */ POUT_LCD |= POUT_PIN_RS; // delay_ms(10); /* Retardo de 10 mseg. */ temp = dato; /* Respaldo del dato original */ dato = dato >> 4; /* Corrimiento del nible alto */ Flex_port(dato); POUT_LCD |= POUT_PIN_E; delay_us(1); POUT_LCD &=~POUT_PIN_E; Flex_port(temp); delay_us(50); POUT_LCD |= POUT_PIN_E; delay_us(1); POUT_LCD &=~POUT_PIN_E; POUT_LCD &=~ POUT_PIN_RS; delay_us(50); return; } //********************************************************** // Escribe una cadena desde memoria de programa al LCD //********************************************************** void Datos_LCD(const char *buffer) { while(*buffer) // Write data to LCD up to null { Dato_LCD(*buffer); // Write character to LCD buffer++; // Increment buffer } return; } //********************************************************** // Escribe una cadena desde memoria de datos al LCD //********************************************************** void Dato_String_LCD(char *buffer) { while(*buffer) // Write data to LCD up to null { Dato_LCD(*buffer); // Write character to LCD buffer++; // Increment buffer } return; } void Flex_port(unsigned char data){ POUT_LCD &= ~BIT1_LCD; POUT_LCD &= ~BIT2_LCD; POUT_LCD &= ~BIT3_LCD; POUT_LCD &= ~BIT4_LCD; if(data & BIT0)POUT_LCD |= BIT1_LCD; if(data & BIT1)POUT_LCD |= BIT2_LCD; if(data & BIT2)POUT_LCD |= BIT3_LCD; if(data & BIT3)POUT_LCD |= BIT4_LCD; return; } void Dato_String_LCDEx(unsigned char xLine, char *buffer) { Comando_LCD(xLine); while(*buffer) // Write data to LCD up to null { Dato_LCD(*buffer); // Write character to LCD buffer++; // Increment buffer } return; } void Dato_LCDEx(unsigned char xLine, const char *buffer) { Comando_LCD(xLine); while(*buffer) // Write data to LCD up to null { Dato_LCD(*buffer); // Write character to LCD buffer++; // Increment buffer } return; } void GoToXY(unsigned char Line, unsigned char Position) { switch(Line) { case 1: Position += 128; Comando_LCD(Position); break; case 2: Position +=167; Comando_LCD(Position); break; } return; } void clear_LCD(void){ Dato_String_LCDEx(LN1," "); Dato_String_LCDEx(LN2," "); GoToXY(1,0); return; } void delay_us(unsigned int time){ while(--time)__delay_cycles (1); return; } void delay_ms(unsigned int time){ while(--time)__delay_cycles (1000); return; }
     

    #ifndef LCD_V1_H_ #define LCD_V1_H_ #include /* * File: LCD_v1.h * Author: THE CHILANGO POWER * * Created on 13 de julio de 2012, 03:32 PM */ // Manejo de un Display de Cristal Liquido LCD 16X4 // de 16 caracteres por 4 lineas, con una interface // de 4 lineas: // // Conexiones del LCD al Microcontrolador #define POUT_LCD P1OUT #define PDIR_LCD P1DIR #define POUT_PIN_RS BIT0 // Define la Columna 1 #define POUT_PIN_E BIT1 // Define la Columna 3 #define PDIR_PIN_RS BIT0 // Define la Columna 1 #define PDIR_PIN_E BIT1 // Define la Columna 3 #define BIT1_LCD BIT4 #define BIT2_LCD BIT5 #define BIT3_LCD BIT6 #define BIT4_LCD BIT7 #define PDIR_BIT1_LCD BIT4 #define PDIR_BIT2_LCD BIT5 #define PDIR_BIT3_LCD BIT6 #define PDIR_BIT4_LCD BIT7 /* Configuracion del Display y cursor */ #define DON 0X0F //0b00001111 /* Display encendido */ #define DOFF 0X0B //0b00001011 /* Display apagado */ #define CURSOR_HOME 0X02 //0b00000010 /* Cursor encendido */ #define CURSOR_ON 0X0F //0b00001111 /* Cursor encendido */ #define CURSOR_OFF 0X0C //0b00001100 /* Cursor apagado */ #define BLINK_ON 0X0F //0b00001111 /* Cursor con parpadeo */ #define BLINK_OFF 0X0E //0b00001110 /* Cursor sin parpadeo */ #define CLEAR 0X01 //0b00000001 /* Display encendido */ /* Modo de entrada */ #define INCREMENT 0X06 //0b00000110 /* Incrementa la posicion del cursor */ #define DECREMENT 0X04 //0b00000100 /* Decrementa la posicion del cursor */ /* Configuracion de los desplazamientos del cursor y del Display*/ #define SHIFT_CUR_LEFT 0X13 //0b00010011 /* Corrimiento del cursor a la izquierda */ #define SHIFT_CUR_RIGHT 0X17 //0b00010111 /* Corrimiento del cursor a la derecha */ #define SHIFT_DISP_LEFT 0X1B //0b00011011 /* Corrimiento del display a la izquierda */ #define SHIFT_DISP_RIGHT 0X1F //0b00011111 /* Corrimiento del display a la derecha */ /* Funciones de inicializacion */ #define NIBLE 0X02 //0b00000010 /* interface a 4 bits */ #define FOUR_BIT 0X2F //0b00101111 /* Interface a 4-bit */ #define EIGHT_BIT 0X3F //0b00111111 /* Interface a 8-bit */ #define LINE_5X7 0X33 //0b00110011 /* Una linea, caracter 5x7 */ #define LINE_5X10 0X37 //0b00110111 /* Una linea, caracter 5x10 */ #define LINES_5X7 0X3B //0b00111011 /* Dos lineas. character 5x7 */ /* Lineas de trabajo */ #define DDRAM_LINEA_1 0X80 //0b10000000 /* Linea 1 */ #define DDRAM_LINEA_2 0XC0 //0b11000000 /* Linea 2 */ #define DDRAM_LINEA_3 0X90 //0b10010000 /* Linea 3 */ #define DDRAM_LINEA_4 0XD0 //0b11010000 /* Linea 4 */ #define LN1 DDRAM_LINEA_1 #define LN2 DDRAM_LINEA_2 /// Configuracion del puerto // /////////////////////////////////////////////////////////////////////////////// //Prototipos de funciones /////////////////////////////////////////////////////////////////////////////// void Flex_port(unsigned char data); void Inicializa_LCD(void); /* Inicializa LCD */ void Comando_LCD(unsigned char dato); /* Indica al LCD un comando */ void Dato_LCD(unsigned char dato); /* Indica al LCD un caracter */ void Datos_LCD(const char *buffer); /* escribe una cadena desde la memoria de programa al LCD */ void Dato_String_LCD(char *buffer); /* escribe una cadena desde la memoria de datos al LCD */ void Dato_String_LCDEx(unsigned char xLine, char *buffer); void Dato_LCDEx(unsigned char xLine, const char *buffer); void GoToXY(unsigned char Line, unsigned char Position); void delay_us(unsigned int time); void clear_LCD(void); void delay_ms(unsigned int time); #endif /* LCD_V1_H_ */
  8. Like
    dacoffey reacted to zashi in MSP430 port of Onity Hotel Lock hack   
    Hey-o 43oh! Apparently it's been so long since I posted my account was deleted and I had to recreate it. C'est La Vie.
     
    Anyway I saw this white paper on how to use an MCU and OneWire to open Onity hotel locks. The proof of concept code is for an arduino (which I know nothing about) so I thought I'd be fun to port it to MSP430 and build a little "Skeleton Key" device.
     
    The full write up with pictures, code, et al is available on my site. (New account, I can't post a url). http://vay8.net/osk
     
    I have not had a chance to test my code/device so if any of you build this your self and try out my code please let me know if it works! There's several spots in my code where I'm not sure I made the right assumption.
  9. Like
    dacoffey reacted to voodoofish in Data Logger board   
    I received the datalogger board today and after multiple hw tests to verify that board functioned as expected, I completed the first of 3 test boards. The last test is to verify that the memory chip is recording correctly, and until then I can't say that this board is 100% functional. though the current 80% has me pretty excited. Now I'm waiting for the addon board that is breaks out the datalogging pins plus a couple other pins to a usable 3 pin configuration.
     
    Images included in this set have the button 1 switch which allows for it to be a reset or action button, and the male header pins. The other image shows the board pre switch and header mockup and also conected to the lp which allows me to do the uploading of programs. Very happy so far. Tonight and tomorrow I'll work on getting the memory chip tested as well as doing some initial tests on the data input ports(adc channels)and communications port(hw uart).
     

  10. Like
    dacoffey reacted to RobG in USB MIDI adapter   
    Here's my board with 4ch, 1M bits/ch Data Logger daughter card. The card should be mounted under the USB board, but I want to have it removable so I mounted it on top and used headers.
     

     
    Still undecided if I should use some existing GUI tool/protocol or write my own.
  11. Like
    dacoffey reacted to Nytblade in Internet-connected MSP430 Experimenter Board   
    I am working on building my own home automation system completely from scratch.
     
    The first step is to have a MSP430 connected to the internet, and then from that MSP430, my plan is to have a bunch of devices communicating wirelessly. Essentially the MSP430 is to act as a "router" for other MSP430s which perform the actual automation tasks. I want to be able to control my home automation system from a remote location (like from sitting at my desk at work). This requires I have a TCP/IP connection to the router-MSP430, which in turn will have Bluetooth connections to all the other MSP430s.
     
    Anyway, I started out with the Ethernet Boosterpack from this site. Mainly just for learning - I didn't expect that the G2553's 512 bytes of RAM were really enough for me to make a home automation controller. After that, I switched to the MSP430F5438 Experimenter Board, which has a massive 16KB of RAM (plus a lot of nice peripherals like LCD, buttons, speaker, microphone, and a joystick). I am now using the Wiz820io, which has the same W5200 chip as the Ethernet Boosterpack.
     
    I have no idea how to do any of this stuff, so I am learning as I go. I also have my day job as an Linux Admin which takes up a lot of time when I'd prefer to be working on electronics instead. This makes my progress very slow. Nevertheless, this weekend I finally got my networking code working. Here is a video of the "operating system" I am making:
    http://www.youtube.com/watch?v=XsrEGmhbGaM
     
    Here is my blog post with the source code to what I've done so far:
    http://www.cashdollar.biz/2012/09/26/my ... he-msp430/
  12. Like
    dacoffey got a reaction from SirZusa in USB Controllable 8 Outlet AC Relay Box   
    Here is a project built using a 430 to power a USB controllable 8 outlet AC relay box.
     
    http://david-adam-coffey.com/blog/ac-relay-box
     
     


  13. Like
    dacoffey got a reaction from bluehash in USB Controllable 8 Outlet AC Relay Box   
    Here is a project built using a 430 to power a USB controllable 8 outlet AC relay box.
     
    http://david-adam-coffey.com/blog/ac-relay-box
     
     


  14. Like
    dacoffey reacted to DrQL in LED Heart with Animations   
    and now for some programming stuff
     
    here I added 3 animations: a knightrider-style, an alternating style and a flashing one
     

    void playAnimation(unsigned int mode) { switch(mode) { // knight rider style case 0: for(i = 0; i < 3; i++) { P1OUT |= LED1; // LED on _delay_cycles(speed); P1OUT |= LED2; // LED on _delay_cycles(speed); P1OUT |= LED3; // LED on _delay_cycles(speed); P1OUT |= LED4; // LED on P1OUT &= ~LED1; // LED off _delay_cycles(speed); P1OUT |= LED4; // LED on P1OUT &= ~LED1; // LED off _delay_cycles(speed); P1OUT |= LED5; // LED on P1OUT &= ~LED2; // LED off _delay_cycles(speed); P2OUT |= LED6; // LED on P1OUT &= ~LED3; // LED off _delay_cycles(speed); P1OUT &= ~LED4; // LED off _delay_cycles(speed); P1OUT &= ~LED5; // LED off _delay_cycles(speed); P1OUT |= LED5; // LED on _delay_cycles(speed); P1OUT |= LED4; // LED on _delay_cycles(speed); P1OUT |= LED3; // LED on P2OUT &= ~LED6; // LED off _delay_cycles(speed); P1OUT |= LED2; // LED on P1OUT &= ~LED5; // LED off _delay_cycles(speed); P1OUT |= LED1; // LED on P1OUT &= ~LED4; // LED off _delay_cycles(speed); P1OUT &= ~LED3; // LED off _delay_cycles(speed); P1OUT &= ~LED2; // LED off _delay_cycles(speed); P1OUT &= ~LED1; // LED off _delay_cycles(speed); } break; // show all LEDs case 1: for(i = 0; i < 3; i++) { P1OUT |= LED1 + LED2 + LED3 + LED4 + LED5; // LED on P2OUT |= LED6; // LED on _delay_cycles(speed); P1OUT &= ~(LED1 + LED2 + LED3 + LED4 + LED5); // LED off P2OUT &= ~(LED6); // LED off _delay_cycles(speed); } break; // alternate all LEDs case 2: for(i = 0; i < 3; i++) { P1OUT |= LED1 + LED3 + LED5; // LED on P1OUT &= ~(LED2 + LED4); // LED off P2OUT &= ~(LED6); // LED off _delay_cycles(speed); P1OUT |= LED2 + LED4; // LED on P2OUT |= LED6; // LED on P1OUT &= ~(LED1 + LED3 + LED5); // LED off _delay_cycles(speed); } break; } }
     
    as you can see the function is invoked by a parameter for which I used a random number
     
    although using the _delay_cycles is not the best approach for low power modes it is up to you to provide a better solution
     
    Happy codings!
     
    Michael
  15. Like
    dacoffey reacted to DrQL in LED Heart with Animations   
    The next step was to build a small version with only one LED using a breadboard:
     

     
    I setup some small codes using the additional G2253 and my Launchpad so to show the red and green LEDs. In the picture the red LED on the Launchpad was replaced with my direct output to the breadboard.
     
    After checking the voltages and currents I decided to mark them as good and started to build the first LEDs on a PCB:
     

     
    here you can see the socket for the G2253 and 2 transistors.
  16. Like
    dacoffey reacted to pine in Newbie project - single digit temperature display   
    With the recent lucky found on some cheap components, a little newbie project is finished. It is a single 7-segment temperature display. The display unit show 2 digits reading in turn. Yes 2 such units will be better but for the reason to keep it simple and fun, and also to fit onto a small breadboard, only one is used.
     
    The heart is a 430G2231 with a built in temperature sensor. Used sample code from CCS with Grace to start with. It is the first time I really get something done with Grace using the fancy configurator. Honestly it is quite helpful and intuitive even for me newbie. For example the original sample code did not turn on some pins by default, but i managed quite with ease to find the config page, without consulting any documentations, where there are check boxes to do so. And I observed the change in the generated code and learn something reading these.
     
    Parts needed:
    1. MSP430G2231
    2. a small breadboard
    3. a 7-segment LED display LTS4710AR
    4. a coin cell holder and a 3V CR2016 lithium coin cell
    (5. a 200 ohm resistor) Edited : this is removed later and replaced by direct connection. But as experienced forum members advised, always use a resistor first to avoid burning the LED parts. Better to read the datasheet and do proper calculations. e.g. see viewtopic.php?f=8&t=1767#p12207
     

     

     

     
    Video
     
    http://flic.kr/p/aBxAYy
     
    As you can see in the video a real room thermometer is placed next to it, and the readings do not match.. possibly there are some roundings in the formula in the code..
     
    Thank you to all on the forum helped out a newbie with this! :thumbup:
  17. Like
    dacoffey reacted to pine in Newbie project - single digit temperature display   
    The schematic, sorry just a hand drawn sketch as I haven't started learning design software
     

     
    And the source code:
     

    //***************************************************************************** // ADC10, Sample A10 Temp and Convert to oC and oF // // Description: This program demonstrates the use of the ADC10 and built-in // temperature sensor. The MSP430 continually samples the temperature sensor // and converts with the ADC, then compares the value to the previous // measurement. If the new measurement indicates a rise in temperature, the // red LED turns on. While the program is running, the green LED toggles // with each temperature measurement. // // This example uses Timer_A's output unit of capture/compare block 1 to // trigger the ADC10 to sample the temperature. // // Timer_A is configured to be in "up mode", its capture/compare blocks // 0 and 1 have their compare registers set to identical values (2047), and // capture/compare block 1 is configured to be in "Set/Reset" mode (its // output, OUT1, is set when the timer counts to the TACCR1 value and reset // when the timer counts to the TACCR0 value). // // The ADC10's trigger source is configured to be Timer_A's OUT1 (the output // from the capture/compare block 1). In addition, the ADC10 is configured // to trigger and ISR when conversion is complete, call the user supplied // function adcIsr(), and put the device in "active mode" on completion. // // MSP430G2.31 // ----------------- // /|\| XIN|- // | | | // --|RST XOUT|- // | | // |A10 | // // Texas Instruments Inc. //***************************************************************************** /* * ======== Standard MSP430 includes ======== */ #include /* * ======== Grace related includes ======== */ #include /* * ==== platform-specific definitions ======== */ #define LEDOUT P1OUT // GPIO port with LEDs #define GREEN BIT6 // green LED location for the LaunchPad #define RED BIT0 // red LED location #define LEDA BIT0 #define LEDB BIT1 #define LEDC BIT2 #define LEDD BIT3 #define LEDE BIT4 #define LEDF BIT5 #define LEDG BIT6 #define LEDDP BIT7 /* * ======== globals ======== */ volatile int temp; // raw ADC10 value volatile int degF; // temperature in degrees F volatile int degC; // temperature in degrees C volatile int initialDegF; // initial measurement in degrees F volatile int delayTick; volatile int i; unsigned int counter; unsigned int TXByte; unsigned int digit1; unsigned int digit2; void show(unsigned int); void delay(void); /* * ======== main ======== */ void main(void) { CSL_init(); // Activate Grace-generated config counter = 0; /* Obtain and store initial temperature measurement */ ADC10CTL0 |= ENC; // Enable conversion __bis_SR_register(LPM0_bits); // Wait in LPM0 for temp to be sampled /* Initial measurement of temperature (in Fahrenheit) */ initialDegF = ((long)(temp - 630) * 761) / 1024; for (counter = 0 ; counter < 10; counter++) { show(counter); for (delayTick = 0; delayTick < 20000; delayTick++) { __no_operation(); // this nop is only to assist debugging } } while (1) { ADC10CTL0 |= ENC; // Enable next conversion __bis_SR_register(LPM0_bits); // Wait in LPM0 for temp to be sampled __no_operation(); // this nop is only to assist debugging /* oF = ((A10/1024)*1500mV)-923mV)*1/1.97mV = A10*761/1024 - 468 */ // degF = ((long)(temp - 630) * 761) / 1024; /* oC = ((A10/1024)*1500mV)-986mV)*1/3.55mV = A10*423/1024 - 278 */ // degC = ((long)(temp - 673) * 423) / 1024; TXByte = (unsigned char)( ((temp - 673) * 423) / 1024 ); if (TXByte < 0) { TXByte *= -1; } digit1 = TXByte / 10; digit2 = TXByte - (digit1 * 10); // display temperature show(digit1); delay(); delay(); show(digit2); delay(); delay(); show(100); // char . for (delayTick = 0; delayTick < 10000; delayTick++) { __no_operation(); // this nop is only to assist debugging } show(101); // char C for (delayTick = 0; delayTick < 10000; delayTick++) { __no_operation(); // this nop is only to assist debugging } } } void delay() { for (delayTick = 0; delayTick < 20000; delayTick++) { __no_operation(); // this nop is only to assist debugging } } void show(unsigned int counter) { if (counter == 0) { LEDOUT &= ~LEDA; LEDOUT &= ~LEDB; LEDOUT &= ~LEDC; LEDOUT &= ~LEDD; LEDOUT &= ~LEDE; LEDOUT &= ~LEDF; LEDOUT |= LEDG; LEDOUT |= LEDDP; } else if (counter == 1) { LEDOUT |= LEDA; LEDOUT &= ~LEDB; LEDOUT &= ~LEDC; LEDOUT |= LEDD; LEDOUT |= LEDE; LEDOUT |= LEDF; LEDOUT |= LEDG; LEDOUT |= LEDDP; } else if (counter == 2) { LEDOUT &= ~LEDA; LEDOUT &= ~LEDB; LEDOUT |= LEDC; LEDOUT &= ~LEDD; LEDOUT &= ~LEDE; LEDOUT |= LEDF; LEDOUT &= ~LEDG; LEDOUT |= LEDDP; } else if (counter == 3) { LEDOUT &= ~LEDA; LEDOUT &= ~LEDB; LEDOUT &= ~LEDC; LEDOUT &= ~LEDD; LEDOUT |= LEDE; LEDOUT |= LEDF; LEDOUT &= ~LEDG; LEDOUT |= LEDDP; } else if (counter == 4) { LEDOUT |= LEDA; LEDOUT &= ~LEDB; LEDOUT &= ~LEDC; LEDOUT |= LEDD; LEDOUT |= LEDE; LEDOUT &= ~LEDF; LEDOUT &= ~LEDG; LEDOUT |= LEDDP; } else if (counter == 5) { LEDOUT &= ~LEDA; LEDOUT |= LEDB; LEDOUT &= ~LEDC; LEDOUT &= ~LEDD; LEDOUT |= LEDE; LEDOUT &= ~LEDF; LEDOUT &= ~LEDG; LEDOUT |= LEDDP; } else if (counter == 6) { LEDOUT &= ~LEDA; LEDOUT |= LEDB; LEDOUT &= ~LEDC; LEDOUT &= ~LEDD; LEDOUT &= ~LEDE; LEDOUT &= ~LEDF; LEDOUT &= ~LEDG; LEDOUT |= LEDDP; } else if (counter == 7) { LEDOUT &= ~LEDA; LEDOUT &= ~LEDB; LEDOUT &= ~LEDC; LEDOUT |= LEDD; LEDOUT |= LEDE; LEDOUT |= LEDF; LEDOUT |= LEDG; LEDOUT |= LEDDP; } else if (counter == 8) { LEDOUT &= ~LEDA; LEDOUT &= ~LEDB; LEDOUT &= ~LEDC; LEDOUT &= ~LEDD; LEDOUT &= ~LEDE; LEDOUT &= ~LEDF; LEDOUT &= ~LEDG; LEDOUT |= LEDDP; } else if (counter == 9) { LEDOUT &= ~LEDA; LEDOUT &= ~LEDB; LEDOUT &= ~LEDC; LEDOUT &= ~LEDD; LEDOUT |= LEDE; LEDOUT &= ~LEDF; LEDOUT &= ~LEDG; LEDOUT |= LEDDP; } else if (counter == 100) { // char Dot LEDOUT |= LEDA; LEDOUT |= LEDB; LEDOUT |= LEDC; LEDOUT |= LEDD; LEDOUT |= LEDE; LEDOUT |= LEDF; LEDOUT |= LEDG; LEDOUT &= ~LEDDP; } else if (counter == 101) { // char C LEDOUT &= ~LEDA; LEDOUT |= LEDB; LEDOUT |= LEDC; LEDOUT &= ~LEDD; LEDOUT &= ~LEDE; LEDOUT &= ~LEDF; LEDOUT |= LEDG; LEDOUT |= LEDDP; } else if (counter == 102) { // char F LEDOUT &= ~LEDA; LEDOUT |= LEDB; LEDOUT |= LEDC; LEDOUT |= LEDD; LEDOUT &= ~LEDE; LEDOUT &= ~LEDF; LEDOUT &= ~LEDG; LEDOUT |= LEDDP; } } /* * ======== adcIsr ======== * ADC10 conversion ISR * * This ISR moves the conversion result into global variable. Doing so * will also clear the associated interrupt flag ADC10IFG. * * This interrupt handler routine gets assigned in the ADC10 Grace view. */ void adcIsr(void) { temp = ADC10MEM; // read ADC10 sampled temperature }
     
    Any comments and suggestions to areas of improvement are very much appreciated.
  18. Like
    dacoffey reacted to pine in Newbie project - single digit temperature display   
    Moved this from a breadboard to a more permenant setting
     

    A small footprint board with all the parts needed. Coin cell battery holder is a little bit off though. The board is a single sided one so I'm not sure my soldering skill is good enough to have it soldered on the back.
    All the pins are brought out to the male headers. There are two jumpers setting so that it can be switched between powered by coin cell battery or external power source like vcc and gnd from an LP. Another jumper for pulling up RST, and off when in-situ programming is needed (RST and TEST connecting to a blank LP).
     
     

    If one day I can make a PCB...
     
     

    Rather than soldering 2231 and 7-segment LED directly on board I choose to have the sockets in between.
     
     

    Visual BOM
  19. Like
    dacoffey reacted to nimblemotors in Tractor Engine Control   
    I don't have a schematic of the battery charger, which is what the hardware was used for orginally.
    But I can tell you about the connection to the msp430. I used a LTC1155. It is a high-side mosfet driver that drives n-channel mosfet at +10v over the supply. So unlike most applications, I switch on/off the 12v to the fuel inject, instead of switching ground on/off. This was important for the battery charger, because switching the high side it could detect when a battery was attached, and automatically start charging them.
    The LTC1155 has two on/off inputs that are connected directly to the msp430 outputs. I used the TA1 and TA2 outputs,
    and did timerA pwm. hope that helps! Jack
  20. Like
    dacoffey reacted to Kman in 8x8 LED Matrix board with AS1116 chip with PONG?   
    Thanks! I wasn't sure if when I uploaded it, it would understand that it was a picture.

  21. Like
    dacoffey reacted to nimblemotors in Tractor Engine Control   
    Hello again my friends,
    I posted the video of the full msp430 based EFI system running my tractor.
    You can see the waterproof box that holds the fuses and all the connections.
    Originally this tractor did not have a single fuse.
     

     
    The fuel injector is a TBI unit from a Geo Metro, just using the injector portion of the TB.
    The throttle plate is from a Prius, and is an electronic controlled throttle.
    Processor is a msp4301232, with two high-side mosfets (previously used to charge NiMH batterys),
    one used to control the throttle, the other controls the fuel injector. The ADC inputs from the 430 are used to read the analog sensor inputs (GM parts) the o2 sensor, the MAP, the water temp.
    The Tach input signal of course is the msp430 based coil-on-plug ignition I showed earlier.
     
    Also here is the dashboard I built for it, using msp430 processors that drive bargraphs on the LCDs
    for the readings. Fuel level, Water Temp, Battery Voltage, Oil Pressure, and RPM.
     

  22. Like
    dacoffey reacted to NullColaShip in Display based on LPD8806 RGB LED strips   
    Hi all,
    Having purchased a bunch of the addressable RGB LED strips from Adafruit (with the newer LPD8806 high-speed PWM control chips for full colour), I set about getting an MSP430 (in this case, an MSP430G2553) on a Launchpad to control them. I stumbled across gwdeveloper's post and GitHub repo for the WS2801 RGB LED strip, and figured it'd be a good starting point.

    I've so far managed to adjust the code (using the Adafruit-supplied Arduino library for the LPD8806 strips) from WS2801 to LPD8806, and made some tweaks to gwdeveloper's demo sequences to deal with a couple of issues which cropped up (attempting to add data directly to the pixels[] array at invalid indexes, which for some reason caused certain colours of the strip to then fail to light when subsequently told to). The LPD8806 code is available from my GitHub repo.

    Update: Now that I have finally assembled the whole thing, here's a video (it's not mounted yet, so the alignment isn't perfect but it's sufficient to see what it'll be like):


    (you might want to click through to YouTube to see it full size - and make sure you have annotations on for details!)
  23. Like
    dacoffey reacted to RobG in LaunchPad Web Server - control your LP over the network   
    Here's the web server software for my Ethernet booster pack.
    The software is 95% ready, still few bugs and some cleanup left, I will post the code when complete.

    The whole thing takes up just under 4.5KB and uses ~400 bytes of RAM, so you still have ~11KB and ~100 bytes of RAM left for whatever you need.

    BTW, I really need to get a tripod for my iPhone



  24. Like
    dacoffey reacted to Slartibartfast in MSP430 G2 Mini-Evaluation Board   
    Hi,
     
    I've developed a small and simple MSP430 G2 Evaluation Board.
    Nothing special but quite useful for experiments with MSP430G2 MCUs.
     
    features:

    MSP430G2 Evaluation Board_documentation.pdf

  25. Like
    dacoffey reacted to RobG in Serial to 7 Segment LED   
    Teaser
     


×
×
  • Create New...