Sign in to follow this  
Followers 0
Fmilburn

MSP430 Wearable with Radio

19 posts in this topic

After making the wearable MSP430 for Halloween this year I was requested to make more for a children's dance group. I have a question, but first some background. This is the latest version:

post-45284-0-81012600-1481094464_thumb.jpg

Everything works fine. I use an adapter with pogo pins to program it as shown in the photo. There are three LEDs on the PCB, a push button switch for the user, and more accessible pins than the previous version. Parts are TSSOP and 0805 SMD. Snap fasteners and stainless thread can be used to connect it to LEDs on the costume. A CR2032 coin cell is used to power it (coin cell holder is on the backside of the PCB). So far that has been sufficient and the light weight and inconspicuous nature has been advantageous for the small children it is intended for.

 

Now a new upgrade has been requested... add a radio so that multiple units can be synched and/or controlled offstage. Here is a rough list of requirements:

  • must be inexpensive - current materials for 10 units is less than $5. I want to keep it under $10.
  • keep SMD parts large enough to be hand soldered
  • keep using CR2032 (rated 3V and 225 mAH)
  • The MSP430G2553 and LEDs are currently using no more than 20 mA on average - to be safe assume 40 mA
  • Unit needs to run at least half an hour on fresh batteries
  • Unit needs reliable radio reception at 10m with clear line of sight
  • Unit will need to receive only - no transmission. Reception updates required close to continuously - say every 100 ms
  • keep PCB to the same size - 40mm/1.6" diameter
  • needs to be programmable in Energia
  • I have a fair amount of time - 6 months to get it working
I have looked at several different radios but the two that I have experience with are the nRF24L01 and CC2650. I am ruling out the CC2650 due to cost. There is a small version of the nRF24L01 that is shown below for scale along with the more commonly seen version:

post-45284-0-64967200-1481094368_thumb.jpg

I think I can shift things around and make this fit. Connection is by the castellated edge facing forward on the photograph. The datasheet states 13.5 mA RX at 2Mbps air data rate. That is in the range of what I have seen as well so it looks like it would meet the requirements.

 

Here are my questions:

 

1) Is there another radio I should be looking at? Maybe one made by Hope.

2) I have no design experience with radios but could I use an off the shelf design and put the radio, bits, and PCB trace antenna on the PCB myself? I would probably have to give on the 0805 parts size criteria.

3) Any other thoughts, comments, and suggestions appreciated.

 

This will be an open source design and anyone who wants to contribute or have the design is welcome :)

 

EDIT: the material cost is on a per unit basis

Share this post


Link to post
Share on other sites

Well whatever you use, 2.4GHz is best due to PCB antenna size. It is a shame the CC26xx series is too expensive since its high sensitivity would help make the distance even with sketchy small PCB antennas.

 

Also for nRF stuff, I wouldn't bet on those actually making 10m at 2Mbps, but it should at 250Kbps. The issue is the human body and how it may reflect/refract RF as the wearer moves around.

Fmilburn likes this

Share this post


Link to post
Share on other sites

Regarding making your own PCB with RF, one nice thing about the TI parts is the TI reference designs, I've used their 2-layer (0.8mm thick) ref design to build a few CC1310 boards of my own, and they work great but the RF passives are all 0402 and require a stencil for solder (OSHStencils stainless works great for this). 0402 is a bear and the absolute lower limit I will go.

 

That said, one of TI's partners made a module for the CC2650 with LGA pads underneath IIRC. That makes the chip far more accessible. Trey German formerly from TI started a small company (Polymorphic Labs) building tiny gadgets based on that module. The CC2650 "BoosterPack" package includes a sample or 2 of that module. But of course all of that is probably over your budget :(

Fmilburn likes this

Share this post


Link to post
Share on other sites

Thanks for the great feedback @@spirilis - I have to agree that the CC2650 is attractive.  BLE would allow for a nice interface with a smart phone as well.  I did promise $10  a  unit but since it is only 10 kids including my granddaughter I could subsidize it.  The other issue with the CC2650 though is that it won't be supported by Energia.  One of the moms is familiar with Arduino and CCS has a learning curve not everyone is willing to pursue.  Certainly it reduces the amateur users in the artsy community given the foothold that Arduino has. 

 

