Jump to content

CorB

Members
  • Content Count

    288
  • Joined

  • Last visited

  • Days Won

    5

Reputation Activity

  1. Like
    CorB reacted to Paal in MSP430F5529LP + 430BOOST-CC110L - Execution randomly hangs   
    Just a quick update on the issues I described above, if someone stumbles by
    I was able to trace down the cause for the crashes I had when the receiver was operating at its sensitivity level (weak signal). It was indeed related to the "packet length byte" associated with the data payload getting corrupted.
     
    After some poking around in the AIR library I found that that the CC1101 packet length configuration was set to 61 bytes. In my sketch I had only reserved 10 bytes in data memory for RX data, because I was only sending 10 bytes. My confusion around that was that with the AIR library, you specify in your sketch how many bytes you are receiving each time. I had set this value to 10, believing that the packet handling then would be done using this value. I was wrong, under the hood of the AIR library, it was still accepting packets up to 61 bytes long.
     
    So every time the lengt byte was corrupted to a value between 10 and 61, some other data was overwritten by junk (packets with lenght byte > 61 bytes is automatically discarded by the CC1101 packet handler with the AIR library).
     
    The simple fix was of course to increase the rxdata space to 61 bytes, I had a simple application and using the G2553 with enough RAM. Doing this, I got what seemed like a rock stable application even at an RF level where most of the packets was corrupted due to poor signal to noise ratio.
     
    Not terribly happy with the AIR library, but I guess it wasn't really made for tinkering too much, just running the example sketches as is...
     
    Edit: I see that the OP has made the same mistake as I did, he is only reserving 50 bytes in data memory for RX data. So his application will be more stable than mine, because its only packages with length between 50 and 61 that will crash his application.
  2. Like
    CorB got a reaction from vitalis in [Energia Library] Anaren CC110L AIR BoosterPack   
    Yes you can. You can access the LPM levels of MSP430 using Energia. 
  3. Like
    CorB got a reaction from vitalis in [Energia Library] Anaren CC110L AIR BoosterPack   
    Hi vitalis,
     
    That is surely possible I think for sending nodes. Just send the data, close the radio and put the system to sleep using sleepSeconds(X). Ive programmed most of my nodes thusfar with CCStudio and they are running for many months on 2 AA batteries when sending data once a minute or so,
     
    regards
    Cor
  4. Like
    CorB reacted to Fmilburn in Getting Started with Printed Circuit Board (PCB) Design   
    This is the first PCB that I have designed and sent off to be manufactured.  Yesterday I received the boards, soldered them up, and they work!

    This write-up outlines the process I used in the hope that it will be useful to other hobbyists and builders.  There are links at the end which provide additional detail. 
     
    Selecting a Project
    The project consists of a small board with a MSP430G2553 microcontroller and an nRF24L01 radio.  I started with a radio attached with jumpers to a LaunchPad quite some time back and then built one on a proto-board.  The photograph below shows a G2553 with radio powered by a buck-boost converter attached to a super capacitor and solar panel.  I used it for a while with my weather station which never was quite completed.

    Although I could have started with that, I actually chose to start with something simpler.  The goal was to focus on the PCB design process and to minimize the issues associated with a new or technically challenging project.  The objectives, strategies, and constraints I decided on included the following:
    Inexpensive






  5. Like
    CorB reacted to Rei Vilo in How to protect your free code from companies predating on it ?   
    The problem is two-fold.
    Companies claim intellectual property (IP) on maker's work, even if the maker mentions all the credits and references she has used and the maker's development is truly genuine. Companies uses maker's work and violate the maker's IP and copyright, even if the maker protects her work with a licence like the Creative Commons https://creativecommons.org/licenses/by-nc-sa/4.0/'>Attribution
  6. Like
    CorB reacted to Rei Vilo in [Energia Library] LCD_screen Library Suite   
    Yes, I did mention copyright and licence, Creative Commons, Attribution, Share Alike, Non Commercial to protect my work, and implemented a donation-based system, to no avail. 
     
    Source code is much more difficult to protect than a packaged application.
     
    I think this is a real problem for hobbyists and makers, especially for sharing and contributing. Does anyone have a better experience?
  7. Like
    CorB reacted to Fred in 43oh wins TI Community Highlight Award   
    Too shy to tell us yourself, @@bluehash? Well, I'll have to do it then!
     
    It looks like 43oh has won TI's Community Highlight Award. Definitely well deserved. This place has always been a great source of help and inspiration. Probably the reason why I use TI stuff rather than anyone else's.
     
    Well done.
  8. Like
    CorB got a reaction from bluehash in Energia 17 is available!   
    Just seen at www.energia.nu !!
     
     
  9. Like
    CorB got a reaction from abecedarian in Energia 17 is available!   
    Just seen at www.energia.nu !!
     
     
  10. Like
    CorB reacted to Rei Vilo in The Story of Energia in 150 Seconds   
    Watch The Story of Energia in 150 Seconds.
     

  11. Like
    CorB reacted to sq7bti in Educational BoosterPack 8 bit FFT Spectrum Analyzer Attempt   
    Hi @@simpleavr,
     
    You might try to hand pick values from wider window, but here are Hamming windows size 16 (mind the symmetry):
    // round(255 * window('kr',16,6)) //const unsigned char hamming[8] = ( 4, 18, 46, 86, 136, 187, 228, 252); //, 252, 228, 187, 136, 86, 46, 18, 4 ); // round(255 * window('kr',16,4)) const unsigned char hamming[8] = ( 23, 51, 88, 130, 172, 210, 238, 253); //, 253, 238, 210, 172, 130, 88, 51, 23 ); // round(255 * window('kr',16,2)) //const unsigned char hamming[8] = ( 112, 141, 170, 196, 218, 236, 248, 254); //, 254, 248, 236, 218, 196, 170, 141, 112 ); More information regarding window function you will find in Scilab help.
     
    S.
  12. Like
    CorB reacted to sq7bti in Educational BoosterPack 8 bit FFT Spectrum Analyzer Attempt   
    Hi,
     
    Having a nice matrix led display laying around with no use of I assembled a test circuit with launchpad and modified the code of @simpleavr to run on it.

    The display is driven by four MAX7219 chips chained on SPI bus. I noticed that the only floating point operation that your code was using is a square root operation in line 257. Once I added a fixed-point square root routine, linking with math lib is not necessary anymore - spared a lot of flash space. The fixed-point routine is also 3 times faster than mathlib floating point one: 50us vs 150us
    #ifdef FLOATING_POINT // sqrt: 150us #include <math.h> #else // FLOATING_POINT // 50us unsigned char sqrt16(unsigned short a) { unsigned short rem = 0, root = 0; int i; for(i = 0; i < 8; ++i) { root <<= 1; rem = ((rem << 2) + (a >> 14)); a <<= 2; ++root; if(root <= rem) { rem -= root; ++root; } else { --root; } } return (unsigned char)(root >> 1); } #endif // FLOATING_POINT Further I've added Hamm windowing to minimize spectral leakage:
    // scilab 255 * window('kr',64,6) //const unsigned short hamming[32] = { 4, 6, 9, 13, 17, 23, 29, 35, 43, 51, 60, 70, 80, 91, 102, 114, 126, 138, 151, 163, 175, 187, 198, 208, 218, 227, 234, 241, 247, 251, 253, 255 }; // scilab 255 * window('kr',64,4) const unsigned short hamming[32] = { 23, 29, 35, 42, 50, 58, 66, 75, 84, 94, 104, 113, 124, 134, 144, 154, 164, 174, 183, 192, 201, 210, 217, 224, 231, 237, 242, 246, 250, 252, 254, 255 }; // scilab 255 * window('kr',64,2) //const unsigned short hamming[32] = { 112, 119, 126, 133, 140, 147, 154, 161, 167, 174, 180, 186, 192, 198, 204, 209, 214, 219, 224, 228, 232, 236, 239, 242, 245, 247, 250, 251, 253, 254, 255, 255 }; Applying windowing on 32 samples uses fixed point math:
    for (i=0;i<Nx;i++) { int hamm = hamming[i<(FFT_SIZE-1)?i:(Nx-1)-i] * data[i]; data[i] = (hamm >> 8); } Finally the display buffer is filled in with output of FFT function:
            unsigned long mask = 1UL;         for (i=0; i<32; ++i, mask <<= 1) {             for(j=0;j<8;++j) {                 if(j<plot[i])                     dbuff.ulongs[j] |= mask;                 else                     dbuff.ulongs[j] &= ~(mask);             }         } where dbuff is display buffer organized as:
    typedef union { unsigned long longs; unsigned int ints[2]; unsigned char chars[4]; } longbytes; union { unsigned char bytes[8*4]; longbytes lbytes[8]; unsigned long ulongs[8]; } dbuff; which make it easy to manipulate:
    unsigned char spibuff[8]; void SPI_Write(unsigned char* array) { P2OUT &= ~LED_CS; __delay_cycles(50); unsigned int h = 8; while(h) { UCB0TXBUF = *array; while (UCB0STAT & UCBUSY); ++array; --h; } P2OUT |= LED_CS; } void update_display() { unsigned char i; for(i = 0; i < 8; ++i) { spibuff[0] = spibuff[2] = spibuff[4] = spibuff[6] = i+1; spibuff[1] = dbuff.lbytes[i].chars[3]; spibuff[3] = dbuff.lbytes[i].chars[2]; spibuff[5] = dbuff.lbytes[i].chars[1]; spibuff[7] = dbuff.lbytes[i].chars[0]; SPI_Write(spibuff); } } BTW I got a second 8x32 led matrix displays from the same ebay offer, and it turned out to be mirrored - LED matrix is turned around 180deg, so the update_display() routine for the other one have to push bytes in order 0 through 3, and bit-shift operations ( << and >> ) yield opposite display reaction (left vs right scroll).
     
    https://youtu.be/Nen6yd5kvZs
     
    s.
     
    Edit: correct photo attachement and source code snippets
    led_fft.tar.bz2
  13. Like
    CorB got a reaction from khwatch in free adc pin CC110L AIR BoosterPack and g2553   
    Hi,
     
    You can use P1.1 (A1) to P1.4 (A4)  But for P1.1, P1.2 you cannot use the UART RX/TX functions when using it for ADC. And P1.3 is connected to the pushbutton on the launchpad. The only ADC without any other function that can be used in combination with the CC110L boosterpack is P1.4.
     
    You can easily check this by looking at the pinmap of the G2553
    http://energia.nu/wordpress/wp-content/uploads/2014/01/LaunchPads-MSP430G2-%E2%80%94-Pins-Maps-13-42.jpeg
    and the CC110L
    http://energia.nu/wordpress/wp-content/uploads/2014/01/AnarenCC110LAIRBoosterPackPinMap.jpg
     
     
    regards
     
    Cor
  14. Like
    CorB reacted to maelli01 in watchdog   
    converted the watchdog example from Tivaware into Energia.
    it should explain itself...
    I tested this with the connected launchpad TM4C1294
     
    5 blinks, resets itself, 5 blinks, on and on....
    /* 6.11.2015 Watchdog example */ #define LED RED_LED #include <stdint.h> #include <stdbool.h> #include "driverlib/sysctl.h" #include "driverlib/watchdog.h" unsigned long oldmillis; unsigned int timeout; void setup() { pinMode(LED, OUTPUT); SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0); WatchdogReloadSet(WATCHDOG0_BASE,120000000); WatchdogResetEnable(WATCHDOG0_BASE); } // the loop routine runs over and over again forever: void loop() { if (millis()>(oldmillis+500)){ oldmillis=millis(); digitalWrite(LED, HIGH); delay(100); digitalWrite(LED, LOW); timeout++; WatchdogReloadSet(WATCHDOG0_BASE,120000000); //feed the dog, food for a second ;-) // simulated software crash: dog will not be fed any longer, causing a reset if (timeout>5){ while(1); } } }
  15. Like
    CorB reacted to Rei Vilo in IoT with LaunchPad CC3200: Exploring the Existing Services   
    I've started a new series Exploring IoT, the Internet of Things on my Embedded Computing website.
    The idea is to explore the different services available for IoT. 

    What are their features? How easy to implement and use them? 

    I'll try and keep the same project along all the offers, a weather station, and run it for one day. The weather station measures temperature, humidity, pressure and light, and reports data every 30 minutes. 
    Already tested:
    Blynk IoT OTG IoT with Exosite IoT with Sparkfun Data and analog.io To be continued...
         
  16. Like
    CorB reacted to Fmilburn in DIY Rain Gauge   
    I made this sensor a while back as a prototype and put it outside earlier in the year and it still seems to be working OK.  It has been a dry spring and summer here in Seattle though and it really hasn't had much of a workout.  It was my first project with the MSP430G2.
     

     
    It is pretty simple.  The funnel catches rain from a known area where it falls into two "buckets" that tip back and forth.  Adjustment screws are used to calibrate the bucket volume.  A hall sensor detects each tip of known volume and sends a signal to the microcontroller which timestamps and stores/transmits the data.  Collected rain falls out the bottom through weep holes once it is measured.
     
    It was cheap to make, here is a bill of materials:
    Hall sensor - less than $2 Funnel: 1$ for three at the dollar store Magnets: I think I paid a couple of dollars for a tube of them Empty plastic nut container bottom of a coffee can to make the tip bucket mechanism Scrap wood Miscellaneous wire, nut, bolts, and nail I had around I stole shamelessly from this guy and he has a good write-up so I won't repeat that here:  http://www.instructables.com/id/Arduino-Weather-Station-Part3-Rain/
     
    These device have been around a long time.  When I was an undergraduate engineering student I worked one summer in a lab associated with the university where they needed to digitize rainfall data over a long period from several locales.  This was in the days of mainframes, well before PCs, microcontrollers, and spreadsheets.  The rainfall data was recorded on 24 hour charts that were attached to a clock driven drum and changed out daily.  Each time the bucket tipped on the rainfall gauge it would make a tick on the chart.  My job was to go through years of data (it had been stored on microfiche by the time it got to me), write it down and then later punch cards that were read into the mainframe.  This project was more fun, but I appreciated the money at the time
  17. Like
    CorB reacted to cubeberg in Cheap solar battery + wireless IoT node   
    Started getting my rain sensor set up - just in time for some rain the day before yesterday.  I accidentally left the transmit speed set really low - so it killed the battery.  Going to let it recharge and fix the interval, and then the bugs.  Right now I'm dealing with a noisy reed switch + some sort of bug on the interrupt.  I can tell IF it rained, but not how much ATM.
  18. Like
    CorB reacted to selcukc in Tiva C Series LaunchPad Based Digital Oscilloscope with Labview Interface   
    TivaScope is an oscilloscope which works with Tiva Launchpad (http://www.ti.com/tool/ek-tm4c123gxl, only 12.99$) from Texas Instruments. It communicates with PC via USB port. Its maximum sampling frequency is 1MSa/s with 12bit resolution. The signal which is shown on screen was obtained from referance signal output with10KHz %30 Duty Cycle. It also supports Stellaris LM4F120 LaunchPad.
     

     
    Tutorials
    https://youtu.be/B4GVoiZVIM4
    https://youtu.be/O0G1Gm5h3fk
     
    Specifications
    Maximum sampling frequency is 1MSa/s with 12bit resolution. It supports USB 2.0 Single channel input PE3(AN0) Referance signal output with10KHz %30 Duty Cycle from PB6 Labview Interface TI E2E
  19. Like
    CorB reacted to cubeberg in Cheap solar battery + wireless IoT node   
    So my issue right now - the max charge daily keeps going up!  Slowly - and it's decently below 3v at this point (2.52v today) - but it keeps going up daily (202, 208, 213, 215).  I may have to add some code in to turn on an LED until the value falls below a threshold.  
  20. Like
    CorB reacted to cubeberg in Cheap solar battery + wireless IoT node   
    I've got a bunch of sensors in my house uploading data to my phant repository - but I decided to start looking into placing sensors outside as well.  
    I purchased some $2 solar sensors from Target (Apparently they're frequently available from the dollar store as well - I'll check into that) in the hopes that I could use them to power an MSP430.  The ones I purchased only provide ~1.2v of power since they're single battery.  They're 200maH as well, but I think that will likely be plenty for my uses.  
     
    Since one wouldn't do it - I used two in series.  At full power - that should be around 2.4v - perfect for an MSP430.  I added a diode between the two just in case, and clipped the LED to avoid unneeded battery usage.  Hooking directly into the battery means that I get power all the time - great since I didn't just want power at night.  Plus - the power output for the LED is apparently pulsed - probably not good for the MSP430.  
     
    I've been watching the sensor values today - it dropped a bit overnight (very little to be honest - about 0.05v), but it's charging nicely right now.  I need to get a better container - but for now it's in a cheap tupperware container inside of a ziploc bag. Apparently the dollar store also sells locking containers with a gasket that would be perfect for this.  
     

     
    Here is my analog.io graph for battery level.  I'm not calculating the actual voltage - but it's out of 255 - 255 being a 3v reference voltage (technically vcc/2 compared to 1.5v reference).  So 198 is ~2.33v.  
     

     
    Next up - I've got some radioshack weather sensors (rain, wind speed & direction) that I'll be ripping the guts out of and replacing with MSP430 brains.  They'll get solar power as well. 
  21. Like
    CorB reacted to cubeberg in Wireless security system + IoT   
    So I recently tried to get a solution up and going on Azure.  Worked great until I realized that the lower-cost and free options were limited by CPU time (I think the "free" option was 5h) and the next level up with 100% uptime was $56 a month.  So - scrap that idea.  I might still see about doing something with .NET, but I'd have to set up a computer at home for cost purposes.  
     
    I'm going back to sparkfun's Phant and data.sparkfun.com service.  I've been working with @@Lgbeno a bit on his imp.guru site as well as some new stuff he's cooking up.  Visualizations are great - gives me a way to look at sensor activity.  
     
    I still need to post some information on my sensors - I'll try to get pictures up soon.  As of last night - I've got two door sensors (also transmitting temperature, battery and light levels) as well as three motion sensors (again, transmitting battery, temperature and light).  I've got 3D printed enclosures for both sensor types, although the enclosure for the motion sensor is way too large - I need to redesign to conserve filament as well as reduce bulk.
  22. Like
    CorB reacted to bluehash in 43oh Server Slow Responsiveness.   
    Thank you guys. This site is l..i..m..p..i..ng. I'm configuring a Linnode for now. I moved over c2kcentral as a test and it went well. 
    I leave for vacation tomorrow(my wedding) and hoping to finish it sometime tomorrow, at least.
    Always at the wrong time.
     
    Thanks for sticking around.
  23. Like
    CorB reacted to Rei Vilo in 2.4" 320 x 240 Color LCD Booster Pack (with and without touch panel)   
    @@CorB
    Thank you for reporting the issue.
     
    Unfortunately, it is very difficult to add support for a new screen when I don't have one sample at hand, especially for "compatible" screens.
  24. Like
    CorB reacted to RobG in 2.4" 320 x 240 Color LCD Booster Pack (with and without touch panel)   
    Here's the pinout (LCDs are preconfigured for new pinout.)
    Pos/Pin CS_Dis CS_SD D/C New(1) P2.5 P2.4 P1.3 Legacy(2) P1.0 P2.5 P1.4 P2.0 Touch IRQ P2.1 Touch CS As for the library, use ugl16msp.zip (from here) and change the following lines in msp.h
    // chip select #ifndef LCD_CS_PIN #define LCD_CS_PIN BIT5 // from BIT0 to BIT5 #define LCD_CS_PORT P2 // from P1 to P2 #endif #define LCD_CS_OUT portOut(LCD_CS_PORT) #define LCD_CS_DIR portDir(LCD_CS_PORT) // #define LCD_SELECT LCD_CS_OUT &= ~LCD_CS_PIN #define LCD_DESELECT LCD_CS_OUT |= LCD_CS_PIN // data/control #ifndef LCD_DC_PIN #define LCD_DC_PIN BIT3 // from BIT4 to BIT3 #define LCD_DC_PORT P1 Now, that library does not support touch panel, but there are some touch examples posted by me. Rei's library supports touch panel, so you could also use that one as well.
    I am almost done adding touch to my library, but I am not sure when I will finish it, possibly next week.
  25. Like
    CorB reacted to RobG in 2.4" 320 x 240 Color LCD Booster Pack (with and without touch panel)   
    @@CorB, the pinout is the same as my 2.2" 320x240 LCD, touch controller same as 2.2" Touch LCD.
    I will add this information here later on and also update my lib (there are only 3 lines that have to be changed.)
×
×
  • Create New...