ESP32 Oscilloscope Clock - Page 1
Forum section: electronics / projects

author: mauroh
author_rank: Frequent Contributor
timestamp: November 26, 2018, 02:36:41 pm
content: Hi, just for fun I made my own version of the famous Oscilloscope Clock and shared it so everyone can play and improve the code.https://github.com/maurohh/ESP32_OscilloscopeClockI've used an ESP32 under the Arduino IDE and since it is just a matter of providing to the Oscilloscope the X Y coordinates, you can display whatever you want.My target was to keep everything as simple as possible, avoiding any additional hardware, so no external RTC, no external DACs.Since the ESP32 has 2 internal 8 bit DACs and it can connect to an ntp server to gather the exact time, it was pretty straight forwardI already shared it on twitter and I was really surprised for the iterest for such a toyhttps://twitter.com/PintusMauro/status/1065563496421703680Enjoyand don't forget to share your results or suggestions.MauroPS:Thank you tohttp://www.dutchtronix.com/ScopeClock.htmfor sharing the project I used as reference, also the XY tables are straight from this project.Thank you to Andreas Spiess fot the Arduino NTP Library NTPtimeESPhttps://github.com/SensorsIot/NTPtimeESPThank you to everyone else who shared some piece of advise, code... that contributed to this fun project.

author: mark03
author_rank: Frequent Contributor
timestamp: November 27, 2018, 02:19:33 am
content: Maybe a dumb question, but how do you get separate, disconnected line and curve segments with only X and Y? Don't you need a blanking signal too, to hide the trace as it moves between graphic elements? Or can you just "move it really fast" when you don't want it to show up? And would that work on a real CRT?I have a mostly gutted Tek 2465 that I want to turn into a clock / generic vector display one of these days...

author: mauroh
author_rank: Frequent Contributor
timestamp: November 27, 2018, 10:00:11 am
content: Hi Mark,this is not a dumb question and it is actually the all challenge of this drawings on an oscilloscope.There are several factors that will impact the final results and are specific on how you generate the image (R2R dac, PWM with rc filter, fast DAC...) and also specific of the type of oscilloscope (analog vs digital), in some case not obvious like selected memory depth or intensity grading capability.I see this was already discussed herehttps://www.eevblog.com/forum/testgear/analog-vs-digital-x-y-mode/On my project the trick is to spend more time drawing the segments I want, moving one bit at a time along two end points and jumping to the next segment as fast as possible.The last one is hardware dependent and the internal DACs of the ESP32 are fast enouth.With the ESP32 I was not able to assign the values of the 2 DACs simultaneously (as you can do with an external DACs like the MCP4802), but I had to write the 2 values one at a time.This will generate several unwanted points that will appear on the drawing.See the attached picture where you can see all the points generated by the code displayed using an Excel chart.This was really useful during debbuggingMauro

author: mauroh
author_rank: Frequent Contributor
timestamp: December 20, 2018, 10:17:03 am
content: Merry Christmas from the bottom of my OscilloscopeESP32 Oscilloscope Christmas treeMauro

author: packetbob
author_rank: Contributor
timestamp: January 09, 2019, 07:28:42 am
content: Thanks for posting this great project..I built mine on a small perfboard and used BNC jacks..I ran into two small issues with the NTP library that I'll mention to perhaps save others time.1) Compile Error - The code would get a compile error complaining that it could not find "ESP8266WiFi.h". This line located in the NTPtimeESP.h file as "#include <ESP8266WiFi.h>". Looking around the code it appears it was perhaps based on some previous ESP8266 code. The ESP32 code I looked at seemed to reference "WiFi.h" instead. So if you have the same issue, open up the "NTPtimeESP.h" inside the library and replace the "#include <ESP8266WiFi.h>" with "#include <WiFi.h>".2) TimeZone Change - I couldn't find any great info on the timezone setting for the NTP library (in the 5 minutes I spent looking) but did eventually determine that you needed to modify the "NTPch.getNTPtime(1.0, 1);" request. Simply change the first argument with your required GMT offset. So for me in the Pacific Coastal Zone (GMT -8), I changed "NTPch.getNTPtime(1.0, 1);" to "NTPch.getNTPtime(-8.0, 1);" . This solved the timezone issue.Anyways again thanks for posting your project.

author: mauroh
author_rank: Frequent Contributor
timestamp: January 09, 2019, 10:32:22 am
content: Thank you for the feedback and notes!!! Really appreciatedI've got the same issue with the NTPlibrary but forgot to point it out.I'll add your notes to GitHub/Readme....To make up for it I attached couple of pictures of some company logos on the OscilloscopeMauro

author: Ironballs
author_rank: Newbie
timestamp: February 08, 2019, 10:01:19 pm
content: Mauro,I had a similar idea to you, that is take an ESP32 and turn in into an ocilloscope clock using the DACs and a NTP Server. My sofware, although worked, isn't as polished as yours. I put your code on my scope clock and here are the resultsHope you don't mind me posting!Garry

author: mauroh
author_rank: Frequent Contributor
timestamp: February 10, 2019, 07:39:56 pm
content: Wow that is a nice clock!!!Thank you Garry for sharing this piece of electronic art.Mauro