GreenKode is building an industrial MVP
We have successfully set out to build a 100 kg Industrial digital weighing device using a farmer’s Machine Part. See the images below.
We came upon a Famers Machine part (it weighed over 50kg) that was rusted and buried in our garden (estimated date pre-Second World War). It was made of a very high-grade quality steel. (Heavy and clean under the rust.)
We cleaned it up and cut to it to fit into the load cell (the estimated weight of the steel was about 10 kg when cut down to size). This meant it was industry safe (all electrics to the weighing device were external to the load cell.) It was very difficult to move accidentally and very difficult to break. The steel was just under 1 inch thick (it could hold up to a weight of 120 kg).
Images of the cleaned steel plate assembled onto the load cell and installed in our kitchen (awaiting the power source and electronics) to weigh our waste!
The electronics of our device all spread out over my bed!
What about the electronics?
The Electronics and display screen needs to be assembled into a box for safety and separation from the digital weighing machine. At the moment they are separated sitting on my bed! The box used was a re-purposed plastic container.With screws and bolts to fit it together. I started to lay out the electronics so that it would fit onto of each other within the box. The basic ‘stacked’ circuit can be seen below as it stands. The assembled box with electrics inside should be down by next week. Please see the update to his blog next week!
All the electrics needs to be stacked into a container! We chose to use a re-purposed plastic container
The stacking begins!
I started to solder all of the components onto a PCB breadboard and onto the micro-computer. The circuit in its current state still needs to be checked for correctness and shorts! Hopefully by next week the electrics will be seen to be working and will be assembled into our blue plastic container. To be continued!
The 3 photos above show the construction of a stacked circuit on top of a mother board. The SIM card (shown as the last image) will be added onto the stack
Putting all the components together by stacking them on top of each other, after several tries, resulted in the following components being housed within the plastic blue box as shown below.
The 2 photos above show the construction of a stacked circuit on top of a mother board housed within the plastic container. Further drilling of holes for the cables and the LCD screen were also made.
A video of the housed circuit being tested and connected to the industrial weighing device is shown below.
We are looking at clocking data
We are finishing off the electronics for the project by tidying up the electronics in 3 ways:
• Modulo Clocks
• RTC Clocks and power saving
•.Transistor switches Power savings
• Modulo Clocks
We use these to record the time and time intervals. They use an onboard crystal oscillator that can be accessed and sits on the mother board. We have set one up and recorded a video of it below. We use the mother board to to store hardcoded values into its EEPROM (also E2PROM) stands for electrically erasable programmable read-only memory. Data is hard coded and can be retrieved from the chip. If there is a power cut any data saved onto the EEPROM can be retrieved.
Why use them ? They are only really useful for interval event triggered events. When you require certain data to be sent regularly over a period of time. However, they have limitations (~49 days till millis() goes back to 0).
EEPROM is useful as you can record the last time an event happened.
See our video of their use below:
The images above: A video of the use of modulo clocks above and sample recorded clock data shown below.
Hacking Domestic Scales
We took a break from testing clocks to test whether or not we can hack domestic scales for our existing reporting waste electronics.
We were thinking about using digital bathroom scales instead of building our own digital weighing devices for beta testing; cheaper and quicker. However, there are no circuit diagrams supplied to work out which lead is which, so working that out was based on testing for continuity of the circuit. Continuity tests will tell you which circuit points are connected to others and so you can redraw the overview of the circuit. Which is what we did.
After testing the circuit leads for correctness we attached them to our existing electronics to discover whether or not we could hack existing scales instead of building our own digital devices. The following video show our test.
Reducing Breakages and energy with a auto switch
We have successfully managed to cut down the likelihood of breakages and energy waste on our digital weighing device. We only need to activate the cellular device on if we are sending data over to AWS. This is at intervals of 1 hour so it is safer to switch it off when we we do need it.
We are using a MOSFET to control the switching. A clever way of controlling your electronics with small power sources.
What makes this switch so nice is that we are controlling the switch by using a timer. (A modulo timer as we explained above.) It is the electronics itself that switches itself on and off in discreet time periods. The test shows switching in 1 minute intervals but the modulo counter can be easily changed to 1 hour intervals.
We show the digital circuit below and our video showing it working as well.
The images above: Our adapted switching circuit
Our circuit components:
• ILS – 5 pieces IRFZ44N Transistor N-Channel International Rectifier Power Mosfet
We send Data out to AWS and now check that the message data to AWS has been received properly.
We have already shown previously that we successfully sent data from our electronic weighing devices BUT we also need to check that the data has arrived.
Quite often the data sent via electronics does not always arrive to the destination. Why?
The cause could be the actual electronics. Or not being able to talk to AWS due to a poor signal. What we should also do is check the response messages from AWS and make sure the data has been received properly.
There are many HTTP response codes that AWS can send to our electronics (shown in the image below) but the one that is the most important is the response code 200. This tells us that the data has been received by the receiver.
The HTTP 200 OK success status response code indicates that the request has succeeded. A 200 response is cacheable by default. The meaning of a success depends on the HTTP request method: GET : The resource has been fetched and is transmitted in the message body. HEAD : The entity headers are in the message body.
So the electronics code must not only send the data to its destination it should also be responsible for checking that the data has also been received properly. This is the logic that we added into the code and showed in the video shown below.
The images above: Shows the HTTP response codes to data trying to be communicated to an API end point with an Https protocol. We also show proof of this working in the above video.
We have added a 24 hour clock to our electronics and cleverly make sure our timer is on time!
We changed the timer to a twenty-four hour clock which sends data out to AWS cloud services on the hour! We have also checked whether or not AWS has received out data correctly! This week we further added the ability for our modulo timer clock to keep the correct time. We ask our cellular provider for the correct time and we check our Date message from the provider is correct and if it is we then update our current time with the time received from the cellular provider. Our video showing this in action is shown below and we show our custom logic code that is currently encoded into the electronics through a flow diagram below as well. This code manages the timer and also any issues we may encounter with using the device.
The main issues in using the digital Weighing device are:
• Make sure we keep on time and send out the data on the hour
• Make sure AWS Cloud Services receives our data and also what do we do if they don’t.
This logic is now encoded onto the device. We are becoming cleverer!
Sending out Text messages
If AWS is not receiving the data we are sending out by the cell chip ( either due to poor coverage, signal strength or other reasons) we want to be made aware of this issue. Luckily, we can do this with use by using a cell chip. The video demonstrates the messages being sent out to the cell phone and the screen shot shows the resulting messages received every time we have not been able to send the data AWS. Very useful to know whether or not we are receiving data.
The images above. We show the video of the AWS data not being received and the following text messages being received on the phone.
Testing Reliability and Continued Use of Our Digital Weighing Device prototypes
We have been testing these devices for reliability and usage by continued use for 1 week. So far they have been shown too be reliable with the occasional failing of messages not being sent on to be recorded. (About 5-8 failed messages every day). The software keeps on trying until a message successful is relayed.
Continued testing of simple complete circuit
A Simple digital weighing circuit is completed and closed. within its housing. It has also been connected to a industrial weighing device. We are testing the simple digital weighing circuit device closed and leaving it on for several days to test for data transfer and circuit continuity. See the video below.
We have finally finished stage 1 of the electronic prototypes
The images above: They show the finished electrics for the weighing devices.
They contain the motherboard and the components all within the Blue boxes. All working boxes are within the video shown above.