Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Fmilburn

  1. There is this one: http://forum.43oh.com/topic/7511-howto-porting-libraries-some-help-needed/ But I also seem to remember another one and can't find it.
  2. @altineller: You can find the port of the Adafruit library that I am using with the F5529 and the Adafruit DS1307 here: https://github.com/fmilburn3/RTClib Changes to the code were very minimal as I remember. As Rei Vilo says, it runs at 5V and you will need to do logic conversion. @@Rei Vilo: I am planning to work through the TI examples for RTC on the F5529. Putting together one of your libraries is at the edge of my current capabilities but if I come up with something useful I will let you know.
  3. @L.R.A Thanks for your insight, it sounds like you got it to do everything you needed it to. I like your scaling approach, the conversion algorithm is simple, and simple is almost always better. White calibration and calibration to the target material in the light condition that will be encountered are absolutely necessary also. Playing around with this sensor will give an appreciation for what camera designers have accomplished with modern auto white balance. With everyday materials and lighting there is complexity that can present interesting problems. Figure 1 in the datasheet is instructive - note that incidental IR in the 800 nm range can throw everything off. I am pretty sure I was seeing this in my experiment. So another improvement might be to place an IR filter in front of the sensor element. The curves in Figure 1 are anything but linear (or even smooth) which can complicate a simple approach depending on the objective. For example, take orange in the 625 nm range. The curves shows a very strong red response that can't really be differentiated from clear and equal weak responses from green and blue. Since my goal was to match the color in a lit LED then what the algorithm really should do is to output red with a healthy dose of green. I was doing OK with red, green, and blue with a simple Arduino program I found but not all the shades in between with real materials. That is what is behind my admittedly ugly approach. A more satisfying way might be to tabulate the normalized data in Figure 1 and use that in an algorithm to better match shades. I imagine there is someone out there who has done that and it would be interesting to see their results. @@Rei Vilo - If the library you are using is a good one and in the public domain I'd be interested in seeing how it works.
  4. 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.
  5. @@Jun I am not familiar with the C2000 LaunchPads but I do not see the F28069M in the list of pin mappings for Energia. The C2000 LaunchPad that is listed at energia.nu is the F28027F.
  6. @@Lgbeno - Which BLE module are you using? And with which LaunchPad? I'm interested in it but when I've looked at it in the past it was pricey. I've played around with the HC-06 a bit.
  7. @@Lgbeno, @@bluehash - thanks for the feedback That is a fun idea to make the sensor IoT and portable for sporting events. Maybe put it in a hat to hide it and have LEDs that get brighter or change color for local display when the noise goes up? The sensor I'm using from Adafruit is easy to setup and you can adjust the gain which is useful. Shouldn't be hard to build your own either....
  8. I'm attaching a link to github with Energia code examples for various sensors. I started this as a place to put examples for students in a course I was helping to develop for middle and high school level students using the MSP430F5529. Unfortunately the course was not held but I'm putting them out there in the hope they might help someone. Where the code has been tested with other LaunchPads I've noted it. Here it is: https://github.com/fmilburn3?tab=repositories You won't find anything sophisticated but many are at least somewhat unique in that I couldn't find an example for that sensor tailored specifically for the F5529, or I wanted to better document it for beginners. Essentially all are variants of work done by others, including work on 43oh, and I hope I've recognized the contribution in the code. There is a wiki associated with some that has the schematic and photographs. There is some other example code that is almost complete - e.g. using small DC motors and servos and I might add them. Here is a list of sensors and devices currently out there: CNY70 - used as a proximity switch CNY70 - used as a tachometer MCP41010 - digital pot HC-SR04 - distance sensor 3 watt high intensity LED MAX4466 -sound level I2C LCD (4x20) and (2x16) HC-SR501 - PIR movement detection SW-180xxP - vibration sensor Joystick PFatFs - compiles and runs on the F5529 Hall effect rainfall sensor TMP36 - temperature Sharp GPf1S53VJ000F - photo interrupter Using low power modes (LPM) in Energia TCS3200 Color Sensor using MSP432 *** added 8/8/15 DS1307 Real Time Clock (RTC) Module *** added 8/9/15 INA125P Instrumentation Amplifier *** added 10/9/15 MCP3008 ADC *** added 10/12/15 TLC5615 DAC *** added 11/30/15 dAISy MarineTraffic shore station w/ CC3200 ** added 12/16/15 AD9850 Frequency Generator ** added 1/20/16 FFT ** added 1/20/16 Rotary encoder ** added 1/23/16 W5500 Ethernet ** added 3/25/16 MSP430G2955 pins_energia.h ** added 3/25/16 DriverLib examples for F5529 ** added 8/16 Infrared Transmission ** added 12/16 WS2812 LEDs using SPI ** added 12/16 Battery measurement ** added 1/17 Finite State Machine - alarm system ** added 2/6/17 Using RTC module with Energia - F5529 ** added 2/24/17 RCWL-0516 "doppler radar microwave motion sensor module" ** added 6/6/17 Vary time a LED stays lit with potentiometer ** added 7/8/17
  9. UPDATE: Whatever the problem was for the MSP432 it appears to be fixed in Energia 16. I always get 1s now, same as CC3200 and TMC123.
  10. The arrangement that I described above is working for me. I am powering the external board from, and grounding it to, the LaunchPad. The leads are fairly short. This addresses the potential problem that roadrunner84 described. Hope this helps...
  11. RE: Solar Tracking I would think that the easiest way to do this would be with an equatorial mount and a stepper motor. E.G. set the stepper to rotate at one revolution per day but instead of going a complete revolution stop at the time of sunset on the longest day of the year and then return to the starting place. You would need a real time clock and logic to handle loss of power. While the declination of the sun changes throughout the year I wouldn't have thought that would matter too much...
  12. Actually I have never tried to do that until now but here is what I figured out.... Consider the little schematic below taken from the MSP-EXP430G2 Hardware Design Files: This is J3 which I presume you are using to program your external MSP430G2553. Now, think about how the jumpers are arranged when using a LaunchPad with Energia. P1.1 is shorted to BTXD and P1.2 is shorted to BRXD. So, the trick is to connect P1.1 on your board directly to BTXD on the LaunchPad and connect P1.2 directly to BRXD (note that BRXD is labelled TXD on the LaunchPad). You will have P1.2 on the "wrong" side of J3 from all the other pins.
  13. @@Lgbeno - I am interested for sure
  14. @@bluehash - looks tight - do you think a minimal MSP430G2 DIP package on a small PCB with nRF24L01 would fit? Also, what do you think of the weatherproofing?
  15. Hi @@mark0 I notice this is your first post - welcome! This will be a cool project when you are finished. As @@roadrunner84 says, your code is difficult to debug by another party due to length/organization and not being able to observe the hardware while the code runs. Some suggestions: * have you flowcharted it and is it following the flowchart? * consider breaking it down further into functions associated with flowchart - simplify your setup() and loop() by calling functions * debug the functions and add them one at a time to the main structure only after they are debugged * reduce/simplify your setup(), loop() and functions down to the very minimum needed to reproduce the problem when requesting help * work one problem at a time You have LED indication and serial monitor output. Is that working as you expect? If so, what have you done to assure it isn't a hardware problem or hardware interface?
  16. @@Sterny There is a tutorial on how to use your bench supply for +/- voltage here Thanks for the information on Mastech @@bluehash. I have thinking about a bench supply and wasn't aware of them.
  17. Fmilburn

    DIY Rain Gauge

    I have been putting together the pieces of a weather station for a while now with the thought of ultimately putting it all on the internet. I got temperature and barometric pressure working first with a BMP183, then this rain gauge, and a DHT22 for humidity. Fairly recently I added a TSL2591 lux sensor for accurate light readings but I haven't weather proofed it so it is back inside. I have loose plans to make a DIY anemometer and wind vane but haven't started. We don't get many lightning storms here in Seattle but lightning detection would be neat. Right now everything is in parts - both hardware and software - and not pulled together. I am working in Energia with the MSP430F5529 Launchpad. I have successfully used Spirilis' nRF24L01 library with the F5529 and the thought is to transmit that to a CC3200 and then the internet. So one day....
  18. Fmilburn

    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
  19. OK - now that I have an oscilloscope I played with this a bit more to see what it did. I essentially used the code in my post above. Here is what I found.... It doesn't seem to work below about 20 Hz - for some reason it gives really spurious (high) results down there. For example at 10Hz I measured 21.6 Hz on the oscilloscope. Above 20 Hz it is pretty much spot on until it gets to 100 KHz or so where it starts to deviate a little. Here are some examples.... CC3200 Oscilloscope ---------- --------------- 51,200 51.20 KHz 102400 102.3 KHz 5000000 497.0 KHz 1000000 988.1 KHz 2000000 1.95 MHz And here are a couple of screenshots: Looking good at 1 KHz Not too bad at 500 KHz Pretty sloppy at 4 MHz
  20. Fmilburn


    This came today - I wanted it more than I needed it but I'm figuring it out and having fun.
  21. Hello @@josePH The examples compile/work OK on my CC3200-LAUNCHXL V4.1 with Windows 8.1 and Energia 16. I suggest checking to see if the following warning taken from the MSP432 installation instructions applies: Energia (MT) uses a different method for building Sketches for the MSP-EXP432P401R. Because of a limitation in this method you must install Energia in a location without spaces.
  22. @@kludo - Are you using the sketch that I posted above? If so, change all instances of the variable PUSH1 to PUSH2 - It works on my V1.5 MSP430G2 LaunchPad using Energia V16.
  23. Hello @@kludo, There is a post here which may be helpful: http://forum.43oh.com/topic/8608-energia-ide-msp430f5529lp-low-power-mode/. Use suspend() to go into low power mode and wakeup() to come out of it when the button is pushed.
  24. Hello @@anry and welcome! I'm sure you will find it fun - but sometimes easy, sometimes not
  25. @@Leinad89mlg Here is a link: https://github.com/fmilburn3/PFatFs - you should download and use all of the files here associated with PFatFs since I can't remember which ones I changed. I've not been able to test it but it compiles for me. The only thing I did was to change all instances of "DIR" to "DIRECT". So remember that when you instantiate something. It is a less than satisfactory fix but hopefully works - let me know if it does.
  • Create New...