table look-up by rotary encoder w/segmented display & NFC

This is my first Arduino project and I am looking any help from component suggestions to best (or better) practices to feasibility to libraries, methods, and such.

The device essentially prints a table look up on a segmented display based on position of a rotary encoder. The user interface will consist of a single button, a rotary encoder, and an 8 char, dimmable, display. The data set to display will be up to 300, 8 chars messages. The data set is to be user updated. It can use a serial port communications for now, but the intention is to use NFC.

Use case:

  • User uploads table of 300 8 character messages to the Arduino from their NFC enabled smart phone (or for now, via serial port).
  • Device shuts off after timeout.
  • User activates device by turning the knob.
  • User sets or “zeros” the Arduino device by turning the knob to the desired position and then pressing the button in a certain way to lock the position in as position zero.
  • User selects a knob position.
  • The corresponding message is displayed - corresponding as in encoder position 3 from zero relates to the third row or message.
  • User adjusts the brightness coefficient that the auto-dimming display uses via some combination of button presses and/or knob turning.
  • Device shuts off after timeout.

Communications. The encoder and the display will be separated, and perhaps the NFC component as well, from the Arduino but 1-10 cm. While the encoder is not too big of a deal, I do not want 60+ wires running through a very confined space to the display. i2C? 1-wire? SPI?

A writable NFC tag could hold the data set and not require the device to turn on in order to update the data, but could the “firmware” be updated via the passive tag? Could I use the writable tag as external storage and never copy the table to the Arduino?

Anyone with NFC experience that can recommend methods and components?

Encoder. The encoder axle has a resolution and spline count of 120. For 300 positions, the rotary encoder must be multi-turn. The encoder position will have a “field set” zero. If the spline lines up in between an encoder pulse it might mess things up. What’s wrong with having a 1000 pulse per revolution encoder and then programing a change in position requires 6-10 pulses?

Memory. How much memory does 300 8 digit messages take? what about 300 8 alpha numeric messages?

Being a multi-turn encoder, I do not think I can find an absolute position encoder (?) so I will need to count the position changes, but the count needs to survive a power down (low-power requirements). While the table will not be updated 100,000, the count will be. I could do some write leveling on the EEPROM or does the the flash memory survive the power cycle? If so, what is the value of EEPROM?

Display. 8 char display or an 8 digit display. It seems like a big jump from 7 segments to 14 segments. But the alpha char could be more user friendly even if not required.

I am looking at segmented LEDs because I think they are more power efficient (?), because I think I can use PWM to control the brightness (even if they are multiplexed?), and because I think I can use the LEDs to sense the ambient light. If I use an e-Ink display, then I will be on to a dedicated light sensor and a back light. http://www.nexternal.com/eink/6-x-14-starburst-p20.aspx

For my first build, the size is not terribly important, but it needs to be on the small side. Any suggestions on display and corresponding components & library?

Power. The device is going to be pretty dang small and there is no room for an AAA or 9v batt. There is one cr2032 and rehabs I can modify the chassis to have two cr2032. Can I run off of 3v or do I need 5v for the Arduinos that can do the above?

Any ideas on powering up from the encoder?

Misc. Ballpark numbers on how many hours this would take an mid-range/skilled (not me, a newb) person? The guess can exclude the NFC bit and rely on a wired serial connection only for the data set updating.

Which Arduino should I get? low power is nice, but I need:

  • enough surviving mem for the data set (unless the NFC tag can store it)
  • enough PWM pins if it is to be used on the display lighting
  • enough SPI pins if that is used on the encoder, NFC, and display + serial port
  • I want to use a USB connection for development, but that could be a separate device.

Thank you for your brilliant insights!
br, tom

This is framed suspiciously like homework.
When is our assignment due to be presented?

@AWOL: im not sure how to respond to that.

Who cares if it is homework? Are you claiming that participating in an open source style community would be cheating and you don't want to be an accessory? I guess that would depend on the details of the assignment and individuals involved.

This project is not homework of any kind. I'm not exactly sure why it what makes my post "framed suspiciously like homework". I am not trying to have a off-hand, casual conversation to pass the time. I have specific problem I want to solve and I am not sure how to do it. How can I expect in-depth and thoughtful responses, if I do not provide an in-depth and thoughtful post.

I am grateful to and have respect for community members that give of their time to share knowledge and experience. If my post appeared too deliberate it is only to be courteous. I find it much easier for me to help others when I fully understand the challenge at hand. I have also given the project considerable thought before posting so I could be as specific as I am.

