2706 views|11 replies

3190

Posts

0

Resources
The OP
 

Product expiration issues [Copy link]

 

I have a question. My company makes testing machines.

In order to prevent customers from not paying, an expiration setting is set. DS1302 is used to record the date and time.

The interface for modifying the date and time has a password, which the customer does not know.

When it leaves the factory, it is set to expire in one month, which means that the customer can only use it for one month and it cannot be used after the expiration date. This is set in the program.

After paying the money, if you pay another part, it will be unlocked and you can use it for a while.

The payment is in full and the service is fully released. There is no situation where you cannot use the service for a period of time.

But there is a problem. Sometimes the time displayed by DS1302 is messy, which is difficult to deal with.

I want to change it to record the number of times the computer is turned on, and then it will become unusable after a certain number of times.

But the boss and some workers said that some customers bought the machines and never used them or turned them on.

For example, if the leader comes to inspect one day, the machine will be turned on once. I didn't expect this situation to happen. It's really speechless.

You don't need to buy the machine for anything.

So please give me some advice here, what should I do if I encounter this situation? Thank you!

This post is from stm32/stm8

Latest reply

The simplest way is to use ID as password. ID is written when the program is burned, and a string can be added to strengthen it. Whether to use independent password has nothing to do with whether the clock module is used.   Details Published on 2020-8-23 16:01
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 

1w

Posts

25

Resources
2
 

The stability of the domestically produced DS1302 is not good enough. If the circuit design is not perfect, it is easy to cause time errors due to timing problems when turning the machine on and off. This will not happen if you change to a better clock chip.

This post is from stm32/stm8

Comments

Thanks! Can you recommend a clock chip? Or is a non-domestic DS1302 okay?  Details Published on 2020-8-22 11:58
 
 

3190

Posts

0

Resources
3
 
dcexpert posted on 2020-8-22 11:54 The stability of the domestic DS1302 is not good enough. If the circuit design is not perfect, it is easy to cause time errors due to timing problems when turning on and off. Change to a better time...

Thanks! Can you recommend a clock chip? Or is a non-domestic DS1302 okay?

This post is from stm32/stm8

Comments

It is not easy to buy an original DS1302. Try another I2C interface clock chip, such as DS3231, DS1307, PCF8563, etc.  Details Published on 2020-8-22 12:16
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 

1w

Posts

25

Resources
4
 
chenbingjy posted on 2020-8-22 11:58 Thank you! Can you recommend a clock chip? Or is the non-domestic DS1302 okay?

It is not easy to buy an original DS1302. Try another I2C interface clock chip, such as DS3231, DS1307, PCF8563, etc.

This post is from stm32/stm8

Comments

Thanks  Details Published on 2020-8-22 13:37
 
 
 

2w

Posts

0

Resources
5
 

There is no need to use clock chips such as DS1302, right?

If there is an extra timer inside the MCU, let this timer run, and each overflow interrupt will increase a specific memory by one. Then the content of this memory is the startup running time, and this memory will not count when the machine is not powered on. The running time will be accumulated each time the machine is powered on multiple times. Check the count value of this memory, and enter an infinite loop when it reaches a certain value. Unlock after payment.

This memory must be non-volatile. If the microcontroller has an EEPROM, it can be used directly. If not, add a small IIC bus memory such as 24C02.

This post is from stm32/stm8

Comments

Thank you! That will greatly affect the life of the memory.  Details Published on 2020-8-22 13:39
 
 
 

3190

Posts

0

Resources
6
 
dcexpert posted on 2020-8-22 12:16 It is probably not easy to buy an original DS1302. Try a clock chip with an I2C interface, such as DS3231, DS1307, PCF8563, etc.

Thanks

This post is from stm32/stm8
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 

3190

Posts

0

Resources
7
 
maychang posted on 2020-8-22 13:13 There is no need to use a clock chip such as DS1302, right? If there is an extra timer inside the microcontroller, let this timer run, and each overflow interrupt...

Thank you! That will greatly affect the life of the memory.

This post is from stm32/stm8

Comments

Yes, the number of EEPROM writes is limited. However, how much time accuracy do you need to limit? If you accept a two-hour error, for example, then write once every hour, and you will only write 8760 times in a year of continuous use. Even if you write once every ten minutes, it will only be more than 50,000 times a year.  Details Published on 2020-8-22 14:47
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 

2w

Posts

0

Resources
8
 
chenbingjy posted on 2020-8-22 13:39 Thank you! The life of the memory will be greatly affected.

Yes, the number of times the EEPROM can be written is limited.

However, how much time accuracy do you need to limit? If you accept a two-hour error, for example, then write once every hour, and only write 8760 times in a year of continuous use. Even if you write once every ten minutes, it is only more than 50,000 times a year.

This post is from stm32/stm8

Comments

You have a point.  Details Published on 2020-8-22 16:14
 
 
 

3190

Posts

0

Resources
9
 
maychang posted on 2020-8-22 14:47 Yes, the number of EEPROM writes is limited. However, how much time accuracy do you need to limit? If you accept a two-hour error, then...

You have a point.

This post is from stm32/stm8
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 

1w

Posts

142

Resources
10
 

If you want to disable the device automatically when it times out when not in use, and the device is not connected to the Internet, the only way is to use a real-time clock module with its own battery. Buy good quality ones with a 5-year guarantee.

If the device is expensive, the best way is to activate it online. The factory only has a 30-day trial period, and it must be activated online after the expiration date. The circuit cost added for networking should be much lower than the cost of sending someone to the site to unlock it with a password. It is also easy to manage, and there is no possibility that internal personnel will be bribed to leak passwords or be cracked.

If you must use a password to unlock, in order to reduce after-sales costs, you can use an ID matching algorithm, one machine one password, and inform the user by phone or other channels when necessary, and the user can operate it by themselves.

This post is from stm32/stm8

Comments

Thank you, but I don't understand the ID matching algorithm. I think it's better to use a good quality clock module.  Details Published on 2020-8-23 08:53
 
Personal signature上传了一些书籍资料,也许有你想要的:https://download.eeworld.com.cn/user/chunyang
 
 

3190

Posts

0

Resources
11
 
chunyang posted on 2020-8-22 20:16 If you want to automatically disable the device when it is not in use, and the device is not connected to the Internet, the only way is to use a real-time battery...

Thank you, but I don't understand the ID matching algorithm. I think it's better to use a good quality clock module.

This post is from stm32/stm8

Comments

The simplest way is to use ID as password. ID is written when the program is burned, and a string can be added to strengthen it. Whether to use independent password has nothing to do with whether the clock module is used.  Details Published on 2020-8-23 16:01
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 

1w

Posts

142

Resources
12
 
chenbingjy posted on 2020-8-23 08:53 Thank you, but I don’t understand the ID matching algorithm. I think it’s better to use a clock module of good quality

The simplest way is to use ID as password. ID is written when the program is burned, and a string can be added to strengthen it. Whether to use independent password has nothing to do with whether the clock module is used.

This post is from stm32/stm8
 
Personal signature上传了一些书籍资料,也许有你想要的:https://download.eeworld.com.cn/user/chunyang
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list