Showing posts with label USBGauge. Show all posts
Showing posts with label USBGauge. Show all posts

Sunday, November 3, 2013

Trinkets

OK, my parts were received from Adafruit.com, see previous post.

The USB Power Gauge works as expected, it is very handy to check the charge rate on my Cell Phone, and for checking power consumed by any USB device, including my Raspberry Pie and/or the BeagleBone computers. The USB Power Gauge provides information that is otherwise a little difficult to obtain.

I had also purchased three Adafruit Trinkets. I followed the recommended software (Ardunio IDE) install instruction, and modification needed for the Trinket. And then, I proceeded to "Brick" all three Trinkets (or at least that is what I thought). I have used the Ardunio Interactive Development Environment (IDE) many times in the past and was not expecting any problems.

Because the "Trinket" has only 512 Bytes EEPROM (boot loader ROM) part the loader (about 1.5K bytes) is placed in FLASH RAM, which leaves about 5.5K bytes for user programs.

While loading a user program into the remaining FLASH RAM, if something goes wrong, part of the boot loader can be overwritten, and therefore it is somewhat easy to "Brick" the Trinket.

Instructions are provide to "UnBrick" the Trinket, but that requires yet another Arduino and downloaded programs.

While reading many pages on the web trying to understand my problem, I discovered that for Linux machines may not support USB in the way that the Arduino IDE for the Trinket desires. The recommended method is to use a external USB Hub to connect the Trinket to a Linux computer.

It worked, . . . how or why, I do not know !!

The Trinkets were NOT actually Bricked, . . . they just looked and acted like it. While plugged into a Hub, they now respond as desired by the Arduino IDE.

My first task was, of course, to run "Blinky", the "Hello World" program.

Once that worked, I quickly put together the following CW sketch to send/blink "CQ" on the LED.


/*
  This Sketch Blinks CQ on the LED
*/
 
int led = 1; // blink 'digital' pin 1 - AKA the built in red LED

int WPM = 13; // Words Per Minute
int ditTime = 1200 / WPM;
int dahTime = ditTime * 3;

// the setup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
  delay(2000);

}

// the loop routine runs over and over again forever:
void loop() {

    for(int j = 0; j < 3; j++) {
      dah(); // C
      dit();
      dah();
      dit();
      eoc();
      
      dah(); // Q
      dah();
      dit();
      dah();
      eoc();
    }
    eow();
    
    delay(10000);
}


void eoc() { // End of Charactor
    delay(ditTime * 3); // added to previous End-of-Char time
}

void eow() { // End of Word
    delay(ditTime * 7); // added to previous End-of-Char time
}

void dit() {
    cwpulse(ditTime);
}

void dah() {
    cwpulse(dahTime);
}

void cwpulse(int duration) {
    digitalWrite(led, HIGH); 
    delay(duration);
    digitalWrite(led, LOW);
    delay(ditTime);
}


// End   

A more complete and non-trivial CW sketch would be table driven, but this was quick-n-dirty just to just get something to work.

More complex and interesting programs will hopefully follow.

I think the Trinket will have a place in my bag of tricks, for small Ham Radio Projects. I am currently thinking of maybe a Beacon Trinket Shield, and/or a Tennis Ball Launcher Trigger Controller.

--

Saturday, October 12, 2013

New Products I Plan to Order

There are two new little products that will make my planned projects easier, both less than $10 each.

The first is a little (inline) USB Power Gauge:

I have several (many) small battery-powered devices that are Charged or Powered via their mini or micro USB connection. For example: a cell phone, mini speakers, keyboards, video cameras, micro-controllers (e.g., Rpi), and several others. I think standardization of chargers and/or power for some devices is great for users, but.

I find that sometimes information is lacking regarding the state, or status, of the device being charged. The devices idiot power LED does not always tell the story. On some devices, the battery does not seem to take-a-charge, or it charges very (maybe too) slowly. The charge rate is typically dependent on the USB charge voltage, the active Application current draw while the device is being charged, or some other unknown reason. I have waited overnight for something to be charged and disappointed with the results the next morning. Without a meter it is difficult to know what is going on, or how to fix the problem.

Adafruit.com is producing a new "USB Power Gauge *" and it will be inexpensive. I plan order one when they are available (in maybe 10 days or so).

Adafruit USB Power Gauge *

The second new little product is a small "Adafruit Trinket"; an Arduino-Like Project Controller:

The Adafruit Trinket has some very interesting spec's, and will be just the right size, with a small pin count, for some projects that I have in mind. With this controller and a simple Arduino Script, all of our Ham projects can be made "smart".  The Trinket can be purchased for 5 Volt or 3.3 Volt circuits. I will include several of these when I place the order from Adafruit.com.

 Adafruit Trinket - A Very Small Project Controller *

* Images were obtained from the Adafruit.com's Web Site, without their permission. Hopefully they will not mind for this endorsement. I do not work for Adafruit, I just really like some of "Lady Ada's" products.


UPDATE: Oct 17, 2013
Parts are now on order.
I also added the following to the order:
Heatsink Thermal Tape - http://www.adafruit.com/products/1468
Heatsink - http://www.adafruit.com/products/1493


--