Markel

Members
  • Content count

    10
  • Joined

  • Last visited

  • Days Won

    1

Markel last won the day on March 3

Markel had the most liked content!

About Markel

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    Malaysia
  1. Hi Clavier, Thanks for your reply. You are correct. So, these below are the sequences that I will do when powering on and powering off the LIS3DH Accelerometer. Powering On: Set ACC_VCC to 0, to turn on power to LIS3DH Accelerometer. Call SensorI2C_open(). Enable ACC_INT1 Pin. Powering Off: Disable ACC_INT1 Pin. Call SensorI2C_close(). Set ACC_VCC to 1, to turn off power to LIS3DH Accelerometer. Best Regards, Markel
  2. Hi, I have this MOSFET Power Circuitry connected to LIS3DH Accelerometer. The LIS3DH Accelerometer is connected to TI BLE CC2640R2F. The expected behaviour is if ACC_VCC is 0, it will power on the LIS3DH Accelerometer, and if ACC_VCC is 1, it will turn off the LIS3DH Accelerometer. However, if I initialize the open the I2C pins at program initialization by calling SensorI2C_open();. This is the behavior below. By normal knowledge The I2C pins connected to the LIS3DH Accelerometer should not affect the MOSFET Power Circuitry. I suspect the MOSFET Power Circuitry is wrong. Can anyone here give me tips what could be wrong. 1. Set ACC_VCC to 1, to turn off accelerometer. 2. VACC is measured at 3.2 V, which should not be. 3. Set ACC_VCC to 0, to turn on accelerometer. 4. VACC is measured at 3.2V, which is correct. Attached is the Accelerometer Circuitry..
  3. Hi, Just an update. I tested this at a weighing scale setup. My load weigh is 1 litre of water = 2.2 lbs. I run the SparkFun_HX711_Calibration.ino and got the calibration factor. I set the calibration factor at SparkFun_HX711_Example.ino. I got the correct weight displayed which is 2.2 lbs. Best Regards, Markel Robregado
  4. Hi, I set the calibration value to -1.f and now I get value of 3200. So I guess that is more reasonable value. Next I will try the program at load cell or weighing scale setup. Here is my code below. #include <SPI.h> #include <OneMsTaskTimer.h> #include <LCD_SharpBoosterPack_SPI.h> #include "HX711.h" /* Example using the SparkFun HX711 breakout board with a scale By: Nathan Seidle SparkFun Electronics Date: November 19th, 2014 License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). This example demonstrates basic scale output. See the calibration sketch to get the calibration_factor for your specific load cell setup. This example code uses bogde's excellent library: https://github.com/bogde/HX711 bogde's library is released under a GNU GENERAL PUBLIC LICENSE The HX711 does one thing well: read load cells. The breakout board is compatible with any wheat-stone bridge based load cell which should allow a user to measure everything from a few grams to tens of tons. Arduino pin 2 -> HX711 CLK 3 -> DAT 5V -> VCC GND -> GND The HX711 board can be powered from 2.7V to 5V so the Arduino 5V power should be fine. */ #define calibration_factor - 1.f//-7050.0 //This value is obtained using the SparkFun_HX711_Calibration sketch //2280.f #define DOUT 18//3 #define CLK 19//2 HX711 scale(DOUT, CLK, 128); // Variables LCD_SharpBoosterPack_SPI myScreen; uint8_t myOrientation = 0; uint16_t myCount = 0; void setup() { Serial.begin(9600); myScreen.begin(); myScreen.clearBuffer(); Serial.println("HX711 scale demo"); scale.set_scale(calibration_factor); //This value is obtained by using the SparkFun_HX711_Calibration sketch scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0 Serial.println("Readings:"); } void loop() { Serial.print("Reading: "); Serial.print(scale.get_units(), 2); //scale.get_units() returns a float Serial.print(" grams"); //You can change this to kg but you'll need to refactor the calibration_factor myScreen.text(10, 10, String(scale.get_units(), 2)); myScreen.text(10, 25, "grams"); myScreen.flush(); Serial.println(); } Best Regards, Markel
  5. Hi energia, From my last post, I can say that it is working but I do not have the correct setup to try out the example program from Sparkfun link below. I should try the example programs using a weighing scale setup connected to the Sparkfun Load Cell Amplifier HX711 board. Also, I am not able to get a calibration value because I am using a voltage divider board that outputs 5 mV, 10 mV, 15 mV, and 20 mV https://github.com/sparkfun/HX711-Load-Cell-Amplifier The formula for getting the calibration value, is explained in this link below. https://github.com/aguegu/ardulibs/tree/master/hx711 I am not an expert with MSP430 Launchpad and Energia, so any helpful inputs would be great. Best Regards, Markel Robregado
  6. I modify the HX711 scale(DOUT, CLK); to HX711 scale(DOUT, CLK, 128 ); to set channel A, gain factor 128. I made changes base from HX711.cpp void HX711::begin(byte dout, byte pd_sck, byte gain) { PD_SCK = pd_sck; DOUT = dout; pinMode(PD_SCK, OUTPUT); pinMode(DOUT, INPUT); set_gain(gain); } I get output at Tera Term "Reading: 0.1 lbs", that is for 20 mV input to Sparkfun Load Cell Amplifier HX711. Best Regards, Markel Robregado
  7. Hi, I am evaluating the Sparkfun Load Cell Amplifier HX711 using the MSP430FR5969 Launchpad. I added HX711 library and modified the HX711.cpp and HX711.h according to this post below. https://learn.sparkfun.com/tutorials/load-cell-amplifier-hx711-breakout-hookup-guide http://forum.43oh.com/topic/10172-hx711-library-for-use-in-energia/ I opened the SparkFun_HX711_Example.ino. After build, I get this error at HX711.h. error: ISO C++ forbids in-class initialization of non-const static member 'OFFSET' I comment out the initialization value of OFFSET and SCALE and it build without errors. I load the program to MSP430FR5969 LP and I get this output, "Reading: 0.0 lbs" HX711.h class HX711 { private: byte PD_SCK; // Power Down and Serial Clock Input Pin byte DOUT; // Serial Data Output Pin byte GAIN; // amplification factor long OFFSET; // = 0; used for tare weight float SCALE; // = 1; used to return weight in grams, kg, ounces, whatever SparkFun_HX711_Example.ino This example demonstrates basic scale output. See the calibration sketch to get the calibration_factor for your specific load cell setup. This example code uses bogde's excellent library: https://github.com/bogde/HX711 bogde's library is released under a GNU GENERAL PUBLIC LICENSE The HX711 does one thing well: read load cells. The breakout board is compatible with any wheat-stone bridge based load cell which should allow a user to measure everything from a few grams to tens of tons. Arduino pin 2 -> HX711 CLK 3 -> DAT 5V -> VCC GND -> GND The HX711 board can be powered from 2.7V to 5V so the Arduino 5V power should be fine. */ #include "HX711.h" #define calibration_factor -7050.0 //This value is obtained using the SparkFun_HX711_Calibration sketch #define DOUT 18//3 #define CLK 19//2 HX711 scale(DOUT, CLK); void setup() { Serial.begin(9600); Serial.println("HX711 scale demo"); scale.set_scale(calibration_factor); //This value is obtained by using the SparkFun_HX711_Calibration sketch scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0 Serial.println("Readings:"); } void loop() { Serial.print("Reading: "); Serial.print(scale.get_units(), 1); //scale.get_units() returns a float Serial.print(" lbs"); //You can change this to kg but you'll need to refactor the calibration_factor Serial.println(); } After that I connect the Sparkfun Load Cell Amplifier HX711 to MSP430FR5969 Launchpad. Here is the connections pin outs below MSP430FR5969 LP VCC 3.3 V <---------> VDD, VCC (shorted) Sparkfun Load Cell Amplifier HX711 MSP430FR5969 LP VCC GND <---------> GND Sparkfun Load Cell Amplifier HX711 MSP430FR5969 LP P1.2 Pin 19 <---------> CLK Sparkfun Load Cell Amplifier HX711 MSP430FR5969 LP P3.0 Pin 18 <---------> DAT Sparkfun Load Cell Amplifier HX711 MSP430FR5969 LP VCC 3.3 V <---------> VCC 3.3V Voltage Divider BRD MSP430FR5969 LP VCC GND <---------> GND 3.3V Voltage Divider BRD Voltage Divider BRD 15 mV -output <---------> WHT/A- Sparkfun Load Cell Amplifier HX711 Voltage Divider BRD 15 mV +output<---------> GRN/A+ Sparkfun Load Cell Amplifier HX711 Attached HX711.jpg is my setup. The problem is when I run the code I get output at Tera Term "Reading: 0.0 lbs". What could be causing this? I am suspecting the cause of this is my pin assignment 19 and 18 are wrong. But, I followed the pin out guide below. Also, maybe I should initialize OFFSET to 0 and SCALE to 1. http://energia.nu/pin-maps/guide_msp430fr5969launchpad/ Best Regards, Markel Robregado
  8. One good way to learn registers is to know how the internals of C API's work like GPIOPinWrite(). - Markel
  9. @@luis. I also want to use Energia. I already have a Temboo account and currently downloading Energia. Many months ago there was still no support for Tiva Connected Launchpad so I was not eager to learn about Energia. But my set priority now is learning how to make Iphone apps for CC3200 Launchpad. I will learn more about Energia+Temboo afterwards. - Markel
  10. Hi All, I joined here to learn more about using Energia for my TI Launchpads. Currently I have Tiva Connected Launchpad and CC3200 Launchpad. I am also a member of TI E2E. - Markel