Posts with «arduino» label

New freshman design seminar

This week I filed paperwork for yet another new course for bioengineering majors: a freshman design seminar.  The course idea was started by the Biomedical Engineering Society (BMES), a student club at UCSC.  They were seeing a lack of engineering in the first couple of years of the bioengineering major.  The first two years at UCSC usually have 12 technical courses and 6 general-education courses, but the bioengineering major has 16 required lower-division courses, mostly science and math.  That means that most students don’t get any engineering design courses in their first two years.

The BMES officers brought the idea of a lower-division project first to the dean of the School of Engineering, who encouraged them to get it created as a permanent course in the department.  They then brought the idea to David Bernick and me, and we brainstormed how to convert the project idea into a workable course that has no prerequisites.  We decided to go with a 2-unit course (about 60 hours total work) rather than a standard 5-unit course (about 150 hours) or a 7-unit lecture plus lab (about 210 hours), because bioengineering students can’t really afford to delay any of their technical coursework, so the design seminar has to be handled as overload.

We decided on winter quarter to offer the seminar.  Fall quarter was rejected, since students will need to be advised to take it and summer advising sessions do not really provide much opportunity for peer advising by fellow engineering students. Spring quarter was rejected, because I’ll have the circuits course (with 12 hours a week in lab, plus 3.5 hours a week in lecture, plus grading), so won’t have the time to do the freshman seminar as well.  David could probably do it in Spring, but it would be best if there were more than one possible instructor available.  It’s not clear who would teach the course the first year—I would have to take it on as overload if I did it, and money would have to be found to hire David to do it, as the course wasn’t even thought of when the curriculum leave plan was written for the next fiscal year.

The class is limited to freshmen and sophomore bioengineering majors (or premajors), but upper-division bioengineers will be encouraged to volunteer as mentors (and some may be paid as group tutors).

Here is the catalog copy I submitted (limited to 40 words):

A first course in engineering design for bioengineers. In co-operation with the Biomedical Engineering Society (BMES).  Students choose a design project and work on it in competitive and cooperative teams. Covers team building, design, prototyping, and report writing.

And here is the more detailed “supplemental sheet” that has the actual course description:

Undergraduate Supplemental Sheet

Information to accompany Request for Course Approval


Sponsoring Agency: Biomolecular Engineering
Course #: 88A
Catalog Title: BMES freshman design seminar
Please answer all of the following questions using a separate sheet for your response.


1. Are you proposing a revision to an existing course? If so give the name, number, and GE designations (if applicable) currently held.
This is not a revision to any existing course.

2. In concrete, substantive terms explain how the course will proceed. List the major topics to be covered, preferably by week.
This course is a project course for freshmen, done in conjunction with the Biomedical Engineering Society (BMES), a student organization on campus.

  1. The class will choose a project for the quarter, with advice from BMES and the instructor.  Lab and fabrication facilities will be toured.
  2. Instructor and reference librarians will introduce students to finding detailed information in the library and on the web relevant to the course (finding data sheets for parts, finding tutorials on relevant theory, searching for survey articles and application notes, using EndNote or BibTeX to maintain a bibliography, …).  Students will choose topics relevant to the project to research.
  3. Students will present the results of background research and brainstorm approaches to the design problem.  Students will be assigned the task of finding and reading data sheets for components they might need.  Students will write a clear set of design goals for the project.
  4. Teams will be formed to prototype different approaches. Dynamics of team formation and functioning will be discussed.  Procedures will be determined for abandoning unpromising approaches, merging teams, and starting new ones.
  5. Weeks 5–8 will involve prototyping projects, with instruction in prototyping technologies and tools (laser cutter, soldering, drill press, glass bending, … ) as needed.  Written drafts of design reports will be required every 2 weeks—these are cumulative reports, not just what has been done since last time.
  6. Weeks 9 and 10 will involve testing and comparison of the different design approaches and a collaborative final design report from the entire class that includes an analysis of all the different designs—their strengths and their weaknesses.  The final design report will be given as a public oral presentation, as well as in a written report.

