Rotate a display depending on the current time

I have a little project in mind to surprise the wife with. Let me give you a little background:

She's a primary school teacher. Depending on which subject she is teaching at a given time in her class she has to use 3 different languages. So, for example, art is in English but Maths is in Spanish. This is not ideal as it can be confusing for the children (ideally you would use different teachers for the subjects in each different language) but it is the situation she has to deal with. She was trying to think of a way to make it clear to the children what language they were speaking in at a given time: Different hats, an armband, etc but as I pointed out, at the end of the day it is human nature to stop doing any of these things as it just ends up being annoying to have to change the piece of clothing every 50 minutes.

As a surprise I want to set up something with a low power draw (so it doesn't have to be plugged in but can run off batteries) that displays the language for a given class. My thoughts at the moment are as follows:

a) A screen of any kind is going to have a higher power draw so my idea is to build some kind of windowed box, sort of like a clock, with a disk printed with the corresponding flags to the languages and have an electric motor rotate said disk by the appropiate amount to display the correct language at each given time.

b) Whatever I use to control the motor is going to have to have a internal clock of some kind to be able to know what time it is at a given moment.

c) I am going to have to be able to program in the class schedule so it knows to what position to place the disk in at a given time. Because the class schedule changes depending on the day I can't just have it turn on for a set amount every X seconds.

d) the language for a given class doesn't always happen in the same order. It isn't always for example language A then B then another hour of B then C then A so sometimes I will have to turn the disk 2/3 of the way, others 1/3 sometimes have it still for two classes, etc. So either I will have to programme a routine for every single day or if it exists, find some way to detect what position the motor is in so I know how far I have to rotate to set a given language.

I do have to mention that while I am computer literate and hava used a soldering iron in the past, I am in no way experienced with this kind o thing. I intend this to be a fun summer project for me and a chance to learn some new skills.

I would welcome any advice on the feasibility of this project and any pointers in the right direction. Some specific questions I have are:

Is an Arduino the right device to control something like this? I wanted to avoid something like a raspberry pi as even though it is probably easier power usage is kind of a priority and I want to reduce it as much as possible.

Is even an Arduino overkill and if so, what other options do I have?

Do electric motors which somehow "know" what position their axis is in exist? If not are there any which know how many turns they have made so I can somehow, using gearing, have some kind of knowledge of the position of the disk at any given time.

Thanks

The basic task is simple, but to make it user friendly to operate is another thing - consider that the class schedules probably change and someone is going to have to program and reprogram it.

I would welcome any advice on the feasibility of this project

Sounds perfectly feasable.

Do electric motors which somehow "know" what position their axis is in exist?

Yes they are called servos, you can set the angle of the shaft, most have only between 180 to 270 degrees rotation.

A rotating disk display would work, turned by a low power, cheap stepper motor like the 28BYJ-48. The motor can be turned off when the desired position is reached.

Motors don't know their shaft positions, so you need some method of indexing the disk. Holes drilled in different disk positions work fine, and can be detected by optical devices like this indexer. You can make your own with an LED and a phototransistor, or get them out of an old ball-type computer mouse.

Rotate until the index hole is reached, then count steps until the desired disk position is reached. Any Arduino can do this.

Okay so by reading the current answers I guess I can either use a servo or a stepping motor.

By what I have read:

A servo is more expensive but comes with its own drive electronics so all I would have to do is connect it to the board.

If I use a stepping motor (which is cheaper) I would need, unless I am mistaken, a motor shield of some kind which is an added cost. I'm guessing that I'd be fine with one single indexing point and just have the disk rotate back to starting point every time between transitions.

If I can use recycled parts I'd prefer to do so, so I'd better start looking around. Maybe I can source a servo from a broken aquarium valve or similar.

Would a stepper motor from an old printer come with a driver board?

Thanks

I would need, unless I am mistaken, a motor shield of some kind which is an added cost

The link I gave includes a driver board, for less than $4

Project sounds totally feasible, and an Arduino will be a good controller for this. It's not overkill (a simpler microprocessor could do, but you lose lots of niceties such as easy programmability and so the Arduino has). A Raspberry Pi otoh is overkill for a project like this. Go for a Nano, as you can solder that on a protoboard for reliability.

