Author Topic: Light detecting oscilloscope-like device  (Read 4770 times)

0 Members and 1 Guest are viewing this topic.

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Light detecting oscilloscope-like device
« on: February 01, 2015, 06:56:03 pm »
So this is a thing that detects light and graphs the amount of light over time, similar to how an oscilloscope graphs voltage over time. Right now, it runs on my PIC18F4XK20 starter kit board, which has a PIC18F46K20 processor, a 128*64 OLED display, and a few buttons.

Here's a picture of the whole thing: (The jumps in the graph on the screen are from my camera flash!)


And a picture of the sensor: (It's just a photoresistor)


Here's some pictures of the thing in action.
This is the screen when it's first turned on. The "VISIBLE" means it's detecting visible light, which is all it can do right now. It will be able to detect other types of light like infrared soonTM. The lower-left corner shows if any delay is added to its refresh rate, the center shows how bright the light is its detecting, and the lower-right corner shows settings and information.


Here is one of those things the lower-right corner shows. The value that is actually coming from the analog to digital converter. Useful for debugging.


Here's another feature: resolution. Because the screen is small, the graph can only be 54 pixels tall. The resolution feature can zoom in on the bottom part of the graph, increasing the detail the graph can display.


Lower resolution is better. Here's that same line as above in resolution 0:


For some more contrast, here's a graph of me poking the sensor in resolution 2:


And in resolution 0:



It's definitely not finished, but I think it's gotten a good start so far.


Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: Light detecting oscilloscope-like device
« Reply #1 on: February 03, 2015, 08:36:32 am »
I changed up some stuff.

-The line separating the graph and text is now dotted (I think it looks better)
-"RES" is now "ZOOM", and bigger number now means better resolution



-I also added a run/hold function. When it's activated, the graph will pause, and a cursor can be moved. The brightness at that point on the graph is displayed at the bottom of the screen.


Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: Light detecting oscilloscope-like device
« Reply #2 on: February 04, 2015, 05:03:32 pm »
I did some more stuff.

The interface is changed up a bit now. The RUN/HOLD function is now always at the lower left corner of the screen. The delay function has been moved to the settings menu at the bottom right.


I also added a function to change the refresh rate of the screen. A rate of 1 means the screen is refreshed after every reading, a rate of 2 means the screen is refreshed after every 2 readings, and so on.