3. Systemwide Senate Regulation 760 specifies that 1 academic credit corresponds to 3 hours of work per week for the student in a 10-week quarter. Please briefly explain how the course will lead to sufficient work with reference to e.g., lectures, sections, amount of homework, field trips, etc. [Please note that if significant changes are proposed to the format of the course after its initial approval, you will need to submit new course approval paperwork to answer this question in light of the new course format.]
Students will spend 3.5 hours a week in lab/lecture and about 3–6 hours a week in reading, writing, and group design meetings, depending on level of commitment to the course, making this course 2–3 units of effort.

4. Include a complete reading list or its equivalent in other media.
The students will be reading primarily about the background and components for the particular project they are doing, which will most likely be different each year.  For example, if students do a project on building a device to continuously monitor optical density in a liquid culture, they will be reading about the theory of optical density measurements, how liquid cultures are grown, light sources (LEDs, laser diodes, and incandescent lights), photo detectors (photodiodes, phototransistors, and photoresistors), and whatever other knowledge they need to design and build their prototypes.  Most of this reading will be from the internet and books or journal articles from the library.
Discussions on team formation may be based on a book like Teamwork and Project Management, 3rd edition by Karl A. Smith and P.K. Imbrie, but a shorter, more readable presentation is probably needed.  Short articles like http://www.mindtools.com/pages/article/newLDR_86.htm (“Forming, Storming, Norming, and Performing”) or http://www.clemson.edu/OTEI/documents/teamwork-handbook.pdf‎ (“Successful Strategies for Teams”) may be more appropriate.

5. State the basis on which evaluation of individual students’ achievements in this course will be made by the instructor (e.g., class participation, examinations, papers, projects).
Students will be evaluated primarily on design reports and participation in project design.

6. List other UCSC courses covering similar material, if known.
This course is similar to capstone design courses and senior theses, but on a much smaller scale.  It is intended to be a first introduction to engineering design for bioengineering majors.

7. List expected resource requirements including course support and specialized facilities or equipment for divisional review. (This information must also be reported to the scheduling office each quarter the course is offered.)
Students will need access to a lab where they can use both electronic equipment and standard molecular biology equipment.  Baskin 287 has all the molecular biology equipment, but lacks a multimeter, bench power supply, oscilloscope, function generator, and soldering station.  Several of the electronics labs have the electronics equipment, but lack water, sinks, and biomolecular lab equipment.  A Bunsen burner for shaping glass tubes would be useful for some projects.
Students may also need access to the laser cutter and other fabrication tools in Baskin Engineering 138.

8. If applicable, justify any pre-requisites or enrollment restrictions proposed for this course. For pre-requisites sponsored by other departments/programs, please provide evidence of consultation.
There are no prerequisites for the course, as it is intended as a freshman seminar.  Enrollment is limited to bioengineering majors and pre-majors who are freshman or sophomores, to keep the freshmen from being overwhelmed by upper-division students.  A small number of upper-division students are expected to participate as group tutors.