The big problem you will run into is maintenance. How are you going to get the correct schedules? And who is going to charge the batteries? Even if only turning once every 50 minutes, those servos will take a hit on your batteries.

You'll probably need some form of real time clock - so the Arduino knows what time it is, and what day of the week. On weekends and during school holidays there is no need to change the clock.

For the programming, maybe the easiest is to add a (micro)SD card to it. This you can then take home and program: I'm thinking in the form of a simple file, which the Arduino reads and interprets, with a format like:

1, 1, english
1, 2, spanish
1, 3, english

Meaning: Monday, first hour, English. Monday, second hour, Spanish. Monday, third hour, English.

From when to when the class hours are of course you hard code. You can just switch it off for the holidays (the RTC will keep the time) to save on battery. Then every semester (I assume class schedules don't change that often) take home the microSD card and update the file.

jremington: The link I gave includes a driver board, for less than $4

Ah, so the ULN2003 is an actual driver board. I was confused by the fact they call it a test module board. As I said, totally new to all of this, so I apologize for the dumb questions ;-)

Sound like that is probably going to be the best option then, by what I have just been reading on steppers vs servos.

So I'm guessing now it's all about finding the cheapest, less power hungry setup that has a microcontroller, real time clock and something to interface with it.

Cheers

I think we're far beyond concerns of being overkill when a piece of paper printed on both sides does the job and she flips it accordingly.

How about just a sign with "English" and "Espanol" text always visible, with indicator LEDs and a button to switch back and forth?

If flipping a piece of paper is too monumental a task, or a button push too much to ask, well there's always the option of making the kids do it.

Nibinin: Okay so by reading the current answers I guess I can either use a servo or a stepping motor.

You could also use a plain DC motor and mount some pairs of small magnets on the rotor and sense them with hall switches, in effect creating a low resolution absolute encoder. With combinations of 01,10, and 11 the Arduino could know which panel is facing out. Just start the motor and monitor the switches. When the desired combination appears - stop.

This would also be immune to a loss of position due to power failure.

INTP: I think we're far beyond concerns of being overkill when a piece of paper printed on both sides does the job and she flips it accordingly.

Of course this won't work. She has to deal with THREE languages, and I've never met a piece of paper with THREE sides. There's your problem! A piece of paper is totally inadequate for this.

Then it is of course always fun to come up with a high tech solution to a low tech problem. If only as excuse to buy more toystools.

How about just a sign with "English" and "Espanol" text always visible, with indicator LEDs and a button to switch back and forth?

OK, joking aside. This probably won't work well for other reasons. There's the LED that's always on, and needs to be pretty bright to be visible in daylight conditions (classroom), so a significant battery drain. Also the problem is that there are always three signs visible, with just the LED difference. That's not good from a user POV, as it's confusing. The unused signs should be completely hidden from view, so a cursory look to the display shows exactly what the user (the school kid) needs to know, and nothing more. That is much clearer.

Thanks for the answer wvmarle.

The class schedule changes once per school year so reprogramming it shouldn't be an issue. When she brings it home at the end of the year I can just reprogram.

I hadn't considered running it off a card reader but you make a good point. Especially if I find myself in the position, and knowing my wifes school I might, of having to build 30 of the damn things because the headmaster likes it. It would make setting the schedules for the different classes a lot easier. It would probably increase the power draw by quite a bit though.

I was assuming that power draw would be a lot lower than I thought and it looks like I'm going to have to do quite a bit more research.

Maybe I should be looking into some of the low power Arduino based boards out there.

dougp: 01,10, and 11 the Arduino could know which panel is facing out. Just start the motor and monitor the switches. When the desired combination appears - stop.

You need a third sensor for this: 101, 110, 111. This way the first 1 indicates that you have reached a position, otherwise you can not distinguish between a correctly aligned 10 and incorrectly aligned 01. Of course this assumes you always turn in the same direction; if turning in both directions you need a fourth position so you know you're aligned when the first and the fourth read 1.

Nibinin: [an SD card reader] would probably increase the power draw by quite a bit though.

Not necessarily as you would read the file upon startup only (in the setup() stage of your sketch) and store it in memory. The rest of the time it's idle and there is no need for the SD card reader to use any power over standby. Do check the datasheets on them.

