Hi All,
Please help to clarify -
Do i need an ADS 1015 if i'm using Arduino Pro Micro for my button Controls and have an Serial output from Arduino ( with connection from battery to arduino analog in) ?
Battery Level - ADS1015 or Arduino
- tinkerBOY
- Posts: 710
- Joined: Tue May 30, 2017 4:00 am
- Has thanked: 294 times
- Been thanked: 206 times
Re: Battery Level - ADS1015 or Arduino
The atmega32u4 chip on the Pro Micro already has the built-in 10-bit ADC so you don't need an ADS1015 for battery monitoring.
New! tinkerBOY PowerSwitch v1.0 with Safe Shutdown
Game Boy Zero Controllers available @ tinkerBOY.xyz * Support
tinkerBOY Controller v3.0 - built-in usb controller, usb audio, and usb hub
tinkerBOY Controller v2.0 - GPIO buttons and builtin PWM Audio and Amplifier
tinkerBOY Controller v1.1 - simple pcb button
* DPI Adapter - better display for GBZ
* keyboard converters - IBM XT/AT Soarer's Converter | ADB to USB Converter
Game Boy Zero Controllers available @ tinkerBOY.xyz * Support
tinkerBOY Controller v3.0 - built-in usb controller, usb audio, and usb hub
tinkerBOY Controller v2.0 - GPIO buttons and builtin PWM Audio and Amplifier
tinkerBOY Controller v1.1 - simple pcb button
* DPI Adapter - better display for GBZ
* keyboard converters - IBM XT/AT Soarer's Converter | ADB to USB Converter
-
- Posts: 47
- Joined: Tue Nov 21, 2017 4:50 am
- Has thanked: 8 times
- Been thanked: 32 times
Re: Battery Level - ADS1015 or Arduino
Can you please show me, how it´s working? Do I need a special arduino code or is it work "out of the box"?
- tinkerBOY
- Posts: 710
- Joined: Tue May 30, 2017 4:00 am
- Has thanked: 294 times
- Been thanked: 206 times
Re: Battery Level - ADS1015 or Arduino
You need of course a battery monitor code on both the arduino chip and on the Raspberry Pi side.lightpixel wrote: ↑Fri Mar 22, 2019 2:19 amCan you please show me, how it´s working? Do I need a special arduino code or is it work "out of the box"?
Here's a sample code from the Arduino IDE:
Code: Select all
/*
ReadAnalogVoltage
Reads an analog input on pin 0, converts it to voltage, and prints the result to the Serial Monitor.
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/ReadAnalogVoltage
*/
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = sensorValue * (5.0 / 1023.0);
// print out the value you read:
Serial.println(voltage);
}
New! tinkerBOY PowerSwitch v1.0 with Safe Shutdown
Game Boy Zero Controllers available @ tinkerBOY.xyz * Support
tinkerBOY Controller v3.0 - built-in usb controller, usb audio, and usb hub
tinkerBOY Controller v2.0 - GPIO buttons and builtin PWM Audio and Amplifier
tinkerBOY Controller v1.1 - simple pcb button
* DPI Adapter - better display for GBZ
* keyboard converters - IBM XT/AT Soarer's Converter | ADB to USB Converter
Game Boy Zero Controllers available @ tinkerBOY.xyz * Support
tinkerBOY Controller v3.0 - built-in usb controller, usb audio, and usb hub
tinkerBOY Controller v2.0 - GPIO buttons and builtin PWM Audio and Amplifier
tinkerBOY Controller v1.1 - simple pcb button
* DPI Adapter - better display for GBZ
* keyboard converters - IBM XT/AT Soarer's Converter | ADB to USB Converter
-
- Posts: 47
- Joined: Tue Nov 21, 2017 4:50 am
- Has thanked: 8 times
- Been thanked: 32 times
Re: Battery Level - ADS1015 or Arduino
Oh great. thank you. I want to use the mintybatterymonitor. So the battery is connected to GND and RAW on the arduino mirco board. Where has to wire SLC and SDA coming from the PI?
- infinitLoop
- Posts: 536
- Joined: Mon Dec 24, 2018 11:46 am
- Location: Portland, OR
- Has thanked: 222 times
- Been thanked: 199 times
- Contact:
Re: Battery Level - ADS1015 or Arduino
i believe the minty script is tailored to use the ads. if you want to use the onboard atmega one, i think you want to use hoolyhoo's gbzbatterymonitor instead. you should not need to connect the slc and sda as that is handled in the board (i think anyway - i haven't tried this on the tinkerboy board, but i've used another board with the built-in atmega controller as the monitor, and did not need to connect gpios for it to work)lightpixel wrote: ↑Fri Mar 22, 2019 3:09 amOh great. thank you. I want to use the mintybatterymonitor. So the battery is connected to GND and RAW on the arduino mirco board. Where has to wire SLC and SDA coming from the PI?
check out this thread:
viewtopic.php?f=44&t=3537&hilit=pro+micro+for+battery
Some of my builds...
BMO GBZ
Star Wars Millenium Falcon Challenge
Game Boy Color Zero
... and another Gameboy Color Zero with custom 3D-printed parts
"Ultimate" 3A+ Build
GlowBoy Zero
Some 3d designs I've done...
Soft Tactile Shoulder Buttons, for screw-hole, well mounting
Snap-in, Soft Tactile Shoulder Button insert, for screw-hole, well mounting
Pac-Man and Space Invaders Themed Rear Fan Holder
BMO GBZ
Star Wars Millenium Falcon Challenge
Game Boy Color Zero
... and another Gameboy Color Zero with custom 3D-printed parts
"Ultimate" 3A+ Build
GlowBoy Zero
Some 3d designs I've done...
Soft Tactile Shoulder Buttons, for screw-hole, well mounting
Snap-in, Soft Tactile Shoulder Button insert, for screw-hole, well mounting
Pac-Man and Space Invaders Themed Rear Fan Holder
Who is online
Users browsing this forum: No registered users and 1 guest