If my post is not appropriate for this community, please direct me to examples of appropriate post and I will try to do better next time.

Who cares if it is homework?

A lot of us do. The reason for withholding help on homework assignments is that the assignee is supposed to the research/work, rather than asking other people to do it.

Too many people come in here expecting to be given answers that they should be researching and integrating on their own.

If I knew anything about NFC, I'd be happy to help with your problem. But, I don't, so I can't.

homework: If it some sort of morality judgment then I guess you need to ask posters to post their assignments and live the moral judgments of to the individuals withholding help. Morality is not an absolute truth for the masses and only for the individual (or only for some individuals).

For example, In the US posting a video of my kids lip syncing a song is stealing with $100,000 statutory fine for each instance of distribution, but in Spain it is perfectly legal and accepted to post TV episodes on your website - as long as your not commercially profiting or as long as your an information service where users posted the video.

Only a teacher or professor stuck in yesteryear would require students to work in a box rather than connected with the global network of non-market players such as open source prosumers. But if they do that, fine. And if a student still asks for help with the homework in a public space than fine. Its not for me to judge or regulate that particular student's morality and the knowledge I share in the public space still increases the value of the commons.

My little brother is in his last year of college and I tutored him in one of his programing classes all last semester. I did not take way from his learning experience. He violate his school's strict honor code. I benefited from the service and from the refresher (it was not in public so the commons was not a factor).

Great, four immediate follow up posts and not a single one about the subject at hand. Perhaps, I should have just responded to AWOL with a single, binary, 0. I suspect this thread will be about homework and while I too would be bothered by some slothful student shirking his/her work on to me, I am also bothered by this concept of if your a student and if your working on homework, go somewhere else.

I am also bothered by this concept of if your a student and if your working on homework, go somewhere else.

We help plenty of people with homework assignments, as long as they are up front about it, and are not asking us to do the work. If six people in the course of a week post questions and code snippets that look remarkably similar, then the individuals are not doing their part and leaning to program. At that point, a lot of us stop replying.

On the other hand, if someone comes in and says that need help with a homework assignment, and that the problem is understanding how to interpret a data sheet, or how to select an appropriate sensor, or how to choose the right transistor or resistor or capacitor, when the question is only peripherally related to the assignment, we're happy to help.

You were quick to take offense at the question. A simple "No, it is not homework" would have been sufficient.

@tomdavidson

Let see if I can help. About the display, a 7 segments type of display consume to much currents, ( like all led's on at 10 mA ) so I will choose a LCD , serial type ( less wire ). About the encoder, may be if I can see what type of encorder you are talking about ( I not experience, yet about encoders using the arduino ). About the power, those batteries cr2032 will be ok, I guess... you need +5 V , 3 of these battery = 9 V , going to the Arduino Vin. The Ardiuno board, I will use a UNO - if the numbers of pins is just fine, if not, I will use a Mega, more pins. But to be small, well not so,so... maybe a Nano might fit the size requierment, it work like Duemilanove ( same as an UNO except for the USB circuit ).

You where talking about 300 * 8 char = 2400 bytes if you need to store in a memory.

Anyway, my 2 cent. I am doing my best to be helpfull.

I really have no problem with people asking homework or research questions on the forum.
However, all too often the question is asked, answered and we never hear anything further from the poster; they make no further contributions to the community, and likely do not give proper attribution.
In more amusing cases, the poster offers financial inducement to complete their late assignments.
If we're lucky, the course lecturer will make a forum appearance.

Here's some advice about rotary encoders. The lowest cost ones are mechanical, usually with 8 to 24 detents per revolution, and do not provide absolute position. Not a problem if you are storing the absolute position in EEPROM during power down. These encoders mostly provide 4 states per detent, but some only 2. You can find code to drive these encoders in my miscsolutions blog. They need 2 Arduino input pins, although you can use diodes to multiplex them with other inputs (e.g. push buttons) if you are short of pins.

You can also get mechanical encoders that provide absolute positioning and have 256 states per revolution but only 128 detents. They provide 8-bit Gray code output, so they need 8 Arduino pins or a shift register and 2 pins to read them.

Regarding storing data in EEPROM during power down, if you can detect the power down while still having enough energy stored (e.g. in a capacitor)to power the mcu for a few miliseconds, you can write the data to EEPROM only when power down occurs, thereby avoiding issues with limited numbers of write cycles.