Showing posts with label Tektronix. Show all posts
Showing posts with label Tektronix. Show all posts

Sunday, March 25, 2018

Ham Solo: ESP8266 Based Amateur Radio Simplex Confirmation Project

-----
Note:  As presented this project requires a FCC Amateur Radio license.  Amateur Radio is about experimentation.   Even still you must be versed in the band plan and stay away from local repeater stations, stay in accordance to FCC Amateur Radio rules such as 97.201(a), 97.201(b), 97.213(a), 97.215, 97.3(a)(7), and likely a few others.  Even after following all those rules, nobody likes to hear a bunch on random DTMF tones so keep your transmissions short and infrequent.
-----
Most Amateur (or ham) radio operators have wondered how or if their signal is getting received.  After getting a YES/NO answer they may want to decrease power, try a different antenna set up, or change location.  The challenge with this can be a willing participant on the receive side that has promised to remain perfectly still and listen for hours.  If you have a friend or XYL willing to do that then consider yourself fortunate.  For all the others there is this project.
-----
The rig is pretty straight forward and explained in the image above.
   - From the field a DTMF tone is transmitted on a frequency that "the shack" is tuned to.
   - If the radio in the shack hears the DTMF tone it is decoded with this module.
   - Code running on an ESP8266 turns the decoded tone "to English" and sends a SMS text message via IFTTT.
   - If the shack received everything you will get a confirming QSL SMS on your smartphone.
-----
It's all quick and simple.  It takes only a 250 mSec or so transmission time and a delay of maybe 2 seconds to get the confirming QSL SMS.  The short video below gives a good explanation:

-----
Want to build your own?  No problem.
   1st:  Get a FCC Amateur Radio license; it's not hard and is an extremely interesting hobby.
   2nd: Buy some radios (costs range from $30 to infinity).
   3rd:  Buy the DTMF module and an ESP8266.
   4th:  Set up a free IFTTT account for the SMS texting.
   5th:  Hook it all up as shown in the image at the top of this page.
   6th:  Load the source code below into your ESP8266 (you will need the Arduino IDE).
   7th:  Be respectful of the rules and test away.
-----
Before showing the ESP8266 source code here's a short video using 5 of the 8 channels on the Tektronix MSO5 (which is bad ass!!!) to monitor the signals coming off the DTMF module.
-----
The (short/simple) ESP8266 source code is below.  If you duplicate the project or this motivates you to get your FCC Amateur Radio license let us know:
-----
/*
 *  HamControl
 *  MARCH2018
 *  WhiskeyTangoHotel.Com
 *  
 *  This project as described requires a FCC Amateur Radio License!!!!!! 
 *  Be aware of all FCC license and regulation retrictions before use!!!
 *  Follow local band plan and Federal regulations!!!!!!!!!!!!!!!!!!!!!!
 *  Go ahead and get your license.  It's a fun hobby.  See: http://www.arrl.org/getting-licensed
 * 
 *  HamControl:
 *  Use DTMF Tones to control ESP8266 via ham radio.
 *  Primary application was to confirm simplex signal Tx/Rx for antenna testing.
 *  When a DTFM is detected a SMS is sent your cell phone for field comfirmation.
 * 
 *  For DTMF DeCode: SMAKN® XD-61 MT8870 (~$10 USD)  
 *  NOTE:  For Baofeng set volume to ~80%
 * 
 *  uC setting for Ardunio IDE (ESP8266 with WiFI)
 *  NoderMCU 1.0 (ESP-12E Module), 80MHz, 921600, 4M (3M SPIFFS)
 * 
*/

// For the Wireless
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>

// WiFi Connection Information
const char* ssid = "Your-SSID-Here";           // PRIVATE: Enter your personal setup information.
const char* password = "Your-WiFi-PW-Here";   // PRIVATE: Enter your personal setup information.
ESP8266WebServer server(80);

