DIESEL RPM Readout | VW AAZ Drehzahl anzeige

Hallo Liebe Community!

Aktuell sitze ich an einem kleinen Tacho Display für den Golf 2.
Als Hardware verwende Ich aktuell einen Arduino Nano, ein 0,96 zoll Oled, push button und mehrere sensoren.

Ich habe bereits die aktuelle Uhrzeit durch ein Date/Time Module (DS1302) integriert,
Ein DS18B20 Temperaturfühler für die Wassertemperatur
und ein Spannung Sensor Modul bis 25v sind auch schon an board.

Im Code Implementiert habe ich bereits eine Lambda Page diese wird allerdings erst in zukunft folgen da das Lambda shield doch recht teuer ist.

Aktuell sitze ich am Problem wie Ich am Arduino das Klemme W Signal der Lichtmaschine Lesen kann?

Das Signal welches die Lichtmaschiene ausgibt ist ein meines Wissens Sinus-Halbwelle mit 0-14v
(das sind die infos die Ich aktuell ergoogeln konnte.)

Ein Oszilloskop besitze ich leider nicht.

Was für eine Schaltung könnte ich mit welchen komponenten bauen um zum beispiel die frequenz der Sinus Halbwelle in ein V signal zu wandeln welches der Arduino auslesen könnte?
(Mit einem Schaltplan/ zeichnung wäre ich in der lage diese zu bauen.)

Vielen Dank Für eure Hilfe im voraus?

RallyeCOMbySenpaiv2

Aktuell sind keine Sensoren angeschlossen aber bereits im Code Implementiert.


// CLOCK
// CONNECTIONS:
// DS1302 CLK/SCLK --> 5
// DS1302 DAT/IO --> 4
// DS1302 RST/CE --> 3
// DS1302 VCC --> 3.3v - 5v
// DS1302 GND --> GND

#include <ThreeWire.h>  
#include <RtcDS1302.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#include <OneWire.h>
#include <DallasTemperature.h>
// Data wire is plugged into port 6 on the Arduino
#define ONE_WIRE_BUS 6
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);




#define SCREEN_WIDTH 128 // OLED display width,  in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels

// Clock Code 
ThreeWire myWire(4,5,3); // IO, SCLK, CE
RtcDS1302<ThreeWire> Rtc(myWire);



// STROM MESSUNG
float Messwert;
float Spannung;



// D12 as 5V Pin 
int PowerPin = 12;

int buttonState = 0;


