Code Monkey home page Code Monkey logo

arduino_ebike_escooter_computer's Introduction

arduino_ebike_escooter_computer

Using Arduino Uno to check battery voltage (7 cells, but you can do more), battery temperature, display it to 16x2 LCD, show alarms and beep to speaker on errors (like undervoltage, overvoltage, high temp, etc)

You will need

  1. Arduino UNO or compatible
  2. 16x2 LCD with I2C board
  3. 74HC4067 multiplexer board (or you can buy the IC and solder it all by hand)
  4. 18B20 digital temperature sensor
  5. 5 to 10 kOhm resistor (for the sensor)
  6. A lot of 1% or better precision resistors to use as voltage dividers
  7. Breadboard for easy prototyping
  8. Soldering iron, flux, solder, skills
  9. Digital or analog multimeter

If you dont plan to read temperature, just comment all code regarding 18B20 sensor. If you plan to measure more than 7 battery cells, you will need more wires, more precision resistors. 74HC4067 has 16 inputs, so obviously you cant have more than 16 batteries measured by one IC. But you can connect more ICs and add code :)

Setup

  1. Different LCDs have different working drivers and addresses
  2. Google your LCD, addreses and drivers they use.
  3. Import your driver to the project. In my case it was hd44780.h, if yours is the same, leave it the way it is.
  4. Connect all the stuff together

Connections: Arduino Pins

Digital 0: empty Digital 1: empty Digital 2: temperature sensor middle leg Digital 3: 100 Ohm resistor (other resistor legs goes to speaker +, other speaker leg goes to ground) Digital 4: Mupliplexer S3 pin Digital 5: Multiplexer S2 pin Digital 6: Multiplexer S1 pin Digital 7: Multiplexer S0 pin Digital 8: empty Digital 9: empty Digital 10: empty Digital 11: empty Digital 12: empty Digital 13: empty SCL: display SCL SDA: display SDA Analog 0: Multiplexer SIG Analog 1: empty Analog 2: empty Analog 3: empty Analog 4: empty Analog 5: empty

Temp sensor: connect a 5-10K resistor from middle leg to right leg. Connect right leg to +5V, left leg to GND

Everything is powered from 5v: Arduino, Display, Multiplexer, Temp sensor.

Troubleshooting

No image on screen - use the potentiometer on back of the screen to adjust contrast No temp data - check sensor connection, use a 5K resistor Phantom readings on analog pins - its ok if you have them hanging free in air or nothing connected.

Questions, feedback

If you have any questions and feedback, feel free to contact me [email protected] or telegram at @nikozzzzzz

Important

// A lot of code on 74HC5067 multiplxer was taken from https://www.instructables.com/id/Tutorial-74HC4067-16-Channel-Analog-Multiplexer-De/ // Including comments. Why write your own comments if someone has already done a prettey good explanatory job // Written by https://www.instructables.com/member/pmdwayhk/ // A lot of temperature sensor code was taken from https://arduinomaster.ru/datchiki-arduino/arduino-ds18b20/ some varibles renamed, comments translated RU -> EN // connect 74HC4067 S0S3 to Arduino D7D4 respectively // connect 74HC4067 pin 1 to Arduino A0

arduino_ebike_escooter_computer's People

Contributors

nikozzzzzz avatar

Stargazers

Floatyboy avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.