I am trying my very best to create my own split flap display using 224 modules (32x7). If you are not sure what that is, here is a short video explaining how they function.
I am going to use hobby grade continuous rotation servos (FS90R) because they are cheaper and quieter than stepper motors. I am also using I2C PCA9685 modules to drive 16 servos at once.
I am looking for a method of monitoring the position of each of the 224 servo motors simultaneously via I2C for simplicity. I looked at using regular rotary encoders, but haven't found any with more than 16 pulses per rotation. Each of the modules will have 60 letters to display, so 60 pulses is the minimum. I could use a 1:4 gear reduction from the drum to the encoder, but I was hoping to use absolute encoders so after the module is powered off, each of the modules will be able to remember what character is displayed when it was turned off. In a perfect world, I would have an absolute position encoder with 64 pulses per revolution to be used with this board capable of controlling servos at the same time.
The encoder controller I thought about using is this I2C encoder controller because it has 7 bridgeable jumpers to assign a unique I2C address and meets the minimum requirement of 224 individual addresses. It features GPIO pins in case I opt to use an incremental encoder and a limit switch to home each module and PWM pins to control the servo’s instead of the PCA9685’s. Please let me know if I’m mistaken for thinking this.
Another option I had considered was a magnetic encoder chip like the AS5600 by AMS as it features 4095 pulses per revolution and is compatible with I2C. Their datasheet however, says that each of the chips have a fixed I2C address, and can not be changed. Why would they make an I2C device and limit it to one?? If it is possible to multiplex this sensor, how will I be able to use 224 of them? A very attractive feature of this chip is they are cheap from China. About $2 per board.
Finally, I am concerned with the processing power of my genuine Arduino Nano. Will it have a problem receiving data from 224 encoder modules at once? Sending information to 224 servos at once in case I want all modules spinning at once? Here is the datasheet for the encoder controller. Unfortunately it is larger than 2MB and caused the forum to delete my original (much more in depth) post
Thank you for answers in advance, I'm sorry if I missed any information, I tried being as specific as possible
There exist simpler stop/go actors for such a display. Feedback is required only for the ending position, when the letter is fully shown, whereupon the motor stops. If another letter should be shown the controller overrides the stop condition until the motor continues running, advances the count to the next letter and waits for the next stop.
TomGeorge:
Hi,
The video clip is basically the simplest and in the long run possibly cheapest way to work them.
Your economy of motor type may cost you more in complexity to be able to determine what you have currently displayed and counting flaps.
Using a stepper, counting stepper steps it has made from the reference point will indicate the character displayed.
Tom...
Yes, that is the cheapest way to control them, but they are using a hall effect sensor and a non-I2C motor controller. They are just smashing code straight from the Arduino to the motor controller. This method is using 3 IO pins on the board, and it works, but for my application that just isn't feasible. I would run out of pins before finishing the first row.
DrDiettrich:
There exist simpler stop/go actors for such a display. Feedback is required only for the ending position, when the letter is fully shown, whereupon the motor stops. If another letter should be shown the controller overrides the stop condition until the motor continues running, advances the count to the next letter and waits for the next stop.
Could you give an example? I'm sorry, I'm not too sure what that means.
alianellj:
Yes, that is the cheapest way to control them, but they are using a hall effect sensor and a non-I2C motor controller. They are just smashing code straight from the Arduino to the motor controller. This method is using 3 IO pins on the board, and it works, but for my application that just isn't feasible. I would run out of pins before finishing the first row.Could you give an example? I'm sorry, I'm not too sure what that means.
Then use TPIC6B595 power shift registers as 28byj-48 motor controllers.
Three/four pins for the whole lot. See this thread (post 274).
Could also use (input) shift registers for the hall sensors.
224 of those modules sound like fun :o
I wonder if you have realized the time and money it will take.
SG-90 type hobby servos could indeed have a high failure rate.
Leo..
Geared DC motors can be driven by one MOSFET each, or multiple by a transistor array. A light barrier to the gate can enable the driver except in the stop position. This way a single pin can be used to start a motor, wait some time until the light barrier keeps the motor running, then switch to input mode to detect when the stop position is reached again.
Another light barrier can be added for the initial position, in parallel to the stop barrier, and powered only when the display should reset. Again all pins stay in input mode until all displays have reached the initial position and all motors have stopped.
Wawa:
Then use TPIC6B595 power shift registers as 28byj-48 motor controllers.
Three/four pins for the whole lot. See this thread (post 274).
Could also use (input) shift registers for the hall sensors.
224 of those modules sound like fun :o
I wonder if you have realized the time and money it will take.
SG-90 type hobby servos could indeed have a high failure rate.
Leo..
I skimmed through the BMW sculpture thread and looked at the simple wiring diagram they had. If I understand shift registers correctly, if I have 8 motors spinning and I want to turn off motor 7, I would trigger 11111101 with a cock pulse in between each number, and end with the LE line high? I have never used a shift register, from what I can tell, this may be the perfect solution. I watched this video to learn more about them. Would it be a good idea to switch the power of a ULN2003 module as if it were an LED in order to turn off the motor, or is this the job for a mosfet? Would I be able to accurately predict the location of the shaft by simply powering the motor for a known length of time given the pulse length of the controller? this is my interpretation of your idea, sorry for crudeness, I am far from home, I made a mistake, the data from the ULN should g directly into he motor, the mosfet is only for power.
With TPIC6B595 chips (one does two 28byj-48 motors) you don't need the ULN2003 (motors are cheaper without the drivers), and you can control step, direction and power off (no mosfet needed either).
28byj-48 motors have (about) 2048 steps per revolution.
Picking the right letter/number is just a matter of stepping the motor the right amount of steps from zero reference.
The digit positions also stay of course in the Arduino as long as you leave the power on,
so maybe better to think about battery backup instead of absolute encoders.
Leo..
Or store the last position moved to in FRAM. Fast to write to, nonvolatile like EEPRPOM.
10 trillion write capability. 10,000,000,000,000.
The 28byj-48 are nice & quiet.
Here is one running from a TPIC6B595
Could take a while to acquire 224 of them. I had to order from several sources on Amazon to eventually get 96 of them.
Here are 16 running from a Mega and ULN2003s
Wawa:
With TPIC6B595 chips (one does two 28byj-48 motors) you don't need the ULN2003 (motors are cheaper without the drivers), and you can control step, direction and power off (no mosfet needed either).
28byj-48 motors have (about) 2048 steps per revolution.
Picking the right letter/number is just a matter of stepping the motor the right amount of steps from zero reference.
The digit positions also stay of course in the Arduino as long as you leave the power on,
so maybe better to think about battery backup instead of absolute encoders.
Leo..
Wow that is such an interesting idea I hadn't though about using a battery! I will definitely look into the TPIC6B595 over the next few weeks before going home. I will also look for someone else on the forum using the same chip for those motors. I do not mind using those smaller motors as their vibrations are a lot lower than say a nema 17 from what I can tell through videos. Not to mention you can get those on AliExpress for ~$1.48 Nemas are usually ~$7 for just a pancake one. Something that does worry me a little is just from a 2 second google search is there doesn't seem to be many commercially available options for pre-made boards using this chip.I found a schematic for a breakout board though. Ill have to do some research on circuit design and get something from JLCpcb. I really appreciate the help Wawa, you changed the entire electronic design of this project lol.
Could take a while to acquire 224 of them. I had to order from several sources on Amazon to eventually get 96 of them.
Here are 16 running from a Mega and ULN2003s https://www.youtube.com/watch?v=Q8PkozbHJFc
Seems like anyone looking for them may have some luck on DigiKey if you were referring to just the chip.
So many good suggestions! I don't know very much about writing things to FRAM, but its again something I hadn't even considered that I will definitely give a try. Plus, its my favorite price, Free! Are there any kind of limits I'm not seeing by using these power shift registers? Or will I have no problem creating a system for 224 motors?
12 chips was selected to fit into a 10mmx10mm board (originally designed to drive up to 12 LED digits that needed high current and/or high voltage).
Plug on an FTDI Basic for downloading code, can daisy chain their SPI signals also.
Might might want to buffer the control signals every couple of boards to maintain signal integrity if you are running a really long string of them.
224 motors @ 2 motors/chip = 112 chips, @12 chips/board = 10 boards.
24 SMD chips has been demo'd also. I don't know if Wawa offers those for sale.
A motor needs a minimum pulse width to actually move a step, I think I found 1672 micoosecondss worked well with light motor loads (Christmas ornaments).
Wawa:
Did you see the 48-motor board (24 TPIC6B595 smd chips) in post#274.
I did after you said something, I quite like how similar that project is to mine and its nice to see someone have success using this chip. I like that the electronics are unbelievably simplified. I don't understand how they were homing the position of the ornaments, I saw something mentioning they were homed at the start of the video, but didn't see how electrically or mechanically.
CrossRoads:
If you want DIPs, I offer a board with 12 chips and '328P processor.
12 chips was selected to fit into a 10mmx10mm board (originally designed to drive up to 12 LED digits that needed high current and/or high voltage).
Plug on an FTDI Basic for downloading code, can daisy chain their SPI signals also.
Might might want to buffer the control signals every couple of boards to maintain signal integrity if you are running a really long string of them.
I've never had the opportunity of working with SPI, With those boards, would I be using 1 master Arduino and use the 328P's as slave modules? I like that those boards offer the ability to offload processes from the master microcontroller. Might also be useful for when I want all motors to begin spinning at once for a cool effect. Wont have to wait for all chips to be addressed by one MC.
CrossRoads:
224 motors @ 2 motors/chip = 112 chips, @12 chips/board = 10 boards.
24 SMD chips has been demo'd also. I don't know if Wawa offers those for sale.
A motor needs a minimum pulse width to actually move a step, I think I found 1672 micoosecondss worked well with light motor loads (Christmas ornaments).
I don't mind DIPs or surface, I have virtually unlimited space when working with this project. DIPs would be easily replaceable if one burns out after a few years or something. Like Wawa said, I would only start with one module so I would only need one board. I just realized the video titled "6 Motors from TPIC" was you! 28byj-48's have 5 wires, and your chips only have 9 pins for output. Do the motors share a ground pin? If you have the example code from that video I would love love to see it.
TPIC chips have eight outputs, with open drain mosfet switches to ground (unlike the 74HC595).
The common pin of the motors all connect to a 5volt supply, and the chip switches the other four motor wires to ground in the right order to step. There are several ways to step. Full step, activating one coil at the time (low torque/noise), might be the best mode in this case. That also greatly reduces power supply size requirements.
"motor off" is just a matter of writing a HIGH to the four outputs.
With SPI from a common Nano I could step 100 motors in about 2ms.
That's one step (all motors at the same time) per loop, including all the calculations.
Study the code I posted in that #274 post.
Leo..
Wawa:
With SPI from a common Nano I could step 100 motors in about 2ms.
That's one step (all motors at the same time) per loop, including all the calculations.
Study the code I posted in that #274 post.
Leo..
Using your SMD board or crossroads? from what I could tell in the #274 post, the smd board was only smd chips and connectors on the other side. Ive never used more than one MC in a project, so treating the MC's on crossroads board as slaves will be a challenge, assuming that is a possible configuration.
At some stage you must make a choice to use one processor, or a master with multiple slaves.
I choose for the first option, CrossRoads choose the second option. Both have their advantages/disadvantages.
A single basic 16Mhz processor should powerful/fast enough to drive the whole lot (the flap displays are the slowest part), but ram size of a common Uno/Nano could be a problem with the large storage arrays needed.
I told you that up-scaling is not easy.
Things like fan-out and SPI/data wire length can become a problem too, that's why I choose a compact build of many chips together, and extending the motor wires instead of the data wires.
I would forget about 224 units, and build/code/use one first.
The experience gained there will help you with up-scaling.
Leo..
Wawa:
At some stage you must make a choice to use one processor, or a master with multiple slaves.
I choose for the first option, CrossRoads choose the second option. Both have their advantages/disadvantages.
A single basic 16Mhz processor should powerful/fast enough to drive the whole lot (the flap displays are the slowest part), but ram size of a common Uno/Nano could be a problem with the large storage arrays needed.
I told you that up-scaling is not easy.
Things like fan-out and SPI/data wire length can become a problem too, that's why I choose a compact build of many chips together, and extending the motor wires instead of the data wires.
I would forget about 224 units, and build/code/use one first.
The experience gained there will help you with up-scaling.
Leo..
I agree it's a good idea to build just one first.. do you offer the schemaitc or board in an online store?
CrossRoads:
My board is setup to have SPI come in and be passed along, leaving the uC out if you want. Or keep it on the first board only.
I checked out your store crossroads and you make a lot of cool stuff! Depending on Wawa's board availability and cost I may be making an order for a kit soon