Thursday, 4 February 2021

OLED displays - arduino

 Organic Light Emitting Diodes or OLEDs don't need backlights,
They contain a film of an organic compound that emits light in response to electric currents.
They also consume less energy than LCDs
I2C uses just 4 pins
(though some come with an extra reset pin).
 
This is a 0.96" OLED LCD Display Module IIC I2C Interface 128x64

 
 
PinWiring to Arduino Uno
Vin5V
GNDGND
SCLA5
SDAA4              
 
To control the OLED display you need the Wire.h , adafruit_SSD1306.h and the adafruit_GFX.h libraries.
The Wire.h library will be installed by default  


 
 
Functions that are useful with OLEDS
  • display.clearDisplay() – all pixels are off
  • display.drawPixel(x,y, color) – plot a pixel in the x,y coordinates
  • display.setTextSize(n) – set the font size, supports sizes from 1 to 8
  • display.setCursor(x,y) – set the coordinates to start writing text
  • display.print(“message”) – print the characters at location x,y
  • display.display() – call this method for the changes to make effect 

 OLEDs communicate with your Arduino via i2c.
+ LCD display i2c - part 1   
 
The I2C is a type of serial bus developed by Philips, which uses two bidirectional lines, called SDA (Serial Data Line) and SCL (Serial Clock Line).  

Data connects to A4
Clock connects to A5 (Uno)


If when you first power it up and nothing happens, try to use a program with a different resolution
 
The  0.96" OLED may be 128x64 or 128x32

Though I bought this OLED thinking it was a 126 x 64 pixel, it runs the ssd1306_128x32_i2c
code.


 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 
 //*********************************************************************
 Code 2 - featherwing - in the examples of the IDE
 
This is the splashscreen
 

//****************
 #include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

Adafruit_SSD1306 display = Adafruit_SSD1306(128, 32, &Wire);

// OLED FeatherWing buttons map to different pins depending on board:
#if defined(ESP8266)
  #define BUTTON_A  0
  #define BUTTON_B 16
  #define BUTTON_C  2
#elif defined(ESP32)
  #define BUTTON_A 15
  #define BUTTON_B 32
  #define BUTTON_C 14
#elif defined(ARDUINO_STM32_FEATHER)
  #define BUTTON_A PA15
  #define BUTTON_B PC7
  #define BUTTON_C PC5
#elif defined(TEENSYDUINO)
  #define BUTTON_A  4
  #define BUTTON_B  3
  #define BUTTON_C  8
#elif defined(ARDUINO_FEATHER52832)
  #define BUTTON_A 31
  #define BUTTON_B 30
  #define BUTTON_C 27
#else // 32u4, M0, M4, nrf52840 and 328p
  #define BUTTON_A  9
  #define BUTTON_B  6
  #define BUTTON_C  5
#endif

void setup() {
  Serial.begin(9600);

  Serial.println("OLED FeatherWing test");
  // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // Address 0x3C for 128x32

  Serial.println("OLED begun");

  // Show image buffer on the display hardware.
  // Since the buffer is intialized with an Adafruit splashscreen
  // internally, this will display the splashscreen.
  display.display();
  delay(1000);

  // Clear the buffer.
  display.clearDisplay();
  display.display();

  Serial.println("IO test");

  pinMode(BUTTON_A, INPUT_PULLUP);
  pinMode(BUTTON_B, INPUT_PULLUP);
  pinMode(BUTTON_C, INPUT_PULLUP);

  // text display tests
  display.setTextSize(1);
  display.setTextColor(SSD1306_WHITE);
  display.setCursor(0,0);
  display.print("Connecting to SSID\n'adafruit':");
  display.print("connected!");
  display.println("IP: 10.0.1.23");
  display.println("Sending val #0");
  display.setCursor(0,0);
  display.display(); // actually display all of the above
}

void loop() {
  if(!digitalRead(BUTTON_A)) display.print("A");
  if(!digitalRead(BUTTON_B)) display.print("B");
  if(!digitalRead(BUTTON_C)) display.print("C");
  delay(10);
  yield();
  display.display();
}
//**********************
 
 
 
 Links
 
 
+ https://www.youtube.com/watch?v=HdgugXvqR3I 

-------------------------------------------------------------------------------------------

 ---------------------------------
-------------------------------------

Wednesday, 3 February 2021

NLC Dispersion Delay - part two.

This is part 2 of the Dispersion delay.
 

 I first started building this in Feb , 2020.
Sorry for the delay. 2020 was a shit year.
Let hope '21 is better for everyone.
 
rECTIFIERS USED.
 
 
 This  is a bandpass filter module 
This module is based on ideas suggested by Lucas Abela.
The filters are in parallel and use vactrols to control delay (& I think cutoff frequency) ??


These are the light dependent resistors which I used.
GL5549
The type of LDR is impt.
It should have a dark resistance of at least 1M ohm.
I like a slow attack (or response time). 
VTL5C3s have a slope of 20, a dark resistance of 10M Ohms and a very slow response time.

  LDR type nr 5516.are good too.
 The 5516 gives about 50 Ohms at full brightness
 
 This module uses 9 vactrols.
You could just buy 9 of them from thonk or synthcube, but I decided to make my own.
In Andrews build notes he suggested red/green/orange/yellow LEDs
 

I chose orange for no better reason that I had a spare bag full of them that I probably wasn't going to need soon.
The colour of the LED will have a bearing on how the vactrol works.
So experimentation is in order.
 
I read somewhere, that yellow LEDs make the most efficient circuit.
 the best match is between green and green/yellow.  A blue LED is the worst possible choice.
Also remember that LED colours are normally not precise.
 
To get the best possible performance, the LED and LDR should have equal wavelengths.
This will require checking datasheets to find a good match. 
 