// IFTTT Information for WebHook widget
String MAKER_SECRET_KEY = "Your-IFTTT-PrivateKey-Here";   // PRIVATE: Enter your personal setup information. Your IFTTT Webhook key here
String TRIGGER_NAME_SMS = "HamControl_SMS";           // this is the Maker IFTTT trigger name to send SMS if a DTFM tone is recieved.
const char* host = "maker.ifttt.com";
String url_SMS;       // url that gets built for the IFTTT Webhook sending SMS DTMF recieved confirmation.
String DTMF_String;   // used to covert numbers and *,#,A,B,C,D tones to a string value.

// Define and set up some variables
int DTMF;  // What key press was sent by the ham radio.

// Define ESP8266 pins
const int led = 2;  // Blue on board LED is on PIN-D4 (GPIO2) for this NoderMCU 1.0 ESP8266.  Blink it between reads
// Define pins from the DTMF Decoder to the ESP8266 GPIO
const int Q1 = 12;  // PIN-D6 SILK SCREEN LABEL
const int Q2 = 13;  // PIN-D7 SILK SCREEN LABEL
const int Q3 = 15;  // PIN-D8 SILK SCREEN LABEL
const int Q4 = 5;   // PIN-D1 SILK SCREEN LABEL
const int STQ = 4;  // PIN-D2 SILK SCREEN LABEL

// Program control variables
int logging = 1; // If 1 then send SMS.  Any other value (0) turns it off.  For debug, typically would be set = 1

void setup(void){ // This setup code is run once.
  pinMode(led, OUTPUT);     // set up the onboard Blue LED pin as an output.
  pinMode(Q1, INPUT);       // Q1-4 are the output signals from the DTFM IC
  pinMode(Q2, INPUT);       // that are feed into and read by the ESP8266
  pinMode(Q3, INPUT);
  pinMode(Q4, INPUT); 
  pinMode(STQ, INPUT);      // STQ is high when DTFM tone is detected
 
  Serial.begin(115200);     // turn on the serial monitor for debug
 
  // Is the WiFi working?
  WiFi.begin(ssid, password);
  Serial.println("");
  // Wait for connection
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print("Trying to connect to ");
    Serial.print(ssid);
    Serial.print(" on ");
    Serial.print(WiFi.localIP());
    for (int x = 0; x < 20; x++) { // 
      digitalWrite(led, !digitalRead(led));  // toggle state of the on board blue LED. Shows program is trying to WiFi connect
      //Serial.println("Server Start blink loop....");
      delay(50);  
    } // endfor WiFi blink connect
  }
  Serial.print("Connected to ");
  Serial.println(ssid);
  Serial.println(WiFi.localIP());

  if (MDNS.begin("esp8266")) {
    Serial.println("MDNS responder started");
    Serial.println(" ");
  }

  // Use WiFiClient class to create TCP connections for WiFi logging
  WiFiClient client;
  const int httpPort = 80;
  if (!client.connect(host, httpPort)) {
    Serial.println("connection failed");  // Boo!!!
    return;
  }

  server.begin();
  Serial.println("HTTP server started");  // Woo Hoo!!!
  Serial.println(" ");
   
  Serial.println("Entering HamControl main loop. ");
  Serial.println("Waiting for DTMF... ");
  Serial.println("-------------------------------------");
}