// declare an SSD1306 display object connected to I2C
Adafruit_SSD1306 oled(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

// 'Rallye COM Logo', 128x64px
const unsigned char epd_bitmap_Rallye_COM_Logo [] PROGMEM = {
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x78, 0x1c, 0x07, 0x0e, 0x0c, 0xff, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x38, 0xe0, 0x9c, 0x1c, 0x07, 0x07, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x30, 0xe1, 0x9c, 0x1c, 0x07, 0x07, 0xb0, 0xe0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x3f, 0x83, 0x1c, 0x18, 0x06, 0x03, 0xe0, 0xfc, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x70, 0xe3, 0xfe, 0x38, 0x0e, 0x01, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x70, 0xe6, 0x0e, 0x38, 0x0e, 0x01, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x70, 0xec, 0x0e, 0x3f, 0xcf, 0xf1, 0x81, 0xff, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0xe0, 0xf1, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x38, 0x71, 0xb9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x70, 0x71, 0xb9, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x70, 0x71, 0x3b, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x70, 0x73, 0x3a, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x70, 0xe3, 0x3a, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xfe, 0x1f, 0xc2, 0x3c, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x18, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x28, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfb, 0x31, 0xbd, 0xdc, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xba, 0x1b, 0xfd, 0x66, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x0e, 0x3d, 0x7e, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x3b, 0xbd, 0xde, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x10, 0xdd, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xe8, 0xd5, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x88, 0xd1, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x88, 0xcd, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xe8, 0xc5, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x10, 0xdd, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

// 'Volkswagen_Logo_till_1995', 128x64px
const unsigned char VW_LogoVolkswagen_Logo_till_1995 [] PROGMEM = {
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x07, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x07, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xe0, 0x07, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xef, 0xf0, 0x0f, 0xf7, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x8f, 0xf0, 0x0f, 0xf1, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x07, 0xf0, 0x0f, 0xe0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x07, 0xf8, 0x1f, 0xe0, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0xf8, 0x1f, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0xf8, 0x1f, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x01, 0xfc, 0x03, 0xfc, 0x3f, 0xc0, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x01, 0xfe, 0x01, 0xfc, 0x3f, 0x80, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x01, 0xfe, 0x7f, 0x80, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x00, 0xfe, 0x7f, 0x80, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x00, 0xfe, 0x7f, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x00, 0xff, 0xff, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x80, 0x7f, 0xff, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x80, 0x7f, 0xfe, 0x01, 0xfd, 0xe0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0xbf, 0x80, 0x7f, 0xfe, 0x03, 0xfd, 0xf0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0xbf, 0xc0, 0x7f, 0xfe, 0x03, 0xf9, 0xf0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x9f, 0xc0, 0x3f, 0xfc, 0x07, 0xf9, 0xf0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x9f, 0xe0, 0x3f, 0xfc, 0x07, 0xf1, 0xf0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x8f, 0xe0, 0x1f, 0xf8, 0x07, 0xf1, 0xf0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x8f, 0xe0, 0x00, 0x00, 0x0f, 0xf1, 0xf0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x8f, 0xf0, 0x00, 0x00, 0x0f, 0xe1, 0xf0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x87, 0xf0, 0x1f, 0xf8, 0x1f, 0xe1, 0xf0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x87, 0xf8, 0x3f, 0xf8, 0x1f, 0xe1, 0xf0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x87, 0xf8, 0x3f, 0xfc, 0x1f, 0xc1, 0xf0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x83, 0xf8, 0x7f, 0xfc, 0x3f, 0xc1, 0xf0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x83, 0xfc, 0x7f, 0xfe, 0x3f, 0xc1, 0xf0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x83, 0xfc, 0x7f, 0xfe, 0x3f, 0x81, 0xe0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x07, 0xc1, 0xfc, 0xff, 0xfe, 0x7f, 0x83, 0xe0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x07, 0xc1, 0xfe, 0xff, 0xff, 0x7f, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0xfe, 0xfe, 0xff, 0xff, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0xff, 0xfe, 0x7f, 0xfe, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0xff, 0xfc, 0x7f, 0xfe, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x7f, 0xfc, 0x3f, 0xfe, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x7f, 0xf8, 0x3f, 0xfc, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0xf8, 0x1f, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0xf8, 0x1f, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x1f, 0xf0, 0x1f, 0xf8, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1f, 0xf0, 0x0f, 0xf8, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x9f, 0xf0, 0x0f, 0xf9, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xe0, 0x0f, 0xf7, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xe0, 0x07, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x07, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x07, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 1040)
const int epd_bitmap_allArray_LEN = 1;
const unsigned char* epd_bitmap_allArray[1] = {
	epd_bitmap_Rallye_COM_Logo
  
  
};

// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 1040)
const int VW_LogoallArray_LEN = 1;
const unsigned char* VW_LogoallArray[1] = {
	VW_LogoVolkswagen_Logo_till_1995
};




void setup() {

  


  // initialize OLED display with address 0x3C for 128x64
  if (!oled.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
    Serial.println(F("SSD1306 allocation failed"));
    while (true);
  }
    delay(1000);         // wait for initializing
 

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

  // Display bitmap
  oled.drawBitmap(0, 0,  epd_bitmap_Rallye_COM_Logo, 128, 64, WHITE);
  oled.display();

  // Invert Display
  //display.invertDisplay(1);

    delay(5000);         // wait for initializing
 
  // Clear the buffer.
  oled.clearDisplay();
  oled.display();


  // Define D12 as 5V Output (max. 20ma) 
  pinMode(PowerPin, OUTPUT);     
  digitalWrite(PowerPin, HIGH);  

  
  pinMode(2, INPUT_PULLUP);




  Serial.begin(57600);   // Begin Serial communication

    // Start up the library of Wasser Temp 
  sensors.begin();

// CLOCK CODE Start // 


    Serial.print("compiled: ");
    Serial.print(__DATE__);
    Serial.println(__TIME__);

    Rtc.Begin();

    RtcDateTime compiled = RtcDateTime(__DATE__, __TIME__);
    printDateTime(compiled);
    Serial.println();

   
}
// CLOCK CODE END // 



void loop() {

  // Wasser Temperatur
  float tempC = sensors.getTempCByIndex(0);


  // CLOCK CODE START 


     RtcDateTime now = Rtc.GetDateTime();

    printDateTime(now);
    Serial.println();

    if (!now.IsValid())
    {
        // Common Causes:
        //    1) the battery on the device is low or even missing and the power line was disconnected
        Serial.println("RTC lost confidence in the DateTime!");
    }


// CLOCK CODE END 


// STROM SPANNUNG VOLTS CODE 
{
Messwert=analogRead(1); //Spannungswert am analogen Eingang 1 auslesen
Spannung= map(Messwert, 0, 1023, 0, 250); //Umwandeln des Sensorwertes mit Hilfe des "map" Befehls. Da der Map-Befehl keine Kommastellen ausgibt, wird hier vorerst mit größeren Zahlen gearbeitet.
Spannung=Spannung/10; // Das Ergebnis wird nun durch 10 geteilt, um die Anzeige als korrekten Wert mit einer Nachkommastelle ausgeben zu können.
//Serial.println(Spannung, 2); //Endgültigen Spannungswert im seriellen Monitor anzeigen. Die Zahl "2" in der Klammer sorgt dafür, dass das Ergebnis mit zwei Nachkommastellen angezeigt wird. Eine "1" würde hier für eine Nachkommastellen sorgen etc.
//delay(100); //Einhundert Miliesekunde warten, damit im Seriellen Monitor nicht zu viele Daten ankommen.
}




    oled.clearDisplay();
   oled.setTextSize(2);             // Normal 1:1 pixel scale
   oled.setTextColor(WHITE);        // Draw white text


    if (digitalRead(2) == 1) {
    buttonState = (buttonState + 1) % 7;
    delay (25);
  }


 switch (buttonState) {
    case 0:
      oled.clearDisplay();;
     oled.setCursor(20, 20);
      oled.setTextSize(3); 
     oled.print("14:50");
          oled.setCursor(35, 50);
          oled.setTextSize(1); 
     oled.print("31.10.2022");
 
     // Enviar a pantalla
     oled.display();
     break;

    case 1:
      oled.clearDisplay();
      oled.setCursor(28, 10);
      oled.print("Volts :");
     oled.setCursor(10, 40);
      oled.setTextSize(3); 
     oled.print(Spannung, 1);
       oled.setCursor(100, 40);
            oled.print("V");
      oled.setTextSize(2); 
     // oled.print((char)247); // degree symbol 
    
    // Enviar a pantalla
    oled.display(); 
    break;

    case 2:
      oled.clearDisplay();
      oled.setCursor(28, 10);
      oled.print(" RPM :");
     oled.setCursor(28,40);
      oled.setTextSize(3); 
     oled.print("1024");
      oled.setTextSize(2); 
     // oled.print((char)247); // degree symbol 


    // Enviar a pantalla
    oled.display(); 
    break;


 case 3:
       oled.clearDisplay();
      oled.setCursor(18, 10);
      oled.print("Lambda :");
     oled.setCursor(10, 40);
      oled.setTextSize(3); 
     oled.print("0,86");
       oled.setCursor(100, 40);
            oled.print("V");
      oled.setTextSize(2); 
     // oled.print((char)247); // degree symbol 


    // Enviar a pantalla
    oled.display(); 
    break;



     case 4:
      oled.clearDisplay();
      oled.setCursor(20, 10);
      oled.print("Wasser :");
     oled.setCursor(20, 40);
      oled.setTextSize(3); 
      oled.print(tempC, 1);
       oled.setCursor(80, 40);
            oled.print("C");
      oled.setTextSize(2); 
     oled.print((char)247); // degree symbol 

    // Enviar a pantalla
    oled.display(); 
    break;

     case 5:
    oled.clearDisplay();
  // Display bitmap
  oled.drawBitmap(0, 0,  epd_bitmap_Rallye_COM_Logo, 128, 64, WHITE);
    
     // Enviar a pantalla
     oled.display();
     break;


     case 6:
    oled.clearDisplay();
  // Display bitmap
  oled.drawBitmap(0, 0,  VW_LogoVolkswagen_Logo_till_1995, 128, 64, WHITE);
    
     // Enviar a pantalla
     oled.display();
     break;




  }
  delay (150);
  
    //read the pushbutton value into a variable
 // int sensorVal = digitalRead(2);
    //print out the value of the pushbutton
 // Serial.print(buttonState);
}



// CLOCK CODE START 

#define countof(a) (sizeof(a) / sizeof(a[0]))

void printDateTime(const RtcDateTime& dt)
{
    char datestring[20];

    snprintf_P(datestring, 
            countof(datestring),
            PSTR("%02u/%02u/%04u %02u:%02u:%02u"),
            dt.Month(),
            dt.Day(),
            dt.Year(),
            dt.Hour(),
            dt.Minute(),
            dt.Second() );
    Serial.print(datestring);
}

// CLOCK CODE END


Vollwelle, nicht Halbwelle.
Meistens sind die Scheitelpunkte geklippt, da diese eben für die Batterieladung usw. drauf gehen.

Es ist also eher auf die Mitte der Flanken zu achten, nicht auf die veränderlichen Scheitelpunkte

Wenn es eine Vollwelle ist, wäre es dann nicht einfacher den Nulldurchgang zu detektieren?

Welcher sich genau auf der hälfte der Flanke befindet.
So ca bei 6 bis 7 V

Ich wusste nicht was die Klemme W zu sagen hat :wink: , also du willst die Drehzahl vom Motor auswerten? Dan bist du mit deiner Überlegung in falscher Richtung, nicht Spannung messen nur Impulse auswerten.
Klemme W ist Ausgang einer der Spulen in der Lichtmaschine.
Ich wurde an W eine Diode tun und die Pulse über Optokoppler an Arduino senden.
Nur je nach dem wie die Lichtmaschine angetrieben wird, muss man das umrechnen, meistens dreht die Lichtmaschine schneller als Motor, bei alten Automodellen. ,

Nicht nur das. Die Lichtmaschiene hat auch mehr als 2 Pole und darum mehrere Perioden (Vollwellen) pro Umdrehung. Das muß man auch beachten.

Grüße Uwe

Warum? Es wird nur die W Wicklung in betracht gezogen und ausgewertet so wird die Drehzahl bei allen, zumindesten alten Diesel Autos gemacht, wie das heute gemacht wird weis nicht.
Bei manchen Lichtmaschinen wird die Wicklung nur für den zweck gewieckelt, darf nicht für was anderes benutzt werden, und nicht mehr als 50mA belastet.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.