DIY IoT E-PAPER Message Board
HTML-код
- Опубликовано: 20 сен 2020
- Get your first 10 PCBs for free at www.pcbway.com/
This is a project I've been wanting to build for some time - it's a message board for your home or business which can be updated from anywhere! The Message Board uses E-Paper which is very low power and only uses power when it updates. Combining this with the Google Docs API and Google Developer Console, using a Raspberry Pi, it's possible to make a message board that polls a Google Sheet and updates when there's new data.
Links from this video:
www.waveshare....)
developers.goo...
www.analyticsv...
CAD and code: github.com/XRo...
You can support me on Patreon or buy my Merchandise:
***************************
Patreon: / xrobots
Merchandise: teespring.com/...
***************************
Affiliate links - I will get some money of you use them to sign up or buy something:
***************************
Matterhackers 3D printing supplies: www.matterhacke...?aff=7500
Music for your RUclips videos: share.epidemics...
***************************
Other socials:
***************************
Instagram: / xrobotsuk
Facebook: / xrobotsuk
Twitter: / xrobotsuk
***************************
CAD and Code for my projects: github.com/XRo...
Huge thanks to my Patrons, without whom my standard of living would drastically decline. Like, inside out-Farm Foods bag decline. Plus a very special shoutout to Lulzbot, Inc who keep me in LulzBot 3D printers and support me via Patreon.
HARDWARE/SOFTWARE
Below you can also find a lot of the typical tools, equipment and supplies used in my projects:
Lulzbot 3D Printers: bit.ly/2Sj6nil
Lincoln Electric Welder: bit.ly/2Rqhqos
CNC Router: bit.ly/2QdsNjt
Ryobi Tools: bit.ly/2RhArcD
Axminster Micro Lathe: bit.ly/2Sj6eeN
3D Printer Filament: bit.ly/2PdcdUu
Soldering Iron: bit.ly/2DrNWDR
Vectric CNC Software: bit.ly/2zxpZqv
Why not join my community, who are mostly made up of actual geniuses. There’s a Facebook group and everything: / 287089964833488
XROBOTS
Former toy designer, current RUclips maker and general robotics, electrical and mechanical engineer, I’m a fan of doing it yourself and innovation by trial and error. My channel is where I share some of my useful and not-so-useful inventions, designs and maker advice. Iron Man is my go-to cosplay, and 3D printing can solve most issues - broken bolts, missing parts, world hunger, you name it.
XRobots is the community around my content where you can get in touch, share tips and advice, and more build FAQs, schematics and designs are also available. Наука
Hey James, there is a type in python called list. You don't have to write out A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, ... you can just iterate over the list (for line in A:)
Yep, was also kinda annoyed by this hahaha
Same here, was pretty annoyed reading that code :D
also you can write a function that iterates over the list , and call it in multiple locations , instead of rewriting the iteration code
Same
@@fusseldieb I'm pretty sure you should be able to use a formula to generate a Hash code of a range of cells, all this could be done on the sheet then you would just need to compare the value
E-ink screens really don't fade. Ever. My Kindle DX hasn't had power in years, and is still displaying the "please charge me" screen, I've also got more recent screens that have been in my parts bin for the last year and haven't changed from the demo text that they shipped with.
Nice trick with the google sheet, it seems at first like overkill but it really does have a lot of nice properties once you get through the authentication mechanism.
It probably depends on the conditions it's stored in, one of which seems to be if it's not used for a long time in a humid climate.
I read that _"please charge me"_ like that one Portal 2 turret saying _"I'm different..."_ and it broke my heart.
PLEASE charge your Kindle :'(
My Kobo e-reader is still perfectly displaying it's image (it's set to display the cover of what I was last reading, along with a message saying it's powered off or on standby as the case may be)
It's certainly not years, but it has been a few weeks.
It's probably going on a decade old at this point, so the screen is quite old as well.
Yeah. While I don't doubt that there are environmental conditions that could degrade the image, for the most part, e-ink displays seem to be persistent indefinitely.
Better yet since he's using a google sheet; he could make a google form for super easy editing on the go. Just have one field with the content output the results to the sheet.
I believe the flashing is part of the clear routine that makes sure all the areas of the display reset properly. The movement of particles in the screen is physical so updating the same area with the same color too many times in a row could potentially bake in the state and make it difficult to change in future. It's also recommended you have a full screen refresh every few days or so to prevent ghosts of previous displays from remaining permanently. I haven't had the issue on mine yet but I believe that is the reasoning.
A Raspberry Pi Zero WH would be perfect for this.
Was more thinking about a ESP8266
@@Scorpion008 Yep, RPis are wayyyyy to overkill for this. Not even near perfect.
Thanks :)
It'd be nice to see this run off an esp32, though - with periodic deep sleep, even a small battery should suffice for quite some time :)
That sounds better, I don't think I would want an RP to run 24-7 just to update some text on a screen, but I also would not pay £50 for a screen.
4:10 - It won't fade. E-paper is essentially non-volatile storage, like hard-drives or flash-memory. The molecules have been oriented/aligned in a way that causes them to create black or white (or color) patterns, and they'll stay that way until they are re-adjusted. That's why it has to do the flashing thing to reset the display, it's readjusting all of the molecules together since it can't know which ones are in which orientation at the start.
I have noticed that with a three-color waveshare e-ink display that I have that if I do not run the display for *several years*, the image does very slightly fade, particularly around the edges.
That is the funniest IF statement I have seen. You know python can directly compare lists, right?
This screams ESP32 and batteries :) Should last quite a while of you only update it during the day.
*screams
Esp32s better
It never fades. I have a 2.7 inch waveshare display and the same image has been on it for around 18 months. They work great with ESP32s. And they have partial refresh. But don't do more than 10 partials before a full refresh or you'll get a permanent yellowish burn-in.
It's really nice to see you build something that even I could tinker with. Usually I watch because it's awesome stuff you're building, but now I also watched thinking I could make that. I'd love to see more of these sort of projects. Great video! Thanks
"So I used a Raspberry Pi..."
_Me, who replaces every RPi project with ESP32s:_
*I have been summoned*
Next step, partial e-paper update only for changed lines
An ESP8266 might even do it
Extremely low power consumption. You can make it deep-sleep and disable wifi until the next update, so you only use a few uA!!!
Make sure you post a Vid!
@@UrbanInsight ruclips.net/video/xnUqWcdtqyU/видео.html
@@trandi8 Sweet! Excellent Job! Youve gained a sub!
7:12 I think you forgot to black out your security key
Ahahaha! True, let's see what people will write him :D
I was just looking at that
Instead of polling the REST API every 5 minutes to see if there have been any changes, you can also attach an app script to your google sheet. You can setup this script to call a little rest API on your raspberry pi each time someone updates a field. This way the screen is updated instantly when you add something and you don't need to check every 5 minutes.
Trigger is definitivelly the way to go. Use a change trigger to generate a raster for the dimension of the screen and store this in the drive in a dedicated folder. When waking up the device will look for date/time of creation of the file, and if it is still the same get back to sleep. If this is a different date/time get the file and update the screen with it. As a result, replace the raspberry with any cheap MCU wifi enabled and run this on battery for months....
Hmm 15 variables, 15 lines of similar output code ....that is ugly. And I would honestly use hashlib ...to save hash, instead of prev values you need to compare with, but I guess whatever works.
Why bother saving the file every 5 minutes? Put it inside the if statement which checks for differences. So many details if we go for coding perfection.
deslomeslager I suspect the intention was deep sleep. Use an ESP 32, store the hash in the NV RAM then each wake you get the content, hash it, compare the saved hash and potentially redraw before going back into deep sleep for 5 minutes.
For what it's worth, it won't fade away. I've got an old e-reader, stuck on a page for a few years...
Couple of months ago, I re-arranged some furniture and found an e-reader I thought lost in 2011. No longer displayed an actual page, but it still had the "low battery" warning perfectly readable.
Ha James .. What a change of pace. I've played a lot with E-ink papers. Finally these things are affordable. I paid nearly $300 for my 6" a few years back. The price was mostly into converting the ereader screen to a serial input. Cool stuff.
Oh a few things I got after reading the documentary (a few month back).
1. You can bypass the waveshare API and update text directly. However you risk damaging the display. Because ... (see point 2)
2. Refreshes are used for maintaining the display.
3. You want to refresh the display every so often anyway, due to display might get damaged if not refreshed of long periods. Manual said at least once a month. (I think) But because even refreshing does not use much power* I would refresh it once a day or at least once a week even if nothing changes.
4. You can backlight it, because the display is rather transparent (and lets a good amount light through). I plan to put a bunch of WS2812B behind I can turn on and off and change color to highlight and indicate things. It drives up power consumption, but not but that much. And you could make some items on the list e.g. flashing red, or so.
*= (negatable compared to a Pi 4, still little compared to a Pi 0W, maybe when run on an arduino and put that into sleep mode when not updating it might be add up to something in comparison )
You missed blacking out a few of the addresses and api keys when you're showing the Google Doc API setup.
I've thought about doing exactly this, except I was going to use it to display my calendar.
That way it doesn't waste paper every year.
It could also have buttons to allow the user to zoom in on today
I would highly recommend this website to you china-epaper.com, DKE is an E-PAPER professional manufacture, price here is much cheaper than Wave Share the one this RUclipsr found, for instance, 7.5" he used is $53.99, DKE only sale for $39.
This. Me and my wife have had this idea for years but never done anything about it. It just needs to be able to display output and move left and right through the months. Data entry could be via Google calendar on smartphones. Digital calendars are great until the screen turns off and it's no longer glanceable!
Also, bad a the way it goes off a google doc and any invitees can make changes to the text. Really great way to make a public message board. Now, to interface more than one of them together and have the text seamlessly span across the borderless display. Maybe 4 of them as a start in 4 quadrants.
Every 10 minutes checking for an update is old school. There probably is a way to use a notification that will call your webhook whenever there is a change to the document. Then you can write the change more real time and use no bandwidth when nothing is happening. I would implement it in such a way that notification causes a refresh of the data elements and set a changed flag. On another thread, check every few seconds if change flag is true. If it is, check to make sure time since last screen update > threshold (say 15 seconds), and if it is update the e-paper and set changed to false and go back to sleep. That way your e-paper will update in seconds when the Google doc changes, but also won't update too frequently if there are constant updates. You will save on bandwidth and have a far more responsive display.
My brother is addicted to pcb's. Not even once kids. Not even once
Thank you, I’m about to make the same project as a gift, I’ll adapt your code to display an image from gdrive instead of the document you showed. You made my life a thousand times simpler. Thank you for your dedication 😁
A couple of years old now, a few people rightly saying use an ESP32. I've done something similar with the InkyFrame 5.7 from Pimoroni which uses a Pico W and real time clock so the Pico can go to sleep and not draw any power until it's woken by the RTC.
I wonder if someone could just hack an old Kindle to this purpose? They can be picked for very cheaply, and already have everything you need built in.
That could be done, but I've seen that Waveshare does also offer real e-reader displays (albeit without the additional stuff like touch, pen, and/or lighting) too.
Oh I'll check that out. I've seen 4th gen kindles on eBay for around £5 shipped so I might just pick one up to have a go at
You definitely could. The main difference is down to hobbyists versus hackers. A hobbyist can buy the kit, as James has done, have access to all the resources and community help, and learn as they go. A hacker must already understand the underlying principles, and has no access to resources since they don't exist. It's basically either end (or two points) of a learning curve.
_[Edit]_ Actually there may be _some_ online resources written by fellow hackers, since they have their own communities. If you're not sure how to proceed it's probably worth googling to see how much help is available before buying a second-hand Kindle.
@@nagualdesign I've found a few articles covering similar projects on hackaday so I think it's achievable
What's great is that you can actually take it with you when you go to the shops: no power needed
Cool idea. A quick look into the API docs I found a potential way to skip writing to the sdcard and really only update on either reboot or changes:
1. startup of the script
2. Get ntp time on you RPi
3. get the "modifiedDate" field for the file and its contents
4. Display it and save the value of modifiedDate in a variable
5. Every X minutes only get the modifiedDate property and compare it to its last value.
6. Fetch file and update display if the value of modifiedDate changed.
That way you could run all of it without writing if you like. Just make sure you catch exceptions e.g. if you internet connection is lost...
Just don't put any commas in your notes or it will break the read of the csv. The csv lib also supports writing so consider using that instead of manually adding commas. If you do, at least escape your text by putting it in double quotes: ".
Yes, great idea, great concept & execution, however I could power a standard 21" screen for a few years for the same cost as this e-paper screen (21" monitor @ 20W, powered on 24 hours/day 365 days a year @ 16p/kWh = under £30 a year! You could dim the display or turn it off during sleeping hours, so you could potentially half the running costs). You would still need the Pi to create an image anyway! Personally I'd rather build it into a mirror frame, plenty of projects & ideas for that. I'd make one if the display was bigger & cheaper as the cost savings for this use case over traditional LCD displays just aren't there!
Cool idea. For the sake of the SD card lifetime, it would probably be better to just read the csv and compare in memory and only writing a new one to SD when there is an update.
I'm pretty sure it doesn't actually change the sd card as he said , it just changes the on board memory , because if it did, you would be able to access it via plugging the sd into a PC , trust me , I've tried it , only thing we have access to is the system files of the pi
@@maskedredstonerproz the reason why you can't access the files on a pc is because windows doesn't support the file system the pi uses by default (ext4)
@@maskedredstonerproz It does. A quick look at the code - github.com/XRobots/IoT-Message-Board/blob/master/Code/v1/sheet02.txt - shows data getting written every single time the program is run.
@@laurinneff4304 so is there a PC OS that does actually support that , I want to know because I'd really like to access said files from a PC , imagine the things I could do , I'd have to do waaay less reflashes
@@maskedredstonerproz Linux supports it (usually ext4 is used on those), and other Unixes probably support it too (so all the BSDs, and maybe even macOS). You might also be able to find a windows driver online
Gdocs uses a version control system and you can be notified if someone changes the doc and run you code to update the display
You can, but then you have to always be listening for that notification, rather than only waking up every so often (every five minutes, hour, day, etc). That’s a great solution if your project is time-sensitive, like a to-do list that you want to update live, but isn’t as great for something that only needs to update once a day, like a weather forecast. If you only need to wake up the raspberry pi once a day, you can use a lot less power than keeping it on all the time; perfect for battery powered projects.
I accept any of these robots of yours as a gift, since here I cannot afford one.
Making the content scroll like terminal will also be cool
Sorry I meant airport terminal
I seem to enjoy all of your videos, the new IoT stuff is kind of nice. However I'm really here for the robotics! But then again having IOT robots doing cool stuff when sensors are triggered inside of a room, might be fun too.
Hey James, theres a cool service called python anywhere which allows you to run you python code in the cloud for free. A idea I had when watching this is that you could have a web server running remotely with all your reminders on it, this would allow you to have the everything working without the requirement of everyone needing a Google account to add reminders
I'm looking to use a regular monitor and one of those cheap microwave radar motion detectors to power up the screen only if someone is in the room
That's a great method.
i hope you buy a puppy and race in a speedboat before you pay your telephone bill.
Oh, that is a lovely wee project. Nice one, James...
Wow I figured you already were familiar with Python. It's so great for bodging things together it seems like it would be perfect for a lot of the cool things you do. Interested to see if you end up using it a lot going forward
I need to learn more ;-)
Would be interested to see a future video on making PCB's and sending them to PCBway as I'm still in stripboard land myself so that would be cool.
Good idea using e-ink for a message board!
The waveshare link is broken, missing a )
You could possibly send a message over MQTT, with the device listening for messages on a private channel and updating the screen only if a message arrives, may make it a little more efficient and would allow for you to set it to idle then wake up only when a message arrives
Very cool, I love how simple you make this seem!
Thankyou for sharing this knowledge, quite useful for small and medium businesses
doesn't really make sense to me to use such a low power device with something power hungry like a raspberry pi. You should really do it with an esp32 and deep sleep! Otherwise, awesome job, thanks for the video
I want to make an E-Reader with a 6" screen, could this be adapted with an RP Pico W? As I don't want Amazon spying on me and what I am reading. Thanks, Bob in the UK
My original kindle left in the cupboard kept its picture for years without fading.
Great project but it's way too small and the fact you can't use a pen like a whiteboard isn't nearly as useful.
Could you put multiple screens in series?
isn't it possible that the rasberryPi only checks the date for the last change of the document? I think that would be easier than checking the text.
The blinking is used to reduce "burn-in" on the screen
You could have used a hash of the contents of the document to compare if it has changed, would save some memory when the file gets bigger. Nice video!
Think this could be made using batteries so it can hang on a refrigerator like a post-it would? Not sure how long some 18650 cells or AA might last in it but I can see that on mine if that was possible.
Love the idea, but you should move your code to write to the CSV file into the IF block and only write if a value has been changed. Not sure if the library you are using is optimized for not writing a file that hasn't changed. This will prevent unnecessary writes to the SD Card.
It appears that the waveshare link is slightly malformed, as the closing parenthesis isn't part of the link.
Great project James, this is SUPER useful! It makes me want to invest in some larger e-paper displays. =]
Nowadays I'm expecting a MQTT interface whenever I read IoT.
It's OK to use a for loop in your python code.
Did you not use for loops for any paticular reason? would have vastly shortened your code, made it easier to modify and reduced the chance of errors.
Probably worth having a look at applied science video. Ben's hack does 3hz update rate and doesn't need to refresh or blank the whole screen.
Interesting demo and a nice little change from robots (cause why not? =D). Weird how they have to flash on and off so much to update. I've seen kindles and they seem to only need to do it once.
I wonder if you could build a cover for it that you could draw on? Set it up like a tablet with a docking station. Create a list of tasks or items to buy. Send it to the display. Undock the display and take it with you. As you complete a task, check it off the list. When all tasks are complete wipe off all the checkmarks and put the display back in the dock to update.
for loop?
Have you heard about habitica? I'd love the E-ink to use its open API to display your daily taskas.
Love your work, inspires me to be a more crafty Engineer
You can simplify getting the column values and writing them to just
wks = gc.open('worksheet name').get_worksheet(0) #0 is the index of the sheets in the worksheet
csv = open(filename, 'w')
for task in wks.col_values(1)[1:]: #i skip the first line of the column bc i use it as a title
csv.write(task)
csv.write(",")
csv.close()
1:09 Invented in the 70s is "recent"??? Use in e-readers ain't recent either, it's been used for over 15 years for that.
LoRa would work wonders here for low power updates.
I'm working on a project for my business that uses the Google sheets API. It's going to be helpful to take a look at your code and see what I can learn.
Glad it's useful - it makes a pretty ok platform for any IoT device since Google docs is so accessible
His code is not a good place to start. There are some pretty bad habbits in there. Id suggest taking a look at the google api docs.
I got esp working without 3rd party to WRITE data. But no reads yet. Sheets can also email you based on triggers (if checks of your sheets' data).
Loved this video 2 years ago. Is there a way to do this with a ESP 32?
I heard somewhere that the display need to (or rather should) be updated entirely every time you change the contents or otherwise the magnetic ink will lose/change? it's polarity. this is pretty much a "burn in" protection
You're saying it wrong. It's PCBWaaaaaaaaaaay.
PCBWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay
Always wanted to see a larger epaper screen. What about stacking several?
You could tile 4 of those 7.5 inch screens to make a bigger screen than the 10 inch one for much cheaper
Key at 7:15 is not blurred/censored...
I'm pretty sure it doesn't matter since the account only has read-only access to the file. Not sure if that's enough info to access it either.
@@jamesbruton It may be, not sure. Even then someone could burn through your access quotas
Wa hey don’t you use arrays, instead of 15 individual variables?
I had an idea/question that might work for a power supply and came back to your video to leave a comment just in case. You had mentioned in the introduction that a common place to leave notes like this is the refrigerator door with magnets. Could a Peltier module connected to the radiator on the back of the fridge generate enough power to update the display?
12:45 Actually I wanted to do a similar project* it even works on a Raspberry Zero (W), and while I am not experienced to do it, there is a way to get it run on a Arduino which would use even less power.
*=have basically the same display, but I think I got the 10'' version. Anyway developing did not go well for me since the Pi I used was too slow for that so I put it on hold till I had my hand on a Pi 4 for development. But in meanwhile forgot about it and got other projects in front of it
Any chance we can do this using the e ink display we get with psoc 6 ?
Why not just hash the data from the sheet and save the hash can compare to the new hash?
A1 to A15 would be a nice case to use an array and then loop over it for your rendering. Avoids some copy paste
How did you get into this kind of thing? I really want to get into robotics myself but don’t know where to start.
You should use nested for loops to avoid the A0..A14 massacre
Can't you get a whole Kindle for $55? Jailbreaking it would give you all the access and hardware you need.
Did you blank out the web address and display the security key?
What happens if the note is too long to display in one line of text?
A nice idea but I would look to not use a cloud effort, serious privacy issue for me. This would be better to implement around short mqtt messages.
Very good idea
Nice project. To check for updates, rather than comparing row by row why not just look for a change in md5 hashes between old and new csv files?
You could use python's and script's absolute paths in crontab and avoid the bash script.
Cool project! I think I might try my hand at it too. Personally, to update the contents, I would've pulled a temporary csv. Then I would compare the file hashes of the two files and if the temporary file hash was different, it would overwrite the permanent csv before discarding the temporary one... but, it's just another way of skinning a cat.
Not gonna lie , he almost had me pressing the invest button the first 30 seconds
Me gonna buy a lot of e paper display if it gets affordable eventually
helli James! hello from Qazaqstan!
Instead of storing the old values, wouldn't it be better to make a hash and use that for comparison?
Struggling not to count how many "Google doc" are here.
Anyways very nice project.
Instead of using bash script use "cron" or alternatives.
Or make it run in a background like normal "daemon" with some watchdog service to monitor it.
Its is fairly easy and more robust.
How do kindles have such big screens for there prices?
Mass production. I imagine that outside of mass applications where a client is buying hundreds of thousands from a manufacturer, these are a rather niche product, so they're very expensive in small quantities. Also, they're a rather new technology, so they haven't hit the commodity prices we're used to with other components.
i wonder how large a solar panel would need to be to maintain this
This runs on arduino but the arduino hasnt enough program space for images. An esp32 would be perfect or a raspberry pi zero without a gui.
Why are you not using a pi zero for this? Would make it look way sleeker :)
If it was flat, battery powered and attached to the fridge by magnets it would be very nice indeed.
nagualdesign Yes, this is what I had in mind as well! To be fair: the full size pi is a better prototyping platform and he could swap it out with something smaller later
@@EngineeringSpareTime He also has the option to cannibalize it for other projects, but it would be nice to keep all his old stuff in working condition (assuming he has room) as a sort of museum.
nagualdesign This would be nice. Talking from experience: It ends up with a lot of stuff in a small space and its all „dead“ money :) With the amount of stuff he is building, it would be enough to have a room full with the working/ finished prototypes
@@EngineeringSpareTime There may also be legal restrictions to prevent people from assembling a sizable robot army. 😉
weird censoring... all values are eventually completely visible. why even bother censoring them sometimes, but not other times? also the censor bars fade separately and half way through the fade are transparent enough to see the text they're supposed to hide.
what a great idea...would love to see a version that works with a stylus pen