Introduction: PoViOt-Stick: POV-stick With Browser Control
(Note to myself, fix that connection photo, serves no useful purpose since It's so blurry)
While playing around with cubes, matrises and ESP8266's, I came up with this idea of internet-controlled POV-stick. I really don't know what this thing is called...but it "draws" text and images on, air?. Yes, it is possible thanks to POV-illusion, persistence of vision. If something flickers quickly enough (about >60hz). it appears to our human eye as image would be stationary. Cameras also which has ability to change light exposure timing, can make really cool and stunning looking pictures with this. Not me though, at least yet, I made this project purely as for exercise for coding and stuff like. Every geek must have toy/s.
- 7-segment display shows IP-address of this, stick.
- Bar display of 8-leds ((8 for now because mine fontmap, where code takes fonts, is 8-bits) MAYBE bigger and/or RGB version is also en-route.) shows text inputted and allows for "wave"-effect if user so wants.
- Internet interface allows text input from mobile phone (yes, you can amuse your friends with this when on trip)
- Plus, It's fully portable!.
Step 1: Material List.
It's like tv without monitor, quite useless and boring. Pick your flawor!
There are many variations of these little buggers (yup, they cause hair, and other droppings sometimes, BUT, I'll cover programming these in this 'ible too) I used ESP-01, chepest and smallest of this range as far as I know.
At first, I started with arduino pro mini. But, ram usage was whopping 70% with fonts installed. So, in final product, I ended on teensy 3.2. As well as increased power & memory over atmega328, teensy can power and "talk" (yeah, my teacher used that word when electronic components communicate between each other) esp's directly without logic level converter. Oh, and teensies aren't expensive.
Shift register that are used in daisy-chained manner to control 7-segment as well as bar display, only with 3-pins. if this sounds impossible, I have 8x8x8 led cube with same setup. 3 pins from controller. And It's connected to internet also.
Driving 74595's is easy, and troubleshooting is easier once you know basic princible.
Think 74595 as chain running different coloured balls, like pool balls, Each time clock is high, new ball is pushed on to production chain. this clock just keeps ticking. Data, determines what type of ball is going inside.
Since all storages has It's limits, q7_ serves excess data to oblivion, or to next shift register.
Data and clock are handled, latch just latches balls what are inside, and ignores now anything what clock and data will tell; doors in production chain are closed, nothing goes in, nothing goes out. Since we have tied OE to full-on, all is seen at all times what is happening in production chain, It is just SO fast (you can shoot data in 74595's as fast as you like. Pretty much like
5: uln2804 (uln2803 is TTL version, better for this application; but, I have used 2804 with no problems)
This is used to scan through, enable digits and bar display as they are needed. Bit burden off from microcontroller and 74595's. You don't need ULN2804, any other NPN-style transistor or N-fet will do, but you need 5-channels.
I used 1k ohm, that's safe and bit overkill but leds are bright enough...
7: 7 segment.
Funny, item # 7 is 7-segment. I used 4-digit, common CATHODE. I'ts crucial you know difference between CC and CA, cc bee'n easier to control/multiplex.
8: Power bank/battery+ needed accesories.
I was in luck, this powerbank I bought serves as battery enclosure. battery is just snap-in-place. So, in case battery goes dead, I can change new one. Or new battery bank...I used LI-ion battery, I'd suppose niCd or any other battery would do. Even lead battery but that would add some weight....unless you wan't to make realistic meteor shots (*ahem, I didn't say that....)
This is again pick-your-flavor. My creativity got lazy at store and I just bought some plastic project box since it accepted needed electronics inside. Plus, since It's plastic, I don't need antennae for ESP-module, and It's far easier to shape compared to metal enclosures. Only con compared to metal enclosure is that if EMI comes problem, it most certainly will be problem since I need to add shielding then. But, so far no EMI/interference problems whatsoever.
Step 2: More Hardware Related, Block Diagram and Shcmatics.
Simple block diagram is handy way to start designing ans serve as rough mind-map.
Due the possible format problems, here's text part:
7Segment(digit) to IC1 (Qx)
Dot -> Q0 A -> Q1 B -> Q2 C -> Q3 D -> Q4 E -> Q5 F -> Q6 G -> Q7
7Segment to darlington
Dig1 -> 18
Dig2 -> 17
Dig3 -> 16
Dig4 -> 15
Bar cathodes- -> 14
Teensy to IC1
2 -> Data (pin 14)
3 -> Latch(pin 12
4 -> Clock(pin 11)
As for teensy-ESP, grounds together as with full circuit, esp will be powered from 3v from teensy, and esp TX is connected to teensy pin # 0 Teensy is powered via 5v battery bank.
Please ask and comment if this part is confusing!
Step 3: Time to Fill Up Casket, Planning First.
This is perhaps challenging part of this project, find suitable case to be small enough to swing, but still big enough for all stuff inside. Argh!
Try to design so that stuff is organized inside box, it looks better, makes maintenance easier.
Of course, if you manage to get windowed enclosure, no holed needed for lid!
First part of planning was easy enough, battery bank on It's about-place, and cut vero-board, plus to confirm there is suitable area for cables to bank. Hooray!
Step 4: Building of Controller Board, Again, Planning.
Now that size of vero-board was known, it was time to start planning it.
I laid all part about-place again, and took photo (obviously....)
Step 5: Controller Board, Chore-time.
Now that planning was done, time to build and improvise on the way.
- FIrst, sockets for teensy, esp, and IC's. For ESP and teensy, I cutted female pin headers for custom sockets.
- Then, LED's. Used spacers to ensure at least close spacing.
- Wires for power and such. Test with multimeter at this point!
- Leds need power and resistors, so it was their time. I used SMD resistors to save bit space.
Now, that bargraph was done, It was good time to test it. First, again with multimeter, then, with power applied, checked voltage rails esp. for ESP.
After being sure nothing should disappear in smoke, time for small test-code for bargraph.
Since it worked, next was 7-segment, which is just hard-wired without any connectors.
It is connected paraller with bargrapg, DOT is lowest led towartd teensy, and G is highest.
Cathodes are connected to darlington.
Some might notice I didn't use pinout what I supplied earlier, but that is because I "had" to improvise.
Step 6: Again, Think Inside Box. or Outside?.
Now actually to put stuff inside enclosure.
Since LED's couldn't be moved, I drilled holes for them. Ended on 5.5mm.
7-Segment display was rectancular, so I made hole for it by drilling holed and then chipping away with knife.
Power switch is single-pole, and only cuts vcc.
For charigng port, it was annoying to make cable since micro-usb cable had so thin wires. Hot glue saved the day!
Step 7: Ready!
This thing looks best in darkness, and with camera that has adjustable light exposure time. I can't tell good timing, since as you can see from photo, I'm no guru with this...yet at least.
Step 8: Wait! What About Code?
CODE PART IS BIT (get it, bit?) UNFINISHED, fontmaps might be missing some characters and I'm working on to make pov-illusion more dynamic. Stay tuned!
ESP-code updated 12/december 2016. which now creates own network!
>>>>>>>>>>>>>>>>><>>>>>>>>>>END of NOTES<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Oh yes, to make your job bit easier, here's all codes for project, along with comments in-code. Have fun, and ask if you got any questions! I enjoyed this weekend project. Had code already roughly done from previous projects.
Oh, before I forget: when programming esp-01, pull GPIO-0 to ground when uploading new sketch on bootup with arduino IDE. And power from 3v3.
You can use really whatever microcontroller that can shift bits to shift registers and has some form of UART.
I ended using teensy purely for power & memory.
For arduino, change HWSERIAL to Serial, or software serial.
Step 9: Improvements Made!
Right, small improvements made, most notably adjustable speed via potentiometer. It is connected from 3v3 to teensy A0. Analog inputs in teensy ARE NOT 5V tolerant!.
Made smaller sketch that combines matrix and segment as libraries for better and neater UI.
We have a be nice policy.
Please be positive and constructive.