Recent Blog Posts

13 Dec 2014 mwaibel   » (Master)

Robots: Robotics in Theatre, Film and Television

In this episode, Ron Vanderkley speaks with Mythbusters' Grant Imahara, and Richard McKenna from The Creature Technology Company about robotics in the Film, Television and Theatre industries.

Syndicated 2014-12-13 07:00:00 from Robots - The Podcast for News and Views on Robotics

3 Dec 2014 shimniok   » (Journeyer)

Bubble Display, Propeller

HP 4-Digit Bubble Display (7-Segment LED)
I used a Sparkfun coupon to buy a couple of vintage, 4-digit, 7-segment, HP LED bubble displays. The kind you'd find in really old calculators. Their guide is most helpful.

I used one of my spare eeZee Propellers to play around with the display and create driver code. I haven't played in Spin in awhile, so it was a good refresher. Here's what I did...

Hookup

Since you want no more than 5mA running through these LEDs, I calculated that a 1K resistor would be about right. At 3.3V, with 1.6V forward drop, that's about 2mA, max.

Propeller pins P16 - P19 are connected to Cathode 4 through 1, respectively. Pins P20 - P26 are connected to Anode A through G, respectively. The decimal point is hooked up to P27.

Driving 7-Segment Displays

So, how do you drive one of these displays? To turn on an LED segment its anode must be high, and cathode low. These HP bubble displays are common-anode, meaning there's a unique cathode for each display digit, but each anode is shared across all the display digits.

You could simply drive the display one digit at a time, setting all the required anodes high and the corresponding cathode low.

The problem is, each digit requires a different number of LED segments. Compare 1, which requires 2 LED segments, with 8 which requires 6 segments. If you used a resistor per cathode, 1 would look brightest and 8 would appear dimmest.

A common cathode display is intended to be controlled with the cathodes. Use 4 resistors, one for each cathode, power each of the common anodes sequentially, and use the cathodes to individually turn segments on or off for each display digit position.

Software

BubbleDisplay.spin

The display driver runs on a cog and displays digits stored in hub memory. The main cog simply counts from 0 to 9999 over and over again, extracting the 1's, 10's, 100's and 1000's place and storing the numbers for display, as follows, where b1, b2, b3, b4 are each of the digits.

    PUB Start | i              

b1 := b2 := b3 := b4 := 10 ' initial digit (>9 means off)
      cognew(display, @stack)    ' start display driver cog
      repeat      
  
        repeat i from 0 to 9999             
b4 := i // 10 ' ones
b3 := (i/10) // 10 ' tens
b2 := (i/100) // 10 ' hundreds
b1 := (i/1000) // 10 ' thousands
waitcnt(clkfreq/10+cnt) ' count at ~10Hz

I may refactor the program to use BCD; storing digits in each of the 4 bytes of a Propeller's 32-bit long int, but the code is more readable using one variable per digit.

Driver Details

As for the driver, a segment array, seg, stores the outa cathode pin bits required to turn on each segment (a through g) at each display digit position (1 through 4).

The main loop calls setdigit(digit, value) which sets the cathode bit in the seg array, for the specified display digit and the specified numeric value. For example, displaying "2" in position 3 requires the cathode for position 3 to be low (on) for segments a, b, d, e, g, and high (off) for segments c and f.

  repeat
setdigit(1, b1) ' set 1's value
setdigit(2, b2) ' set 10's value
setdigit(3, b3) ' set 100's value
setdigit(4, b4) ' set 1000's value
bit := AN_A ' start with anode a
repeat s from A to G ' loop thru segments
outa := seg[s]|bit ' turn on cathodes, anode
bit <<= 1 ' next anode bit
waitcnt(clkfreq/delay+cnt)

Then, the main loop iterates over the array, seg[A..G], sets the cathode pins, simply with outa := seg[s] and raises the corresponding segment anode pin for each array element by ORing outa with bit, which is the bit corresponding to the current anode pin. How does the array get set with the right cathode?

The setdigit(digit, value) function converts the display digit into the appropriate cathode bit to activate (set low) or deactivate (set high).

case digit
1: unset := CA_1
2: unset := CA_2
3: unset := CA_3
4: unset := CA_4
other: unset := 0


set := !unset & (CA_1|CA_2|CA_3|CA_4)
It then uses the numeric value (0..9) in another case statement to select which segments should be on (seg[?] &= set) or off (seg[?] |= unset).

  case value
0: seg[A] &= set
seg[B] &= set
seg[C] &= set
seg[D] &= set
seg[E] &= set
seg[F] &= set
seg[G] |= unset
...

And that's it. You can find the source code here: BubbleDisplay.spin

So, It's Been Awhile...

You would have heard from me sooner, but alas, there has not been much time for tinkering or blogging lately.

My paucity of spare time can be blamed on work, filling Tindie orders, and gearing up for the crowd funding campaign for OpenMV Cam.

Syndicated 2014-12-03 15:00:00 (Updated 2014-12-03 15:00:01) from Michael Shimniok

14 Nov 2014 Sergey Popov   » (Apprentice)

:-)

14 Nov 2014 wedesoft   » (Master)

Graph couloring

Graph coloring with Scheme and Graphviz

Syndicated 2014-11-13 00:00:00 from Jan Wedekind

5 Aug 2014 svo   » (Master)

Больше бит с VGA-разъема Altera DE1

Увеличение аналогового разрешения композитного видеовыхода на плате Altera DE1.

Increasing analog resolution of VGA-connector based CVBS output on Altera DE1.

Aumentando resolución analógica de la salida de video compuesto de Altera DE1.

