tiny OLED 128x64 calendar display (arduino) - Page 1
Forum section: electronics / projects

author: linux-works
author_rank: Super Contributor
timestamp: May 13, 2015, 12:51:44 am
content: had this little oled 128x64 $10 display sitting around and figured I'd put it to good use.I wrote some arduino code today (took me ALL day) that does a bunch of calendar calculations and formats a 'cal' unix style display, but graphically. there's JUST enough room on this display, with those fonts, to display a 6 line calendar (some odd months have 6 weeks in them, sort of; like the one this month, in fact!).will upload the source soon as I run a bunch more tests on it.nice little 5v device. using the (very large, sigh) u8glib library (takes a long time to build, even on a pretty fast i3 system):http://code.google.com/p/u8glib/device is known as 'sh1106'.amazon has it:http://www.amazon.com/Huhushop-TM-Serial-Display-Arduino/dp/B00JM88A94note, that's just one of many vendors that have it.I might integrate this display and logic with a clock project later on.

author: PeterFW
author_rank: Frequent Contributor
timestamp: May 13, 2015, 01:45:02 am
content: Quote from: linux-works on May 13, 2015, 12:51:44 amBe advised, those displays are (might be) not well suited to run permanently.They are rated for only a few thousand hours run and lifetime.They are pretty nice though, i got a few myself.

author: linux-works
author_rank: Super Contributor
timestamp: May 13, 2015, 02:30:29 am
content: did not know that! they have that short of a lifetime?well, $10 makes me care a bit less (and that's the 'expensive' amazon price; I'm sure its cheaper direct from china).I guess I will make sure I socket the thing so that when it wears out I can simply plug a new one in.thx

author: linux-works
author_rank: Super Contributor
timestamp: May 15, 2015, 09:48:04 pm
content: more progress:and the front:I'm using nearly all of the 30k that the arduino 328 chip has. each time I touch the code I have to find a 'donor block' of variables or code or something. the u8 graphics lib takes a huge chuck of it, though. the wifi library also takes its tax.its a neat little clock, though. if you pre-enter your ssid and password and give it a website url to hit, on power-on it will connect to wifi, hit the webserver, get its GMT time and convert it to your local time (you do have to pre-enter your DST and TZ data; it uses time.h and timezone.h arduino libs). after it gets 'network time' it simply runs the software RTC code, not really needing a local RTC hardware module. that saves cost and bulk and complexity. the arduino hits the same webserver at intervals you select (at code/build time) and so it resyncs and stays long-term accurate.currently, the display cycles between the calendar page and a 2-line date and hh:mm:ss page. just that simple.mostly its a learning exercise to get experience with this ESP wifi module (and those horrid horrid AT commands. have to try the LUA stuff next). also is my first time using that 128x64 oled module. its a fun little module, although the u8lib takes forever to build, even on a modern system.

author: linux-works
author_rank: Super Contributor
timestamp: May 15, 2015, 11:17:34 pm
content: front of the unit showing a simple date and time displayright now, it shows that and updates every second on the second until halfway thru the minute, then it shows the calendar for a few seconds, then back to this display.3 more of those displays just arrived in the mail, so I will be doing more with them, over time, I can tell

