In many energy harvesting systems an energy storage component needs to exist to store electrical energy for use when needed. Commonly these are capacitors, or super capacitors, or some other buzzword. While capacitance and voltage specifications are relatively easy to define something very important to low energy systems is often not defined, the capacitors leakage current and leakage settling time.
Today’s technology allows active components to sleep and consume only several hundred nano amps of current. The EnOcean STM300 for example consumes 220nA while sleeping. Passives don’t have this state and all capacitors have leakage current. The physical chemistry generally is the determining factor for the magnitude of leakage. In powered applications this is almost never considered. However, what if a capacitor is leaking uA of current? If the system is asleep for 99% of the time you just increased your energy consumption 10x!
Besides the leakage current itself a second item to consider is how long a capacitor takes to settle to its steady state leakage value. A capacitor could have a leakage current of nA but it might take 2 days of settling to reach that point. This is not ideal either.
Leakage currents need to be measured, but more importantly a 3.6V 470uF tantalum capacitor will not have the same leakage properties from manufacturer to manufacturer so it is important to measure this and pick quality parts!
There doesn’t seem to much out there in the hobby world with EnOcean. I find this interesting because EnOcean is pretty simple to use and has the unique advantage of energy harvesting devices anywhere. EnOcean sells a USB stick, the USB300 that speaks the EnOcean Serial Protocol 3 ( ESP3 (PDF)). I implemented part of this protocol, the ability to receive radio telegrams and transmit any ESP3 packet. In reality you probably only need to deal with a the small subset of ESP that is for sending and receiving radio telegrams. This would be the type 1 radio packets.
This python program doesn’t do much, but it lays the foundation for more and removes the burden of calculating check-sums. After starting you need to select the correct com port to use. If the connection is OK you will get back some details of the device, firmware version, chip ID etc. The main loop simply waits for 4bBS and RPS(four byte sensor and repeated switch) telegrams to be received from other EnOcean devices. It will print the data and source ID as well. The EnOcean Equipment Profiles EEP 2.5 (PDF)specifies how data looks coming in from different types of devices. Hopefully this helps you get started with ESP3 and adding EnOcean devices to your project.
The picture shows the program starting and some button presses and releases of a PTM210 wireless energy harvesting switch.
Keil’s C51 compiler does a silly thing. Normally in Keil you can compile code under 6k in size without needing a license. Adding a floating license removes this restriction. Unfortunately adding this license also means you cannot compile any code, even if it it under 6k without checking out a license. Installing a second version of Keil did not solve this problem as I though it would. So I found another solution (despite their tech support saying it is not possible 😉 )
Keil keeps a TOOLS.INI file in the /Keil/ directory. This file also keeps track of licensing. For example my last two lines under the C51 section are:
FLF0=”\\****\SCC\Third Party Tools\Keil PK51 Floating License\KeilC51.FLF”
Removing these lines from the .ini files returns the C51 compiler to evaluation mode with limited code size functionality. Replace them to use the floating license.
Keil checks this file at every compilation so no need to restart or anything…
My roommate Chelsea decided to have a nerd themed 21st birthday in Boulder. A fitting choice since I am already almost a nerd….
Anyway, to maximize her nerdy-ness I created her a LCD name tag with a twist.
I combined a zigbee module, 9v battery, and LCD screen with bobby pins for her to wear like a “hello my name is” tag.
On my wrist I had an arduino, zigbee module, and 9v. I programmed the arduino to intermittently sent info to the name tag. I also added two buttons; One to press for every kiss she got, and the second to press every time she was bought a drink. Each would display some unique text with a updated drink and kiss counter.
After all Boulder is the number one party school! A very easy build with an awesome affect.
It seems like a simple task, but it actually is not. To do RGB control you need three PWM signals from a MSP430. This equates to needing at least one timer that has three capture control registers. The value line parts included with the launchpad have a timer A0 with 3 CCRs. For whatever reason CCR0 is not available as a configurable hardware output; or at least I could not figure out how to use it as such.
Non value line parts (read- non dip msp430s) offer Timer B, which can have as many as 7 CCRs. Finding these parts are difficult as TI does not provide a search function based on number of CCR registers per timer. These would work great. Alternatively you can pick up a value line msp that has two timer As, and is thus capable of 4 hardware PWM signals. This just means a few extra lines of initialization code and keeping track of what color is on what timer. The timers count’s will not be synchronized but this is irrelevant.
I used the MSP430g2553, free from TI via samples here: g2553
There are a few things to configure to your liking. The period and the maximum duty cycle (to prevent burning out LEDs). The period ultumatly sets the PWM frequency. The two Timer As are running off of the DCO at 16Mhz. They will continuosly count up to the period -1 and reset to zero. This alone will do nothing. Each color has a CCR to tell the hardware when to do something. This something is configured in a separate control register, which tells it what to do. In this case it is OUTMOD_7, which changes the pins state at every time the timer = the CCR value. Setting the period to 320 sets the timer frequency to 50Khz, and thus the PWM frequency to the same. Setting a CCR register to 120 would then give you a 50% duty cycle on the corresponding pin. See below for the sample code. The whole code composer project is zipped in there….have fun.
So I decided I would start trading options. It seems like many people are scared to trade options because of a stigma that they are risky and or complicated. While both can be true they really are simple instruments, at least in their basic form.
If you buy an option you are paying a premium for the right to buy or sell 100 shares of a stock at a given price. This price is called the strike price. The right to buy is called a call while the right to sell is called a put. Options have a fixed length when then can be used, or exercised. After this date they expire are are worth nothing.
Whats nifty about options versus buying the underlying security is that you neither own the security and don’t pay full price for it, instead you pay a premium, much like in insurance.
While stock xyz may cost $10 a share, a call strike price of $11 that expires in a month might only cost $2.00 a share. Similarly a put strike price of $9 might cost $2 a share. When a call option is above the strike price it is known as in the money, similarly for a put when it is below the strike price. Lets compare the call option to an underlying security for 100 shares.
Cost: 200 – 2,000
Max loss: 200 – 2,000
Max gain: inf. – inf.
Lets look at several potential prices of the stock.
This doesn’t look so good, you would have made money on the underlying stock compared to losing or breaking even on the option. Even though the stock move up %30 your income is $0. But lets look further. Say the stock increased %50.
Revenue: $300 – $500
Still the stock seems better right? Wrong. In order to get $500 you had to invest 10x as much capital, $2000, instead of $200! A better metric is your Rate of Return (ROR) which is how much the asset is worth/how much capital you risk.
ROR @$15: 100/200 – 500/2000
50% – 25%
WOW any investor would love a big return like that….
Additionally if you purchased $2000 in options you would have an extra $1000 in cash compared to the underlying stock.
Ok this tutorial is not that good but, there are many more out there…..