I haven't tried the smaller nRF24 in my photo yet so I do have some concerns about reception.  What I can do is progress both of them for a while before making a decision.

 

The "Dot" that Trey has on his site is a great example of how tiny and yet powerful these things have become.

 

EDIT:  I don't know that I am ready for 0402 :blink:  Do you use a microscope?

Share this post


Link to post
Share on other sites

 

What those esp8266 modules using the arduino core for it?

That is a possibility.  Certainly the Arduino capability is there.  I fooled around with those a bit quite a while back.  They are fiddly.  Performance isn't great compared to the CC3200 but then for this application it wouldn't have to be.  I remember the power requirements were pretty high so I had a quick look just now.  This is from the English data sheet (which I am not sure I trust).

 

Receive 802.11g, packet length=1024 byte, -70dBM             60 mA

Standby mode is 0.9 mA.  Transmit mode is 200 mA more or less.  I can't find my notes but if anything I remember higher real world requirements for transmit.

 

So it might work but powering from a coin cell is a concern.  I would have to look at form factor.  Maybe I should do a shootout with the others since I still have one on hand.

Share this post


Link to post
Share on other sites

Thanks for the great feedback @@spirilis - I have to agree that the CC2650 is attractive.  BLE would allow for a nice interface with a smart phone as well.  I did promise $10  a  unit but since it is only 10 kids including my granddaughter I could subsidize it.  The other issue with the CC2650 though is that it won't be supported by Energia.  One of the moms is familiar with Arduino and CCS has a learning curve not everyone is willing to pursue.  Certainly it reduces the amateur users in the artsy community given the foothold that Arduino has. 

 

I haven't tried the smaller nRF24 in my photo yet so I do have some concerns about reception.  What I can do is progress both of them for a while before making a decision.

 

The "Dot" that Trey has on his site is a great example of how tiny and yet powerful these things have become.

 

EDIT:  I don't know that I am ready for 0402 :blink:  Do you use a microscope?

Nope magnification visor w/ extra loupe I can swing down. I think viewing in stereo helps.

Share this post


Link to post
Share on other sites

Today I soldered the little nRF24L01 module onto an adapter and tried it out for the first time.  I cut a 28 pin 1.27 mm SOIC adapter in half and then soldered the castellated module onto it so that I could access the pins on 0.1" pitch. That way the antenna was cantilevered out and waving in the breeze.  It will be easy to adapt this to the wearable if selected.

post-45284-0-72113800-1481259040_thumb.jpg

I did have to go back and touch up one pad with the iron that didn't make a good connection.  After that, it was quick to get it going using the Energia library that @@spirilis wrote.  I put a G2553 LaunchPad on a BOOSTXL battery pack and then my homemade prototype on top of that with the radio and voila - something working in less than an hour.

post-45284-0-23435600-1481261352_thumb.jpg

The good news is that to my surprise I couldn't tell any difference in performance with this tiny breakout and the larger more commonly seen ones that I had used in the past - at least in this quick test.  Provided I set the radio speed to 250000 I was getting 10m pretty easily.  However, I had never really noticed how a human body can interrupt the signal and now that I was looking for it, sure enough it was there.  Still, it might be acceptable and I can try using a transmitter with a better antenna and see how much that helps.  If anyone has experience with those I would be interested.  I still need to do some tests on battery life with the CR2032.

 

Meanwhile, I looked a bit more into the ESP8266.  The form factor is OK, I can fit it all in.  0805 jellybeans will fit OK and the ESP8266 module is castellated so I can solder it by hand if desired.  All parts are readily available and inexpensive.  I need to look at setting up a wireless LAN and also battery life.

dubnet likes this

Share this post


Link to post
Share on other sites

I worked with the ESP-8266 a bit this week.  I have two - an ESP-01 that I got first and wasn't impressed with, and a Adafruit Huzzah that I ordered later but never really did anything with due to my unfavorable opinion of the ESP-01. 

 

The good news is that the Huzzah is easy to use and works nicely with the Arduino IDE.  Reception is far superior to the nRF24.  The WiFi library is pretty impressive on first pass - documentation and examples are good and have improved since I last looked at it- better than Arduino.  It has enhanced capability over the base library that Energia and Arduino use.   Everything worked on the first attempt.

 

