#ssd1306 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #ssd1306, aggregated by home.social.
-
So, I finished making my fluid sim gift on ESP32!
https://corteximplant.com/@zeyus/114095311805576694
Please excuse my nails, I was literally working with bitumen and managed to clean it off my hands, but it started to hurt scrubbing
Sorce code (including 3d printed case design): https://git.cyberwa.re/zeyus/FLIP-ESP32-I2C-OLED
#esp32 #flipfluids #fluidsim #fluidsimulation #3dprint #oled #ssd1306 #imu #mpu #electronics #embeddedsystems #embedded #arduino
-
Библиотека для OLED1306 с русским языком на RPi
Здравствуйте люди! Я сделал библиотеку под названием "SillyOled" для работы с OLED-дисплеями SSD1306 через I2C и SPI. Библиотека может показывать текст, фигуры, бит-мапы, а также управлять дисплеем. Вот главные особенности:
https://habr.com/ru/articles/933328/
#oledдисплей #ssd1306 #raspberry_pi_pico #thonny #python #библиотека
-
@fast_code_r_us I build this with (more for) my nephew with #arduinonano clone and an #SSD1306 128x32 #oled display.
I used the #U8g2 to display the text and the u8g2_font_unifont_t_weather to display the thermometer icon.
-
Делаем автомобильный компьютер с нескучным функционалом
Привет, я собрал небольшой бортовой компьютер для авто, который умеет показывать температуру, время с момента включения и раздавать «Free Wi-Fi». В этой статье приведён код, список компонентов и всё остальное, чтобы собрать такой же. Назвал я его Kruk — от беларуского слова «Крук» (рус. «Крюк»). Вот видео его работы на YouTube . Здесь его страница на GitHub. Если вы уже посмотрели видео, то понимаете суть функции «Free Wi-Fi». Как только к Wi-Fi подключаются, система сразу переводит пользователя на captive portal , а сам компьютер начинает показывать, помимо температуры и времени, ещё два дополнительных окна с информацией о количестве пользователей, подключившихся к Wi-Fi, и о количестве пользователей, которые до сих пор к нему подключены (online).
https://habr.com/ru/articles/920714/
#esp32 #ESP32C3 #ssd1306 #ds18b20 #arduino_ide #bmw_e36 #WeActStudio #Kruk #Sabas_Solutions #микроконтроллеры
-
Ah yes, the riveting saga of #SSD1306 #drivers 🤖💾 where the hero bravely battles the villainous #single #font #limitation. Who knew #rendering #text on an #OLED required such Herculean effort? Next up: decoding the ancient #mysteries of the #rotary #phone. 📞✨
https://subalpinecircuits.com/ssd1306-and-font-rendering/ #HackerNews #ngated -
Экран для вывода данных через COM-порт
Если у компьютера нет не только монитора, но и даже видео-выхода, а показания датчиков хотелось бы видеть, то решением может быть отправлять данные в виде строки в COM-порт, который будет слушать микроконтроллер и отображать приходящую строку на своём дисплее. Под катом простейшая реализация этого на микроконтроллере ATtiny13 и 0,96'-экране SSD1306 с разрешением 128х32.
-
CH32V003 первый проект. Мигаем OLED дисплеем и делаем измеритель концентрации CO2
В последнее время разработчики электроники испытывают трудности с поставками электронных компонентов. Одним из решений данной проблемы является переход на "исконно китайскую" элементную базу. Это решение подкупает ценой и доступностью, но пугает плохой документацией и небольшим количеством информации на понятных нам языках. В данной публикации расскажу о любопытном микроконтроллере на ядре RISC-V и сделаю простое первое устройство - датчик концентрации углекислого газа в воздухе/мигалку OLED дисплеем и светодиодом (куда ж без мигалки светодиодом). В репозитории размещен проект для тех, кто захочет воспользоваться данными наработками.
-
This is a bit of an odd one, but I was asked to put something musically related together as a game to get in the spirit of the season, so I thought something along the lines of an Arduino adjustable tone generator with the aim being the player has to tune it by ear to as close to concert A – 440Hz – as possible.
This shows how I used my Nano Audio Experimenter Sheild PCB to do it. Note, as with most of my builds, this isn’t particularly mechanically satisfying, but it did the job 🙂
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
These are the key Arduino tutorials for the main concepts used in this project:
- Arduino Tone Pitch Follower
- Arduino Analog Read Serial
- Adafruit GFX Library
- Adafruit small OLED display Library
- Nano Audio Experimenter Sheild PCB
If you are new to Arduino, see the Getting Started pages.
Parts list
- Nano Audio Experimenter Sheild PCB.
- Arduino Nano.
- SSD1306 OLED display.
- 1x temporary make, toggle switch.
- Amplification and audio connections.
- Power – either (micro) USB or a 7-9V barrel jack.
The Circuit
This uses the Nano Audio Experimenter Sheild PCB with the following configuration:
- No DAC fitted.
- Audio tone output via D3 through the audio output stage.
- Audio GND jumpered across to digital GND via DAC header (see later).
- SSD1306 OLED display fitted.
- Switch connected to a free IO pin (recommend D4-D6).
- No MIDI circuitry required.
- Powered either by 7-12V barrel jack or 5V USB direct to the Nano.
The photo shows the key configuration options. To get an audio output whilst using PWM, the analog GND portion of the board needs connecting to the main GND. This can be done by adding a link between the two holes highlighted below:
In my case, as I’m using a pre-build PCB I’ve added a separate single-pin header socket which then can be used to jumper across these two connectors without removing the future ability to use a DAC again.
The frequency is set using all three pots. This gives a lot more variability as a game than using a single pot. The OLED display is used to show the frequency once it has been chosen. This happens while the switch is pushed.
The Arduino tone function will be used, which provides a 0-5V DC biased square wave output. Sending this through the audio filter and output stage means that the voltage is reduced (via the resistor potential divider) and the DC bias is removed (via the coupling capacitor) so it can be used as a more typical audio line output and connected to an old amp or similar.
There are a number of options where a GPIO pin is available via a header which can then be used to connect to a simple push switch:
- Top: D9 is exposed in the PWM output jumper (which is set to select D3).
- Far Right: D4-6 are exposed for use with an analog multiplexer.
- Right: D7 is also exposed both in the jumper that can be used to set the behaviour of S4 and (assuming the jumper is actually set to make the link) D7 becomes exposed on the far right header too.
- Far Right: A3 is also exposed on the far right header and so could also be used if required.
The downside of all of these is that my ready-made board requires header pin sockets which isn’t particularly robust for a game.
Advanced Option
But then I realised there is one additional pin exposed in a way that could still be used as an input but with a far more robust connector. D1 (TX) is linked to the MIDI OUT 5-pin DIN socket too, albeit via a 220Ω resistor. This means that I also have the option of connecting a switch across a 5-pin DIN Socket’s pins 2 (GND) and 5 (TX) and using that instead. The 5 pin DIN socket makes a much stronger and robust connection to the board, even if it is a little unconventional.
WARNING: The switch must NOT be connected between pins 4 and 5, which are the normal MIDI connections or from pin 4 to GND. Depending on the configuration used, there is a risk of connecting 5V to GND in the Arduino Nano and shorting something out. You might get away with it, depending on which resistors you end up having in the circuit (5V / 220Ω is just under 30mA), but it is really important to double checking the wiring before use!
Here is a “from the front/plug side” and “from the back/wiring side” view of a 5-pin DIN plug showing which pins are 5 and 2.
Using D1 this way means that the serial port cannot be used (even though this project isn’t using MIDI) as TX is now being reconfigured as an INPUT.
RX isn’t an option as a populated MIDI circuit has an optoisolator between the external DIN socket and the GPIO pin.
Of course if a new PCB is being used, the MIDI section can be left unpopulated and it would then be possible to directly connect one of the MIDI sockets to either RX or TX. But for this project I’m just planning on reusing my generic, fully populated board, hence RX is not an option.
The Code
The basic tone generation is simply the Arduino tone function (more here). The frequency is a simple sum of the three potentiometers giving a range from 0 up to 3069. In musical terms this spans the range of notes from A0 (and lower) almost up to G7 (just over 3kHz).
Once the choice of frequency has been made, by ear alone, the button can be pressed and the display used to show both the frequency chosen and the numerical difference from 440Hz. The winner is the person closest to 440Hz.
To add an additional feeling of skill, but in reality to add a dose of luck, I’ve added two decimal points in the display which are actually randomly chosen each time the button is pressed. The idea being that if two players both get a pretty close 440Hz then the winner is essentially selected by random!
In order to avoid having to do decimal arithmetic in the code however, when calculating the difference I’m multiplying the frequency by 100, adding in the (random) decimal as if it was just a number between 0 and 99 and then comparing the result to 44000.
D3 is selected as the audio output and D4 is selected as the trigger button for the display using the following two lines:
int SPEAKER = 3;
int TRIGGER = 4;Additional notes from the code:
- I’ve implemented a software smoothing algorithm for the reading of the potentiometers in an attempt to remove some jitter. Although again a small amount of jitter brings another element of luck into the game.
- When printing out, I have to take care of blank spaces in the frequency to keep the decimal point aligned for anything from 1 to 4 digits; but also have to allow for an extra leading zero in the case of randomly selecting a decimal in the range 0.01 to 0.09.
- I’m using the Adafruit GFX and SSD1306 libraries for the Arduino.
- When the button is pressed, the display changes to show the frequency. When it is released the frequency is hidden again.
Closing Thoughts
This was a bit of a diversion and I could have easily knocked something up from solderless breadboard or stripboard with some pots and a display. But being able to just grab the PCB and experiment with the code made putting it together pretty easy.
Kevin
https://diyelectromusic.wordpress.com/2023/12/01/arduino-guess-the-frequency-game/
-
This takes the Arduino Nano Mozzi Experimenter Shield PCB and swaps out three of the pots for the optional use of the following:
- MCP4725 DAC.
- SSD1306 display.
- IO links for an analog multiplexer.
This is in addition to the remaining three potentiometers, the MIDI interface and the audio filter output.
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
The Build Guide is available here: Nano Audio Experimenter Sheild PCB Build Guide.
If you are new to Arduino, see the Getting Started pages.
The Circuit
The board includes a 5V MIDI IN and unbuffered MIDI OUT. It includes a barrel jack for power directly into the Arduino Nano’s raw input.
It includes pin headers for an SSD1306 display and MCP4725 DAC and headers to allow connection to an analog multiplexer such as a 4051 (8-way) or 4067 (16 way). This is connected to A3.
There is also an audio output filter stage that can be switched between D3 or D9 for PWM output or the DAC.
The following Arduino pins are used in total:
- A0, A1, A2: potentiometers.
- A3: optional analog multiplexer input.
- A4, A5: SCL, SDA I2C interface.
- D0, D1: UART MIDI RX and TX.
- D3 or D9: optional PWM output.
- D4, D5, D6 and optionally D7: multiplexer “address” outputs.
PCB Design
Key aspects of the design:
- It follows quite closely the format of the Arduino Nano Mozzi Experimenter Shield PCB on the power, MIDI and Nano side.
- A jumper allows the audio output to be connected to D3, D9 or neither if a DAC is plugged in.
- The multiplexer’s S4 pin can be hard-jumpered to ground if required or left unconnected (or both) if not using a 4067 16-way device.
- There are header pins which match the footprint of a DPDT switch to disable the MIDI link to D0/D1 to allow uploading of sketches.
- The audio section of the DAC has a separate GND plane for the analog output section. If the DAC is not used this has to be connected to the GND plane of the rest of the board, so an additional connecting, plated hole is provided near to the DAC header footprint.
Closing Thoughts
I believe it is possible to use both the SSD1306 display and the MCP4725 DAC whilst servicing the other IO on the board, but I can’t imagine it would yield any practical or useful function to do so!
This is a board with options that aren’t necessarily meant to all be used at the same time. It is the latest in my line of “experimenter” boards, essentially designed for messing about with audio on the Arduino Nano.
The only thing I wished I’d added was some test points for an oscilloscope probe.
Kevin
https://diyelectromusic.wordpress.com/2023/11/12/nano-audio-experimenter-sheild-pcb/
#74hc4067 #arduinoNano #cd4051 #mcp4725 #midi #multiplexer #mux #pcb #pwm #ssd1306
-
MiniDexed Raspberry Pi IO Board
I’ve been toying with the idea of some kind of IO board for my MiniDexed experiments for use with a Raspberry Pi. I initially wanted something fully self-contained – i.e. just pop it on a Raspberry Pi and you’re good to go. But then it was pointed out that having all the IO connections on one side is much more friendly from a “putting it all in a case” point of view.
- Update: There is now a newer version of this design for the SSD1306: MiniDexed Raspberry Pi IO Board V2 Design.
In the end, I used many of the same circuit elements and came up with two designs.
Update: Here are links to the build guides for these PCBs:
There is a version for the Raspberry Pi V1 here: MiniDexed Raspberry Pi V1 IO Board and my pseudo TX816 can be found here: MiniDexed TX816.
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
These are the key tutorials for the main concepts used in this project:
- My first experiments in KiCad: Arduino Uno Dual Merge MIDI “Shield” – Part 2
- MiniDexed: “Bare Metal” Raspberry Pi MiniDexed DX7
If you are new to microcontrollers and single board computers, see the Getting Started pages.
Basic Requirements
I wanted a board to do the following:
- Include a screen or display.
- Have MIDI IN.
- Optionally include MIDI OUT and THRU.
- Have a rotary encoder for input.
- Incorporate a PCM5102 DAC for audio output.
- Optionally include a couple of buttons.
As I mention above, I was initially after something that would fit within a normal “HAT” type footprint for a Raspberry Pi, which is pretty constraining, but following on from the Clumsy MIDI board, should be possible with a small SSD1306 OLED display.
But I was also keen to try to build something that would allow all the IO to line up along the back, so I’ve also designed a larger board that overhangs the Pi and allows for a full three MIDI din sockets. This larger board can accommodate a HD44780 LCD display as used in the original MiniDexed setup.
I’m happy for the whole thing to receive power via the Pi and of course USB and ethernet connections are also available on one side.
MiniDexed RPi IO Board (SSD1306 Version)
Starting a new project in KiCad, there is already a “Raspberry Pi 40-pin Extension Board” template which provides the basic outline, PCB footprint for the GPIO, and cut-outs for the display and camera.
Here is the schematic I’m working to.
Points worthy of note:
- A H11L1 based MIDI IN circuit connected to RX0.
- A rotary encoder (not a KY-040 module) is used with 10pF capacitors for debouncing the connections.
- A PCM5102 in the “GY module” format (as used by Clumsy MIDI).
- Two optional button push-switches which are also broken out to headers, also with debouncing capacitors.
- I’ve included the header for the SSD1306 in SDA-SCL-VCC-GND format.
This is the GPIO map used:
If the rotary encoder seems to be “backwards” then swap RE_A and RE_B in the configuration. Note that at the time of writing, I2C SSD1306 displays are in development but hopefully will be available in MiniDexed by the time you read this.
Here is the board that has been sent off for manufacturing.
Design notes:
- I used the GY-PCM5102 symbol and footprint library from the Clumsy MIDI GitHub repository.
- The H11L1 is upside down as that made routing easier.
- I’ve included footprints for two push-buttons (the very common “through hole” type used in many maker projects) but also included two sets of header pins so these could be wired off to something else if required.
- I’m using a 32×128 OLED (again the same one used with Clumsy MIDI). As I say, MiniDexed doesn’t support this directly at the time of writing, but I’ve submitted a PR for support that is waiting to be accepted, so hopefully it will be fully supported soon.
- Unlike my previous boards, I used a filled zone to create a link to the GND net and provided a ground plane on the rear copper layer of the board.
- Both the SSD1306 and PCM5102 modules I’m using have a built-in regulator to take 5V down to 3V3. This is particularly critical for the SSD1306 as it includes pull-ups for the I2C connection to the 3V3 level (not 5V). But this is why they are hooked up to 5V yet I’m not using level-shifters to interface to the (3V3 logic) Pi.
Here is an early “space test” (without the buttons) with a paper printout to give you an idea of what I’m aiming for.
And an image of the Gerbers as sent off for manufacture:
MiniDexed RPi IO Board (HD44780 Version)
Again starting a new KiCad project from the Raspberry Pi 40-pin extension board template, this is the circuit I’m working with for this one.
Schematic Notes:
- This is using the same PCM5102, rotary encoder, and switches as above (although I’ve just realised I never swapped the schematic and pcb over to use the GY-PCM5102 module symbol and footprint – oh well, for this board it is a 6-way set of headers!).
- This uses the “data interface” version of the HD44780. I did think about using the I2C version, but thought this would be the simplest case to build if it could be made to work.
- There is MIDI IN, OUT and (optional) THRU.
- The MIDI circuit borrows heavily from Clumsy MIDI and includes a 74HCT14 hex inverter as an output buffer for OUT and THRU (although it is labelled as a 74HC14 on the schematic and pcb).
- THRU is optional, in which case the unused inputs to the 74HCT14 should go to GND instead (selected by solder jumpers).
- OUT can optionally be changed to a(nother) THRU rather than an OUT, in which case it can be switched via solder jumpers to be connected to RX0 rather than TX0.
To simplify the routing of the PCB, the pinouts for the various components have changed. Here is the pinout being used (this is now quite different to the original MiniDexed pinout).
So this is the design for the pcb that has been sent off for manufacture:
Design notes:
- The PCB is designed to be used with a Raspberry Pi “upside down”. That is, with the connectors at the top, and GPIO at the bottom. This means the USB/RJ45 ports will be on the left hand side, as shown.
- The MIDI THRU section is optional. If only two MIDI sockets are required that part of the board can be cut off along the line indicated. If that is done then the solder jumpers beneath the 74HC14 must be changed as follows:
- Cut the “THRU” jumper (this disconnects the 74HC14 from RX0).
- Solder the “NO THRU” jumper (this connects the unused 74HC14 port to GND).
- The MIDI OUT port can be changed to a THRU too. If the original THRU is removed, this means you can just have MIDI IN and THRU instead of IN and OUT if you wish. If the original THRU is retained, then you can have a MIDI IN and two THRUs. To turn the OUT into a THRU change the two solder jumpers near the H11L1 as follows:
- Cut the “OUT” jumper (this disconnects the OUT circuit from TX0).
- Solder the “THRU” jumper (this connects the OUT circuit to RX0 to make it a THRU).
- Whilst on the subject of MIDI sockets, all three sockets are oriented to go underneath the board so they will go alongside the RPi.
- The optional buttons are not provided on the PCB, but via two sets of headers on the left hand side of the board.
- As mentioned above, annoyingly I forgot to change the PCM5102 footprint to that of a GY-PCM5102 module, so there are no holes for the additional 9-way header. These are not used electrically, but they would have provided some additional physical support. Instead I might solder some header pins and use the plastic pin spacer as a support under the board (but I’ll look into that when I get the boards back).
- I’ve included a simple “preset” pot to control the contrast for the LCD.
- Once again I used a filled zone to create a link to the GND net and provide a ground plane on the rear copper layer of the board. Note that I left a cut-out under the traces to the THRU part of the circuit, to reduce the chance of a short if the board is cut off at this point.
- Most LCD1602/HD44780 modules are 5V parts, with 5V required to ensure the LCD actually illuminates successfully. However, as described here, it is usually ok for a 3V3 output to drive a 5V input, so as long as the LCD isn’t attempting to drive the IO pins for the Pi, the Pi should be fine talking 3V3 to the LCD. So that is the approach I’m taking. It does mean that this won’t accept a 3V3 LCD module. But in all this, remember my level of electronics experience, and make up your own mind…
Manufacturing
Both boards should be built using the standard, cheapest manufacturing options. Both are fine with a 6/6 mil constraint on track width and separation.
The second board is somewhat larger than the common “cheap” tier. For me, all my other boards were $4.60 plus postage for 10 boards, but the larger one has jumped up to around $27 plus postage.
On the back of my first blog post, having used Seeed Fusion to produce my first boards, they sent me some money off vouchers, so I’ve used them once again here. That was particularly welcome given the increased cost of the larger board!
I still don’t really have a space to store these designs. But I’ll update this post when I do!
Closing Thoughts
Although either of these designs could potentially be used in a case to make a nice, small, self-contained unit, I can’t guarantee that the spacing of connectors and components will really allow it. I’m also not sure what will be required in terms of cooling for the Pi, so I’ll have to see how I get on. It may be that I’ll need more spacing between the Pi and the IO board.
I’m still learning with KiCad, so am fully expecting continued mistakes or odd design choices, but I think both of these will be interesting to try.
Update: mistakes already spotted since sending them off:
- The afore-mentioned GY-PCM5102 footprint error.
- Labelling on the board states 74HC14 and it really has to be a 74HCT14.
So that is the walk-through of the design of these boards. Of course I won’t really know if they are successful until I get the boards back from manufacturing!
Kevin
#hd44780 #midi #minidexed #pcb #pcm5102 #raspberryPi #ssd1306
-
Making Your Own Technically-HDMI OLED Monitor - One day, [mitxela] got bored and decided to build his own HDMI monitor – the uncon... - https://hackaday.com/2022/04/01/making-your-own-technically-hdmi-oled-monitor/ #computerhacks #laptopshacks #oleddisplay #oledssd1306 #linuxhacks #i2coled #ssd1306 #smbus #hdmi #oled #ddc
-
Bridging the PC and Embedded Worlds with Pico and Python - Although protocols like I2C and SPI are great for communicating between embedded ... - https://hackaday.com/2021/04/18/bridging-the-pc-and-embedded-worlds-with-pico-and-python/ #raspberrypipico #i2cinterface #raspberrypi #micropython #ssd1306 #gpio #i2c #spi
-
Smart Lid Spies On Sourdough Starter, Sends Data Wirelessly - [Justin Lam] created a wonderfully-detailed writeup of his Smart Sourdough Lid project, which was cr... - https://hackaday.com/2021/03/04/smart-lid-spies-on-sourdough-starter-sends-data-wirelessly/ #sourdoughstarter #cookinghacks #3dprinted #sourdough #smartlid #esp8266 #ssd1306 #vl6180x #dht22 #oled #iot #tof
-
The Swiss Army Knife of Bench Tools - [splat238] had a ton of spare sensors laying around that he had either bought for a separate proje... more: https://hackaday.com/2020/07/28/the-swiss-army-knife-of-bench-tools/ #multi-tool #multimeter #tachometer #toolhacks #mcp23008 #mlx90614 #mpu-6050 #encoder #ssd1306 #vl53l1x #tp4056 #lm358 #wemos #pir
-
Arduino Handheld Game System Gets a Grip - With little more than an Arduino, an OLED display, and some buttons, it’s easy to build your own fau... more: https://hackaday.com/2020/02/06/arduino-handheld-game-system-gets-a-grip/ #adafruitfeather #handheldshacks #arduinohacks #handheldgame #cyberpunk #arduboy #ssd1306 #oled