void loop(void){    // Loop this code section until hell freezes over

  // The blue onboard LED will blink between to show prog is 'running'.
  digitalWrite(led, !digitalRead(led));  // toggle state of the on board blue LED.
   
  if (digitalRead(STQ) == HIGH) {  // If it HIGH then DTFM detected.  Let's get to work.
      Serial.println("DTMF Detected!!!");
      DTMF_String = "Could_not_decode_DTFM!";  // Should be overwritten below, but just in case Mr Murphry shows up...
     
      // Convert the four bit (Q1-Q4 read) to decimal values 1-9 to match the button pushed
      // 0=10, *=11, #=12, A=13, B=14, C=15, D=0
      DTMF = (digitalRead(Q4) * 8) + (digitalRead(Q3) * 4) + (digitalRead(Q2) * 2) + (digitalRead(Q1) * 1);
      DTMF_String = String(DTMF);
      if (DTMF == 10) {
          DTMF_String = "0";
      }
      if (DTMF == 11) {
          DTMF_String = "*";
      }
      if (DTMF == 12) {
          DTMF_String = "HASH";
      }
      if (DTMF == 13) {
          DTMF_String = "A";
      }
      if (DTMF == 14) {
          DTMF_String = "B";
      }
      if (DTMF == 15) {
          DTMF_String = "C";
      }
      if (DTMF == 0) {
          DTMF_String = "D";
      }     
      Serial.println("Key pressed: " + DTMF_String);     
             
      if (logging == 1) { // is SMS logging turned on?
          // Set up IFTTT Webhook Channel to send the SMS. 
          // Use WiFiClient class to create TCP connections for IFTT SMS
          WiFiClient client;
          const int httpPort = 80;
          if (!client.connect(host, httpPort)) {
            Serial.println("connection failed");
            return;
          }
         
          // Build the IFTTT SMS url
          url_SMS = "https://maker.ifttt.com/trigger/" + TRIGGER_NAME_SMS + "/with/key/" + MAKER_SECRET_KEY+ "?value1=" + DTMF_String;
          Serial.println(" ");
          Serial.println("SMS payload to IFTTT.");
          Serial.println(url_SMS);
          client.print(String("POST ") + url_SMS + " HTTP/1.1\r\n" +
          "Host: " + host + "\r\n" +
          "Connection: close\r\n\r\n");
          Serial.println(" ");
          Serial.println("Logging is ON.");
          delay(1000);   // pause for webservices and to prevent double tap
          // and fast blink the blue onboard LED to show DTMF was recognized
          for (int x = 0; x < 100; x++) {
              digitalWrite(led, !digitalRead(led));  // toggle state of the on board blue LED
              delay(50);  
          } // endfor DFTM delay/blink                
          
      } else {
       
          Serial.println("Logging is OFF.");
          Serial.println(" ");
      } // endif/else logging 

      Serial.println("-------------------------------------");
      Serial.println("Waiting for DTMF... ");
           
  } //Endif STQ High?
  delay(250); // Delay for flashing on board BLUE program running status LED
   
} // void loop until hell freezes over
-----
73!

Sunday, June 11, 2017

Measuring Fidget Spinner RPM via TEK MDO4000 Oscilloscope


-----
How fast can a Fidget Spinner spin?  Well, it depends on what spins it.  Let's use compressed air.


That sounds fast, it's actually scary to hold!!!  But how fast?
-----
To make the measurement we used a simple LED as a sensor.  A bright light shines down onto the LED.  The arms of the Fidget Spinner block the light as they move over the LED creating electrical pulses. 
-----
The sensor LED is connected to a Tektronix MDO4104C to measure the pulses.  The scope (along with a few thousand other features) allows an engineer to quickly study waveform measurements with cursors.  After a little math we get our answer; well over 10,000 RPM.
That's fast!
-----

Sunday, December 18, 2016

Low Cost Bi-Directional Level Shift Module Characterization (TE291)

-----
From time to time the level shift module pictured above has come in handy.  They do a great job shifting 3.3VDC to 5VDC logic or 5VDC logic to 3.3VDC logic.  The cost is about $1USD and hookup is simple.  Of course they are designed for low speed digital signals but, we wondered how the module would handle higher speeds.
----
The Bench Setup:
Keithley 2230G-30-1 power supply for the 3.3VDC and 5VDC power.









Tektronix AFG3252C function generator for the square wave (3.3V and 5V logic) stimulus.










Tektronix MDO4104C oscilloscope to capture the input/output signals.