9. Proposals for new or revised Disciplinary Communication courses will be considered within the context of the approved DC plan for the relevant major(s). If applicable, please complete and submit the new proposal form (http://reg.ucsc.edu/forms/DC_statement_form.doc or http://reg.ucsc.edu/forms/DC_statement_form.pdf) or the revisions to approved plans form (http://reg.ucsc.edu/forms/DC_approval_revision.doc or http://reg.ucsc.edu/forms/DC_approval_revision.pdf).
This course is not expected to contribute to any major’s disciplinary communication requirement, though it will include feedback on writing design reports so that students are better prepared for writing in upper-division technical courses.

10. If you are requesting a GE designation for the proposed course, please justify your request making reference to the attached guidelines.
This course is a group design effort, in which students agree on an overall design project, split into teams to prototype different approaches to the design, and work cooperatively both within the teams and in the class as a whole.  The course matches the Practice: Collaborative Endeavor (PR-E code): “Students learn and practice strategies and techniques for working effectively in pairs or larger groups to produce a finished product. For example, students might learn specialized practical information such as how to use change-management software to monitor and manage changes initiated by multiple group members. Alternatively, they might learn basic information about leadership, teamwork, and group functioning, which they can incorporate into their own group process. What is common to all courses is that some instruction regarding the process of collaboration is provided, in addition to instruction specific to the academic discipline and the products being produced.”

11. If this is a new course and you requesting a new GE, do you think an old GE designation(s) is also appropriate? (CEP would like to maintain as many old GE offerings as is possible for the time being.)
As this is a 2-unit course, the old GE designations, which were reserved for 5-unit courses, are not applicable.

Yesterday (Friday), BMES met with me to discuss whether the course description met their goals and how to get sufficient enrollment in the course. (I’d had to file the paperwork in a hurry, hoping to catch the last Committee on Educational Policy meeting of the year—we may still have missed it, in which case the course won’t be approved until the fall.)  The students who read the course description seemed to think that the course was what they were looking for.  I’m a bit worried about whether it can be kept to the workload of a 2-unit course.

We also talked a bit about possible projects for the first offering.  Two have been discussed so far:

  • A low-cost optical density meter for continuous monitoring of OD 600 (with an LED light source) or OD 650 (with a narrower-spectrum laser-diode light source) of cultures on a shaker table.
  • A pulse oximeter for measuring blood oxygenation.

Both of these projects have minimal analog electronics (basically just an LED or two and a phototransistor, with associated resistors).  The challenging parts are the mechanical design for the density meter (how do the sensor and shaker flask interact?  submersible sensor? culture pumped through a tube? waterproofing? autoclavable?) and the programming for the pulse oximeter (I think that most of the usual analog electronics can and should be replaced by programming, but is the Arduino powerful enough?  do we need a Raspberry Pi instead?).

We’ll be encouraging the members of BMES to come up with other project ideas, so that there can be a different project every year.  Another possibility that was mentioned is to build a thermal cycler for PCR, like the OpenPCR project, but the design work there has already been done, and the parts are more expensive.

The two projects we’ve been thinking of so far use only a few dollars worth of parts and a re-usable $22 Arduino board, so I don’t see any problem in just having students buy the components themselves.  It would be good for them to learn how to find and order parts from companies like DigiKey (though they are an expensive source for 650nm laser diodes: $9 vs. 5 for $10 at other suppliers).

Unless we get some corporate sponsorship, we’ll have to run this design seminar on a shoestring, as the School of Engineering relies on student lab fees for consumable parts, and those fees have to be approved about a year in advance. Anyone know a company interested in making a small donation to support such a freshman design seminar?  (It is not worth my time to go looking for a sponsor, but I’d be glad to put anyone who wants to make a donation in touch with the University Development people working with the School of Engineering.)


Filed under: freshman design seminar Tagged: Arduino, Biomedical Engineering Society (BMES), curriculum design, design project course, engineering education, prototype

Arduino data logger at Global Physics Department

My son presented the Arduino Data Logger he wrote for my circuits class to the Global Physics Department on 2013 May 15.  The sessions are recorded, and the recording is available on the web (though you have to run Blackboard Collaborate through Java Web Start to play the recording).

I thought he did a pretty good job of presenting the features of the data logger.

Now that school is beginning to wind down, he’s started looking at making modifications to the data logger code again, and has updated it at https://bitbucket.org/abe_k/arduino-data-logger/

He’s down to only three classes now (US History, Physics, and Dinosaur Prom Improv), though he still has homework to catch up on in Dramatic Literature and his English class.  He’s still TAing for the Python class also.

On Thursday and Friday this week, he’ll be taking the AP Computer Science test and the AP Physics C: Electricity and Magnetism test.  He’s having to take both tests in the “make-up” time slot, because we couldn’t get any local high school to agree to proctor the tests for him during the regular testing time.  Eventually his consultant teacher convinced the AP coordinator to let her proctor the tests, but by then it was too late to register for anything but the makeup tests. We’re way behind schedule on the physics class, so he’s just going to read the rest of the physics book without working any problems before Friday’s exam—we’ll finish the book in a more leisurely fashion after the exam. He won’t be as prepared for the physics exam as I had hoped, but at least the CS exam looks pretty easy to him.

One thing I didn’t realize is that schools can charge homeschoolers whatever the market will bear for proctoring the tests:

  • Depending on the reasons for late testing, schools may be charged an additional fee ($40 per exam), part or all of which the school may ask students to pay. Students eligible for the College Board fee reduction will not be charged the $40-per-exam late-testing fee, regardless of their reason for testing late.
  • Schools administering exams to homeschooled students or students from other schools may negotiate a higher fee to recover the additional proctoring and administration costs.

[ http://professionals.collegeboard.com/testing/ap/about/fees ]

We’re paying $145 per exam (not just the $89 standard fee and the $40 late fee), but I’m glad he gets to take the exams at all this year.

Tomorrow he and I are doing another campus tour—this time at Stanford. He managed to get an appointment with a faculty member, but we noticed that the faculty member is scheduled to be teaching a class at the time of the appointment—I wonder what is going to happen with that. I’ll report on the visit later this week.


Filed under: Data acquisition Tagged: Advanced Placement exams, Arduino, data logger, Global Physics Department, physics

Arduino data logger at Global Physics Department

My son presented the Arduino Data Logger he wrote for my circuits class to the Global Physics Department on 2013 May 15.  The sessions are recorded, and the recording is available on the web (though you have to run Blackboard Collaborate through Java Web Start to play the recording).

I thought he did a pretty good job of presenting the features of the data logger.

Now that school is beginning to wind down, he’s started looking at making modifications to the data logger code again, and has updated it at https://bitbucket.org/abe_k/arduino-data-logger/

He’s down to only three classes now (US History, Physics, and Dinosaur Prom Improv), though he still has homework to catch up on in Dramatic Literature and his English class.  He’s still TAing for the Python class also.

On Thursday and Friday this week, he’ll be taking the AP Computer Science test and the AP Physics C: Electricity and Magnetism test.  He’s having to take both tests in the “make-up” time slot, because we couldn’t get any local high school to agree to proctor the tests for him during the regular testing time.  Eventually his consultant teacher convinced the AP coordinator to let her proctor the tests, but by then it was too late to register for anything but the makeup tests. We’re way behind schedule on the physics class, so he’s just going to read the rest of the physics book without working any problems before Friday’s exam—we’ll finish the book in a more leisurely fashion after the exam. He won’t be as prepared for the physics exam as I had hoped, but at least the CS exam looks pretty easy to him.

One thing I didn’t realize is that schools can charge homeschoolers whatever the market will bear for proctoring the tests:

  • Depending on the reasons for late testing, schools may be charged an additional fee ($40 per exam), part or all of which the school may ask students to pay. Students eligible for the College Board fee reduction will not be charged the $40-per-exam late-testing fee, regardless of their reason for testing late.
  • Schools administering exams to homeschooled students or students from other schools may negotiate a higher fee to recover the additional proctoring and administration costs.

[ http://professionals.collegeboard.com/testing/ap/about/fees ]

We’re paying $145 per exam (not just the $89 standard fee and the $40 late fee), but I’m glad he gets to take the exams at all this year.

Tomorrow he and I are doing another campus tour—this time at Stanford. He managed to get an appointment with a faculty member, but we noticed that the faculty member is scheduled to be teaching a class at the time of the appointment—I wonder what is going to happen with that. I’ll report on the visit later this week.


Filed under: Data acquisition Tagged: Advanced Placement exams, Arduino, data logger, Global Physics Department, physics

Olympia Circuits shows Arduino datalogger and Arno Add-Ons at Maker Faire 2013

Olympia Circuits is best known for its Arno board and Arno Shield, which are designed to ease the Arduino learning curve by providing a bevy of pre-wired sensors and controls along with detailed instructions for several DIY projects. The company announced a couple of new products at Maker Faire this past weekend: the Arno Digital RGB Add-On and the SODA HE-1.0 Arduino datalogger. With the former, your Arno simply gains three RGB LEDs, while the latter stands for "Simple, Open Data Acquisition, High Efficiency." It's an Arduino board with screw terminals designed around Atmel's ATmega32u4 that features a real-time clock (RTC) with battery backup, a high-precision ADC and a microSD card slot. The RTC can either wake the entire board or trigger an interrupt at set intervals, which makes the board very power efficient when used in the field. Olympia Circuits will be updating its website with more info shortly (including availability and pricing). Until then, don't miss our hands-on gallery below.

Filed under: Misc

Comments

Source: Olympia Circuts

Arduino Yun weds Arduino, WiFi and Linux at Maker Faire 2013

The Arduino Robot wasn't the only interesting product the Italian company launched at Maker Faire this past weekend. Arduino Yún combines a Leonardo board (featuring Atmel's ATmega32u4) with a MIPS-based WiFi SoC (Atheros AR9331) running Limino (an OpenWRT / Linux derivative). It includes everything you'd expect from a Leonardo board plus WiFi, wired Ethernet, a USB host port and a microSD card slot. The Arduino side can be programmed wirelessly and communicates with the WiFi SoC via SPI and UART interfaces using the new Bridge Library, which delegates networking to the Linux side. Out of the box, the board behaves just like any standard WiFi access point with a full web interface -- it even allows SSH access. Arduino Yún is the first of a family of WiFI-enabled products and will be available late June for $69. Check out the gallery below for some closeup shots, and follow the source for more details.

Filed under: Misc, Wireless

Comments

Source: Arduino blog

Insert Coin: Linkbot modular robotic platform lets you quickly build a bot, skills

In Insert Coin, we look at an exciting new tech project that requires funding before it can hit production. If you'd like to pitch a project, please send us a tip with "Insert Coin" as the subject line.

Everybody loves robots, but the initial ardor for building one can quickly be snuffed out by the complex reality of actually programming it to do anything. That's where Linkbot comes in, a new project from the Barobo team that brought us the Mobot. It's designed as a modular system that can be expanded infinitely with accessories like a camera mount, gripper, and wheels, thanks to three separate mounting surfaces -- which also have standard #6-32 screw attachment holes on the mounting plate to attach personality-enhancing cutouts. Despite the expansion potential, though, it can still be used right out of the box to do robotics without touching a lick of code. That's thanks to several built-in modes like BumpConnect, which permits wireless connections between the modules by touching them together; and PoseTeach, to program complex motions by hand in a similar (but less time-consuming) manner to stop-motion animation techniques.

For those who want to step it up a notch, the system lets you go far past basic mech fun. The Linkbot itself has two rotating hubs with absolute encoding, along with an accelerometer, buzzer, multicolored LCD and ZigBee wireless system with a 100m line-of-sight range. There are also optional breakout and Bluetooth boards to connect sensors like range finders, IR proximity sensors, photo detectors and thermostats. The outfit's BaroboLink software for Mac, PC or Linux is included to program the Arduino-compatible bot in several languages as well, and can even translate previously created PoseTeach motions into computer routines. So far, the company has created working prototypes and even shipped them to local schools, so if you're interested, you can pledge a minimum $129 toward the company's $40,000 target to grab one. That'll net you a Linkbot, two wheels, the BaroboLink software, access to the MyBarobo community -- and hopefully a jolt to your robotics confidence.

Filed under: Robots

Comments

Source: Kickstarter

Arduino Robot launches at Maker Faire, we go hands-on (video)

There's a new kid on the Arduino block, and it's called the Arduino Robot. Launched yesterday at Maker Faire Bay Area, it's the company's first product that extends beyond single microcontroller boards. The Roomba-like design, which we first saw in November 2011, is the result of a collaboration with Complubot. It consists of two circular boards, each equipped with Atmel's ubiquitous ATmega32u4 and connected via ribbon cable.

The bottom board is home to four AA batteries (NiMH), a pair of motors and wheels, a power connector and switch plus some infrared sensors. By default it's programmed to drive the motors and manage power. The top board features a color LCD, a microSD card slot, an EEPROM, a speaker, a compass, a knob plus some buttons and LEDs. It's programmed to control the display and handle I/O. Everything fits inside a space that's about 10cm high and 19cm in diameter.

Pre-soldered connectors and prototyping areas on each board make it easier to customize the robot platform with additional sensors and electronics. It even comes with eleven step-by-step projects and a helpful GUI right out of the box. The Arduino Robot is now on sale at the Maker Faire for $275 and will be available online in July. Take a look at our gallery below and watch our video interview with Arduino founder Massimo Banzi after the break.

Filed under: Misc, Robots

Comments

Via: Make

Source: Arduino

Google I/O attendees will see their every move recorded in real time

During Google I/O this week, visitors to the Moscone Center will have their every movement tracked, but it's not as creepy as it sounds. Google's Cloud Platform Developer Relations team is spearheading a project called the Data Sensing Lab, which utilizes a network of Arduino sensors to collect ambient data and translate it into easily understood visualizations. Fluctuations in temperature, air quality and humidity will be recorded along with noise levels and foot traffic to provide a real-time breakdown of activity within the Moscone Center. The information from the Data Sensing Lab will then be displayed on a number of screens scattered around the conference floor.

The Data Sensing Lab is the next step in Google's quest to master environmental data collection after absorbing the team behind Behavio last month. Developer Programs Engineer Michael Manoochehri admits that the plan is "kind of futuristic, and maybe a little crazy," but emphasizes the practical uses for real-time environmental analytics. For example, information about air quality fluctuations can be monitored to adjust a room's temperature and footstep counters can provide valuable insight into which areas are most popular. In the spirit of open innovation, Google promises to make the Cloud Platform code, the Arduino sensor designs and the collected data available online after the conference. Big Brother might be watching, but at least we'll be able to watch right along with him.

Filed under: Misc, Google

Comments

Via: TechCrunch

Source: Google

Tutorial – Arduino and MC14489 LED Display Driver

Learn how to use MC14489 LED display driver ICs with Arduino in chapter fifty-one of a series originally titled “Getting Started/Moving Forward with Arduino!” by John Boxall – A tutorial on the Arduino universe. The first chapter is here, the complete series is detailed here.

Updated 12/05/2013

Introduction

Recently we’ve been looking at alternatives to the MAX7219 LED display driver IC due to pricing and availability issues (stay tuned for that one) – and came across an old but still quite useful IC – the MC14489 from Motorola (now Freescale Semiconductor). The MC14489 can drive five seven-segment LED numbers with decimal point, or a combination of numbers and separate LEDs. You can also daisy-chain more than one to drive more digits, and it’s controlled with a simple serial data-clock method in the same way as a 74HC595 shift register. Sourcing the MC14489 isn’t too difficult – it’s available from element14, Newark, Digikey, and so on – or if you’re not in a hurry, try the usual suspects like Futurlec.

For the purpose of the tutorial we’ll show you how to send commands easily from your Arduino or compatible board to control a five-digit 7-segment LED display module – and the instructions are quite simple so they should translate easily to other platforms. Once you have mastered the single module, using more than one MC14489 will be just as easy. So let’s get started.

Hardware

Before moving forward, download the data sheet (pdf). You will need to refer to this as you build the circuit(s). And here’s our subject in real life:

For our demonstration display we’ll be using a vintage HP 5082-7415 LED display module. However you can use almost any 7-segment modules as long as they’re common-cathode – for example, Sparkfun part number COM-11405. If you’re using a four-digit module and want an extra digit, you can add another single digit display. If you want a ruler, the design files are here.

Connecting the MC14489 to an LED display isn’t complex at all. From the data sheet consider Figure 9:

Each of the anode control pins from the MC14489 connect to the matching anodes on your display module, and the BANK1~5 pins connect to the matching digit cathode pins on the display module. You can find the MC14489 pin assignments on page 1 of the data sheet. Seeing as this is chapter fifty-one  – by now you should be confident with finding such information on the data sheets, so I will be encouraging you to do a little more of the work.

Interesting point – you don’t need current-limiting resistors. However you do need the resistor Rx – this controls the current flow to each LED segment. But which value to use? You need to find out the forward current of your LED display (for example 20 mA) then check Figure 7 on page 7 of the data sheet:

To be conservative I’m using a value of 2k0 for Rx, however you can choose your own based on the data sheet for your display and the graph above.  Next – connect the data, clock and enable pins of the MC14489 to three Arduino digital pints – for our example we’re using 5, 6 and 7 for data, clock and enable respectively. Then it’s just 5V and GND to Arduino 5V and GND – and put a 0.1uF capacitor between 5V and GND. Before moving on double-check the connections – especially between the MC14489 and the LED display.

Controlling the MC14489

To control the display we need to send data to two registers in the MC14489 – the configuration register  (one byte) and the display register (three bytes). See page 9 of the data sheet for the overview. The MC14489 will understand that if we send out one byte of data it is to send it the configuration register, and if it receives three bytes of data to send it to the display register. To keep things simple we’ll only worry about the first bit (C0) in the configuration register – this turns the display outputs on or off. To do this, use the following:

digitalWrite(enable, LOW);
shiftOut(data, clock, MSBFIRST, B00000001); // used binary for clarity, however you can use decimal or hexadecimal numbers
digitalWrite(enable, HIGH);
delay(10);

and to turn it off, send bit C0 as zero. The small delay is necessary after each command.

Once you have turned the display on – the next step is to send three bytes of data which represent the numbers to display and decimal points if necessary. Review the table on page 8 of the data sheet. See how they have the binary nibble values for the digits in the third column. Thankfully the nibble for each digit is the binary value for that digit. Furthermore you might want to set the decimal point – that is set using three bits in the first nibble of the three bytes (go back to page 9 and see the display register). Finally you can halve the brightness by setting the very first bit to zero (or one for full brightness).

As an example for that – if you want to display 5.4321 the three bytes of data to send in binary will be:

1101 0101 0100 0011 0010 0001

Let’s break that down. The first bit is 1 for full brightness, then the next three bits (101) turn on the decimal point for BANK5 (the left-most digit). Then you have five nibbles of data, one for each of the digits from left to right. So there’s binary for 5, then four, then three, then two, then one.

digitalWrite(enable, LOW); 
shiftOut(data, clock, MSBFIRST, B11010101); // D23~D16 
shiftOut(data, clock, MSBFIRST, B01000011); // D15~D8
shiftOut(data, clock, MSBFIRST, B00100001); // D7~D0
digitalWrite(enable, HIGH);
delay(10);

To demonstrate everything described so far, it’s been neatly packaged into our first example sketch:

// Example 51.1
// Motorola MC14489 with HP 5082-7415 5-digit, 7-segment LED display
// 2k0 resistor on MC14489 Rx pin
// John Boxall 2013 CC by-sa-nc
// define pins for data from Arduino to MC14489
// we treat it just like a 74HC595
int data = 5;
int clock = 6;
int enable = 7;
void setup()
{
 pinMode(data, OUTPUT);
 pinMode(enable, OUTPUT);
 pinMode(clock, OUTPUT);
 displayOn(); // display defaults to off at power-up
}
void displayTest1()
// displays 5.4321
{
 digitalWrite(enable, LOW); // send 3 bytes to display register. See data sheet page 9
 // you can also insert decimal or hexadecimal numbers in place of the binary numbers
 // we're using binary as you can easily match the nibbles (4-bits) against the table
 // in data sheet page 8
 shiftOut(data, clock, MSBFIRST, B11010101); // D23~D16
 shiftOut(data, clock, MSBFIRST, B01000011); // D15~D8
 shiftOut(data, clock, MSBFIRST, B00100001); // D7~D0
 digitalWrite(enable, HIGH);
 delay(10);
}
void displayTest2()
// displays ABCDE
{
 digitalWrite(enable, LOW); // send 3 bytes to display register. See data sheet page 9
 // you can also insert decimal or hexadecimal numbers in place of the binary numbers
 // we're using binary as you can easily match the nibbles (4-bits) against the table
 // in data sheet page 8
 shiftOut(data, clock, MSBFIRST, B10001010); // D23~D16
 shiftOut(data, clock, MSBFIRST, B10111100); // D15~D8
 shiftOut(data, clock, MSBFIRST, B11011110); // D7~D0
 digitalWrite(enable, HIGH);
 delay(10);
}
void displayOn()
// turns on display
{
 digitalWrite(enable, LOW);
 shiftOut(data, clock, MSBFIRST, B00000001);
 digitalWrite(enable, HIGH);
 delay(10);
}
void displayOff()
// turns off display
{
 digitalWrite(enable, LOW);
 shiftOut(data, clock, MSBFIRST, B00000000);
 digitalWrite(enable, HIGH);
 delay(10);
}
void loop()
{
 displayOn();
 displayTest1();
 delay(1000);
 displayTest2();
 delay(1000);
 displayOff();
 delay(500);
}

… with the results in the following video:


Now that we can display numbers and a few letters with binary, life would be easier if there was a way to take a number and just send it to the display.

So consider the following function that takes an integer between 0 and 99999, does the work and sends it to the display:

void displayIntLong(long x)
// takes a long between 0~99999 and sends it to the MC14489
{
 int numbers[5];
 byte a=0; 
 byte b=0; 
 byte c=0; // will hold the three bytes to send to the MC14489 

 // first split the incoming long into five separate digits
 numbers[0] = int ( x / 10000 ); // left-most digit (will be BANK5)
 x = x % 10000; 
 numbers[1] = int ( x / 1000 );
 x = x % 1000; 
 numbers[2] = int ( x / 100 );
 x = x % 100; 
 numbers[3] = int ( x / 10 );
 x = x % 10; 
 numbers[4] = x % 10; // right-most digit (will be BANK1)

 // now to create the three bytes to send to the MC14489
 // build byte c which holds digits 4 and 5
 c = numbers[3];
 c = c << 4; // move the nibble to the left
 c = c | numbers[4];
 // build byte b which holds digits 3 and 4
 b = numbers [1];
 b = b << 4;
 b = b | numbers[2];
 // build byte a which holds the brightness bit, decimal points and digit 1
 a = B10000000 | numbers[0]; // full brightness, no decimal points

 // now send the bytes to the MC14489
 digitalWrite(enable, LOW);
 shiftOut(data, clock, MSBFIRST, a);
 shiftOut(data, clock, MSBFIRST, b);
 shiftOut(data, clock, MSBFIRST, c); 
 digitalWrite(enable, HIGH);
 delay(10); 
}

So how does that work? First it splits the 5-digit number into separate digits and stores them in the array numbers[]. It then places the fourth digit into a byte, then moves the data four bits to the left – then we bitwise OR the fifth digit into the same byte. This leaves us with a byte of data containing the nibbles for the fourth and fifth digit. The process is repeated for digits 2 and 3. Finally the brightness bit and decimal point bits are assigned to another byte which then has the first digit’s nibble OR’d into it. Which leaves us with bytes a, b and c ready to send to the MC14489. Note that there isn’t any error-checking – however you could add a test to check that the number to be displayed was within the parameter, and if not either switch off the display (see example 51.1) or throw up all the decimal points or … whatever you want.

You can download the demonstration sketch for the function – Example 51.2, and view the results in the following video:

You can also display the letters A to F by sending the values 10 to 15 respectivel to each digit’s nibble. However that would be part of a larger application, which you can (hopefully) by now work out for yourself. Furthermore there’s some other characters that can be displayed – however trying to display the alphabet using 7-segment displays is somewhat passé. Instead, get some 16-segment LED modules or an LCD.

Finally, you can cascade more than one MC14489 to control more digits. Just run a connection from the data out pin on the first MC14889 to the data pin of the second one, and all the clock and enable lines together. Then send out more data – see page 11 of the data sheet. If you’re going to do that in volume other ICs may be a cheaper option and thus lead you back to the MAX7219.

Conclusion

For a chance find the MC14489 is a fun an inexpensive way to drive those LED digit displays. We haven’t covered every single possible option or feature of the part – however you will now have the core knowledge to go further with the MC14489 if you need to move further with it. And if you enjoy my tutorials, or want to introduce someone else to the interesting world of Arduino – check out my new book “Arduino Workshop” from No Starch Press.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

The post Tutorial – Arduino and MC14489 LED Display Driver appeared first on tronixstuff.

Flight Suit V3

The next version of the LED Flight Suit marches forward with WM, lots of headway on key components:
  • Three 16-channel, 12-bit pwm PCA9685 chips will operate MOSFET's to switch 48 LED strips.
  • Small sot23 smd MOSFETs (or these); the old ones (P16NF06's) were too overkill, too big. Overkill is still good but there's some math this time.
  • RC batteries for more power: peak 14.8V and 12A no problem, but will be <500mA most of the time.
  • Thinner, lighter LED strips with 120 LED's/m.
  • Arm-based remote control with a 1.3" OLED screen, dials/buttons/sliders/TBD.
    • The remote control will hopefully be a second Arduino-based system, a serial peripheral to the main suit system.
  • Multi-band audio analysis with MSGEQ7 or a separate Arduino FFT.
Most importantly WM is coding Arduino!  He already built a complete mode-switching, parameter-adjusting system with a figure diagram on-screen!  

We'll make the suits themselves-- the displays with LED strips-- when we have a working circuit and software: we don't know where everything's going yet.  So for a demo display I'm making a circuit board showing all 48 PCA9685 outputs on LED bars-- old school.  Here's the one I'm scrapping-- got too much rework:



and here's an MSGEQ7's output, from iphone audio, of seven values on a Sure Electronics 24x16 panel:



That display will also help when debugging and building the system.
Jeff's Arduino Blog 11 May 20:17