Syndicated 2014-08-05 22:20:29 from svo's interactive persuasion vehicle

20 Jul 2014 Flanneltron   » (Journeyer)

Cognitive Abstraction Manifolds

A few days ago I started thinking about abstractions whilst reading Surfaces and Essences, a recent book by Douglas Hofstadter and Emmanuel Sander. I suspect efforts like Surfaces and Essences, which traverse vast and twisted terrains across cognitive science, are probably underrated as scientific contributions. But first, let me briefly introduce the idea-triggering tome. Surfaces […]

Syndicated 2014-07-20 02:14:57 from SynapticNulship

3 Jul 2014 jmhenry   » (Journeyer)

Ladybird autonomous robot to help out down on the farm

Agricultural robots are beginning to come into their own. This article on the “Ladybird” robot explains how one type of machine is being developed to help farmers conduct a host of operations on many types of crops. This “bug” won’t...

Syndicated 2014-07-03 03:19:24 from RobotNext

3 Jul 2014 steve   » (Master)

Shadow Show

Shadow Show

Shadow Show

Shadow Show, edited by Sam Weller and Mort Castle, describes itself as “All-new stories in celebration of Ray Bradbury”. I’ve been a fan of Bradbury’s fiction most of my life. Friends from my high school days may remember me sitting under the bleachers during Pep Rallies reading “R is for Rocket” or wandering the hallways with a copy of “Fahrenheit 451″. I most liked his early work; stories like Frost and Fire or The City. They blended conventional science fiction with Bradbury’s unique style which approached magical realism. I felt his later writing lost a lot by abandoning the science fiction aspect and focusing exclusively on the magical realism. In any case, I heard about this book and imagined it might contain Bradbury-like stories that recaptured the feel of his early work. Alas, this is not the case.

For the most part, the stories in the book aren’t really at all like Bradbury stories. At least, I’d never confuse any of them with the real thing. Most had supernatural or horror themes and lacked the connection to science fiction. They’re simply from authors who were, in one way or another, inspired by Bradbury. They’re not bad stories. Some are enjoyable and may appeal to Bradbury fans, if only to find out how other writers were inspired by him.

There were a few exceptions, however; stories that are intended to provoke memories of Bradbury or his stories in one way or another. The best of these, at least for me, was Children of the Bedtime Machine by Robert McCammon. This story made the book worthwhile for me and was a real celebration of Bradbury in multiple ways. First, it was a story I could imagine Bradbury writing; second, it combined science fiction with a Bradburyesque magical realism, and lastly, Bradbury’s writing actually plays a part in the story’s plot. It’s the story of a woman living in a post-apocalyptic wasteland; the result of climate change and global war. There’s little plant or animal life left, and little hope for the future. The woman’s only joy in life is a trunk full of old book that she reads to herself. During a visit to a trading post in a nearby town, she’s given a useless machine from the dead past. The combination of a Ray Bradbury book and a machine designed for insomniacs leads to a new hope for a dying world.

If you can pick up the book inexpensively, it’s worth it just for that one story. Or perhaps you’ll enjoy the other stories more than I did. Authors include Harlan Ellison, Margaret Atwood, Neil Gaiman, Joe Hill, Alice Hoffman, Kelly Link, and others.

Syndicated 2014-07-03 02:14:55 from Steevithak of the Internet

10 Jun 2014 robotvibes   » (Master)

I’m back, and ready to kick ass!

Nuff said…Let’s go!

Syndicated 2014-06-10 01:35:20 from Cyb3rnetx

10 May 2014 evilrobots   » (Observer)

http://www.drdobbs.com/a-flexible-system-for-centralized-backup/199101279

http://www.vmwarearena.com/2013/10/vsphere-55-download-free-esxi-55.html#comments

1 Dec 2013 AI4U   » (Observer)

Artificial Intelligence in German (Amazon Kindle e-book)

If your humanoid robot needs an AI Mind to think in English or German, a new Amazon Kindle e-book goes into great detail about robotic thought processes.



This e-book in English about AI in German (and English and Russian) contains the entire AI source code in Forth, which causes most of the editorial portion of the e-book (18 of 20 chapters) to be readable without charge in the free preview.


Robot of the Day

robot de tres rueda

Built by
Eduardo J. Carletti

Recent blogs

13 Dec 2014 mwaibel (Master)
3 Dec 2014 shimniok (Journeyer)
14 Nov 2014 Sergey Popov (Apprentice)
14 Nov 2014 wedesoft (Master)
5 Aug 2014 svo (Master)
20 Jul 2014 Flanneltron (Journeyer)
3 Jul 2014 jmhenry (Journeyer)
3 Jul 2014 steve (Master)
2 Jul 2014 Petar.Kormushev (Master)
10 Jun 2014 robotvibes (Master)
10 May 2014 evilrobots (Observer)
1 Dec 2013 AI4U (Observer)
13 Nov 2013 jlin (Master)
23 Jun 2013 Mubot (Master)
13 May 2013 JLaplace (Observer)
21 Apr 2013 Pi Robot (Master)
12 Apr 2013 Pontifier (Apprentice)
16 Mar 2013 gidesa (Journeyer)

Newest Members

Newest Robots

7 Aug 2009 Titan EOD
13 May 2009 Spacechair
6 Feb 2009 K-bot
9 Jan 2009 3 in 1 Bot
15 Dec 2008 UMEEBOT
10 Nov 2008 Robot
10 Nov 2008 SAMM
24 Oct 2008 Romulus
30 Sep 2008 CD-Bot
26 Sep 2008 Little Johnny