-----
The Result:
Performance was very good, especially considering these module are often used in the 100KHz and below range.  Leveling from 5V to 3.3V had better results.  The signals start looking ridiculous over 1MHz. Take a look at the scope shots below.
-----
3.3V Level Shifted to 5V at 10KHz, 100KHz, 500KHz, and 1MHz
(Yellow = Input; Blue = Output)




-----
 5V Level Shifted to 3.3V at 10KHz, 100KHz, 500KHz, and 1MHz
(Yellow = Input; Blue = Output)




 -----

Saturday, January 30, 2016

Low Cost Servo Motor Tester from eBay

For about a $1.50 USD eBay sellers will ship out to you the servo tester pictured above.   It's an amazing value to let you verify that the cheap servo you also got from eBay even works.  It's also great to help understand the MIN, CENTER, and MAX positions for any servo based RC or uC project. 
-----
Basically, servos motors are controlled by receiving pulse train signals.  The eBay servo tester is capable of producing this required pulse train.  Jameco has an easy to follow tutorial.  The image below shows that a 1mSec pulse width sends the servo full left.  1.5mSec centers the it.  2mSecs move the servo full right.  Jameco explains it all very well.
-----
The servo tester has three setting:
     MANUAL: allows the servo position to be adjusted with a knob.
     CENTER:   sets the servo to it's center position
     SWEEP:     continually sweeps the servo from it's MAX to MIN position (forever)

Connection is simple.  One side of the servo tester is for power.  The other side is where the servo under test conveniently plugs in.
-----
So.... let's use a Tektronix MSO5104B oscilloscope to look at the output of the servo tester and see what the heck is going on.  In the screen shot below the servo tester control knob is set to full left (minimum).  Sure enough, the pulse width as measured by the scope is 915uSec.  That's pretty darn close to the 1mSec width in the drawing above.
-----
With the knob set to full right (maximum) the scope cursors show a pulse width of 2.14mSec; pretty close to the ideal 2mSec in the drawing.
-----
Using the MSO5104B oscilloscope to zoom out on the signal we can see that the pulses repeat steadily every 20mSec.  If you check the tutorial at Jameco you will know that is exactly what is expected.
  -----
Conclusion:  Splurge the $1.50 USD and treat yourself to this handy device.  It really helps to verify that a servo is actually working and in setting the movement limits on your project.  Below are two short videos of the servo tester in action.
 

 
----
Here a short video where I use a Tektronix AFG3252C to send the control pulses to the servo.  The AFG3252C has infinitely more flexibility, but cost a few dollars more than the eBay option.
 
----- 
Thanks for stopping by.  Build something.

Wednesday, January 13, 2016

5VDC Boost Converter Characterization

 -----
Boost Converters are a type of switch power supply that magically turns a small DC voltage into larger DC voltage.  Learn about how that magic is preformed here.   Used properly they are great, but the magic of a boost converter does have it's limits.
----- 
For the measurement setup a Keithley 2230 power supply is set to 1.5VDC (think AA battery voltage) to act as V(in) for the boost converter.  A Keithley DMM7510 HiRes multimeter is used to measure the ripple on V(out).  A Keithley 2450 SourceMeter SMU is used to simulate a load on the boost converter in static and swept mode. The Keithley 2450 also produces a V(out) graph under the swept load.

-----
The video shows how the 5VDC boost converter starts performing poorly at loads close to 100mA.  The output voltage begins to drop and ripple frequency increases as the boost converter works harder under the higher loads.  The Keithley 2450 is set up to graph the boost converter voltage output as it simulates the swept load.
-----
[EDIT: February 20, 2016]: We got a comment that the boost performance could have been effected by not having a constant 1.5VDC input into the converter during the entire load sweep due to lead resistance.  Turns out the comment was correct.  We retested the same boost converter with 4-wire measurement connections at both the INPUT and OUTPUT.  This 4-wire setup reduces any errors due to lead resistance.  The video below shows the improved result.  Measurement setup is everything!!!
 -----

