Go Down

Topic: First Project - Scale Simulator (Read 432 times) previous topic - next topic

Mahoke

Jan 13, 2019, 09:37 am Last Edit: Jan 13, 2019, 09:40 am by Mahoke
Hello everyone,

Just wanted to share my first project here. Compared to what I'm looking at from you guys it seems pretty basic, but we all start somewhere right! I wanted to create a automatic simulator to control my manual simulator from work. We use these to test our scales (I work for a scale company).

It can set zero, set max and then generate a random weight every 5 seconds and display it on the lcd. I use the Servo and some lego gears to put my manual tool into motion.

I've stumbled upon many issues building this from scratch, but I feel pretty good with the result!



https://imgur.com/a/5bHoqKe some more pics

Code @ https://pastebin.com/G997EJd4

Feedback is welcome, new to writing any type of code.

Willpatel_Kendmirez

#1
Jan 13, 2019, 10:43 am Last Edit: Jan 13, 2019, 10:44 am by Willpatel_Kendmirez
And seems it even has a simulated operator ;)




TriB

Cool! I´m working for a company which often has to connect a scale to an ERP system.
So I also created a scale simulator, but in a different way.
It is created with a Duo and a LCD shield with buttons.

You can setup the baud, start- /end- char, min- /max- values, dot or comma, and 1/8 different datasets (only weight, mettler toledo, whatever interface used). This is more or less harcoded and not very nice. The weight comes with a random net/gross number within the min/max ranges. But helpful enough for me.
Two different modes: answering on requests or on button-press.

Worst thing about it: No little Lego worker on it  ;D

Willpatel_Kendmirez

Worst thing about it: No little Lego worker on it  ;D
That can be Phase II.


Mahoke

Cool! I´m working for a company which often has to connect a scale to an ERP system.
So I also created a scale simulator, but in a different way.
It is created with a Duo and a LCD shield with buttons.

You can setup the baud, start- /end- char, min- /max- values, dot or comma, and 1/8 different datasets (only weight, mettler toledo, whatever interface used). This is more or less harcoded and not very nice. The weight comes with a random net/gross number within the min/max ranges. But helpful enough for me.
Two different modes: answering on requests or on button-press.

Worst thing about it: No little Lego worker on it  ;D
ERP, Mettler-Toledo... I have a feeling we work for the same company?

We should join forces!

TriB

Hehe, I don´t think so.
Currently I´m more or less the only one here, who hacks around with external devices, interfaces, and nerdy stuff  8)

I´ve uploaded my solution to GitHub. Please feel free to throw an eye on it!
But be aware, it´s a simple, fast developed solution with no attention to clean code, readability or reusability  :smiley-roll:

GitHub/Scale_Simulator

Go Up