Giter VIP home page Giter VIP logo

Comments (26)

tvixen avatar tvixen commented on July 21, 2024

Hi there
If it helps, you can have a look at my code.
I converted it into a Arduino Nano 👍 https://github.com/tvixen/diy-BMS-with-Arduino-Nano

Br Tim

from diybms.

chickey avatar chickey commented on July 21, 2024

Have you burnt the fuses on the attiny85?

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

Yes. I designed my own board with altium based on orginal schematic and component for product PCB at home. I want to share this design if I can run it. I bootloaded orginal code in fourteen attiny85. Just I changed ESP code for load uno or mega. I can send message with uno on I2C but no response attiny85 board.

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

Hi tvixen, thaks for your advice and your good works. But I have to work with Attiny85 because I producted 14 pcb based on Attiny85. Is your code running with Attiny85?

from diybms.

chickey avatar chickey commented on July 21, 2024

Ok asking as I had no luck initially and had to increase the stretch clock from 1000 to 2500 as memory serves as I couldn’t get any communication either but I hadn’t set the fuses so the speed etc was incorrect and the stretchclock increase kind of masked the issue.

from diybms.

tvixen avatar tvixen commented on July 21, 2024

You can use Stuart's slave software, and then try mine for your master (UNO) This should work.

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

I used your code but no difference. Uno sends but attiny85 not talk. I see the signal at the output of ADUM but attiny is not talk. Is it necessary Optiboot?

from diybms.

Merdeka avatar Merdeka commented on July 21, 2024

Haven't tested it but could it be an issue with the default i2c bus speed? 100khz vs 400kHz.

Cheers,
Timo

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

I found a ESP8266-12e and used the orginal code, original bus speed. It doesn't work too. Attiny85 doesn't reponse again. I controlled everything on pcb. It seems normal. I don't know why not running it?

from diybms.

tvixen avatar tvixen commented on July 21, 2024

Do you see the green diode blink on the Cell_module. If not, check your programming of the ATTiny85.

from diybms.

tvixen avatar tvixen commented on July 21, 2024

If you use Uno, you don't have to use Optiboot. As it's only Nano having a problem with the watchdog.

from diybms.

tvixen avatar tvixen commented on July 21, 2024

Try ONLY to connect one module to the bus. When this is working, add another. aso aso.

from diybms.

chickey avatar chickey commented on July 21, 2024

Also try the clock stretch change

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

Led is not blinking. But I saw a video on youtube, diyBMS tutorial it haven't blinking too. Already I'm working with only one cell. Also I controlled reset pin voltage, it's almost 2V.

https://www.youtube.com/watch?v=ZahB-86zzfQ

from diybms.

chickey avatar chickey commented on July 21, 2024

https://youtu.be/CbuOteAcv04

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

Thanks, I have watched video now. I guess, your github code have all changes from your video. I will try now.

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

Did you added 2.2K pull-up resistors to esp I2C wire, except modul?

from diybms.

tvixen avatar tvixen commented on July 21, 2024

Yes this is very important to do. If not, there's no 'power' to feed the bus.
The whole idea is to keep the bus isolated ...except from the master who will power the bus.

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

Ok, I already used resistor, but I wanted to make sure.
I think I have code problem. As Colin said, the light is still not blinking .
There is no other reason for the LED not to blinking.

from diybms.

tvixen avatar tvixen commented on July 21, 2024

you should try another device on the i2c bus (only), and see if the master can detect it (a sensor maybe, or OLED display).
if your master can't see it.... you have found your problem. Also (now you got a scope) see if the SDA and SCL is acting as they should (timing).

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

I loaded Colin's codes. SCL does not seem normal, does it? It's a bit short.

Scope1-SCL
Scope2-SDA

scope1

from diybms.

chickey avatar chickey commented on July 21, 2024

Module code should be identical and I backed out the stretch clock changes in the controller code. I more put the video to show the issues I had as I hadn’t done the fuses etc

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

Is it possible to communicate with the scope as it looks? As a result, everybody have worked. Should I search the fault somewhere else? I know I'm starting to get boring, I'm sorry for that but I need help.

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

There is a warning in the code. Could the factory have set for external crystal?
Because the module does not work even in the simplest code like led blink.

If you burn incorrect fuses to ATTINY85 you may need to connect a crystal over the pins to make it work again!

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

I found something like this. I hope this is the problem.
http://www.instructables.com/id/Simple-and-cheap-Fuse-Doctor-for-Attiny

from diybms.

EmreBostanci avatar EmreBostanci commented on July 21, 2024

I have a good and bad news for you. The good news is that the problem is solved, the bad news is that I think the bootloading code is loading. I hit the upload button and the problem is solved. And Colin, your arrangements are wonderful. I thank you all very much.

from diybms.

Related Issues (20)

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.