Saturday, August 22, 2015

Keithley DMM7510 monitors Charger Doctor Output



The Charger Doctor is a sub $2 device that displays voltage and current levels while charging a USB device.  There have been several teardown write ups on the Charger Doctor.  It's useful, but does have some limitations.  For example, it doesn't charge iOS devices and it seems to effect the reliability of the WiFi connection on our Raspberry PIs.  This made us want to take a closer look at what the output was doing.

Here we use a Keithley DMM7510 to monitor the Charger Doctor output.  The DMM7510 is a precision instrument with 7.5 digits of resolution and 14 PPM accuracy.  It has a touch screen interface with graphical output, advanced triggering options, cursors, and a whole lot more.  Plus, it is fast (very very fast); capable of sampling at 1M/s.  To sum it up, it's pretty darn cool!
-----


In the video the DMM7510 shows a decrease in voltage when the Charger Doctor displays current.  Also, some instability when displaying voltage.  But remember, the Keithley DMM7510 is a very sensitive instrument.  The change in voltage looks big on the screen, but it is really very small.
-----
The overall voltage swing is only 7.536mV or 0.00753 Volts.  That's not a lot.
-----
And taking a closer look at that instability when the Charger Doctor displays voltage we see that it is only 1.256mv peak to peak; that's just 0.001256 Volts.  Really, that seems exceptional for a sub $2USD device.
-----
There is a lot of discussion on the web as to why iOS devices don't charge via the Charger Doctor.  With the stability shown, I'm not sure why the Charger Doctor effects the WiFi reliability of the Raspberry PI, but I can say it does.  We set the Keithley DMM7510 to camp on the Charger Doctor output signal and trigger on a larger glitch or voltage spike to give us a clue.  After about 15 minutes the Charger Doctor remained stable within the trigger limits and we moved on with our life.  We do have to take into account that the Charger Doctor was effectively unloaded while making these measurements and that could make a big difference.
-----
Thanks for stopping by.
-----

Wednesday, March 18, 2015

Handy RF Screen Room "Blinds" your Cell Phone


Nosey spouse?  NSA tracking you?  Just want to made sure you are not "available"?

If for some reason you want make certain your phone (or a visitors phone) is "blind" to location tracking, showing that iMessages are delivered, confirmation emails, GPS, etc. place the phone in a microwave oven.


Here we use a Tektronix RSA306 Real Time Spectrum Analyzer (which is located behind the PC screen) to demonstrate the effectiveness of a microwave oven as a RF screen room.  Notice the RSA306 can "see" WIFI/Bluetooth signals when the door is open.  When the door is closed anything inside the oven is "blinded" to all cell phone communications.  All of them.

