Jump to content


  • Content Count

  • Joined

  • Last visited

About aam

  • Rank
    Noob Class

Recent Profile Visitors

513 profile views
  1. Hi, Many thanks @Fmilburn and @@chicken, I've put the first delay at 1s second and the measure works better. For my test I use an signal generator because it's easier to change the frequency and I'm sure of the frequency value. I have just two questions concerning the sketch and the resolution. I understood why I have to choose a higher delay in order to allow the counter to trig more often and then have a better resolution. But when I increase the delay, the frequency measurement increases too. Is it because the counter triggers too much times and then the value is higher ? Should I
  2. Sorry @jazz but I don't know how can I use these sketch in this topic http://forum.43oh.co...requency-meter/ There is no Energia sketch and when I upload the sketch in the sixth post, I have this error message Energia: 1.6.10E18 (Windows 7), Board: "MSP-EXP430F5529LP" Speed_Measurement_1.40:1: error: expected constructor, destructor, or type conversion before ';' token Speed_Measurement_1.40:6: error: expected constructor, destructor, or type conversion before ';' token Speed_Measurement_1.40:11: error: '::main' must return 'int' Speed_Measurement_1.40:1: error: ISO C++ forbids declarati
  3. Hello everybody, Thank you for all your responses. @@veryalive I have started to use energia two month ago for a project. So, i consider myself a beginner. I have a BLDC motor and I would like to measure its speed rotation for a given current using a photodiode and a laser. The laser is constantly emitting the light on the photodiode. The propeller blade cuts the light periodically. Thus, it gives me a signal with a frequency. So, if I can measure this frequency i will be able to determine the speed rotation. I want a resolution of 0.1Hz if possible and an update rate of 1s. @@jaz
  4. Hello everybody, I would like to measure the speed rotation of a motor. For this, i use a photodiode. The signal waveform is given by the picture. I want to measure this signal frequency using the MSP430F5529 and Energia and display it in the serial monitor. I know i have to use the Timer A in Capture/Compare mode but I don't know how. I saw a lot of codes but they use CCS and the MSP430g2553 and it is not clear for me. How can I proceed to measure the frequency of my signal ? The frequency can vary from 50Hz to 500Hz. Thank you for your help.
  5. Thank you for your help. I will try to do the same method than the MSP430 but for the MSP432 with your tips. And thanks sharing Robert's code in CCS, it will help me to use CCS
  6. I tried your sketch using an array and it works !! Thank you very much for your sketches ! I did the same test with a 100Hz sinus signal and I got about 1620 sample per period giving about 162ksps. The waveform is given by the picture. I have just one more question. I have a MSP432P401R Launchpad and I have the same problem than the MSP430F5529. Do you know how can I improve the sampling rate ? Thanks again
  7. You are right I saw in the serial monitor "Time 60", I just removed it in my sketch. I understood how you can got 166ksps thank you. Maybe, it is because of the serial.print which is reduced the sampling rate if I obtain a 2.4kHz frequency. I think store this value in an array before displaying in the serial monitor would increase the sampling rate. To display 500 values I did: int capture_data_analogInPin[NUM_READS]; void analog () { // Serial.println(readADC()); mark = millis(); for(i = 0; i < NUM_READS; i++) { captured_data_analogInPin = readADC(); }
  8. Hello, Thank you for response. However, I have 2 problems with this sketch: - The first problem is when I use this sketch in my program, I have only one value displayed while I need a lot of values (for example 1000 values) in order to have the signal waveform.(Attached screenshot Capture.JPG). I tried to store my values in a array before displaying them (like I did in my first sketch) but it doesn't work. How can I display an array resulting of my conversion ? - The second problem is when I upload the sketch directly without changing anything, I measure a 2.4kHz sampling frequency.
  9. Hello Everybody, I am using a MSP430F5529 Launchpad with Energia IDE in order to measure the current flowing on the motor. But I have a problem with sampling rate. The current that I want to measure has a 22kHz frequency and I have a 10kHz sampling rate. I would like to have a 200kHz sampling frequency. I found in an other topic that the sampling rate can be reduce because of the serial.print. So, I stored my values in a array before displaying them. i have a better sampling (10kHz) but not enough. Could you tell me how can I improve the sampling rate ? Attached the sketch. T
  • Create New...