Ceech board upgrade
-
The board will receive a new design with TP4056 battery charger.
Charge current and battery voltage will be reported on ADC6 and ADC7.
Mosfet will be available for external load regulation. It is connected to D3.
There are three sockets for:
bluetooth
NRF24l01+ and
I2C modules.
-
Are we able to use the Rfm69 module with nrf24l01 adapter? Is the IRQ PIN connected to D2?
-
@kenci It can be used with Rfm69. And yes, IRQ pin is connected to D2.
-
New boards are ready and are being tested. Here is one connected to a Bluetooth module charging a battery:
This is the code used in battery voltage and charge current monitoring:
float readVcc() { signed long resultVcc; float resultVccFloat; // Read 1.1V reference against AVcc ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); delay(10); // Wait for Vref to settle ADCSRA |= _BV(ADSC); // Convert while (bit_is_set(ADCSRA,ADSC)); resultVcc = ADCL; resultVcc |= ADCH<<8; resultVcc = 1126400L / resultVcc; // Back-calculate AVcc in mV resultVccFloat = (float) resultVcc / 1000.0; // Convert to Float return resultVccFloat; } const int current = A6; const int lipo = A7; float vout = 0.0; float vin = 0.0; int value = 0; void setup() { Serial.begin(9600); } void loop() { float napetost = readVcc(); float tok = ((analogRead(current) * napetost / 1024 ) * 1200) / 3; // convert the ADC value of charge current to miliamps float baterija = ( analogRead(lipo) * napetost / 1024 ) * 2; // measuring battery voltage Serial.print("Vcc = "); Serial.print(napetost); Serial.println("V"); delay(400); Serial.print("Charge current = "); Serial.print(tok); Serial.println("mA"); delay(400); Serial.print("Battery voltage = "); Serial.print(baterija); Serial.println("V"); delay(400); Serial.println("----------------------------"); delay(2000); } /* Improving accuracy: To do so, simply measure your Vcc with a voltmeter and with our readVcc() function. Then, replace the constant 1107035L with a new constant: scale_constant = internal1.1Ref * 1024 * 1000 where internal1.1Ref = 1,1 * Vcc1 (per voltmeter) / Vcc2 (per readVcc() function) Example: For instance, I measure 3,43V from my FTDI, the calculated value of Vref is 1,081V. So (1,081 x 1000 x 1024) = 1107034,95 or 1107035L rounded up. Use smoothing example from IDE to smooth the data from ADC. */
Charge current is limited to 400mA and can be easily changed to another value by changing just one resistor.
1 out of 4
Suggested Topics
-
Over the air updates
General Discussion • 23 Mar 2014, 21:38 • ToSa 1 Mar 2015, 11:21 -
Sleep mode for bmp280
Hardware • 20 Feb 2018, 13:24 • fishermans 5 Feb 2024, 18:30 -
Best VOC sensor for detecting a wide range of VOC's?
Hardware • 26 Oct 2023, 23:59 • NeverDie 18 Nov 2023, 01:41 -
Newbie questions
Hardware • 14 Feb 2025, 20:03 • magwas 14 Feb 2025, 20:03 -
Best time of year to buy higher quality small project solar panels?
Hardware • 10 Jun 2021, 19:19 • NeverDie 30 Aug 2024, 14:01 -
hlk-pm01 are to noisy for rfm69?
Hardware • 5 Aug 2023, 21:16 • Tmaster 9 Aug 2023, 16:28