Jump to content
43oh

dubnet

Members
  • Content Count

    566
  • Joined

  • Last visited

  • Days Won

    30

Reputation Activity

  1. Like
    dubnet reacted to bluehash in TI Store Happy Geek Pride Day! Celebrate with discounted shipping.   
    Shipping within the United States FedEx Ground=$1.00 0000 0001 FedEx Saver (3-day delivery)=$2.00 0000 0010 FedEx Express Economy (2-day delivery)=$4.00 0000 0100 FedEx Overnight PM Delivery=$8.00 0000 1000 FedEx Overnight AM Delivery=$16.00 0001 0000 Shipping outside the United States International Economy=$4.00 0000 0100 International Priority=$16.00 0001 0000     Shop TI store now   Enjoy our shipping discounts!
  2. Like
    dubnet got a reaction from tripwire in Error communicating EnergyTrace pod. How do I use Energy Trace?   
    A quick search on the site revealed this:  http://43oh.com/2015/09/how-to-measure-an-energia-applications-power-usage-with-energytrace/
  3. Like
    dubnet reacted to chicken in Products using MSP430   
    Philips Hue Tap, a wireless light switch without battery, featuring a MSP430FR5730

     
    Teardown by Adafruit, with the MSP430 discovered at the 15 minute mark.
    https://youtu.be/4T4nhuobjZM?t=875
     
    This device doesn't have a battery, but uses a mechanical, relais-like component to generate power when the user pushes buttons.
    https://www.enocean.com/en/enocean_modules/eco-200/

  4. Like
    dubnet got a reaction from Fmilburn in Error communicating EnergyTrace pod. How do I use Energy Trace?   
    A quick search on the site revealed this:  http://43oh.com/2015/09/how-to-measure-an-energia-applications-power-usage-with-energytrace/
  5. Like
    dubnet got a reaction from curtis63 in Error communicating EnergyTrace pod. How do I use Energy Trace?   
    A quick search on the site revealed this:  http://43oh.com/2015/09/how-to-measure-an-energia-applications-power-usage-with-energytrace/
  6. Like
    dubnet reacted to energia in Why is the delay needed for reading from response from HC-05 over UART on a Launchpad 1.5?   
    Note that serialEvent() is not executed in ISR context. What happens is that main() calls a function serialEventRun(). This function then calls Serial.available() to check if any characters are available. If they are it will call your serialEvent(). 
     
    A quick "dirty" work-around to demonstrate that all char are recieved would to check if cmdBufferOffset == 4. If it is then you got the entire string you where expecting. As @@chicken mentioned, it is better to check for "\r\n" to make sure you got the response.
    char cmdBuffer[128]; int cmdBufferOffset; int AT_PIN = P1_3; void setup() { cmdBufferOffset = 0; /* * Init the BT device */ Serial.begin(9600); pinMode(AT_PIN, OUTPUT); digitalWrite(AT_PIN, HIGH); delay(500); // Time to reach AT mode Serial.write("AT\r\n"); // delay(500); // *** WHY IS THIS NEEDED ? **** } void loop() { if(cmdBufferOffset == 4) { Serial.print(cmdBuffer); cmdBufferOffset = 0; } } /* * From BT device on UART */ void serialEvent(void) { while(Serial.available()) { int cInt = Serial.read(); cmdBuffer[cmdBufferOffset++] = (char)cInt; } }
  7. Like
    dubnet reacted to terjeio in PCB Laser Exposer/Printer   
    Here are the files for my PCB Exposer/Printer, it is the complete package including mechanical design files.
     

    The printer itself.
     

    Example - a power control PCB for Raspberry Pi - 40 x 40 mm.
     
    Code includes driver for MCP4725 DAC, buffered serial port driver, stepper motor control and command parsing for the MSP430G2553 used as the main controller.
     
    Code and design files:
     
    PCB Exposer - controller code for MSP430G2553.zip
    PCB Exposer - desktop application.zip
    PCB Exposer - mechanical design files in Vectric format.zip
    PCB Exposer - schematics and PCBs.zip
     
    Desktop application is coded in C#, schematics and PCBs in KiCad format.
     
    There is some more information to be found in this tread:
    http://forum.43oh.com/topic/4990-what-are-you-doing-right-now/page-5
     
    Terje
     
     
  8. Like
    dubnet reacted to vinicius.jlantunes in Electronic Materials and Devices course by MITx starting soon on edx   
    As title says: what appears to be a very interesting course is about to start on edx:
    https://www.edx.org/course/electronic-materials-devices-mitx-3-15-1x#!
     
    I will not be able to take this one as I am taking one other series of courses from MITx on Supply chain (related to work) and they take A LOT of time. This other MITx course I'm taking is amazing, which is why I am posting this one here. Looks like their courses are a bit better than the edx average.
     
    Good luck for anyone trying it!
  9. Like
    dubnet got a reaction from Fmilburn in Analog/ADC example for TM4C129   
    @@Fmilburn   No problem.  Your answer was far more complete than mine.  You induced curiosity so I did a quick check of the TM4C1294 datasheet (http://www.ti.com/lit/ds/symlink/tm4c1292ncpdt.pdf , page 1750/figure 27-1 and page 1793/figure 27-44) which confirms that digital pins are not 5V tolerant and the max analog input is equal to Vdda (Analog supply voltage) which has a stated max of 3.63V (nominal 3.3V).
     
    EDIT:  For the sake of clarity it is not to infer that the analog inputs will tolerate 3.63V as the supply on the Launchpad is likely 3.3V.  So the 3.3V figure given by @@Fmilburn is correct.
     
    EDIT2:  I always seem to miss the information contained in the title of the post, in this case the MCU model. My apologies to the OP.
  10. Like
    dubnet reacted to Fmilburn in Analog/ADC example for TM4C129   
    Hi @@lilyhack,
     
    I don't use the TM4C129 and am not familiar with that sensor, but here are some thoughts....
     
    In the link you have posted there is a link to a datasheet.  Of interest:
    The supply voltage to the sensor, assuming a LaunchPad is powering it, will need to be 5V The offset voltage will be Vcc/2 or 2.5 V Voltage will go up or down by 0.017 V per A depending on whether current is forwards or backwards I can't remember if the TM4C129 pins are 5V tolerant or not.  It seems like they are, but in any case you don't want the voltage to go above say 3.3 V for measurement.  With only 0.017 V per A, you would have to have pretty high current levels to do that but I would put a voltage divider in.
     
    The datasheet gives some Arduino code:
    Current = ((analogRead(1)*(5.00/1024))- 2.5)/ .017; This code assumes 5V input to the sensor with no voltage divider for the output to Analog pin 1 of the microcontroller.  You will need to modify that as the Arduino only has 10 bit ADC and the TM4C129 has 12 bit.  So, divide by 4095 instead of 1024 and subtract 1.65 if you have a voltage divider that gives 3.3 V with a 5 V input.
     
    EDIT:  Didn't see your post when I started writing dubnet
  11. Like
    dubnet got a reaction from Fmilburn in USB and low power   
    Not sure if this is possible due to your design constraints, but why not sense the USB power rail to generate an interrupt (some type of one shot as the power comes up)? Then continue to monitor the power rail in your loop and when it disappears go back to sleep. 
  12. Like
    dubnet got a reaction from bluehash in Nice form factor for low power wireless node   
    Saw this on DP and checked out the author's blog. Neat way of producing a inexpensive, small form factor wireless data acquisition node. Two AA cells and the board all in a cheap three cell AA enclosure. Would be cool to see this adapted to a TI MCU.
     
    http://johan.kanflo.com/the-aaduino/
  13. Like
    dubnet got a reaction from Fmilburn in Nice form factor for low power wireless node   
    Saw this on DP and checked out the author's blog. Neat way of producing a inexpensive, small form factor wireless data acquisition node. Two AA cells and the board all in a cheap three cell AA enclosure. Would be cool to see this adapted to a TI MCU.
     
    http://johan.kanflo.com/the-aaduino/
  14. Like
    dubnet got a reaction from greeeg in Nice form factor for low power wireless node   
    Saw this on DP and checked out the author's blog. Neat way of producing a inexpensive, small form factor wireless data acquisition node. Two AA cells and the board all in a cheap three cell AA enclosure. Would be cool to see this adapted to a TI MCU.
     
    http://johan.kanflo.com/the-aaduino/
  15. Like
    dubnet got a reaction from colotron in Nice form factor for low power wireless node   
    Saw this on DP and checked out the author's blog. Neat way of producing a inexpensive, small form factor wireless data acquisition node. Two AA cells and the board all in a cheap three cell AA enclosure. Would be cool to see this adapted to a TI MCU.
     
    http://johan.kanflo.com/the-aaduino/
  16. Like
    dubnet got a reaction from chicken in Nice form factor for low power wireless node   
    Saw this on DP and checked out the author's blog. Neat way of producing a inexpensive, small form factor wireless data acquisition node. Two AA cells and the board all in a cheap three cell AA enclosure. Would be cool to see this adapted to a TI MCU.
     
    http://johan.kanflo.com/the-aaduino/
  17. Like
    dubnet got a reaction from spirilis in Nice form factor for low power wireless node   
    Saw this on DP and checked out the author's blog. Neat way of producing a inexpensive, small form factor wireless data acquisition node. Two AA cells and the board all in a cheap three cell AA enclosure. Would be cool to see this adapted to a TI MCU.
     
    http://johan.kanflo.com/the-aaduino/
  18. Like
    dubnet got a reaction from pine in Nice form factor for low power wireless node   
    Saw this on DP and checked out the author's blog. Neat way of producing a inexpensive, small form factor wireless data acquisition node. Two AA cells and the board all in a cheap three cell AA enclosure. Would be cool to see this adapted to a TI MCU.
     
    http://johan.kanflo.com/the-aaduino/
  19. Like
    dubnet reacted to monsonite in New Project with MSP430FR4133 and MSP430i2xxx   
    Hi All,
     
    It's about a month since my last update, and following on from the breadboard prototype,  the project has been gathering momentum.
     
    After an initial review of the various MSP430 devices it was decided to opt for a generic smart analogue sensor design, capable of driving an OLED display.
     
    I selected to use the MSP430i2041 ( which was chosen for it's 4 x SD24 ADCs) in order to make precision sensor measurements.  It uses a low noise differential input instrumentation amplifier.
     
    Typically it can be used for bridge sensors, current shunts, milliohm measurements, strain-gauges, PT100 and thermocouple temperature measurements etc, etc.
     
    The product is on a small board - just 42 x 53mm (1.65" x 2.1"), and has a forwards facing OLED display and 4 button user interface.
     
    As stated last month I am using the MSP430i2041 and 128K byte 23LC1024  SPI serial SRAM.  I am using my SIMPLEX Forthlike language which now executes code out of external serial memory, or an be used to respond to serial commands (requests for ADC reading data etc) over a serial link. 
     
    A super capacitor and LiPo battery are used to allow for non-volatile memory. 
     
    As this has been designed as an evaluation, all of the 'i2041 mcu pins are available on 2 x 16 pin header strips - allowing it to be plugged into a breadboard, stripboard, or connected to a Launchpad with jumper wires, using just Rx, Tx, 3V3 and 0V.  The Launchpad '4133 or  '6989 are preferred as they provide a 6 digit LCD "meter" like display.
     
    USB to serial communications is handled using a CH340G USB-serial IC.    There is an on board LiPo charger and boost regulator  - allowing the board to run from a LiPo  or  - as little as a 1V dc supply. 
     
    A Bluetooth Low Energy module allows data to be sent to smart phone or tablet.
     
    Just to let you know that the pcbs for the above project arrived today and I already have a couple of them built up.
     
    I will be posting some pictures up to this thread over the next couple of days.  
     
     
     
     
    If the module is successful, I hope to be able to open source at least some of the design, for those who are interested.
     
    It would be great to have MSP430i20xx support on Energia - allowing this module to be simply programmed.
     
     
     
     
    Ken
     
     
    London

  20. Like
    dubnet reacted to USWaterRockets in Have feedback for TI? Please share here.   
    The biggest flaw with standardizing on an Arduino Driver lib is precisely because it encourages people to NOT learn about the underlying hardware. As soon as they try to connect up a peripheral with a subtle difference, they get completely frustrated and complain about the lack of support for their particular sensor or application. Not everyone is like this, but it is a generalization of a broad swath of Arduino users.
     
    There's nothing wrong with learning how I2C works, or how a PWM works. Once you know how they work on one micro, then you understand the fundamentals enough to code the same thing on totally different hardware.
  21. Like
    dubnet reacted to Fmilburn in FFT   
    I am guessing that you have set the parameters wrong for the fft and it is outside it's range.  In the original code I had a table in fix_fft.h that showed the highest frequency that could be measured with different values of LOG2N and FREQ_RESOLUTION for the MSP432.  Perhaps you have modified the values outside the range of the table and it is isn't covering your range?
     
    I ran a couple of cases real quick to see how it performed at lower frequencies since I haven't done that before.  I was using a Tiva TM4C123 LaunchPad and Energia v17 at 80 MHz.  First, set the parameters:
    #define LOG2N 7 //log base 2 of the number of points, e.g. LOG2N = 8 is 256 points #define FREQ_RESOLUTION 2 //Frequency resolution of output in Hz #define ANALOG_IN 6 //analog input pin #define ANALOG_RESOLUTION 12 //CPU specific With these parameters the highest frequency that can be measured is 126 Hz.  Note that this information is given in the debug print with the original code.  I generated a square wave and varied the frequency with the following results....
    Since the resolution is only 2 Hz this is OK.  Now, as stated above, the maximum frequency these settings can go to is 126 Hz.  So if we modify as follows then we can measure up to 252 Hz.
    #define LOG2N 7 //log base 2 of the number of points, e.g. LOG2N = 8 is 256 points #define FREQ_RESOLUTION 4 //Frequency resolution of output in Hz #define ANALOG_IN 6 //analog input pin #define ANALOG_RESOLUTION 12 //CPU specific And some more measurements...
    Note that 100 Hz was run again and there is a different answer due to the changes in the settings and the coarser resolution.  To go higher, change the settings again.
    #define LOG2N 8 //log base 2 of the number of points, e.g. LOG2N = 8 is 256 points #define FREQ_RESOLUTION 5 //Frequency resolution of output in Hz #define ANALOG_IN 6 //analog input pin #define ANALOG_RESOLUTION 12 //CPU specific and measuring at 400 Hz
  22. Like
    dubnet reacted to chicken in Where do I find an energia library for MMA8653FCR1 ?   
    Sorry, carefully reading your question might help me to actually answer it
     
    Looking at the datasheet of the MMA8653, I think the relevant chapters are 6.7 (freefall / motion detect registers) and 6.9.3 through 6.9.5 (CTRL_REG3-5, interrupt configuration registers).
     
    In the linked Arduino code, ctrl_reg3-5 are already available. Add values for the motion detect registers.
    int ff_mt_cfg = 0x15;  // Freefall/motion configuration register int ff_mt_src = 0x16;  // Freefall/motion source register int ff_mt_ths = 0x17;  // Freefall/motion threshold register int ff_mt_count = 0x18;  // Freefall/motion debounce register (Personally I'd use #define reg_name reg_address for this, but I will stick with the style of the Arduino code linked above)
     
    You can use the I2C_SEND function in the Arduino code to set the registers to the desired values. I'd expand on the example's ACC_INIT function.
     
    1. Set the desired detection mode with the bits in FF_MT_CFG.
    Set bit 6 to 1 (OAE, detect mode, 0 = freefall, 1 = motion). Motion means, any axis measures above the threshold
    Set bits 3, 4, 5 to 1 for the axis you want to detect on (XEFE, YEFE, ZEFE, representing x, y, z respectively).
    Leave the other bits at 0.
    0x78 looks like a reasonable value. You may need to exclude the axis of gravity when trying to detect motion < 1g.
     
    2. Set the desired threshold at which motion is detected in FF_MT_THS
    Set this register to a value between 0 and 127, representing 0 to 8g.
    The register also has a flag (bit 7, DBCNTM) that determines how debouncing works. I think leaving it at 0 is fine.
    0x20 would set about 2g as trigger level, be careful with values < 1g to avoid detecting gravity as motion.
     
    3. Set how many samples are needed to trigger the motion detection in FF_MT_COUNT
    Set this register to a value between 0 and 255. The duration depends on the update rate (ODR), which the Arduino example set to 800Hz. So each sample represents a 1/800th of a second. I'd experiment with values around 10 and lower it when reaction is too sluggish or increase it if detection is triggered randomly.
    0x0a represents a debounce counter value of 10.
     
    4. Optional: Set the interrupt pin we want to wiggle in CTRL_REG5
    Bit 2 controls the interrupt pin for motion detection, either INT1 (1) or INT2 (0).
    Default is INT2, so we only need to write to this register if we want to use the INT1 pin.
     
    5. Optional: Set how the pin wiggles CTRL_REG3
    Bit 1 (IPOL) selects, whether the pin goes high to low or low to high when an interrupt occurs. Default is going from high to low.
    You will also need to look into this register if you use the sleep modes of the accelerometer.
    0x01 will make the interrupt pin go high when motion is detected
     
    6. Enable interrupt from motion detection in CTRL_REG4
    Bit 2 enables the freefall/motion interrupt.
    0x02 will enable the interrupt.
     
    So in summary:
    I2C_SEND(ff_mt_cfg, 0x78); // motion detection, x, y, z I2C_SEND(ff_mt_ths, 0x20); // 2g I2C_SEND(ff_mt_count, 0x0a); // debounce over 10 readings I2C_SEND(ctrl_reg4, 0x02); // enable motion interrupt (default is INT2 pin) When you connect INT2 pin of the accelerometer to the MSP430, you can then use DigitalRead or AttachInterrupt to react to the signal.
     
    All the above is just theoretical as I don't have this chip at hand. But I obviously had too much time at hand
  23. Like
    dubnet reacted to phenyl in Analog Devices RF Detector Kit offer for $5   
    Well, I tried ordering two of the boards and a couple small tx modules.
    Luckily they sent me a mail asking if I accepted their shipping charge of 76.81 USD. (for a total of 31 USD of components)
     
    Which feels outrageous and so I politely declined...
    I chose "cheapest international shipping method", so for living out of the US it's simply out of any range of justification for a hobby purchase.
  24. Like
    dubnet got a reaction from tripwire in Analog Devices RF Detector Kit offer for $5   
    Agreed $9 would have been reasonable for a two pound package. However, it was $16.
  25. Like
    dubnet reacted to Fmilburn in Flow Chart Template   
    I have been working on a project lately where I need to fit a design into an enclosure and was fumbling through my drawer looking for a measuring scale when I came across an old flow charting template.  I acquired it almost 40 years ago when I was working on a hydrocarbon process simulator that we were programing in FORTRAN.  That project was the last time I wrote code until fairly recently, but anyway, here is the template:

    Pretty funny...  On the left side is a "card scale" that you could put next to a stack of IBM punched cards to estimate how many you had.  Over at top right are the main ways of getting something into the computer - punched card, magnetic tape, and punched tape.  I actually remember using punched paper tape on a computer once.  Down below is online storage, offline storage, and "drum".  Followed by document, display, terminal, and manual operation.
     
    I don't actually remember using it as we weren't required to document with flow charts.  But we did have extensive user documentation in the form of paper manuals and the code itself was heavily documented.
     
     
     
×
×
  • Create New...