author: linux-works
author_rank: Super Contributor
timestamp: May 24, 2015, 12:50:06 am
content: left image is when there is no unread email.right image means there is email to be readthis is using the white version of the display (1.3"). I also have the .96" oled displays, which are noticeably smaller but do run the same code and display protocol.the way this works (for me) is that I have an xbee on this system with an arduino controlling it all. it listens for 'beacons' to arrive on the xbee and they can be time/date announcements or they can be email counter annoucements. no email info is sent over the beacons (for obvious security reasons) and all email polling is done on a 'locked down' rasp pi system with some simple python IMAP fetcher code. the only thing that goes over the xbee is the email count: 0 or some other positive integer.I kind of like having little dedicated displays that do a single thing (or a small # of things) well and nothing more than that. quite the opposite of the smartphone-does-everything idea; but I don't really like the phone approach, to be honest. purpose-built devices are always nicer (to me) than generic ones.

author: zapta
author_rank: Super Contributor
timestamp: May 24, 2015, 02:51:58 am
content: Those 1.3" OLED displays are very handy and I used the in a few arduino and arm projects, always with the u8g library. They come in different non compatible versions, different controllers, different pinouts (some have the + and - swapped, some have reset some don't), different voltage specification (some have a 3.3V LDO but the signals are not 5V tolerant, some don't the LDO but flicker when you run them on 5V) and different protocols (SPI vs ICS). I settled on one model and get them directly from heltec because ebay vendors often sent me the wrong model.If you are looking for case idea I recommend the Sick Of Baige 'cases', either one of the stock sizes or a laser cut custom one (Ponoko near SF do a great job).http://dangerousprototypes.com/docs/images/e/e4/SOBv1_overview2.jpghttps://raw.githubusercontent.com/zapta/power-monitors/master/pmon_3v8/www/pmon_3v8_closeup_annotated.pngEDIT: does your display have an LDO at the back? As far as I know the SSD1306 is not compatible with 5V, not as supply and not for the signals. When I run it on 5V the display flickered on some units during updates.

author: linux-works
author_rank: Super Contributor
timestamp: May 24, 2015, 04:06:28 am
content: I bought one from ebay (white 1.3") and that's the harder one to find, for some reason. blue blue blue - you can get lots of bluewhite is nice since it works well behind an orange plexi filter and it almost matches the nixie color. blue is just always bluefor protocols, I've seen ones that are i2c-like (mine) and ones with an extra pin or 2 which seem more like spi. if I ever did build something that needed a lot of these, I'd buy them all at once to be sure. I can see that you'd go nuts trying to go from vendor to vendor and have the same product.no idea if there is an ldo on there. I see a 3 legged thing but it looks more like a transistor, no heatsink area that I could see. it is native 5v and signals at 5v, so that's fine with me. 3.3v annoys me simply because the whole world is not at 3.3v.as for the case, I am a techshop member and so I'll do a lasercut box of some kind. the challenge is to think about what to do that might be a little bit unusual or different.one of my (two) builds has an opto proximity sensor (sharp, I think) and it was fun playing with that. on that unit, the oled only comes on if you are sitting at the desk within 2 feet of the device.seeing that waveform or graph on your pic gives me an idea. I've been wanting to take the serial output from my fluke and send it over packet RF to some other data collector. maybe I should put this kind of oled to work for a small rolling graph of measured values from serial-controlled dvm's and such. my old fluke45 has a great display but no graph or trend ability. even if just a coarse 128x64 - it can still show some trends if you are watching some point on a circuit.

author: zapta
author_rank: Super Contributor
timestamp: May 24, 2015, 05:45:49 am
content: Quote from: linux-works on May 24, 2015, 04:06:28 amThat three legged part is probably the 3.3 LDO, you can measure the voltages across it (if you can post a picture here it will be great). This doesn't mean that your device is really 5V compatible. Are there level shifters on the signal lines?Look at the Maximum Ratings section in the data sheethttps://www.adafruit.com/datasheets/SSD1306.pdf,signal levels are limited to vdd+0.3V which is ~3.7V.Glass module specificationhttp://www.adafruit.com/datasheets/UG-2864HSWEG01.pdfhttp://www.adafruit.com/datasheets/UG-2864HSWEG01%20user%20guide.pdfBTW, have you tried to run everything on the ESP8266? I think it does have I2C (on the modules that expose more pins) and the U8G is quiet portable. With the Arduino/ESP8266 it's quiet easy to write C/C++ programs for the ESP8266.

author: linux-works
author_rank: Super Contributor
timestamp: May 24, 2015, 06:02:06 am
content: the modules are marketed as 5v and they have not died, yet, but that does not mean much.esp is 3.3v for sure and the inputs are not 5v tol. but I thought the oled had 5v tol inputs, even if the vcc internally had to be 5. I'll check, but so far, 3 or more modules that I've connected have been running fine for over a week now.the 3 legged thing is probably a transistor. looks way too small to be a reg chip. I'll take a photo.if I can bypass the arduino and go direct from esp to oled that will be great - BUT - the esp is not my only or even my main wireless uplink. in some ways, I prefer the xbee and that cannot run 'code' in any conventional way (that I know of). and so, I don't mind too much having the arduino be in the middle. it gives me more abstraction in how I can put pieces together.next, I will try using the nrf24l01 modules; I have a pair of those that I have not tried yet. yet more rf uplink choices

author: echen1024
author_rank: Super Contributor
timestamp: May 26, 2015, 01:07:19 am
content: Quote from: linux-works on May 24, 2015, 06:02:06 amNot sure if you caught the Noritake VFD gravy train some time ago, but one of those industrial VFDs would be beautiful here!

author: linux-works
author_rank: Super Contributor
timestamp: May 26, 2015, 03:00:55 am
content: nope, did not get ant vfd's. did not know about it (?)this is the latest iteration:blue is looking more blue, now (EV on camera set way back).I added an 'audio volume mode'; when my volume control changes on my diy preamp, it sends out a message. this will pick it up and show the speaker icon and the dB level. I'm adding more icons almost daily32x32 is a challenge but you can find things that scale down well enough (its still a very manual effort to get xbm bitmaps into the arduino u8lig code).

author: linux-works
author_rank: Super Contributor
timestamp: May 27, 2015, 01:07:39 am
content: now, all mounted on a single board:sort of - I'm using an xbee explorer sparkfun breakout board since xbees use nonstandard pin spacing and that means their raw modules usually need a carrier board if you are .1" perf board limited (and I am, generally).the back is a bit messy, as is the front behind the displayit was a tight fit getting all this in there. there's the 28pin skinnydip atmega 328, a resonator, 6 pin inline 'arduino' download header (you see the ftdi module on it, in the background), a 74125 tri-state buffer (to share the hardware uart with the xbee) and there's even a piezo speaker wedged in there between the xbee breakout and the 2 DIP chip top plastic surfaces. I have not soldered wires in for the buttons and have not even thought about -what- the buttons will do, but I knew I needed 2 buttons there, so I mounted them and planned around themI'll think of something for them eventually (lol).the box comes next. I'm tired of this thing sitting on the table all exposed like thisbut it is a nice little software test-bed and I can now explore what sw to run on this kind of device.

author: zapta
author_rank: Super Contributor
timestamp: May 27, 2015, 02:26:41 am
content: Looks very nice. I like your screen design.

author: zapta
author_rank: Super Contributor
timestamp: May 30, 2015, 05:50:00 am
content: Here is my variation of the ESP8266 + OLED concept. The two nodes are controlled by the phone via the cloud. The nodes and the phone maintain persisted connections to a server and can exchange messages with very low latency. The nodes are based on the ARM PRO MINI design (ARM M0, mbed.org and lpcxpresso compatible) and contains a SPI 1.3" oled and an ESP8266 module with stock AT firmware). Power, programming, configuration and output log are done using the USB port (Virtual disk and CDC serial) and optional hardware debugging is done via SWD port with a Link 2 board.

author: linux-works
author_rank: Super Contributor
timestamp: May 30, 2015, 07:42:42 am
content: looks good. is that for work or home/hobby?

author: zapta
author_rank: Super Contributor
timestamp: May 30, 2015, 08:54:23 am
content: Quote from: linux-works on May 30, 2015, 07:42:42 amIt's a fun project I did at home.

author: Yansi
author_rank: Super Contributor
timestamp: May 30, 2015, 09:38:36 am
content: How well are those displays readable in sunlight?I might just buy one for little fun too.

author: linux-works
author_rank: Super Contributor
timestamp: May 30, 2015, 04:46:01 pm
content: I will have to try it outside. but its quite bright and high contrast as you'd expect.there is blue (most common) and white (harder to find), as well as an odd yellow strip on the top few lines and blue all below.the white is interesting since you can put it behind some color filters to change the look. the strength goes down but it does work (maybe not well enough for outdoors use). with an orange filter I can get something similar to the neon/nixie look. red filter blocks too much light so that does not work.blue won't need or benefit from a filter, so if you buy blue you have to really like bluealso be sure you get the right display. its so easy to buy the .96" display instead of 1.3". many sellers will not even realize there are 2 models.mounting is a challenge. on a few of mine, the top glass is lower on the bottom than it should be and this makes using 4 screws pretty hard and risky (it comes right up against the glass). and if you look at one of my later photos, you'll see on the bottom left area - glass has started to crack off and break away. it has not affected the display yet but its pretty fragile, overall.these are a neat little evolutionary stepping stone. they are nice for now and I can see uses for them, but I expect them to go away over time and be replaced by multi color oled displays eventually. but for right now, for $10 each, they ARE fun and once you get used to the api (like u8lib) its not hard to use.build on arduino takes forever, though. the u8lib causes my (semi fast and modern) i3 cpu to take nearly half a minute to build a fairly simple app. compared to a few seconds for most any other app; something in how the author coded the u8lib seems to be really inefficient (for building). for running, it seems fine though.on limited memory systems (like arduino) be careful about loading too many fonts. with 2 fonts I'm already at 25k code size and there is only 30k on the 328 series arduino chips! there are NO built in fonts, this is a pure bitmap display, so any font you load takes progmem or eeprom.they also are not super fast to write to unless you go with spi; so don't expect to have lots of motion on the i2c versions.

author: zapta
author_rank: Super Contributor
timestamp: May 30, 2015, 05:29:06 pm
content: Quote from: linux-works on May 30, 2015, 04:46:01 pmHad similar experience more than once, ebay sellers don't really know what they are selling, I got blue instead of white and SPI ones with the new pinout (e.g. no RST pin) even though the picture is of the old pinout. I think the problem is that Heltec doesn't have model numbers so you need to know what to look for. I solved the problem by buying directly from Heltec.Quote from: linux-works on May 30, 2015, 04:46:01 pmI am using single pin headers for support and solder a small round piece of copper wire at the top. Not very elegant. I am thinking of designing some 3D printed mounts, the PCB holes are large enough so I think it will work.Quote from: linux-works on May 30, 2015, 04:46:01 pmThe first build is slow but then incremental changes to my app compiles very fast (a few seconds). I am using Arduino 1.6.4 on mac air.Quote from: linux-works on May 30, 2015, 04:46:01 pmSome fonts are smaller than others. You can also try trimming characters you don't need. I am using only the u8g_font_8x13 font.

author: linux-works
author_rank: Super Contributor
timestamp: May 30, 2015, 05:41:41 pm
content: when I picked 3 fonts instead of 2, suddenly my mem usage went from 25k to over 30k, which would not even fit inside an arduino.I'm using the 1.58 chain for now. wonder if 1.6 is that much better. I have no idea why its so slow to build. I have 16gb of ram, an ssd on sata3 and a reasonably modern i3. something is really inefficient (templates in c++? don't know, but something is really ugly, I suspect) in how this code is designed. it works and all, but when I see builds take this long, I really wonder what design decisions the author made that caused this. it does make iterative testing so much slower than it has to.and yes, the ebay sellers are mostly just SELLERS now. I tried to buy a few of the white and blue displays from china; the seller had combined shipping on the blue and the white, I wanted a mix of them so I asked if they would combine across the 'product lines'. I used the simplest english I could form, but still the seller took days and did not even understand what I asked ('I do not check it' was her reply; whatever THAT means!). they simply don't know their products, they buy and sell whatever they can get and they don't even have the most basic communication skills anymore (there was a time that to do business, you had to speak 'business english' but now ebayers from china don't even take the time to learn enough to communicate well with their customers. they are now useless, not adding any value at all, but still taking their middleman cut).I've had good luck with amazon. but amazon has been out of those displays for a while now (maybe I bought all they had, lol). I'll pick amazon over ebay/china any day of the week, even if I have to double-pay for the item.your idea of buying direct is the better way. how many do you have, btw?maybe a group buy would actually make sense. that way people would know what they're getting and they could count on a certain interface or color or build and know that it is what its described as.

author: zapta
author_rank: Super Contributor
timestamp: May 30, 2015, 08:02:09 pm
content: The older arduino ide compilation may be less incremental, don't know. I presume you installed u8g as a library, not in your project directory.I typically but in batches of 10, using them for the power monitors, when people ask for them. Am low now, have only 2 left so may order another batch. I can includes your in my order if you like, the cost about $9 each.

author: IanJ
author_rank: Unknown
timestamp: May 30, 2015, 08:36:43 pm
content: Quote from: linux-works on May 30, 2015, 05:41:41 pmI've used the u8 lib on Arduino and noticed similar.On my home built power supply I used these fonts (Arduino Nano) and with two 128x64 LCD's connected. I think I used about 80% of the Nano.u8g_font_6x10u8g_font_fub25nu8g_font_fub17ru8g_font_fub11rU8glib version V1.14Code:U8GLIB_ST7920_128X64 u8g(13, 11, 12); // SCK, SID, CS (hardware based SPI for LCD2)U8GLIB_ST7920_128X64_4X u8g2(10, 8, 9); // SCK, SID, CS (software based SPI for LCD1)Ian.

author: linux-works
author_rank: Super Contributor
timestamp: May 30, 2015, 08:52:24 pm
content: the thing about arduinos (and other small chips) is: once you fill them up, time to bring in a secondit drives some people nuts - to have cpu to cpu comms and to break things up to message-passing between them, but I like the freedom to make 'purpose built chips'.so, I could see a 328 arduino being a mini display server of sorts. you might figure out what UI widgets you might need, then code them as 'commands' and devise a protocol to send data back.now you have a main controller who simply sends primitives to a 2nd controller. you get more code space, you also get better concurrency (in some cases).I don't love the 'mega' arduinos. not easy to deal with in the phys pkg they come in. I like attiny's and 328 arduinos. on one task, I moved the IR receiver code over to an 8pin attiny and had it send out serial 'tokens' on IR signals received. the main arduino simply had to listen to the uart for IR requests. it freed up a lot of resources since ir scanning is very timing based.so, I could see an arduino as a 'font and ui server' (lol) in some cases.(or, of course, go with larger controllers. I know: ARM!. lol. yes, once the UI gets big enough, little arduinos don't make the most sense, at least single units of them)

author: zapta
author_rank: Super Contributor
timestamp: May 30, 2015, 09:15:21 pm
content: I switched from the 328p to the lpc11u35 and am not looking back. It's come in a smaller package and can do more, not to mention the better ide and optional hardware debugger.

author: zapta
author_rank: Super Contributor
timestamp: May 31, 2015, 12:44:05 am
content: I just posted on thingieverse a model of mounting posts for these OLED displays. I made them from PLA and 'riveted' using the side of a hot iron. It's easier that my previous method of using header pin and soldering a small wire ring at the top.http://www.thingiverse.com/thing:856970

author: Yansi
author_rank: Super Contributor
timestamp: May 31, 2015, 01:44:44 am
content: Wouldn't it be better to source somewhere bare displays, find suitable FPC connectors and mount it right on your PCB? If it is ever possible to source these displays as a bare parts for a reasonable price, without those silly shields... I've already encountered a situation where some part soldered on a shield witch a bunch of other stuff there was surprisingly cheaper, than bare chips...

author: zapta
author_rank: Super Contributor
timestamp: May 31, 2015, 02:00:08 am
content: Quote from: Yansi on May 31, 2015, 01:44:44 amI think it's possible to source the 'glass' but it will not save you much. BTW, it doesn't use a connector, just flex that is soldered to the board. I de/soldered a few of those, very doable. And the glad is attached with a thin double take. I saw once a data sheet of the glass, don't remember where though.

author: linux-works
author_rank: Super Contributor
timestamp: May 31, 2015, 03:27:32 am
content: plastic welded legs. like it!better: some kind of rubber that takes a bit of shock and makes the module more user-proof (install/removals, etc).maybe the right density of foam, like weatherstripping. should be strong enough to hold but removable without too much force.I want to be able to raise, lower mine, though. I can see value in being able to match height of buttons and displays with front panels. so, longer male headers from the module, and some kind of pass-thru female sockets that would solder on the pcb below but let pins pass thru if you really needed that level of adjustment. that way, you can commit to cutting pins to length much later in the project.otoh, you could adjust height by laying this module on a small 'bed' pcb that has outside holes on the corners that are bigger, robust and not too close to any glass. if you secure the module to the bed, the bed could be lowered or raised to-height, as desired, and it can be treated a lot more like a strong part than the pcb carrier that the oled is currently mounted to.it almost argues for not using their carrier and doing you own, but I don't love having to get into -that- kind of distraction. I just want to use the darned thing. but it does have to be strong enough to be in the real world and a good mounting story is needed, at least for me.

author: linux-works
author_rank: Super Contributor
timestamp: June 13, 2015, 12:38:44 am
content: now, I'm using this display for a small handheld RF remote control:arduino, xbee, oled and eventually some battery and box. looking into lipo batteries and maybe a Qi coil charging system.this remote does work right now, too. controls the volume on my DIY preampthis is with the smaller .96" oled, not the bigger 1.3" one. also I rotated the display 180 since it was the only way I could fit all this on that small board. when I used u8glib to rotate the display, some pixes were shifted and so the same code did NOT run perfectly; I had to add 3px to the x-axis to make this work (not sure if a bug in the module or the u8glib). at any rate, it works after adding 3pixels to the x values where you draw, when upside down.I do really like those industrial angle buttons. they should last a nice long time and be relatively trouble free.

author: MLXXXp
author_rank: Frequent Contributor
timestamp: June 13, 2015, 02:08:43 am
content: Quote from: Yansi on May 31, 2015, 01:44:44 amhttp://www.buydisplay.com/default/oled-display

author: linux-works
author_rank: Super Contributor
timestamp: June 14, 2015, 07:37:26 pm
content: and more progress again today:I'm playing with the idea of talking to multiple boxes by directing the commands to the right 'box address' (using a user-defined protocol I threw together).its hard-coded right now but I'd like it do be very dynamic and have it learn the kinds of boxes out there (on my net), learn what each box has controls for and then it can display the edit-page for the control types that box supports. ideally, no new code should have to be written if some new box appears that supports the control prims that the remote understands.and at this point, I'm already 95% full for the 30k arduino chips. I may have to look into the next bigger cpu, real soon.

author: linux-works
author_rank: Super Contributor
timestamp: June 19, 2015, 04:33:23 pm
content: stepwise refinement: now added a LiPo battery and recharger circuit (adafruit, taking the easy way out on this one, lol):its still hack-mounted and does not have a case, but its enough to use and develop software on.I also bought a Qi charging coil and board kit; so that will probably be the next upgrade before I can start to think about a box for the remote.kind of funny how I bought this display, toyed around with it, made a calendar and now I'm off on some totally unrelated tangent, just because I saw a neat use for this little display

author: zapta
author_rank: Super Contributor
timestamp: June 21, 2015, 02:50:01 pm
content: Quote from: linux-works on June 19, 2015, 04:33:23 pmYou can also use conductive wire free charging base. They may be cheaper and more efficient. one simple contact geometry is used by those restaurant pager/coaster and it even allows to stack multiple units on the same charger.There are also contact geometries that allow free rotation and free position but they are more involved.BTW, what battery life time do you get?Edit: this stack charger design fit well the Sick Of Baige case design if the make the top and bottom screws at the right shape and have the spacers pressed against power pads on the PCB.

author: linux-works
author_rank: Super Contributor
timestamp: June 21, 2015, 05:50:41 pm
content: stacked charging; interesting!I will play with Qi since I'm fascinated by the inductive power transfer concept. it may not be the best thing but I'm gonig to live with it for a while and see what its like. if the execution is poor, then I'll abandon it but I want to experience it first-hand before I judge it.I don't know what the battery life is yet. I do have a dc load and I'll try to do some current analysis in its present form (which is not at all structured to be battery efficient, in the code) but when I do that update pass, I'll see how long it can run with display, with display timing out, with xbee on and with xbee put to sleep.btw, I cased it up last nite (late nite at Tech Shop; what a way to spend saturday night, lol):yes, its thick as a brick (hahaha)but I don't feel bad, its using all off the shelf parts, no major size reduction was attempted and lots of thick 1/8" plastic layers were needed to hold it the way its currently built. otoh, its hard to lose a thick brick like this. jethro tull might be proudthis is the first time I'm seeing the white display with an orange 'nixie' window over it. I like it. wish I could buy a true yellow/amber oled display instead of blue and white.

author: zapta
author_rank: Super Contributor
timestamp: June 21, 2015, 06:42:37 pm
content: It looks better and better ;-)Do you turn off the display when not in use to save battery? Does the inductive charge receiver provides you with battery fuel guage?BTW, you can control the intensity/current of the display. It has a reference resistor that controls that current. IIRC it is discussed in the SSD1306 datasheet.I had to do in the past battery optimization for mobile devices. Background radio activity is one of the things you want to look for. I used this Arduino based PowerPlay device, it outputs regulated 1 cell voltage and tracks the consumed charge over time. It performs basic analysis itself (average current, number of wakes, etc) and also provides raw data to an optional computer for additional analysis.https://github.com/zapta/power-monitors#power-play-38v

author: linux-works
author_rank: Super Contributor
timestamp: June 21, 2015, 07:10:52 pm
content: thanks man!I do have a screen timeout function. for now, I press the green button on the right to toggle screen-on and screen-auto-timeout. will probably think of a better function for that green button later on.I have not tried varying the intensity. hmmm, new idea: photocell controlled intensity. damn, have to stop adding feature creep to itI do plan to add a battery gauge. definitely needed. I wonder if the a/d on the arduino may be enough to self-read the voltage? if not, what would be a good way for the system to measure its remaining run-time?oh, I see that there is a power play thing. I'll read up on that.the xbee is not put into hiber mode yet but its planned, for sure. right now, the xbee in the remote is the initiator, so it can power itself down when the user has nothing to 'say'. but later, I intend this to also receive datagrams, so not sure yet how to structure the current consumption.I'm using the adafruit charge coil and circuit so I'll ask them if there are management metrics that can be gotton from it. I suspect not, since they'd probably list it if it was there, but I'll find out.

author: zapta
author_rank: Super Contributor
timestamp: June 21, 2015, 07:40:11 pm
content: Regarding fuel guage, the power play uses the LTC2943 fuel gauge which uses a continuous bidirectional coulomb counter (better for long term integration) and has a I2C interface. I am sure there are many other fuel gauges, possibly even with charger function integrated.http://www.linear.com/product/LTC2943Possibly cutting the power to the OLED display will result in lower standby current that just turning all the pixels off. It has for example an internal capacitor based DC/DC that will keep working and consume current.Regarding the yellow color you mentioned, I saw similar OLED display where the top portion of the display is yellow, to distinguish the status line from the rest of the display.http://www.aliexpress.com/item/Yellow-Blue-0-96-SPI-Serial-128X64-OLED-LCD-LED-Display-Module-for-Arduino-51-Series/1669384921.html

author: linux-works
author_rank: Super Contributor
timestamp: June 21, 2015, 08:05:35 pm
content: I have seen those top-band oleds and some buyers got them thinking they were settable but were upset to find the 2 colors are fixed. if you can structure your UI to that, it might be ok. I do like amber on black (like old vt220's) and I run my xterms that way, tooI'll look into that fuel gauge chip. that's new stuff to me, but if its i2c, that's ideal. I will look into removing power from the display - but - isn't there some init that has to happen (at the app or library side) if the display is off? that's time overhead if the screen has to come on and something has to be written to it, yes?I'm currently erasing the screen after a timeout and its a funny effect, since I have the screen 180 mounted (leads are at the bottom) and the u8glib lets me do that 'rotate' once and all output is all in that mode, after that. I turned that on, but the screen clearing and painting now comes from the bottom upits kind of funny since we're mostly used to seeing draws happen from top-down. the erase if semi-fast and the draw is just barely acceptable (when there are bitmaps on the screen). the i2c 'simple' displays are actually not very fast. I will try the spi version and if I can afford the pins, maybe convert over to it.re: battery gauge; I wonder if its even worth the screen space, cpu time and chip space, given how this thing is designed to be used. its not like a phone that will be out with you and needs to have a good 'away' run time. a remote control for a home audio/video system would rarely leave the home and would be used in very short bursts or short durations. when not being used, it sits on the charging pad, so its almost never going to even get close to wearing down the battery in real use. IF you use a charging pad or cradle, and I'm trying to see if that's a real workable solution.

author: zapta
author_rank: Super Contributor
timestamp: June 21, 2015, 09:16:36 pm
content: The SPI will be much faster with no noticeable refresh 'wave'. You right about the initialization, it may be required after reapplying power.If you don't need an accurate fuel accurate, giving a rough estimation based on the battery voltage should be fine, and if it's only for you, you can show in it volts ;-)You may need also to have low voltage cutoff somehow to you don't over drain the battery.

author: linux-works
author_rank: Super Contributor
timestamp: June 21, 2015, 09:43:18 pm
content: I'm not sure yet what to do about the battery running down. the adafruit circuit is supposed to fully manage things on charging and the battery should auto-off itself once it gets below its cutoff. the arduino will just lose power and black out (not brown out since I think the lipoly battery is auto-off). but I have not used lipoly before and this is my first time with incircuit rechargeables.I don't know if I have to do anything special on the arduino side. its not like I have to sync a database as I see power about to fail. and since my data packets are checksummed, even a power loss during an xbee transmit won't ever cause any mistaken command or badness to happen.putting the xbee into hiber mode (taking a digital pin) is my next move and that should reduce power quite a bit, from what I've read.I like the idea of a battery meter, but on the other hand, screen real estate is precious and technically there is no need for a gauge, here. but I'll see. the point of a beta (or alpha) is to try out various concepts, throw it against the wall and see what sticksnot literally of course - unless it truly is spaghetti. and my code is NOT spaghetti, lol

author: ataradov
author_rank: Super Contributor
timestamp: June 21, 2015, 10:04:36 pm
content: Quote from: linux-works on June 13, 2015, 12:38:44 amDo you have a link or a part number for those buttons?

author: linux-works
author_rank: Super Contributor
timestamp: June 21, 2015, 10:52:47 pm
content: angle switches at mouser:320.22E11BLKpicture shows brown but they are black ('blk').you like the idea, too, huh?they feel great. they are not as strong as the usual square style but they are still pretty touch friendly.

author: ataradov
author_rank: Super Contributor
timestamp: June 21, 2015, 10:56:24 pm
content: Thanks.Mouser shows Customers Also Bought "XB24-AWI-001 Zigbee / 802.15.4 Modules". Did you also buy XBee from them at the same time? Because how many people will buy this button and XBee module?

author: ralphd
author_rank: Frequent Contributor
timestamp: June 21, 2015, 10:57:16 pm
content: Many of the pro minis have the 2K Arduino bootloader on them. Flashing optiboot or picoboot-arduino will save you 1.5K.If you enable lto for gcc you'll probably save another couple KB.

author: linux-works
author_rank: Super Contributor
timestamp: June 22, 2015, 12:16:13 am
content: Quote from: ataradov on June 21, 2015, 10:56:24 pmfirst, 'doh!'second, 'lol'.third, 'fixed'.

author: linux-works
author_rank: Super Contributor
timestamp: June 23, 2015, 03:45:23 pm
content: got a new Qi charging base that tilts and has 3 coils:also replaced the front with a smoked/bronze plastic panel, which is partially see-thru. has more geek-appeal

author: zapta
author_rank: Super Contributor
timestamp: June 23, 2015, 03:49:27 pm
content: This deserves to show up on hackaday. You can send a short description to tips@hackaday.com

author: linux-works
author_rank: Super Contributor
timestamp: June 23, 2015, 04:00:57 pm
content: thanks, manI do intend to submit it. I guess I have 'never quite done' symdrome, which many of us can relate to. I can'te quite submit some partial stuff until I see enough end-to-end control working, and with enough variety of target boxes. but you are right, I should define an end point for when its good enough and then submit it. probably should put the code on github first, which I do plan to get to very shortly.

author: linux-works
author_rank: Super Contributor
timestamp: June 28, 2015, 05:31:43 pm
content: this display is now my go-to display of choice for small jobs. here, I'm using it to display the DAC sample rate (word clock from the spdif receiver in the DAC):there is a freq-counter software library and I'm using that to get the SR freq.the front panel will have to be redone to allow for the green board, nowlol, just realized I left the little screen protector plastic on. that's what the green 'flag' in the photo is.

author: bingo600
author_rank: Super Contributor
timestamp: June 28, 2015, 06:45:55 pm
content: Quote from: linux-works on June 28, 2015, 05:31:43 pmHi LWI'd love to get an url to the display and maybe a Datasheet .. pleaseAnd also the display library , i guess arduino.TIABbingo

author: linux-works
author_rank: Super Contributor
timestamp: June 28, 2015, 07:10:15 pm
content: ebay and amazon have lots of these. go to amazon, for example, and search on 'oled 128x64' and find the ones that use i2c (4 pins like mine). that will be easy to use on the arduino. you won't need datasheets if you use the u8glib library (search on that name).I will post my sample code to github shortly, so that can be an example, but there are many online.for the display I have (which may not always be what you get; you have to try variations):to start off, you do this:Code:#include "Arduino.h"#include <Wire.h>#include <U8glib.h>// create an instance of the OLED display classU8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NO_ACK); // Display which does not send ACKthere, the 'u8g' instance is created and you have to use it.inside setup:Code:// use largest font we haveu8g.setFont(u8g_font_courB18);and inside loop:Code:oled_draw_loop();that function is like this:Code:voidoled_draw_loop (void){u8g.firstPage();do {draw_my_stuff();} while (u8g.nextPage());return;}and finally, the thing YOU write to draw YOUR app stuff:Code:voiddraw_my_stuff(void){// audio graphic iconu8g.drawXBMP(0, 0, speaker_width, speaker_height, speaker_icon_bits);// the number valuesprintf(str_buf, "-%d dB", db_val);u8g.drawStr(63, 10, str_buf); // print at 63,10return;}that's the general idea. see the u8glib site for the full info.

author: bingo600
author_rank: Super Contributor
timestamp: June 28, 2015, 08:09:44 pm
content: Thanx for the introJust ordered a few of these disp's/Bingo

author: linux-works
author_rank: Super Contributor
timestamp: June 28, 2015, 11:34:14 pm
content: 2nd build today; mostly the same as the first one but with a small round button, smaller display and blue instead of white. also, no nano module; I went pure DIY with a simple 328 chip and resonator:the back of the board, in case anyone's curiousmany pins are not even soldered down; I only soldered ones I needed to connect to. no socket on the chip and in the unlikely event I have to remove that chip, it will be less of a hassle this way.arduino-from-scratch, to be surenot even a software download port (ftdi or isp). the chip is loaded and it does what it does. yes, I did test the chip in breadboard before I soldered it down.I don't think I have any wires on the other side. they are all here. just easier that way, given the display and button are on the other side.

author: linux-works
author_rank: Super Contributor
timestamp: June 29, 2015, 07:27:40 am
content: more home-automation ideas; yet another take on an arduino home thermostat.multi-zone capable and wireless.still a breadboard idea; but might move it forward as an add-on to my remote and to replace my current dumb wall thermostat. I've always wanted to be able to get and set the value from anywhere in the house, and I plan to allow control from either the wallplate version or the handheld remote.

author: MLXXXp
author_rank: Frequent Contributor
timestamp: June 29, 2015, 01:00:57 pm
content: Quote from: linux-works on June 29, 2015, 07:27:40 amKeep in mind that the OLED display is rated 10000 hours to half original brightness. That's only about 14 months of constant on operation. For something like a thermostat, that's expected to last quite a few years, you'd probably only want the display to come on when someone is actually looking at it. You'd need a pushbutton, proximity detector, etc., to only turn on the display when necessary.

author: linux-works
author_rank: Super Contributor
timestamp: June 29, 2015, 04:36:41 pm
content: agreed; I am working on some timeout method so that it does not say on all the time.or, worst case, allow replacement easily every yearfor those that want to just leave it on all the time.if its socketed and only $10, its not the worst maintenance cost I could imagine. but if I can avoid it wearing out, I will try to do something creative.

author: MLXXXp
author_rank: Frequent Contributor
timestamp: July 02, 2015, 12:31:36 am
content: If your not stuck on having a blue colour, I think the white ones are rated for longer life. One datasheet I've looked at said between 15000 hours and 50000 hours, depending one the brightness you run it at.

author: linux-works
author_rank: Super Contributor
timestamp: July 06, 2015, 12:01:49 am
content: now I have a bargraph routine working:I kept the display very sparse and left the bitmaps out. speed matters, here, and this is still the slow i2c version of the display. this draw loop needs to be fast since the remote is now a listener on the xbee 'bus' as well as a talker. it can talk and send a change-vol command to the preamp (background, led display) but if you grab the preamp's knob and turn it, the oled remote needs to stay in sync, so when its not talking, its listening for 'events' or asynch events from the managed object (eg, the preamp). and if you turn that rotary encoder very fast, you want the display on the other end of the rf link to feel quick and not laggy. keeping the screen redraws very simple and light keeps the response time snappy. the bar graph is just a rounded frame and an inner box, with some pixels apart for effect.there was no bargraph routine in u8glib so I had to write one, if you call it 'writing one' (2 lines of code). it helps that I didn't have to scale; there is 100db of range in the vol control system and there are more than 100 pixels in the display x-axis, so a 1:1 mapping made great sense.

author: linux-works
author_rank: Super Contributor
timestamp: July 21, 2015, 11:49:57 pm
content: looks like my work (and luck) have paid off. I took this system to a local audio demo event ('head-fi bay area meet') and my stuff got reviewed by the editor of a hifi magazine:http://www.hometheaterhifi.com/home/show-reports/show-report-head-fi-meet-july-18-2015.htmlshort review but he seemed to really like the remote and the oled feature.its really nice when stuff like this happens. (no, I did not pay for the review, lol).

author: linux-works
author_rank: Super Contributor
timestamp: August 04, 2015, 04:19:48 pm
content: made the brick into something a bit thinner. just reorganized the insides, went with a smaller battery and an alternate charger board. reduced the thickness from 1.25" down to 0.6"its now more like a regular remote. in fact, its thinner than my old sony dvd IR remote, its lighter and shorter, too.v1 was a good learning exercise. v2 is much better. maybe v3 will be a real board someday

author: mikecq
author_rank: Newbie
timestamp: February 27, 2017, 07:26:14 pm
content: how can i get the code for this "it now checks for unread email "?

author: linux-works
author_rank: Super Contributor
timestamp: February 28, 2017, 02:52:05 am
content: PM me.but the code is not very good, I'll warn you. it was using the AT commands on the ESP module, which, uhmmm, kinda suck.if I did it again, I'd use the esp12e or similar and skip the arduino chip entirely. it would all be native C and not those stupid unreliable AT commands.

author: mikecq
author_rank: Newbie
timestamp: March 02, 2017, 05:26:53 pm
content: Hi, where can I get the code?

author: Andy Watson
author_rank: Super Contributor
timestamp: March 02, 2017, 05:50:46 pm
content: Quote from: mikecq on February 27, 2017, 07:26:14 pmQuote from: linux-works on February 28, 2017, 02:52:05 amQuote from: mikecq on March 02, 2017, 05:26:53 pmSometimes !

author: mikecq
author_rank: Newbie
timestamp: March 08, 2017, 02:20:37 pm
content: I did PM, I am just not sure how to view message on this website

author: Andy Watson
author_rank: Super Contributor
timestamp: March 08, 2017, 02:54:10 pm
content: Quote from: mikecq on March 08, 2017, 02:20:37 pmIt should just arrive! Check that you have set appropriate permissions in your profile.Profile => Modify Profile => Personal MessagingThe middle step may not be required - depending on how you view the forum. The personal messaging section allows you to determine who and which messages get through.

author: sztremi
author_rank: Newbie
timestamp: March 13, 2022, 10:51:40 pm
content: Quote from: linux-works on May 13, 2015, 12:51:44 amCan I get the code and a schematic for it?

author: sztremi
author_rank: Newbie
timestamp: March 13, 2022, 10:52:20 pm
content: Can I get the code and a schematic for it?

author: m3vuv
author_rank: Super Contributor
timestamp: March 14, 2022, 05:50:21 am
content: I had a 0.96 inch display on my homebrew radio but had it bolted down to rigidly to the case of the radio so broke when my radio fell from my bench,i swapped the original display for a 1.3 inch one,thats the one i broke,do 2.5 inch displays exist with the same controller,are there bigger ssd1306 displays on the market that are ic2?,i want a bigger one on my radio if they even exist?,TIA.

author: MLXXXp
author_rank: Frequent Contributor
timestamp: March 14, 2022, 08:51:47 pm
content: Quote from: m3vuv on March 14, 2022, 05:50:21 amYou can get 2.42" 128x64 OLED modules based on the SSD1309 controller. The SSD1309 is almost fully compatible with the SSD1306, needing only a slightly different initialisation sequence.

author: linux-works
author_rank: Super Contributor
timestamp: December 10, 2024, 09:08:02 pm
content: update to the old thread; finally with some source and a port to tft color display.

author: linux-works
author_rank: Super Contributor
timestamp: December 10, 2024, 09:12:21 pm
content: this is just a class lib with the meat in it. it will probably need some tweaks to get it the way you like it, but it builds on standard arduino g++ IDE and its basically portable C. the tft.* calls should be obvious (x,y based).this project builds and runs and is one demo as a part of my web-based esp8266/esp32 swifi ('simple wifi') library.I'll publish that shortly and the actual app pictured. but wanted to get the calendar stuff out in case anyone still wants it. it took me a while to find this old 2015 source code and maybe an hour or two to revise it and merge it with my current web-based ESP projects. now that its there, people can use it. its based on the original unix (?) cal.c source and there are a lot of magic numbers that I have no idea about. it should work but if there are bugs, it wont be easy to fix. otoh, its old ancient ascii based calendar code and since its very old it should have been long debugged by now