Jump to content
43oh

Fred

Members
  • Content Count

    885
  • Joined

  • Last visited

  • Days Won

    43

Reputation Activity

  1. Like
    Fred got a reaction from bluehash in TapATalk updated to 1.0.0   
    I'm posting this from Tapatalk, so it seems to work.
  2. Like
    Fred got a reaction from OppaErich in Arm-HQ will be converting to Stellaris next week   
    A bit of a shame, as I was hoping this would become the place for decent STM32 info. However, I can see why you've decided on this. It's not really happening.
  3. Like
    Fred got a reaction from bluehash in New Stellaris Launchpad?   
    I managed to find a clearer picture. Not sure if this was meant to be shown or not...
    http://www.flickr.com/photos/laraswanland/7356344648/
  4. Like
    Fred got a reaction from pine in Relay switch - Live or Neutral to connect?   
    In the UK it's brown for live, blue for neutral and green/yellow for earth.
     
    If you're switching fluorescent lighting you may need an appropriate varistor across the relay contacts to stop them fusing. It works a bit like a flyback diode on the relay input, but for AC.
  5. Like
    Fred got a reaction from luke in Pee-Light project   
    Wow! I made it to hackaday. I wonder if it was the sheer genius of the project? The complexity? The flawless build quality?
     
    Or maybe just simple toilet humour.
  6. Like
    Fred got a reaction from nuetron in C5000   
    It seems TI have just produced an audio / capacitive touch booster pack. On special at $30 for a while, then up to $35. Ideal if you want to make your own iPod I suppose.
  7. Like
    Fred got a reaction from oPossum in eZ430 dongle - header pinout & parts sources   
    I got some 50-pin lengths of 0.05" header on eBay (UK) for a reasonable price. I was doing it the other way round - using my EZ430 USB stick to program a board that had a 0.1" connector.
  8. Like
    Fred got a reaction from voelker in Launchpad Geocache box   
    Nice. I did something similar a while ago based around a Netduino Mini. (I'm a C# coder, so that's what got me into microcontrollers.) Some of my targets used an arrow to point in the right direction, some gave distance, some just text clues, etc. It kept my 8 year old nephew entertained for an hour or so on his birthday. Project write-up here if anyone's interested.
  9. Like
    Fred got a reaction from MarkoeZ in [TIDEALS] Dec 6th, 2011 - MSP-FET430U28A bundle $75.00   
    Whilst we're waiting, http://tiedeals.com apparently has 45%-75% off first quality brand name silk neckwear.
     
    I must type more carefully.
  10. Like
    Fred got a reaction from pine in [TIDEALS] Dec 6th, 2011 - MSP-FET430U28A bundle $75.00   
    Whilst we're waiting, http://tiedeals.com apparently has 45%-75% off first quality brand name silk neckwear.
     
    I must type more carefully.
  11. Like
    Fred got a reaction from bluehash in Pee-Light project   
    Well, my first project is nothing spectacular. I call it the Pee-Light. When I walk into my bathroom in the middle of the night, an LED light in the ceiling gives me just enough light to see what I'm doing and not pee on the toilet seat. It's not enough to blind me when it comes on and I still have my night vision when I'm stumbling back to bed.
     
    On the negative side
    It probably lies somewhere between a project and "using a commercial product as intended". 90% of the hardware and maybe 75% of the software is an Olimex MSP430-PIR which itself was based on a reference design from TI.
     
    On the positive side
    It acheived my goal of finding my way around the MSP430. I didn't just copy and add to the software. I made sure I shifted code into my project bit by bit and understood it all.
    I used the USB stick from my EZ430-F2013 kit to program it.
    It's permanently and properly installed in my house and gets used at least once a day. (I've got a new baby so I'm up a lot.)
     
    The existing PIR sensor flashed an LED when it sensed movement. My extension to it was to use a light-dependent resistor to check whether it's dark and a simple transistor to allow a 9v battery to power an LED, The LED fitting I had lying around was designed for 12v and is sealed, but actually gives just the right amount of light when run from 9v.
     
    Some photos



     
    Code

    // ***************************************************************************** // Fred's PIR software // The majority of this code is from: // Code for application report SLAA283 - "Ultra-low Power Motion Detection using the MSP430F2013" // ****************************************************************************** #include // P1.7 LDR power // P1.6 LDR in // Hardware notes // P1.0 - LED // P1.4 - onboard switch // P2.7 - PIR_VCC // A4 - PIR (uses P1.1 and P1.2) // A3 - LDR (uses P1.6 and P1.7) // LDR between 1.5 (LDR power) and 1.6 (in) // 200k between 1.6 (in) and 0v // Threshold 1M ohm input < 50k // Work in progress // P1.5 - LDR power on // P1.6 - LDR in (dark = less than Vss/5 == 50k) // P1 #define LED_OUT BIT0 // Bit location for LED #define BUTTON_IN BIT4 #define LDR_PWR BIT5 #define LDR_IN BIT6 // P2 #define LIGHT_OUT BIT6 #define SENSOR_PWR BIT7 // Bit location for power to sensor #define PIR_THRESHOLD 50 // Threshold for motion #define LDR_THRESHOLD 50000 #define LIGHT_ON_TIME 20 // x about .5s #define PIR_IGNORE 3 static unsigned int result_old = 0; // Storage for last PIR conversion static char readingLDR = 1; static int lightTimer = 0; static int pirIgnoreTimer = 0; char testMode = 0; // LED control // Definition as used before defined void adcStartReadPIR(void); void adcStartReadLDR(void); void main(void) { //WDTCTL = WDTPW + WDTHOLD; // Use WD to wait about 10s WDTCTL = WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL; // ACLK/32768, int timer: ~10s BCSCTL1 = CALBC1_1MHZ; // Set DCO to 1MHz DCOCTL = CALDCO_1MHZ; BCSCTL1 |= DIVA_2; // ACLK = VLO/4 BCSCTL3 |= LFXT1S_2; P1OUT = LDR_PWR | BUTTON_IN; P1DIR = LDR_PWR | LED_OUT; P1SEL = 0x00; P1REN |= BUTTON_IN; // P1.4 pullup P1IE |= BUTTON_IN; // P1.4 interrupt enabled P1IES |= BUTTON_IN; // P1.4 Hi/lo edge P1IFG &= ~BUTTON_IN; // P1.4 IFG cleared P2OUT = SENSOR_PWR; P2DIR = LIGHT_OUT | SENSOR_PWR; P2SEL = 0x00; SD16CTL = SD16VMIDON + SD16REFON + SD16SSEL_1; // 1.2V ref, SMCLK SD16AE = SD16AE1 | SD16AE2 // P1.1 & P1.2: A4+/- SD16_A inputs | SD16AE6; // P1.6: A3+ SD16_A inputs SD16CTL &= ~SD16VMIDON; // VMID off: used to settle ref cap //adcStartReadPIR(); // Wait for PIR sensor to settle: 1st WDT+ interval P1SEL |= LED_OUT; // Turn LED on with ACLK (for low Icc) while(!(IFG1 & WDTIFG)); // ~5.4s delay: PIR sensor settling P1SEL &= ~LED_OUT; // Turn LED off with ACLK (for low Icc) // Reconfig WDT+ for normal operation: interval of ~341msec WDTCTL = WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1;// ACLK/512, int timer: 341msec BCSCTL1 |= DIVA_3; // ACLK = VLO/8 IE1 |= WDTIE; // Enable WDT interrupt _BIS_SR(LPM0_bits + GIE); } void adcStartReadPIR(void) { readingLDR = 0; SD16INCTL0 = SD16GAIN_4 + SD16INCH_4; // PGA = 4x, Diff inputs A4- & A4+ SD16CCTL0 = SD16SNGL + SD16IE; // Single conversion, 256OSR, Int enable SD16CTL |= SD16REFON; // If no, turn on SD16_A ref SD16CCTL0 |= SD16SC; // Set bit to start new conversion } void adcStartReadLDR(void) { readingLDR = 1; SD16INCTL0 = SD16GAIN_1 + SD16INCH_3; // PGA = 1x, Diff inputs A3- & A3+ SD16CCTL0 = SD16UNI + SD16SNGL + SD16IE; // Single conversion, 256OSR, Int enable SD16CTL |= SD16REFON; // If no, turn on SD16_A ref SD16CCTL0 |= SD16SC; // Set bit to start new conversion } void checkPIR(void) { // See if we've had movement volatile unsigned int result_new; volatile unsigned int change; SD16CTL &= ~SD16REFON; // Turn off SD16_A ref result_new = SD16MEM0; // Save result (clears IFG) if (result_new > result_old) // Get difference between samples change = result_new - result_old; else change = result_old - result_new; result_old = SD16MEM0; // Save last conversion // Ignore the first few readings after the light turns off if (pirIgnoreTimer < PIR_IGNORE) { pirIgnoreTimer++; return; } // If motion detected... if (change > PIR_THRESHOLD) { // LED now only used if it's light // Even this small light level affected LDR measurement P1OUT |= LED_OUT; // Light already on? if (P2OUT & LIGHT_OUT) { // Reset counter whether it's dark or not lightTimer = 0; } else { // Is it dark? adcStartReadLDR(); } } else { P1OUT &= ~LED_OUT; //adcStartReadPIR(); } } void checkLDR(void) { unsigned int val = SD16MEM0; if (testMode) { // Just LED = light if (val < LDR_THRESHOLD) P1OUT &= ~LED_OUT; else P1OUT |= LED_OUT; P2OUT &= ~LIGHT_OUT; __bis_SR_register_on_exit(SCG1+SCG0); // Return to LPM3 after reti return; } if (val < LDR_THRESHOLD) { // Switch light on P2OUT |= LIGHT_OUT; lightTimer = 0; } else { // Just show LED so we know it's working P1OUT |= LED_OUT; } } #pragma vector = SD16_VECTOR __interrupt void SD16ISR(void) { if (readingLDR) checkLDR(); else checkPIR(); __bis_SR_register_on_exit(SCG1+SCG0); // Return to LPM3 after reti } /****************************************************** // Watchdog Timer interrupt service routine ******************************************************/ #pragma vector=WDT_VECTOR __interrupt void watchdog_timer(void) { // Test mode just measures light level if (testMode) { adcStartReadLDR(); __bic_SR_register_on_exit(SCG1+SCG0); // Keep DCO & SMCLK on after reti } // Light on? if (P2OUT & LIGHT_OUT) { // Tick, tick, tick if (++lightTimer >= LIGHT_ON_TIME) { P2OUT &= ~LIGHT_OUT; pirIgnoreTimer = 0; } } if (P1OUT & LED_OUT) // Has motion already been detected? P1OUT &= ~LED_OUT; // If yes, turn off LED, measure on next loop else adcStartReadPIR(); __bic_SR_register_on_exit(SCG1+SCG0); // Keep DCO & SMCLK on after reti } // Port 1 interrupt service routine #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) { testMode ^= 0x01; // Toggle test mode P1IFG &= ~BUTTON_IN; // P1.4 IFG cleared }
     
    Schematic
    Still need to do this, despite it not being very much.
  12. Like
    Fred got a reaction from zeke in [TIDEALS] Dec 6th, 2011 - MSP-FET430U28A bundle $75.00   
    Whilst we're waiting, http://tiedeals.com apparently has 45%-75% off first quality brand name silk neckwear.
     
    I must type more carefully.
  13. Like
    Fred got a reaction from EngIP in Programmable with launchpad?   
    You should be ok. I programmed an Olimex PIR board using the USB stick from the EZ430-F2013. It had the same connector. Check the JTAG pinout though - mine was non-standard until some links on the board were changed.
     
    Unfortunately I choose the 433 MHz version of the Chronos or I might have between tempted to get one too.
  14. Like
    Fred got a reaction from PentiumPC in Justification needed for TI's sample.   
    What country are you in? I was thinking of getting some samples. If I can get an extra 2553 I'll send one to you.
  15. Like
    Fred reacted to PentiumPC in Ebay Bluetooth Dongle write up. HC-06 /HC05   
    Buyer please note
     
    There are 2 models of this Module on Ebay (and many other clones or variations), both operates in similar ways.
     
    HC-06 has a simpler AT command set and can only be set to master by using the Key pin (physical pin).
     
    HC-05 has an expanded AT command set, pairing and Master/Salve mode can be done thru AT commands. e.g. you can switch of pairing etc.
     
    For simple applications it makes no difference, I guess..
     
    Regards,
    Terence
  16. Like
    Fred reacted to PentiumPC in Ebay Bluetooth Dongle write up. HC-06 /HC05   
    HI Guys,
     
    This is a simple write up on one of the Bluetooth module yon can buy on Ebay.
    http://www.ebay.com/itm/170693106136
     
    I already placed order for some of these from Dealxtreme but decide to try sourcing another from Ebay for comparison.
    Dealxtreme still give the best price for bluetooth dongles, $6.60 with free shipping (crawling speed), while the cheapest I can find on Ebay is $4.90 + $3.95 shipping.
     
    The Bluetooth module from Ebay was delivered in less than 2 weeks.
    The package came in a padded envelop, The module was encased in a black plastic holder and wrapped in bubble wrap.
     

     
    I had some time before my meeting and decided to wire it up. I made a simple break out board, breaking out only the necessary pin.
     
    VCC, GND, TX, RX, PIO 1 (status light), website say PIO 8 which is wrong.
     

     
    I checked the board, fixed a bad solder joint and powered it up, I was greeted with an rapidly blinking LED, indicating that it is waiting to be paired.
     

     
    Paring was simple, My Mac detected the module immedaitely and I paired it with Passcode "1234". (I had a hard time pairing with Seeed Studio's Arduino Bluetooth shield, which uses the same kind of module).
     

     
    I loop the TX to RX and ran "Screen" to test it out. Default baud rate on the TX and RX pin is set to 115200, but that don't apply on the bluetooth side.
     

     
    Till now everything works as expected, will update once I do more testing.
     
    Regards,
    Terence
  17. Like
    Fred got a reaction from bluehash in CCS 5.1 available   
    It seems that CCS5.1 RC1 is now available. Sorry if you all knew already but I haven't seen a post about it.
    http://processors.wiki.ti.com/index.php/Download_CCS
     
    When installing it prompted me to integrate into my existing Eclipse installation, which sound good. No more multiple copies of what's essentially the same software. Unfortunately it wanted a 32-bit version of Eclipse, so I haven't tried this out yet.
     
    [Title edited as final version is now available]
  18. Like
    Fred got a reaction from Geet in New Here! - ez430-rf2500   
    Ah! That's a bit clearer. Oddly enough that's exactly what I've been doing. I've got an Olimex PIR board which I wanted to use and connected it up to the USB stick that came with my EZ430-F2013 (the same as the RF2500). I found these posts helpful on how to use the USB stick for other devices:
    http://blog.curioussystem.com/2010/10/d ... for-ez430/
    http://www.43oh.com/2010/11/ez430-f2013 ... out-cable/
    http://www.simpleavr.com/msp430-projects/ti-launchbread
     
    I went my own direction and bought some 0.05" header socket strip and soldered wires directly to it. (Image attached, but there's not much to it.)
     
    Having said all that zborgerd is spot on that the Launchpad is another way to connect to any spy-by-wire devices and it's stupidly cheap at $4.30 including shipping. It might even be cheaper that the header strip! I just ordered 3 of them.

  19. Like
    Fred got a reaction from bluehash in [TIDEALS] F2806x controlSTICK at 25% off.   
    It seems it's already there - F2806x Piccolo controlSTICK
    http://tideals.com/ti-deal-week-sept-27-%E2%80%93-oct-11th/
     
    Is that the same one that you could get along with a free full version of CCS via another code?
  20. Like
    Fred got a reaction from zborgerd in [TIDEALS] F2806x controlSTICK at 25% off.   
    It seems it's already there - F2806x Piccolo controlSTICK
    http://tideals.com/ti-deal-week-sept-27-%E2%80%93-oct-11th/
     
    Is that the same one that you could get along with a free full version of CCS via another code?
  21. Like
    Fred reacted to gwdeveloper in eZ430-RF2500-SEH sample source code   
    Hello leomar01, if you're starting with CCS for the first time the workspace will be fresh. Make sure you are selecting 'C:\Texas Instruments\eZ430-RF2500-SEH_Sensor_Monitor-v1.5' workspace folder. After that, Import a New Project by selecting from the top menu 'Project > Import Existing CCS Project'. If you browse to 'C:\Texas Instruments\eZ430-RF2500-SEH_Sensor_Monitor-v1.5' and press ok, it will list the proper project to import.
    After that, you'll need to create new Linked Resource. This is also in that readme.txt file. From CCS's top menu 'Window > Preferences' then on the left column, 'General > Workspace > Linked Resources' create a new resource called DEV_ROOT and select the 'C:\Texas Instruments\eZ430-RF2500-SEH_Sensor_Monitor-v1.5\CCE_Source' folder. Press ok and you should be able to compile and debug.
     
    Also, there will not be a main.c file in the project. In the project, the 'Components' folder is the files needed for SimpliciTI (the wireless stack used in the application). The 'Peer Applications' folder contains 'SEH_AP_v1.5.c' (access point) and 'SEH_ED_v1.5.c' (end device). These contain your main functions and are selected based on the active build configuration. Simply right-click on the project's folder and under 'Active Build Configuration' you can select the access point or end device.
     
    [attachment=0]Capture430.JPG[/attachment]
  22. Like
    Fred got a reaction from zeke in [TIDEALS] EZ430-Chronos Wireless Watch Development Tool   
    Free international shipping! Ordered one too, even though it seems like one of those things that you play with, write a "proof of concept" app and then never use again.
×
×
  • Create New...