Search the Community

Showing results for tags 'sensor'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks


  • Community Calendar

Found 14 results

  1. Hi all i'm programming by MSP430fr5739 a temperature and humidity reading by the DHT11 sensor. ?The wire are correct, and so the problem is'nt in the link, it is in the code. This is my code, usind the dht11 library, find on internet. ?The main problem is that i don't know how to read the value of T and H, and maybe there is some problems in the reading (probably in the interrupt) ?Thanks for the advice. ?MAIN CODE: #include <msp430.h> #include <DHT11_LIB.h> unsigned char RH_byte1; unsigned char RH_byte2; unsigned char T_byte1; unsigned char T_byte2; unsigned char checksum; unsigned char Packet[5]; unsigned char volatile TOUT; unsigned char volatile SECOND_TIMER=0; void init(void); #pragma vector = TIMER0_A0_VECTOR __interrupt void CCR0_ISR(void){ SECOND_TIMER++; TOUT=1; //TOG (P1OUT,0x01); per il led CLR (TA0CCTL0, CCIFG); } void init(){ WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer PJDIR = BIT1+BIT2+BIT3; // Set LED to output direction PJOUT = BIT1; //high the LED PJOUT = BIT2; //Set clock and timer CSCTL1 = BIT1+BIT2 ; // DCO a 8MHz CSCTL2= SELS_3; // SMCLK take DCOCLK TA0CCR0 = 50000; // Initialize the timer to count at 20Hz TA0CTL = TAIE_1; // Enable interrupt TA0CTL = TASSEL_2 + ID_3 + MC_1+ TACLR ; // SMCLK, div 8, up mode, e fa il clear _enable_interrupt(); //Enable global interrupt } void main(void) { init(); while(1){ //Must wait 1 second initially and between all reads if(SECOND_TIMER >= 5){ TOG (PJOUT,BIT1); // Simple way to gather all data with one instruction read_Packet(Packet); RH_byte1 = Packet[0]; RH_byte2 = Packet[1]; T_byte1 = Packet[2]; T_byte2 = Packet[3]; checksum = Packet[4]; if (check_Checksum(Packet)) SET (PJOUT, BIT1); //Se il checksum giusto si riaccende SET (TA0CTL, TACLR); SET (TA0CTL, 0x10); //Up mode TA0CCR0 = 50000; //Initialize the timer to count at 5Hz SECOND_TIMER = 0; //Clear counter } } } DHT11 LIBRARY: #ifndef DHT11_LIB_H_ #define DHT11_LIB_H_ #define TST(x,y) (x & (y)) #define SET(x,y) (x|= (y)) #define CLR(x,y) (x &= ~(y)) #define TOG(x,y) (x ^= (y)) #define DPIN BIT0 extern unsigned char volatile TOUT; void start_Signal(void); void start_Signal(){ SET(P2DIR, DPIN); // Set Data pin to output direction CLR(P2OUT,DPIN); // Set output to low __delay_cycles(25000); // Low for at least 18ms SET(P2OUT,DPIN); //HIGH __delay_cycles(30); // High for at 20us-40us CLR(P2DIR,DPIN); // Mette il pin in ricezione (Input) } unsigned char check_Response(void); unsigned char check_Response(){ TOUT=0; SET(TA0CTL,TACLR); //Reset timer to 0; TA0CCR0 = 100; //Set timer to overflow in 100uS. SET(TA0CTL,CCIE); //And enable timer interrupt while(!(TST(P2IN,DPIN)) && !TOUT); //while if IN=0 if (TOUT) return 0; else { SET(TA0CTL,TACLR); SET(TA0CTL,CCIE); while((TST(P2IN,DPIN)) && !TOUT); if(TOUT) return 0; else{ CLR(TA0CTL,CCIE); // Disable timer interrupt return 1; } } } unsigned char read_Byte(void); unsigned char read_Byte(){ TOUT = 0; unsigned char num = 0; unsigned char i; CLR(TA0CTL,CCIE); for (i=8; i>0; i--){ while(!(TST(P2IN,DPIN))); //wait the hing signal SET(TA0CTL,TACLR); // clear SET(TA0CTL,0x10); //Up mode (Mode control 01b) SET(TA0CTL,CCIE); //enable interrupt while(TST(P2IN,DPIN)); //wait the low signal CLR(TA0CTL,0x30); //held counter if (TA0R > 0x28) //TA0R
  2. - INTRODUCTION Hi everybody, I want to share a library for controlling a 4-pins PING sensor (HC-SR04 ICStation) basically, although you can also control the 3-pins PING))) sensor conventional of Parallax (URL). This library is a modification of the Caleb Zulawski's library for PING))) sensors. I made basic improvements in calculations, I added a function to calculate the distance in millimeters and added the option to change the "input trigger signal" [10uS for HC-SR04 and 5uS for PING)))] - CHANGE LOG v2.1 (26/08/2014) * Fixed calculations of distance in inches. v2.0 (25/08/2014) * Fixed problems with measurements adjustments. * New function for modification of a single unit. v1.0 (24/08/2014) * Basic modification of Caleb Zulawski's library. * Added the calculation of distace in millimeters. * Identified problems with measurements adjustments. - TESTING Tested on: Tiva C (TM4C123GXL) & Arduino UNO R3 - COMPARISON SECTION A small comparison between the 2 sensors is: * HC-SR04 sensor: 1. Working Voltage: 5V (DC) 2. Output signal: Electric frequency signal, high level 5V, 0V low level. 3. Sensor angle: Not more than 15 degrees. 4. Detection distance: 2cm-450cm. 5. High precision: Up to 0.3cm 6. Input trigger signal: TTL impulse 10uS 7. Mode of connection: 1. VCC 2. TRIG ( T ) 3. ECHO ( R ) 4. GND * PING))) sensor: 1. Working Voltage: 5V (DC) 2. Output signal: Electric frequency signal, high level 5V, 0V low level. 3. Sensor angle: Not more than 15 degrees. 4. Detection distance: 2cm-300cm. 5. High precision: Up to 0.3cm 6. Input trigger signal: TTL impulse 5us 7. Mode of connection: 1. GND 2. VCC 3. SG - DOWNLOAD SECTION v2.1: Ping4Pins v2.0 (Not recommended): Ping4Pins v1.0 (Not recommended): Ping4Pins - INSTRUCTIONS OF INSTALLATION 1. Download the latest version of the library 2. Unzip the zip-folder. 3. Copy the "Ping4Pins" folder in the location of the libraries depending of your trainer: * For Arduino: <Arduino IDE directory>\hardware\libraries\ * For Tiva C: <Energia IDE directory>\hardware\lm4f\libraries\ Note: If you used an older version of the library, I recommend deleting the folder and copy the new folder "Ping4Pins". - EXAMPLES SECTION In the "examples" folder are 5 examples for Arduino and 5 examples for Tiva. I'll post the example # 1: /*Example # 1 for TivaC / ArduinoCreated by Jeyson Zu
  3. So I'm working on a fingerprint scanner project with this repo written for arduino for the scanner I'm using. I am trying to make it work with an MSP430G2553 instead of the Arduino Uno. When I try using this library in Energia, it can't find the scanner despite being wired on the launchpad the same way that it is wired on the Arduino (External 5V source, Arduino pin 2 --> MSP430 pin 1.1, Arduino pin 3 --> MSP430 pin 1.2). The code compiles and the serial monitor outputs the test looking for the scanner, but it has yet to be able to find it. If anyone could give me any help with this, it would be greatly appreciated. Energia ino sketch is attached. EDIT: So after making myself more familiar with the code and the C++ imports, it seems the scanner works in 4 phases: 1) Take image 2) If image is a finger, convert it to digital features 3) Compare fingerprint features against features of enrolled fingerprints 4) Able to return result for the comparison and if its a match, return the ID# These lines: SoftwareSerial mySerial(5, 6); //Define serial communication on two pins Adafruit_Fingerprint finger = Adafruit_fingerprint(&mySerial); Seem to be whats handling all the fingerprint logic. So the issue isn't with the scanner, its with the communication between scanner and the MSP, most likely that I'm somehow defining output pins 5 and 6 (P1_3 and P1_4) incorrectly so they are not handling the scanner at all. fingerprint.ino
  4. Hi,guys!This is my first time here.This forum seems like a very active MSP430 community.Glad to find so many MSP430 lovers. I would like to share a project I did a month ago,which is about evaluating TI's Senshub board with MSP430F5529.Well this board has lots of sensors on it,such as BMP180,MPU9150,TMP006,SHT21,ISL29023.On TI
  5. These sensors can be obtained on Amazon/Ebay, are fairly cheap, and work by converting current from photodiodes into a square wave output. Don't expect much from them as they have a lot of limitations but can detect colors and match them to some degree. I noticed an old posting on 43oh about this sensor but it wasn't apparent they were successful so I gave it a try. The photo below shows the sensor and examples from the demonstration sketch I wrote in Energia V16 using the MSP432P401R LaunchPad. I tried using pulseIn() and got it working quickly on the MSP432. I tried the same code with the F5529 and it was somewhat less successful - it was flaky matching colors which I suspect was due to the limitations of pulseIn() on the F5529. The sensor output is adjustable but I didn't find it worked well at the lowest frequency setting. A better approach for the F5529 would be to use a timer and count pulses but I lost interest :-) The sensor is sensitive to incidental light/shadows, material properties, distance from subject, and probably all sorts of other things. It is more sensitive to red (and infrared) than other frequencies and the datasheet gives some help but in the end everyone seems to slap something together using the raw readings or just use the raw readings. I didn't find the raw readings useful and developed empirical factors for the frequency response from some colored card stock and made up an algorithm based loosely on an approach I saw in some Arduino code. The pin connections and code are here for those interested.
  6. 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: 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
  7. Hello, I bought an Adafruit TSL2591* shield but unfortunately it looks like there's no lib for MSP430s. There's code for Arduino and some posts about the TSL2561. Unfortunately I don't have any experience with I2C and hope/wonder if someone is interested to get it running on the MSP430s? That's a really nice sensor. * :
  8. Hi, I'm trying to read analog values from a SHARP IR sensor GP2Y0A41SK0F using the MSP430F5529 launchpad. There was not any error when I verified and uploaded the codes in Energia. However, when I clicked on the Serial Monitor, nothing showed up. But when I chose the MSP430G2452 from the "Tools" menu, the monitor successfully showed the analog values. I connect Vcc (red wire) to 5 V pin, the ground (black wire) to GND pin, and the analog output (white wire) to P6.4 pin/A4 pin. The same thing also happened to the MSP430G2553 launchpad. It only works when MSP430G2452 is selected. I looked at the codes very thoroughly but I couldn't see any mistakes: const int IR = A4; void setup() { Serial.begin(9600); } void loop() { int maxVal = 0, minVal = 1024, n=200; float x_i, total=0, mean; for (int i=1; i <= n; i++) { x_i = analogRead(IR); total += x_i; Serial.println(x_i); if (x_i < minVal) { minVal = x_i; } if (x_i > maxVal) { maxVal = x_i; } } mean = total / n; Serial.print("minimum = "); Serial.print(minVal); Serial.print(", maximum = "); Serial.print(maxVal); Serial.print(", total = "); Serial.print(total); Serial.print(", mean = "); Serial.println(mean); delay(100); }
  9. I decided to build an air humidity alarm so I know when to air (you can also attach a piezo buzzer, which is more recognizable in some situations). I found/use this lib. Chip: MSP430G2452 (this I had left, I think it's overkill for this task) -- Problem solved. Thanks to all who helped. To solve the problem I decided to comment out if (millis() < _lastMillis) { return _lastResult; // return last correct measurement } _lastMillis = millis() + 1; in DHT22_430.cpp because I think the millis() doesn't run below LPM1. I also don't need the millis() because I already wait in interrupts (3-10 seconds, enough for this sensor which needs at least 1-2 seconds time). I also commented out "delay(250);" and changed "delay(20);" to "delay(10);" to reduce unnecessary power consuming cycles. Tested and works. BTW: don't forget to comment out "#define DEBUG" in DHT22_430.h (but it will give you a compile error anyway when using timer ("multiple definition of `__isr_9'")). That's it, no further changes (if I would have made many small changes to the lib, I'd have attached the two lib files in an archive file). -- Power consumption: In LPM3: 10
  10. Hello, my name is Rolando Correa. I am a Junior student at John Brown University located in Siloam Springs, Arkansas. This semester I have been working in a project called "The Pool Boy" for my Embedded Systems class. Project Objective The purpose of this project was to design and assemble a pool skimming system. The final product, the Pool Boy, can autonomously navigate and filter the surface of an 800 square foot pool in under 60 minutes. It filters the surface of the pool via water intake system driven by high efficiency electrical motors. The Pool Boy follows a random path based on a "random generated number" to efficiently cover the entire surface of any size or shape of pool. The onboard proximity sensor allows it to navigate around stray objects and pool walls without collision. The embedded solar panels continuously charge the included rechargeable battery. Parts 1 Texas Instruments MSP430G2553 1 Proximity Sensor (4-30cm range) 3 Small Solar Panels (0.1mA each output current) *this turned out to be less than expected. 2 Green LED's 1 Red LED 1 On/Off Switch 1 Rechargeable Battery (7.4 V) 2 EDF 50mm DC Motors High Density Foam 1 MOSFET Driver (4426) 2 Power MOSFET 1 Voltage regulator Feel free to leave a comment for more information. Thanks!
  11. Hi everybody, I have ordered some lm75a sensors from eBay and after careful SMD soldering on a SOIC to DIP converter, I am trying to get these sensors to work with the Launchpad and Energia. Somehow this is more difficult than expected (especially after connecting a RTC chip and a light sensor with ease). Has anyone tried to get these sensors to work with the Launchpad? What kind of pullups are needed? Does anyone have example code? And finally I tried this on the new release of Energia, has anything changed with the I2C code? Kind regards, Eelco Rouw
  12. Hi, My project is an home automation network. The first aim was to regulate the two heaters I got in my business place. So I made a first PoC with an arduino nano and a rapsberry. The nano sends to the RPi temperature from one side of the room and the a RPI log it along with it's own temperature measurement (the 2 based on DS18B20). Communications between the two is done by 2 RF24 modules, the Raspberry got one 433 transmitter to send order to 2 Chacon switch plug onto which the heaters are connected. On the raspberry I got a Python module logging the temperature in files and a web site in php to display temp graphs with d3.js. As everything was ok, and with some advices from shop owner I switched to the MSP430 platform. Got now three sensors, 2 soldered and one on a bread board, communicating with one Rpi. Now for the future : Challenge 1 Part 1 At the moment I'm using ManiacBug library for Energia, and use the RF24 auto ack with the sensors writing to the same pipe (they write every 10 seconds but should at last write once a minute) so there are few packet packet collision, but to avoid this problem, and as I want more than 5 sensors, I'm gonna have to manage some network addresses and the management packet acknowledgements. Which strategy for address assignment ? I would like to have the more flexible solution. So the sensor have to register themselves to the logger (RPi) so the loggers (in case several sensor networks) had to have the same physical address (on the RF24) as for each sensors. At init the sensors call the logger and register themselves. If there are several logger reachable, you have to accept the new sensor on the logger side. When the logger accept a new sensor it send back to the sensor a 'local' address for the network it manages. The security concerns are not taken into account in my near future plan. The addresses must be unique (managed by the logger) they are compose by the network id and the sensor address, so the logger or networks must have unique ids and not two long has the payload is only 32 bytes on the RF24... The user have to manage the link between physical sensors and logical assignments ( 0x02f = the one in the garage) in case of replacement or complete reset of an existing sensor. Part 2 One of my plan is to monitor plants soil in pot moisture (for exemple). So the wireless is less interesting as the pot may be near each other or need 2 sensor due to their size. What i want to achieve is to have one transmitter with several wired sensor hooked to it. The perfect solution is to have the possibility to daisy chain the sensors. So here to I should have a unique "address" for each sensor had to the network. The goal is to identify each sensor across the network and to have the possibility to request or command them. I'm wondering which way to go, the easiest the better ;-), implementing OneWire sensors (i need distance, moisture, flow...) as i already have OneWire ds18b20 or I2C... The wired sensor need to measure and transmit it with a stable address (keep it if it switch off) but it doesn't not to have to bee an hardware one, should be assigned on network registering. The address of the wired sensors are sub address of the sensor. Or they could be considered has 'top' address and the wireless sensor they are attached to have to manage is packets and for attached sensor. Challenge 2 The protocol : the transmission packet themselves. It has to be the more flexible possible, clear string one will be too long, for the moment I use a struct but it's to restricting if the protocol must evolve... And now the fun part : the images :-) The Wip version The soldered version The logger with its screen : date, hour and three temp. The graphs
  13. I am looking for a cheap lidar sensor for my robotic vision. I have not been able to find any that are relatively inexpensive. Does anyone have any suggestions for a dealer? I have heard that they are much more accurate than other similar sensors. Any thoughts on this?
  14. This is just the start of my project. Ultra sonic distance sensor, based on paralax ping sensor or other ultra sonic distance sensors . 24Khz and 40Khz ultra sonic transducer. Basic operation: Send Pulse--> wait for echo --> read time between pulse and echo --> send distance --> start over. completed part of projct at the time of posting. Output amplifier--completed PWM output (24Khz) --completed Parts that need to be completed Input amplifier/opamp -- waiting for jfet opamp, considering a 741 just for testing purposes pulse length code -- was working on it, didn't work, reallized enabling interrupts would help greatly Distance calculation--- waiting for other parts to be completed 40Khz PWM output Test Tested 24Khz transducer, 5v. Was able to see reflected signal(1m,3ft,1yd) on an oscilliscope through the other transducer, Signal that was detected was below .01v, about ~.002v peak to peak. Next steps: pulse length code listen code. Finalize amplifier, (would like to have 5-12v operating voltage for amp) prototype input amp (lf356, or 741 or class A with High gain) Choose Output type, UART, SPI, I2C 1wire, LCD, audio (sonar ping?) Currently I am uing a g2553 because of the 2 timers built in, I am sure I could do this with a g2231 or f2013/f2012 but for ease of prototyping, (HW UART) 2553 was chosen at this time. Goals: max distance with lowest power consumption max distance with highest power small form factor ....more goals to come