The bad new is I am seeing high power requirements, at least the way I have it set up right now which is continuously looping and looking for new incoming UDP packets.  I measure about 150 mA -  higher than expected.

 

Still, assuming 60 mA for the LEDs I would get a half hour's life from a 2030 coin cell with a 0.5 safety factor which meets the original requirements.

 

I know I can get the G2553 and nRF24 to work, albeit with reduced reception.  I am comfortable I can get the CC26xx to work, although cost will be higher.  Next step - see what more I can do to reduce overall energy usage on the ESP-8266.

Share this post


Link to post
Share on other sites

You may want to research and/or test if a CR2032 actually can deliver that current and theoretical capacity at that load. The datasheets don't specify a max current, but the capacity is specified at sub mA constant draw, and the graphs usually only go up to 1 or 2mA.

Share this post


Link to post
Share on other sites

 

You may want to research and/or test if a CR2032 actually can deliver that current and theoretical capacity at that load. The datasheets don't specify a max current, but the capacity is specified at sub mA constant draw, and the graphs usually only go up to 1 or 2mA.

Hi @@chicken and thanks for the observations.  You are entirely correct, I am way past what is described in the data sheet.

 

I know you are familiar with some of this but for others who might be interested I will explain in more detail what I have done, some of the limitations, and what I plan to do.

 

The Halloween tiara I made used a CR2032 with a G2553 and 3 WS2812 (no radio).  I dialed the brightness back on the WS2812s.  It cycles through various displays and would peak at around 20 mA according to crude measurement done at the time on my bench power supply - most of the time less than 20 mA.  I don't have good measurement on battery life other than my daughter said it was still working when she took the battery out last and she guessed a half hour or more.

 

The tests with the nRF24 are limited as well.  I tested my old design on the same bench power supply and read the current.  It was programmed to continuously poll for incoming messages and blink the LED at 1 Hz.  While the LED was lit I saw 21 uA.  With it off I saw 18 mA.  Below, my crude measurement:

post-45284-0-46940700-1481577330_thumb.jpg

Just now I attached a coin cell as shown below and ran a quick test:

post-45284-0-48896800-1481577438.jpg

It ran for about 15 minutes but started acting wonky (ouch:  15 min / 60 min/hr * ~20 mA = 5 mAh capacity).  As well, there is a difference in this design that is not implemented on the wearable - a largish 10uF capacitor to smooth things out in front of the radio.  My hope would be that putting the radio and G2553 in lower power modes at intervals would give me a sufficient power budget to run the LEDs.

 

Here is some pertinent information from the Energizer CR2032 datasheet:

  • Nominal voltage:  3.0 Volts
  • Typical capacity: 240 mAh (to 2.0 volts)
  • The continuous discharge characteristics are plotted for a 15K ohm load at 0.19 mA typical down to 2.0 V cutoff and shows 1200+ hour life

They also  have this nice graph showing pulsed current, see the datasheet for more information:

post-45284-0-19718500-1481579292_thumb.jpg

The pulse is ~23 mA and pulse duration is 1 mSec on and 14 mSec off.  The background draw is 0.2 mA.   It shows 150 mAh before the internal resistance really takes off and voltage drops.  To date, my application is essentially continuous and reduced battery life is the result.  And I can't get anything like 0.2 mA background or 7% duty on the pulse with my application.

 

If I reassess my chance of success with a coin cell then it is essentially nil with the ESP8266.  There is a shot with the G2553 and nRF24 although I expect problems.

 

The backup, although I don't consider this success, is to power with AAs in a battery pack with wires to the wearable.  This has been provided for on the PCB and that is how I powered it on the one I used for the ferry boat float at Halloween.  The ESP8266 would also work that way - in fact there are designs out there I could probably just use.  But where is the fun in that ;)

 

 

 

Share this post


Link to post
Share on other sites

The issue is the relatively high internal resistance of the CR2032. The green line in the graph shows 20 Ohms for a fresh battery. At 20mA that's a voltage drop of 0.4V, which is manageable until resistance starts increasing towards the end. At 100mA that's a 2V drop, i.e. you won't go anywhere even with a full battery.

Share this post


Link to post
Share on other sites