The yellow shrink wrap is to prevent shorts.
 

testing shrinkwrap first.
Double layer. 
You could use a white internal heatshrink to reflect as much light as possible back to the LDR
Of course if you have a 3D printer then make your own light tight boxes.
 
 

Im inserting the LED side in first.
remember that the short lead is the cathode. = K
 


These are the headers to join the 2 boards.

Jacks next.
All the pots are B100k

I'm surprised at just how well these vactrols work.


If anyone had tried making their own and experimented with different LEDs or LDRs do let me know.

 

---------------------------------------------------------------------------------------------------
Click here to return to the NLC Build Index:
http://djjondent.blogspot.com.au/2015/03/non-linear-circuits-ncl-index.html

Tuesday, 2 February 2021

Ringworld - Larry Niven

This is solid classic sci-fi.
Great world building.
It's part of a series.The " Known Space" series.
The books were written by American author Larry Niven.
 

The series is composed of five standalone science fiction novels.

Fate of Worlds is also a sequel to the four books of the Fleet of Worlds series, set in the same "Known Space" universe and all written by Niven and Edward M. Lerner:

“Ringworld” was written in Oct, 1970.
It follow the adventures of Louis Gridley Wu, who accepts the invitation to join a young woman and a couple of aliens on a journey to the mysterious Ringworld.

The Ringworld, is a giant object, 600 million miles in circumference, (1 million miles across),
 built around a star. It's a  megastructure, a marvel of engineering, consisting of a greater mass than Jupiter.
The ring has an atmosphere like Earth's and it rotates around the star to provide artificial gravity.
 A compromise between a Dyson Sphere and a planet ?
 
This is definitely a classic and I recommend that anyone interested in Sci-Fi  read it.
However, the story telling is a bit slow and tedious, so be warned. I did struggle with myself to finish it. I think the book may have won it's Hugo award on its concept which is pretty cool for the time.

These travelers become stranded on the hostile ring, and must find a way to get home.
 
Luis Wu, must outplay the murderous Kzin, & conquer the traps the ringworld.
It turns out that the Puppeteers have been manipulating humans for their "luck gene"
and the Kzin for aggression.

It's I guess why they are called puppeteers.
Getting towards the end of the book I realised that the whole novel really is about the female character Teela. Was the entire mission a result of her luck gene? In the end, it unites her with her true love.
It's interesting that luck is considered a genetic trait, that can be strengthened by selective breeding.






--------------------------------------------

sci Fi Index

----------------------------------------------

Monday, 1 February 2021

Eurorack Jam at Elk Elektronik

..

Nice one Ed.

The system uses many NLC modules. Esp like the Null-A
NULL-A Build notes

Nelson Falls - Mt Field - Tasmania

 Located in the Franklin-Gordon Wild Rivers National Park.
 


West Coast region of Tasmania
 




The landscape ranges from eucalyptus temperate rainforest to alpine moorland, rising to 1,434 metres at the summit of Mount Field .
Mount Field National Park was the first national park created in Tasmania.
Established in 1916.  It's 64 km northwest of Hobart.
 It's part of the homelands of the Big River nation of Tasmanian Aborigines.
 


The largest trees here were growing when Abel Tasman first sighted Tasmania in 1642.
Many are over 100m high.

 




 
 

Saturday, 30 January 2021

Monday, 25 January 2021

NLC Mobius Pill - Build notes -part 1

 These are my build notes for the Nonlinear Circuits Mobius Pill.
 
The MP is a chaos - noise module in Eurorack format.
So if you like chaotic noise this is for you.
 
The BOM looks pretty standard with no rare or hard to find parts.
You will need two 4046 ICs. 
These are your PLLs (Phase Locked Loops). 
(These PLLs create the chaos.)

There are also two Op-amps. These are standard 072s.

In addition to the two PLLs the circuit also has two vactrol based  low pass filters 
These filters are in the Buchla style... I think they are 292 inspired gate/filter combos.

The vactrols are all DIY (black box design) using LEDs and light dependent resistors.
The PLLs have a single combined voltage control input.
Each filter has it's own voltage control input.

 
 
Thanks  to Andrew for supplying this diagram.
It explains what's happening in this circuit.
There are two TL072 op-amps, two VCOs, two filters , and two PLLs


The phase detectors feed into the LPFs and theirs outputs are fed into the non-inverting inputs of one and the inverting input of the other.
The outptuts of each control VCOs.


There are 4 inputs & 4 outputs.

Inputs:
Input signal, Freq CV, LPG1 CV and LPG2 CV.

Outputs
Two of the outputs are from the LPGs and two are from the PLL VCO










Some pics of the virgin PCBs.


LEDs go here. These LEDs are part of the vactrols.

---------

The 4046 IC -- it contains a VCO, two phase comparators & a zener diode.

The zener diode acts as a voltage regulator, setting the voltage at 5.1V. across it, for voltage input into pin 4. This is the voltage that controls the number of oscillations for the output digital signal of the chip
  
The oscillator will produce a digital square waveform .
Analog input to the VCO is at pin 9.
Digital output of a square wave is at pin 4. 
This is fed into an op-amp and becomes the VCO 1 & 2 outputs.
 
PC (Phase comparator) 1 out (pin 2) becomes the LPG output.
Hopefully, this will help you trouble shoot, should you run into any probs.

The 4046s




First place the ICs,
 
 
Now the  nineteen 100k resistors.

Rest of the resistors... Caps next.
 
 
the

 The 1uF and 10uF need to be 25V or more.

To be continued ......Waiting for those diodes 

Links

 
---------------------------------------------------------------------------------------------------
Click here to return to the NLC Build Index:
http://djjondent.blogspot.com.au/2015/03/non-linear-circuits-ncl-index.html