Effect on power consumption in control applications
CHIPKEN
Posts: 45
How can the Propeller chip reduce power consumption in some control applications? Some PID programs I have observed do seem to perform better. Could this be a gage for less power consumption?
Chuck
Chuck
Comments
I like the feature of being able to slow the procesor right down until you need the speed.
Our application requires higher speed for only 3-5 minute periods, up to 50 times a day.
The energy saving will be much better, especially in our solar powered systems.
We currently use a bs2p, and the NAP command if the device is to be solar powered.
Cheers,
Chris
That's the kind of answer I was looking for. Thanks
Chuck
The signal for wakeup can originate from an external event or a clock. In our weather stations, things like rain gage tips and anemometer or flow gage turns are events that have to be counted, but they are relatively slow and sporadic, so the 20khz/microamp mode can keep track of them just fine, either in code or via a cog counter module. The cogs make it easy to manage those asynchronous events in parallel. The the system wakes up also by the clock to read in analog values such as temperature and humidity and to put the data in a log file. That might occupy a fraction of a second during each hour. in the kind of projects I do, the time the system spends napping usually far exceeds the time it spends madly working.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Propeller's power consumption mostly depends on two factors: Clock speed and number of active COGs. You can control both factors by software. In power save mode, you would shut down any COGs you don't need to monitor the wake-up reasons, and also throttle down the clock. In this mode, maybe just one COG would be active, monitoring the possible wake-up events at a clock speed just fast enough to detect such events in time.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Does anyone have typical consumption data for the Propeller for different clock-speeds and number of active COGs, yet?
If so, what does it draw with:
20KHz:
One COG in a wait-state, the rest diabled.
One COG executing, the rest disabled.
All 8 COGs executing.
Also at 12MHz and at 80MHz...
Just wanting to know when it's better to ramp up the clock, or when to branch out to multiple COGs while still maintaining a minimal current-draw.
Edit: Changed it from 4 to 12MHz...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...
Post Edited (Gadgetman) : 3/13/2006 8:00:24 PM GMT
<edit> sorry couldn't find it, must have been a figment of my imagination </edit>
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 3/13/2006 7:53:18 PM GMT
not a complete figment of imagination - I posted one for the SX but not for the Propeller.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
It is necessary to take the usual precautions to make the pins either outputs, or inputs with pullups. They all start off as inputs. The demo board has a couple of special considerations. Pin A29 is best left as an input, because it has a pullup resistor for the eeprom SDA. Pins A24 to A26 are connected to the PS/2 keyboard interface via transistors/resistors with pullups to +5 volts. To measure the propeller current, you have to make those pins low outputs. If A25 or A27 are left as high outputs or as inputs, the propeller will draw parasitic power through the +5 volt pullups, and the current through the 3.3 volt Vdd supply will seem to be practically zero. That threw me for a minute. Wow, zero current operation!
I haven't done the other tests you mentioned on operating current, but if no one else does, I probably will get to it.
During programming (which uses the 12mhz RCfast clock), the chip draws about 3.5 milliamps.
I did look at the input characteristics. When there is a floating input, typical 60hz pickup (e.g., touching the floating pin) will increase the current by ~80 uA per pin. Bringing an input through its switching threshold increases the current to a peak of around 1.2 milliamps. That is the current drawn by having both p and n channel transistors in the totem pole input conducting at the same time. That is not all that much for such a high speed device. The propeller input transistors have a relatively small geometry (I recall Chip said). There is no synchronizer on the input pins, but a series of inverters amplifies the input signal and sharpness the transitions. You see the effect of the transition current if you run something like an RCTIME command, where the current peaks as it nears threshold. Or that is important in something like a delta-sigma converter, which forces the input pin to hover near its threshold switching point. Without care for layout, the higher currrent can translate into ground loop errors that limit the accuracy.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
The version of silicon that you have is pre-production and draws a lot of static current in the memories' sense amps. The coming production silicon cuts that quiescent sense-amp current to 0. Plus, it runs faster. We will rate the Propeller at 80MHz, which is conservative. It easily runs at 110 MHz on your workbench. Your current silicon tops out at 90 MHz. I've been measuring 3uA per COG at 20KHz on the newer silicon. Also, on the new Demo Board I'm going to a simpler 2-pins per PS/2 interface. It uses 4 resistors only, and no transistors.
- Chip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
You mentioned a new demo board. As long as you're making changes, could you make +5V available on the header connector alongside the proto area? It would sure come in handy for those chips that don't run on 3.3V. Using the current board, I've had to solder a lead to the LM2940.
Thanks,
Phil
I can do this. I'm going to redesign that board next. It will use 2-pin connections to TWO separate PS/2 jacks, so that a mouse and keyboard can be plugged in at the same time. Also, I will put the Propeller Clip circuitry on board so that you can plug the USB cable in directly. One other thing, at the expense of pins 8 and 9, I will put an RC integrator in for demonstrating CTR D/A and A/D.
One question: should I get rid of the headphone jack and put two RCA's in their place to make for an easy audio (stereo)·TV connection?
Thanks.
- Chip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Does anyone else sense a bit of some "other" thread in these ideas?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Who says you have to have knowledge to use it?
I've killed a fly with my bare mind.
Thanks on the 5V!
I think I'd keep the stereo phone jack. Radio Shack sells an adapter with a phone plug on one end and two RCA jacks on the other. They also carry a cable with a stereo phone plug on one end and two RCA plugs on the other. I don't see a similar adapter going the other way though -- only plug-to-plug. This would be an inconvenience for those wanting to use headphones. Also, most PC speakers use the 1/8" stereo phone plug cables.
The RC integrator on 8 and 9 is a great idea! I've noticed from my own experiments that by the time the output lead gets to the proto area, the noise level coupled to other circuitry is really high. Confining this to the PCB should help a lot!
Cheers!
Phil
I note your interest in the R/C A/D and D/A function. I have just gone through that here; the D/A works great as expected, but the A/D is totally unworkable. I see bit noise of about quarter scale (64 counts out of 256). I could not believe it as I have used that technique so many times with the SX. I checked my circuit and software enough times that I'm sure I had it all correct. The power supply was quite clean, so I don't know what the story is here. I can't believe the switch threshold is that noisy..... albeit, it IS a fair bit below Vcc/2.
I'll try it again tomorrow using different pins.
Have you had this working properly on the Propeller? If so, I wonder what my difference is..... if not, you might want to reconsider flaunting that feature!
Cheers,
Peter (pjv)
I think two RCA jacks for the audio, next the one for video, is a good move. But where will you put the two 330 uF electrolytic audio coupling capacitors that crowd that edge of the board? Why not tanalums ($?).
Please leave on the jumper for that allows easy monitoring of the power supply current. I almost didn't find the that jumper, as it is disguised in line with the connection points!
I'm not sure I like the idea of sacrificing a8 and a9 for a demo of the DAC/ADC capability. It would be so easy to add the R and the C onto the breadboard area, and the output and input probably need to be buffered by an op amp anyway for most purposes. I'd rather have a8 and a9 left general purpose.
I do agree with Phil it would be nice to have the 5 volts avaialable, even if it means sacrificing one of the Vss or 3.3 volt connection points, or moving the Vdd jumper out a little bit to make room for more points.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Andy and I were playing with the the sigma-delta mode of the CTR the other night and we were getting 16-bit readings that seemed stable to me. The thing that made a big difference was to have TWO integrator capacitors: one tied between VSS and the input I/O pin and the other tied between VDD and the input I/O pin. This went a long ways in canceling power supply noise. I think we were using .1uF caps and a 1K feedback resistor (80 MHz, mind you). BTW, the sigma-delta counter mode is "POS w/feedback". If you do a loop in assembly that waits 64k CNT's and then reads the PHS register and subtracts away the last reading, you get 16-bit A/D conversion. At 80 MHz, this yield 1220 conversions per second. You have to set FRQ to 1 so that it tallies the·POSitive readings (it feeds back the opposite). I don't have any accuracy figures yet. I'm sure it's not nearly perfect, as it is a current A/D that centers around the pin threshold which is not exactly VDD/2. It may very well prove to be lousy for many applications, but in theory it should work okay, especially in feedback applications where many of the errors cancel out.
One detail that might be worth mentioning: The I/O pins were designed to have equal internal capacitance to both VSS and VDD, so that power-supply noise is common mode. This has the effect of keeping the toggle point stable. Having only one integrator cap tied to VSS or VDD introduces a lot of asymmetry when there is power-supply noise. Of course, the raw pin capacitance is only 6pF - not much, but it is balanced.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Post Edited (Chip Gracey) : 3/14/2006 3:33:38 AM GMT
ww1.microchip.com/downloads/en/AppNotes/00700a.pdf
www-s.ti.com/sc/psheets/slaa104/slaa104.pdf <-- includes how to choose RC, error sources
www.sxlist.com/techref/ubicom/lib/io/adc_vp.htm <-- Chip on using the SX
I'm interested to see how this works out performance wise, an, to find the best layout and components.
If greater accuracy trumps over simplicity, the same cnta mechanism would certainly work with external parts (comparator, analog switches & reference supply), in order to establish real differential operation wrt a well defined analog ground.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Chip Gracey
Parallax, Inc.
Is that because of close proximity to the Vss ground pins and/or parasitic capacitance of the breadboard? With respect to the experiments you and Andy were doing, were you using the demo breadboard there, or was there a special setup, not the demo board?
On the topic of low power consumption, operation at lower frequecy would probably relax the layout requirements and the effect of ground bounce. Since it is ratiometric technique, it could work (albeit slower) with RCfast, no?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I don't think that's 80MHz riding on the 30MHz, because it's perfectly in sync, like a harmonic. The ratio of 80/30 would not be so congruous looking. It might be your test setup ringing or your scope's reaction to 750ps rise/fall·times, but I don't think it's 80MHz. We have a 1.5GHz scope at work that is best for viewing high-speed toggling. It has active FET probes and only 0.6pF loading. I'm sure it would show this 30MHz as a very clean square wave. All the 100MHz-range scopes I've seen tend to show signals that look like that picture.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
In my experience, even 1/2" of trace length results in·visible signal distortion at 80+Mhz. There seems to be a lot of inductive phenomena, more so than capacitive. Because the sigma-delta requires very short-term feedback, anything contributing to ringing or overshoot needs to be reduced to·a minimum to insure accurate settling ASAP. Now, I could be thinking wrongly about all this, as it may 'come out in the wash' through thousands of feedback cycles. I will do some tests today·on the sigma-delta mode of the CTR·and try to come up with some figures and a code example.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
I'm having another go at things because I had used the breadboard on the demo board, so we'll see if I can improve on my findings.
Beau, my scope has an FFT function on it, albeit not very sensitive, and it does not appear to pick up any significant 80 MHz. Furthermore, as Chip found, all my high speed waves are nice and square. The scope has a 500Mhz bandwidth.
I also have a "proper" RF spectrum analyzer that goes to 8 GHz, and very low signal levels (neg 140 dbm), but I have not yet had the time to see what IT thinks of the EMI.
Will report back when I have some new findings.
Cheers,
Peter (pjv)
-- If I hold the ground ring right up against the post, and touch the tip of the probe directly on a propeller pin on that side, I see about 70 millivolts of ring on the rising edge of the signal, and it dies out in about 20 nanoseconds.
-- If I turn the probe tip around, with the ground ring still on the post, and probe the same signal at the connection point for the breadboard, there is not much difference.
-- If I stick a bare wire in one of the Vss connection points and another in A9, and again use the ground ring and the tip between those two points, the ring is slightly higher, 100 millivolts.
-- However, if I use the standard 6 inch ground clip to the ground post, the ringing starts out over 400 millivolts and lasts much longer, and is still visible at 100 nanoseconds with a 5mhz clock.
Thanks to the massive ground plane on your PCB, there does not seem to be much difference between the ground post and the Vss connections. (Keep the ground plane!)
I've very hazy too on how it might come out "in the wash" with thousands of feedback cycles. The voltage input signal is usually referenced to ground. Fluctuations in the threshold due to ground bounce, and due to the threshold staying at Vdd/2 rather than at a constant level relative to ground, would it seems average out to be a constant offset on the signal. If ground currents are involved, that offset could depend on other processes going on inside the Propeller chip, for example, sinking current to drive LEDs.
Bounce in the threshold would have a much more pronounced effect on methods that are not averaged, such as RCtime. They would usually trigger on a fluctuation, so there is great incentive to keep the bounce as low as possible. It always pains me to see RCTIME circuits built with the Stamp that have totally uncontrolled layout. Taken modulo a small number, can make a good random number generator.
I know there are 4 separate Vss connections on the quad/44 packages. One thought is to keep one of those off the ground plane, and use it as a Kelvin connection. Power currents would not flow through its bond wires. I don't know, is Vss is connected to a massive lead frame inside the package?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Regarding the R/C A/D and D/A integrator, is there room to put a trace that could be cut or pads that might be shorted for those that would like those pins for digital functions?
I think that those whose application demands more than the board offers are likely capable of spinning (pardon the pun) their own PCB.
As to the +5 Volts: Access to the +5V rail is, I think, crucial.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mark
HVW Technologies Inc.
http://www.HVWTech.com
Parallax Distributor
I can see the benifits of either setup.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10