Agreed...  The ESP-8266 datasheet states 60 mA and even that is too high.  The ESP-8266 won't work for this application with a coin cell.

 

The music is recorded and is fairly short.  So for the nRF24 I could keep everything off until the last minute, turn radios on but not the LEDs, synch everything with the radios when the music starts, turn the radios off, and then turn the LEDs on to run through a pre-timed sequence.  Provided there are no false starts / restarts that might work and puts it back into the realm of what I have tested.

Share this post


Link to post
Share on other sites

What is the role of the radio communication?

 

If it's about synchronization, you could take an idea from Disney and go with IR.

http://www.theverge.com/2012/8/13/3239390/disney-glow-with-the-show-led-ears

http://www.stuffandymakes.com/blog/2012/07/08/disney-glow-with-the-show-ears-teardown

MSP430 inside, but also three AAA batteries.

Fmilburn likes this

Share this post


Link to post
Share on other sites

Neat. I hadn't thought of that. It even uses the G2553. That would be easier (and better) from a power management viewpoint. Bandwidth is less but I don't need it. Need to check distance. Potential blockage of signal and maybe stray IR are considerations but I will check it out.

 

To do some initial tests I have a couple of "super bright" IR LEDs that I could use for a transmitter and some Vishay TSOP38238 receivers. The receivers work OK down to 2.5 V or so according to the datasheet and can filter out many disturbances. Supply current for receivers is under 0.5 mA.

Share this post


Link to post
Share on other sites

I am going to try and update this weekly in the hope it will give me extra impetus to get it done.  I've done more looking at IR and as is normally the case have found lots out there that I didn't know, including some good stuff on 43oh.  To quickly summarize:

  • The IR receiver I am using (TSOP38238) works on 2.5V - 5.5V, and has a typical supply current of 0.27  - 0.45 mA. - seems like it will work OK with coin cell for this application
  • Using a matched 950 nm IR LED with the receiver at the moment.  Even with a single LED transmitter can get 10 m although not 100% reliable.  I expect to overcome this with a more powerful transmitter (e.g. IR illuminator as suggested by chicken)
  • The receiver is sensitive to transmission frequency but that is easily configured in software
  • The receiver is sensitive to burst length but that is also configured in software
  • The receiver is sensitive to spectral wavelength - need to consider this when ordering an IR illuminator ring or constructing a multi-LED transmitter
  • It has vertical and horizontal directivity but this isn't expected to be a problem

Rather than use existing code or libraries I decided to strike out on my own as an educational exercise since it appears to be within my capability.  I started by writing a simple output function at 38 kHz that looks pretty good coming out of the G2553:

post-45284-0-04439500-1482127934_thumb.jpg

Here it is on the oscilloscope after being processed by the TSOP38238 IR Receiver:

post-45284-0-99296700-1482128019_thumb.jpg

Next I made up a protocol for sending 1s and 0s:

post-45284-0-86868300-1482128084_thumb.jpg

OK, should be able to work with that.  Up to this point I had been working in Energia (one of my original objectives) but timing was too coarse in the micro second range.  So I have switched to CCS with the objective of using TimerA0 with interrupts, and then accessing it within Energia.  Tone() won't be usable, but hopefully there won't be other interference inside Energia and I don't need tone().

Share this post


Link to post
Share on other sites

I should have labelled this MSP430 Wireless Wearable instead of Wearable with Radio.  Anyway, I have been happy with the progress using IR and plan to commit to it for now.  Here are the options that I considered and the reason for choosing IR:

 

CC26xx - ruled out due to cost - did not pursue technical viability

ESP8266 - ruled out due to power requirements when using CR2032 coin cell - not viable technically

nRF24L - this is a potential alternate, the main concerns are power and distance which I did not pursue to the end.

IR - cost is low, power requirements are low for receiver, able to cram it all into memory and fast enough on the MSP430G2553 if I use CCS and direct register access with C.  The main concerns are distance which should be able to overcome with higher power transmitters  (possibly multiple transmitters) since they need not be powered by a coin cell, and the difficulty in acknowledging successful receipt of a packet.

 

I have started a new thread to document the development of the IR option: http://forum.43oh.com/topic/10098-msp430-infrared-controlled-wearable/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0