cbalint13 / tinnymodbus

RS485 ModBus tiny multi-sensor module
Other
102 stars 31 forks source link

It is not working stable. #6

Closed alvor closed 8 months ago

alvor commented 4 years ago

Hi! It is not working stable because built-in oscillator cannot provide the required frequency accuracy. Only one of the four chips that I tried worked. Quartz resonator needed. But it will take two pins. At least Attiny84 needed.

cbalint13 commented 4 years ago

At so low speed the jitter is ignorable. I dont have any problems reading from dozens (almoust 100 now) of such modules since 2 year. Continuous aquisition per minute basis. I agree that during the flash procedure (higher speed, pure soft IRQ) skews may occur 1:20 rate, but flash can be restarted.

alvor commented 4 years ago

Very strange ... I tried to get the bootmode-info.py script to work properly. I have only one out of four working fine at a speed of 9600. Another one works every other time. Two more do not work at all. Maybe I'm doing something wrong?

cbalint13 commented 4 years ago

@alvor,

What sensors are you reading ?

The mentioned capacitor (C2) in the schematic is trivial, otherwise you will experience missreadings and timeouts on reading due to noise induced by sensor's power rail.

alvor commented 4 years ago

Sensors did not even try to read. Try only bootmode-info.py . I made my board. But the scheme is the same.

alvor commented 4 years ago

IMG_20191121_184131

cbalint13 commented 4 years ago

@alvor,

Then try read sensors directly.

I can send you 3 samples of mine (just write me in PM) in the worst case.

Pomelo81 commented 4 years ago

how can i Change the ds18....20 Modbus Register or the ID of 1Wire devices?

the bus becames a error if iobroker reading 0x200 2 regs. ; 0x201 2 regs… now i want to Change the id or Register to +1. id 00 reg 0x200 id 02 reg 0x202 …… or id 00 reg 0x200 id 01 reg 0x202 …..

i m not the bestz programmer…. can you help me for my Problem??? thanks

storfusker commented 4 years ago

Maybe alvor is right when he claims that there can be some unstability with the internal oscillator From what I can read, then the internal oscillator is factory calibrated at 3V, and if 5V is used for the power, then the oscillator slows down as much as 10-15% This can be calibrated by putting the oscillator signal out on a pin, measured, and calibrated by a simple sw command either static in the code, or a byte saved in EEPROM and read at startup Br Steen