If you want to hide your phone (or hide someone else's) from all network communications, put it inside a microwave oven.

Oh, and don't turn on the microwave with your phone inside like this guy did!

Thursday, December 25, 2014

Tektronix MDO3000 as a MP3 Player


-----
A friend of mine got a Pono music player this Christmas.  The claimed advantage of the Pono player vs other music players is better sound fidelity.

So what does the Pono player do different?  Normal CD music is sampled at 44,100 times per second (44.1Ks/S) and 16-bit resolution.  The Pono is capable of playing music with an increased sample rate of 192,000 times a second (192Ks/S) and 24-bit resolution. A quick web search yields page after page of audiophiles debating these fidelity claims and we will leave that discussion to the experts.
------
Since Pono advocates see benefits in increasing sample rate from 44,100 times per second to 192,000 times a second, then just think about how awesome really turning up the sample rate would be!!!  But how?  Enter the Tektronix MDO3000 which can sample at an amazing 2,500,000,000 (2.5Gs/S) times per second and that's a lot!
 -----
The Tektronix MDO3000 is a benchtop instrument that has some truly amazing capabilities that push it way beyond being just an oscilloscope.  One of these features is the Arbitrary Function Generator (AFG) that can capture signals from any of the analog channels and play them back on command.
----
In the video below, we set the Tektronix MDO3000 to sample at a lazy 1,000,000 times per sec (1Ms/S).  Then we use a PC to play a MP3 music file for capture into the instrument's waveform memory via analog channel 1.
-----
Next, with a few button clicks the music waveform we just captured is loaded into the instrument's AFG to make it ready for playback.  Simple.
-----
The Tektronix MDO3000 AFG output is BNC connector on the back of the instrument.  We connect to the AFG and plug into a speaker.  The result: The most impractical (and expensive) MP3 player available, but with an impressive sample rate many, many times higher than the Pono player.
-----
This whole experiment means nothing, of course.  We did it simply because "we could".  If you do decide to go with a Pono (or a Tektronix MDO3000) as a music player remember that much of the sound quality is determined at the time of the original recording and not just at playback.  Also your headphones, speakers, listening room, ears, etc...
-----

Saturday, December 13, 2014

Propagation Delay of a 74HC04N Hex Inverter

-----
It takes some time for an electrical signal to travel down a wire or through a logic gate.  Not much time, but some.  It's called propagation delay (tpd) or "prop" delay.  We had a 74HC04N on the breadboard from our recent Rasperry PI CPU Usage Tachometer project and decided (for reasons unknown) to measure the prop delay of this chip.  The 74HC04N is a simple IC that turns a logic "0" into a "1" and turns "1" into a "0".  It has "six" gates to "invert" digital signals; thus the name "hex inverter".

----
For our measurement setup we used the Tektronix MDO4104B-6 oscilloscope.  It has plenty of what it takes to make this simple prop delay measurement and we had one handy. Since passing through one gate inverts a digital signal, passing the signal through two gates (or any even number of gates) will invert that signal back to it's original logic level.

Here is a 5VDC signal propagating though two gates.  The yellow trace is the input and the blue trace is the output after passing through two gates.  Using the scope cursors we measure the prop delay at 12nS  (nS or nanosecond = 10EE-9 seconds).  That's an average of 6ns per gate.
-----
Here is a 5VDC signal propagating though all six gates.  Again, the yellow trace is the input.  The blue trace is the output.  The scope cursors measure the total prop delay at 33.2nS (as well as some signal degradation from loading) for an average of 5.53nS per gate.
-----
Is that prop delay good or bad?  Well, we have to consult the device datasheet.  For a 5VDC setup NXP specs their 74HC04N at 7ns per gate typical, so our chip is beating the spec!  As far as it being good or bad depends on your application.  For most low speed hobby projects prop delay isn't even a consideration.  If you are designing high speed circuits then race conditions and prop delay specs become important to your design.  
-----
UPDATE: Special thanks to all the .EDU sites for checking in!

Thursday, December 11, 2014

Raspberry PI CPU Usage Tachometer


We had an old car tachometer laying around the labs (beats me why...) that seemed perfect for some type of project.  But what?   Since it is pretty common to see a car looking tachometer as a CPU usage meter on the desktop of a PC we decided to create a hardware version of this for the Raspberry PI.

Basically what we are going to do is read the CPU usage on the Raspberry PI.  Then convert that CPU usage value into a corresponding frequency.  That frequency will be output via GPIO on the Raspberry PI pin 11 to drive the tachometer.
----
First step is to characterize the tachometer and find out what type of frequencies made the needle move.  The Tekronix 3252C made easy work of that.

----
The spreadsheet below shows what frequencies move the tachometer needle to what position.  
We also used this spreadsheet to calculate a multiplier to adjust the CPU usage reading on the RaspPI to a 0 RMP to 8000 RPM reading on the car tachometer.  It's a pretty simple calculation and you can see how it is used in the Python source code below.
-----
The tachometer needs 12VDC to power it, but the input signal to move the tachometer needle needs to be 5VDC.  A 7805 voltage regulator solves that problem.  Also, to buffer the RasPI GPIO a 7404 was used to drive the RasPI signal into the tach.  The connection looks like this:
----
Using some Python code the end result is this:

In the video you can see how moving the mouse around on the Raspberry PI increases the CPU usage making the tachometer reading increase.  When the Chromium web browser is launched the CPU usage goes to 100% and the tachometer needle 'redlines'.
-----
The Python code is straightforward.  Drop us a line if you decide to duplicate the build!


#
# Program makes a simple car tachometer read CPU usage percentage.
#
# WhiskeyTangoHotel.Com - December 2014
#
# To run this program you must first do a one time install
# of the following from the terminal commans line.
#
# sudo apt-get install python-pip python-dev
# sudo pip install psutil
# sudo apt-get install python-psutil
# see: http://sourceforge.net/p/raspberry-gpio-python/wiki/PWM/ for PWM info

import time
import psutil
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(11, GPIO.OUT) # Pin 11 drives the tachometer

#p = GPIO.PWM(channel, frequencyHz)
p = GPIO.PWM(11, 200) # move the tach needle to about 1/2 scale
#p.start(dc)   # where dc is the duty cycle (0.0 <= dc <= 100.0)
p.start(50)
print ' '
print 'SELF TEST: Tach to about 1/2 scale for 5 seconds...'
time.sleep(5)   
print ' ' 

i = 0 # just a counter
adjust_cpu_to_hz = 3.8   # adjust_cpu_to_hz is calculated on the tach characterization spreadsheet.
# Tektronix 3252C was used to feed input into the tach to create the
# characterization spreadsheet.  Discover how many Hz needed to move needle.

while(True): # loop forever  
i = i + 1
# read the RasPI CPU Usage. Store the value in var cpu_usage.
cpu_usage = psutil.cpu_percent()
# use adjust_cpu_to_hz to scale the cpu_usage result to Hz within the tach's range
p = GPIO.PWM(11, cpu_usage * adjust_cpu_to_hz)  
p.start(50)
print 'Run #:', i, '  ', cpu_usage,'%', '    ', cpu_usage * adjust_cpu_to_hz,'Hz out to tach'
time.sleep(3)   # allow x secs to give the CPU a breather
p.stop()     # stop PWM (also end of while loop)

input('Press return to stop:')  
p.stop()     # stop PWM
GPIO.cleanup() # Take out the trash
----

Monday, September 15, 2014

Testing the CREE 5000 Lumen XML U2 LED HeadLight

The CREE 5000 Lumen XML U2 LED HeadLight was a topic of discussion at Ride Dual Sport.  The product seemed well built from the pics and at less than $18 shipped it seemed like a must try.

The unit comes complete with a the LED light, rechargeable battery (with a nice nylon case), handle bar mount, and charger.


The light feels solid and well built.


----
So how does it perform?  First off; it's bright.  Really bright!!!  There are three brightness setting, but honestly, the dimmest seems plenty bright.  I ran the light from full charge to dead on LOW and HIGH.  On LOW a 4.5 hour run time was observed.  A Keithley 2110 5 1/2 digit precision digital multimeter was used to record current draw.


-----
The battery pack puts out 8VDC, so don't connect the headlight straight to a 12VDC motorcycle or car battery without spending 60 cents for 7808 regulation.  


-----
Current shown by the Keithley 2110 with the unit in STANDBY mode; ~50 hours estimated.



-----
Current shown by the Keithley 2110 with the unit in LOW mode; 4.5 hours observed.


 -----
Current shown by the Keithley 2110 with the unit in MEDIUM mode; ~2 hours estimated.  



-----
Current shown by the Keithley 2110 with the unit in HIGH mode; 1.5 hours observed.

 -----
The unit is built well, works great, and is a fantastic value.