I glossed over there being 3, following sentence only mentioned 2 and that stuck in my mind.

Regardless, the goal here is to save someone the immense trouble of moving a piece of paper, and instead make them worry if the device will do what it is supposed to. Tip: make this gadget accommodate a manual override. E.g., in your spinny disk example, imagine your device fails or a surprise sched occurs (assembly, fire drill, guest speaker), and someone moves the disk to correct it.

Manual override - good one.
I’d go for a switch with four settings: auto, language 1, language 2, language 3.

INTP: I think we're far beyond concerns of being overkill when a piece of paper printed on both sides does the job and she flips it accordingly.

How about just a sign with "English" and "Espanol" text always visible, with indicator LEDs and a button to switch back and forth?

If flipping a piece of paper is too monumental a task, or a button push too much to ask, well there's always the option of making the kids do it.

The first reason to do it is: because why not? As I mentioned, I am considering it a fun summer project and an excuse to learn new skills. In fact, since I have just gone back to university to study agricultural engineering and will be taking a few courses on automation in the future, this will be a way to dip my toe into this field. So yay, fun and learning at the same time.

The second reason is that this is going to be hung up above the whiteboard. She can't have 6-7 year olds climbing up on a chair to turn it and I don't want her doing it either. If I can avoid her climbing up on a chair 6 times a day then that's 6 times a day less she risks falling (and since we're planning on having kids soon I CERTAINLY don't want her climbing up while pregnant).

The third reason is that we'll probably make it a class project and have the kids decorate the outside box in some way. In fact, if I find a good setup for this, and since the school has computer science and electronics as part of the curriculum from age 6 up to 16 I'm sure we could turn this into some kind of project for the older children to do for all the classrooms.

It could probably be set up to work with a button push, but if there are 3 and in some cases 4 languages used in a classroom, wouldn't I need some kind of microcontroller in any case to be able to do partial turns? Hmm, I guess just having a button you press continuosly until the correct flag is visible would be so so much simpler..

Damn, now you have made me doubt myself. I tend to be an advocate for the simplest solution to a problem but I had got myself slighly excited about doing this. I think I might have to step back for a second and maybe consider finding an alternate summer project and just going the simple route for the language sign.

Nibinin: It could probably be set up to work with a button push, but if there are 3 and in some cases 4 languages used in a classroom,

OK, you got me there. What kind of school is that?

Hmm, I guess just having a button you press continuosly until the correct flag is visible would be so so much simpler..

Not really as you have to stop at the right time. Having it move forward with a single press of a button and then have an Arduino (they're cheap anyway) handle the movement does improve on the usability. If it's moved manually, you can even go for a simpler processor such as an ATtiny (they're really cheap - but harder to work with - though if you need to make 30 of them it's going to be some big savings). You only need four inputs (the three hall sensors + the push button) and one output (to the motor).

For your power supply: get a USB adapter and a long wire from the nearest power plug to your installation.

wvmarle: You need a third sensor for this: 101, 110, 111.

Not if the magnets are placed on a single radius say, an inch apart.

  0      1   posn 1  \    0º
  1      0   posn 2  |--- 120º --------------  center of the wheel
  1      1   posn 3  /    240º

  H1     H2  sensors

In this way both magnet positions will sweep both sensors at the same time.

Make it work with a button, first. It's a usable solution, and has enough challenges of its own for a beginner. Power source seems to be a big question often overlooked. Obviously batteries have their limit, so you have to continue down the path of wall power- in a public building, with the lives of many children in the equation, nonetheless, which has its own accompanying maze of liability. (What if your device trips a breaker, causes a fire, small piece comes off and a kid chokes on it, etc etc)

Automation is a fine goal, but really is a step far down the line in this project. Once you have a working model with manual input via the button, then you will be at the point where the project is automating the button pushing.

Side note, the display being out of reach has the benefit of not having to accommodate a manual change, I'm sure if the displayed word is wrong for the period, the teacher would just dismiss it instead of spending time trying to fix it. Likewise I don't think children are so braindead that they can only speak whatever is on the display due to conditioning or unable to understand instructions contrary to it.