PDA

View Full Version : Why didn't I think of this before?!?



Inor
02-22-2023, 10:43 PM
Periodically clients send me stuff to play with. About a year ago, one sent me this:

21656

What is it? It is a small computer called Jetson Xavier created by Nvidia corporation primarily designed for controlling industrial robots. Why anybody thought I would be able to add anything to the conversation about it is beyond me since I know absolutely NOTHING about industrial robots. But it is cool as hell! It is an insanely powerful little computer (more powerful than my top of the line MacBook Pro) and since it is designed for industrial robots, its power requirements are EXTREMELY low. When I fire up all of the CPUs and the GPU it only consumes 30 watts and I can pare back the number of CPU cores all the way down to using only 10 watts!

But, like I said initially, I had no idea what I should do with it since I am not into industrial robots. So it has sat in a box on a shelf for the last year. The day before yesterday an idea for it hit me like a sledge hammer and since the weather has been too crappy to be outside doing stuff the last few days, I decided to start my new home automation project!

When we built M.T. Acres all of the appliances, the furnace, hot water heater, well pump, even the garage door opener are all "smart". We did not want "smart" appliances, but getting "dumb" appliances was just not an option for the models Mrs Inor wanted. So we paid for all this crap but never connected it to the internet to be "smart" because we did not want the manufacturers tracking our use patterns for it and even potentially controlling it.

But I got to thinking the Jetson would make a PERFECT "brain" for all of our "smart" appliances! So I got it set up with a Linux operating system and so far have the two freezers, well pump, furnace, hot water heater, kitchen refrigerator, garage door opener and Mrs Inor's weather station talking to it. So far, all I am doing is collecting data from each device on general usage statistics with absolutely NO information going out to the manufacturer.

I am going to let it collect data for a couple months on just normal daily usage and when each device turns on and off and how much power each uses and what time of day the power is used most frequently. After I have 2-3 months worth of data, I will use that to train a statistical model to optimize our electrical use. The Jetson has more than enough power to do deep learning models and reinforcement learning models as well as being able to reconfigure each appliance on the fly as it figures out the best way to minimize our electricity costs.

I am thinking this is going to be a project like my cryptocurrency experiments. It is going to take some time to get the pieces properly in place. But once they are, it should also have some significant payback like the crypto. Conservatively it should be able to reduce our electric bill by at least 10-15% once the model is well trained. It could be even more.

Sasquatch
02-23-2023, 12:53 AM
Probably not something you would want to tackle but sounds like a business could be started with this.

Inor
02-23-2023, 01:02 AM
Probably not something you would want to tackle but sounds like a business could be started with this.

A business definitely could be started building something like this. From what I am seeing just from playing with it for a couple days, it is definitely NOT something I would touch with a 10 foot pole for money! The liability would be absolutely through the roof.

StratBastard
02-23-2023, 02:43 AM
Forget industrial robots. I have one word for you: Fembots!!! Conquest of the planet is now within your reach.

216572165821659

T-Man 1066
02-23-2023, 07:27 AM
That is slick. Industrial robots that I have dealt with have always had their own proprietary controllers built into the control system. We can communicate between the CNC and the robot, or a PLC/PMC with ethernet, or dry contacts. Modbus too.

Keep us updated on this project. :chopper:

Dwight55
02-23-2023, 07:32 AM
Looks a whole lot more to me like something that would adorn the bottom of my lowest desk drawer . . . with stacks of waste paper and a couple shopping bags for good measure.

I ain't got time or knowledge enough for that stuff . . . but you have a grand time Inor . . . keep us informed.

May God bless,
Dwight

Dwight55
02-23-2023, 07:32 AM
Looks a whole lot more to me like something that would adorn the bottom of my lowest desk drawer . . . with stacks of waste paper and a couple shopping bags for good measure.

I ain't got time or knowledge enough for that stuff . . . but you have a grand time Inor . . . keep us informed.

May God bless,
Dwight

Inor
02-23-2023, 11:09 AM
That is slick. Industrial robots that I have dealt with have always had their own proprietary controllers built into the control system. We can communicate between the CNC and the robot, or a PLC/PMC with ethernet, or dry contacts. Modbus too.

Keep us updated on this project. :chopper:

This is a computer the developers for those proprietary controllers would use to create the firmware/software for them. As such, everything on it is wide open for doing whatever I want. It has more available interfaces than Carter has Little Liver Pills. The only thing it does not have is WiFi. But in my case, I do not care about that. It is just going to sit quietly on a bookshelf somewhere plugged directly into a router doing its thing.

I'll do some periodic updates as this effort progresses. By this weekend, it should have collected enough data that I should be able to start cleaning that up and putting it together into a format that I can use to train some models. I won't have enough data to actually do the training, but I will at least be able to get started putting things in order.

Sparkyprep
02-23-2023, 03:49 PM
Wish I had computer skills you had.

T-Man 1066
02-23-2023, 03:59 PM
This is a computer the developers for those proprietary controllers would use to create the firmware/software for them. As such, everything on it is wide open for doing whatever I want. It has more available interfaces than Carter has Little Liver Pills. The only thing it does not have is WiFi. But in my case, I do not care about that. It is just going to sit quietly on a bookshelf somewhere plugged directly into a router doing its thing.

I'll do some periodic updates as this effort progresses. By this weekend, it should have collected enough data that I should be able to start cleaning that up and putting it together into a format that I can use to train some models. I won't have enough data to actually do the training, but I will at least be able to get started putting things in order.

I am guessing no wifi for security.

Inor
02-23-2023, 10:40 PM
I am guessing no wifi for security.

I don't think so. This is a development board, so security is not even a consideration most of the time. I think it is because there is nowhere to mount any kind of antenna without interfering with the heat sink. What's crazy is that it does have BlueTooth and support for LoraWAN built in.

There is a wifi daughterboard available for it for around $15, but it is not really necessary. I go back and forth about getting one. But once I get it working the way I have planned, there will be no keyboard or monitor on it. I can just set it next to my router completely headless and use a 12 inch network cable. When I need to log into it, I will just use my laptop and a plain SSH connection or VNC if I need graphics.

red442joe
02-24-2023, 11:52 AM
Periodically clients send me stuff to play with. About a year ago, one sent me this:

21656

What is it? It is a small computer called Jetson Xavier created by Nvidia corporation primarily designed for controlling industrial robots. Why anybody thought I would be able to add anything to the conversation about it is beyond me since I know absolutely NOTHING about industrial robots. But it is cool as hell! It is an insanely powerful little computer (more powerful than my top of the line MacBook Pro) and since it is designed for industrial robots, its power requirements are EXTREMELY low. When I fire up all of the CPUs and the GPU it only consumes 30 watts and I can pare back the number of CPU cores all the way down to using only 10 watts!

But, like I said initially, I had no idea what I should do with it since I am not into industrial robots. So it has sat in a box on a shelf for the last year. The day before yesterday an idea for it hit me like a sledge hammer and since the weather has been too crappy to be outside doing stuff the last few days, I decided to start my new home automation project!

When we built M.T. Acres all of the appliances, the furnace, hot water heater, well pump, even the garage door opener are all "smart". We did not want "smart" appliances, but getting "dumb" appliances was just not an option for the models Mrs Inor wanted. So we paid for all this crap but never connected it to the internet to be "smart" because we did not want the manufacturers tracking our use patterns for it and even potentially controlling it.

But I got to thinking the Jetson would make a PERFECT "brain" for all of our "smart" appliances! So I got it set up with a Linux operating system and so far have the two freezers, well pump, furnace, hot water heater, kitchen refrigerator, garage door opener and Mrs Inor's weather station talking to it. So far, all I am doing is collecting data from each device on general usage statistics with absolutely NO information going out to the manufacturer.

I am going to let it collect data for a couple months on just normal daily usage and when each device turns on and off and how much power each uses and what time of day the power is used most frequently. After I have 2-3 months worth of data, I will use that to train a statistical model to optimize our electrical use. The Jetson has more than enough power to do deep learning models and reinforcement learning models as well as being able to reconfigure each appliance on the fly as it figures out the best way to minimize our electricity costs.

I am thinking this is going to be a project like my cryptocurrency experiments. It is going to take some time to get the pieces properly in place. But once they are, it should also have some significant payback like the crypto. Conservatively it should be able to reduce our electric bill by at least 10-15% once the model is well trained. It could be even more.

Ya know what I got out of all that?
You should name him George!
That's it.

Joe

MountainGirl
02-24-2023, 04:54 PM
Ya know what I got out of all that?
You should name him George!
That's it.

Joe
LOLOLOL
:beerchug:

red442joe
02-24-2023, 08:01 PM
@Inor, that doesn't mean I don't appreciate what you share, that stuff was just over, (way)over my head.
Thanks,
Joe

hawgrider
02-24-2023, 08:24 PM
@Inor, that doesn't mean I don't appreciate what you share, that stuff was just over, (way)over my head.
Thanks,
Joe

Don't feel bad way way above my pay grade too.

bigwheel
02-24-2023, 09:17 PM
Looks like a space alien contraption of some sort..hmmm. That may be the machine that does the sex tests when they transport the cute ladies up to the mother ship to run some experiments. Some saying rearranging their genes and sending them back to bed.

Inor
02-25-2023, 12:18 AM
@Inor, that doesn't mean I don't appreciate what you share, that stuff was just over, (way)over my head.
Thanks,
Joe

Not at all! My ideas are all over the map. By next week, I may discover fire or the wheel.

Slippy
02-25-2023, 07:17 AM
Bigwheel may be on to something...

Inor
03-03-2023, 10:52 PM
Big progress tonight! I have been spinning my wheels on this project for a few days and I finally got the breakthrough I was hoping for tonight! I do not yet have enough data to start training models yet, but I was finally able to get most of it set up the way I want for when I do.

The weather at M.T. Acres has also been very helpful the last couple weeks. We have had a wide variety of weather, some cold, some warm, so I have collected a bunch of sample data for a variety of situations.

Next is just a waiting game until I get enough data to actually start training models. In the meantime, I am going to experiment with building some basic modeling software so when I do get enough training data, I can start testing right away. Also, I may start experimenting with building software to fiddle with some of the settings on the freezers and the well.

I can already see where this will eventually save us some money on our electric bills!

red442joe
03-04-2023, 07:05 PM
...spinning my wheels...training models...warm...training models...basic modeling...training... fiddle...save us some money!

I think I like where this is going!

Joe

Inor
04-16-2023, 10:07 PM
I only have about 6 weeks of data for the well, our freezers and the refrigerator. So far, I have partially trained 2 separate models, one for the well and one for the freezers. (I will save messing with the refrigerator for later.) This morning, I turned on the two semi-trained models for the freezers and the well. They are not actually adjusting the settings on anything yet. They are only logging the decisions they "would have made" if they were fully active. I want to watch how they react and see what they would do in normal circumstances and try to get an estimate for how much, if anything, they would save if they were fully active. I also want to see how much improvement they make over the course of a week or two as the models continue to train on the new data coming in over the next several days.

Jester-ND
04-17-2023, 08:43 AM
22318

Inor
09-02-2023, 05:03 PM
My models have been live and actually adjusting the settings on the freezers, refrigerator and well pump for a few months now, so I thought I should do an update to this post with the results...

For about the last 4-6 weeks, the software seems to be saving me a little more than 7% and a little less than 8% on my electric bill. It is hard to quantify it precisely because I set up a stock tank in the pasture behind our fence line for the cattle for our rancher neighbor. So we are burning through quite a bit more water than we have in previous years. But, based on having the well pump run a little more intelligently only running at night when the electricity rate is cheaper (except when the water level in our tank gets too low), it is definitely having a positive impact.

I have the freezers keeping the temp below 8 degrees during the day and below 0 at night and that seems to be working perfectly. The model for the freezers is also smart enough to take into account the outside air temperature when making a decision on whether to cool the freezers down more during the day as well. That part is actually working better than I thought it would. We had a couple weeks when the daytime highs were above 100 and I wanted a fallback to cool the freezers below 0 on those days just in case the power went out. (The power did not go out, but I wanted to make sure we were safe just in case.)

The models are still re-training once per week so they are continuing to improve. But it seems unlikely at this point that they will get too much better. I figure the best I can hope for is maybe 1/10 of a percent or so improvement over the next year.

So putting everything in terms of dollars and cents, I figure this project is saving me somewhere between $10 and $15 per month on my electric bill. To follow that up with the questions: "Was it worth the effort to do this project?" My answer would be a qualified "yes". In total, I have somewhere between 40 and 60 hours of development time invested in coding the software and getting everything set up on my network. If I were to bill that at my normal billable rate for contract programming the project would never pay for itself. But since I did not have to pay for any hardware and my programming time was basically free... Yeah, it was worth doing. It was certainly a fun project and there is a tangible and measurable benefit to doing it.

"Would I recommend that you build something similar for your situation?" Maybe. If you enjoy writing code and learning new stuff AND you have an unused computer laying around not doing anything... Sure, go for it. If your unused computer is some kind of Intel/AMD based computer, it is probably not worth the effort since the power consumption for the computer is high enough that it will be unlikely to save much overall. But if you have a cheap ARM-based computer (like a Raspberry Pi or similar), yeah, you will get some benefit.

So overall, I am calling this project a "qualified success".

red442joe
09-02-2023, 06:42 PM
Yay!
Thanks for the update and sharing!

Joe

Inor
11-25-2023, 09:49 PM
Another update on my Jetson project...

It has been live for several months now and it has retrained several times with new observation data as it has been running. The freezer and well modules have continued to get better and now appear to be saving me a touch over 8% per month on my total electric bill. I also wrote a new modules for the kitchen refrigerator and the furnace. They are have only been running for a couple months, so their contribution to the savings has yet to be determined. But given that my first models were only saving about 7.5% on my electric bill and the savings is now over 8%, they are adding something to the mix.

I have also been watching the resource utilization on the Jetson to see how much computing horsepower is being used. It is so little that it is barely measurable. So I began thinking: "What else can I do with it?"

I decided to pick up a couple cheap cameras to see if I could make a simple security system with them. The first camera and chip came this week. It is called an ESP32-CAM. It is a little bigger than a postage stamp and including the camera, they go for about $8.50. (The chip is about $5 and the camera module is about $3.50.)

26303

Getting it working was a serious pain in the neck because the technical documentation for it described different pin-outs than what was actually printed on the board. But once I got that figured out I was able to get it running. For an $8 "computer" it works surprisingly well. The image quality, while not great, is good enough for what I want it for. It has built-in WIFI and Bluetooth. The built-in WIFI antenna leaves something to be desired in terms of range, but I figured out how I can extend that with an external antenna. Getting the external antenna working will require one change to the circuitry on the board which does not excite me because I am the world's worst solderer. But it is only one connection and if I screw it up, it only costs me a couple dollars.

Loading up a sample firmware application from the chip developers to demonstrate the capabilities, it does seem to support most everything I can think that I would need to build some simple game/security cameras.

26291

They do make some other cameras that I can try with it as well. (The one I am currently testing is the cheapest, crappiest model they offer). Using it for security, I am probably going to want a camera that does not filter out infrared light. I am sure on cameras as cheap as these, the infrared filter must just be a piece of plastic glued to the lens. I have not yet taken it apart to know for sure, but I am pretty sure they would not spend the money for infrared filtering glass for the lens.

The other thing that looks pretty good with it is the power requirement. When it is fully active and everything is turned on, it burns roughly 110 milliamps @ 5V per hour. I can also put it in "deep sleep" mode and it burns less than 6 milliamps. So I can easily run it with a small solar panel and a couple 18650 lithium cells for backup at night and cloudy days.

Just doing some back-of-the-envelope math to get a sense for how expensive a complete camera unit might cost, I should be able to construct a complete camera unit with motion sensors, motorized pan and tilt, solar power with lithium battery backup power, and a 4GB local image storage, plus a plastic housing for the whole mess for less than $50 per unit. I figure I can construct several camera units, place them around our property and have them communicate to the Jetson to allow us to monitor and control them from a single location.

I also ordered another different camera board that is supposed to be a little better quality. It has a much better camera and a more powerful chip. But it does require more power (still under 200 milliamps when fully in use but I think it is somewhere around 20 milliamps when sleeping), and it is bigger (about an inch by 2 inches). The power does not bother me but the larger size might be an issue. If it is, I might see if I can get the camera for the new board to work with the ESP32 chip.

Whichever way I decide to go, writing the software to run the whole thing looks like it is going to be easy once get the electronics hardware part figured out.

So phase II of this project should give me something to tinker with inside this winter.

Box of frogs
11-26-2023, 06:02 AM
My boy Inor is wicked smart !!

Prepared One
11-26-2023, 08:52 AM
I am lazy, I bought ring cameras with solar panels so I have cameras that cover the largest part of the cleared property plus the gates. Easy peasy. I am going to put a couple cellular game cameras back in the woods and down by the creek as well. I'll know who's coming at least.

TJC44
11-26-2023, 10:07 AM
Are you using an Arduino to run it, or something else? Looks like the price on it (like everything else) has gone up. Amazon has them for about $10 now. I was toying with the idea of getting the development kit just to have something to play with to keep me out of trouble. Having a camera up by the road (there is a turnout there that people use to turn around) would be nice. Hmmm...:thinking:

T-Man 1066
11-26-2023, 11:29 AM
Definitely a cool project that I will continue to follow your progress on.

What kind of camera range from the house do you expect to get?

Dwight55
11-26-2023, 01:06 PM
Nice to know I'm not the only one falling into the "learn something new" pit.

Caught the laser engraver bug . . . and the drone bug . . . so now I've got a Phantom 4 drone decorated like a Vietnam era Phantom F-4 . . . including USS Coral Sea designation as her home carrier . . .

And as of last week I now have two laser engravers . . . a 3000 mw and a 10 watt . . .

Learning how to do all of this at 79 is a bit of a challenge . . . but it beats the heck out of the View and the Price is Right.

Nowadays when my wife asks me if there is anything on TV I just tell her dust . . .

But anyway . . . lets all learn something new and have fun doing it.

May God bless,
Dwight

Inor
11-26-2023, 03:20 PM
Are you using an Arduino to run it, or something else? Looks like the price on it (like everything else) has gone up. Amazon has them for about $10 now. I was toying with the idea of getting the development kit just to have something to play with to keep me out of trouble. Having a camera up by the road (there is a turnout there that people use to turn around) would be nice. Hmmm...:thinking:

The ESP32 boards have some kind of relationship with Arduino but I'm not completely clear on what that relationship is. You program it using the same Arduino IDE though. It is basically a subset of the Arduino. They make several varieties. The one I got does not come with a USB connector or anything. It is pretty much the same as this one:

https://www.amazon.com/Hosyond-ESP32-CAM-Bluetooth-Development-Compatible/dp/B09TB1GJ7P/ref=sr_1_11?crid=1007PJ9KE4PQJ&keywords=esp32%2Bcam&qid=1701032485&sprefix=ESP32%2Caps%2C188&sr=8-11&th=1

To program it, I have to use a separate "daughter board" with a USB-to-RS232 chip and wire it up manually. (I wanted that because of the size and because I do not want to give up any more IO pins for controlling the USB connector.)


Definitely a cool project that I will continue to follow your progress on.

What kind of camera range from the house do you expect to get?

If you are asking about the range of the camera for capturing images, I am thinking it only needs to be about 20-25 feet. The motion sensors I am planning to use to "wake it up" only have a range of about 4 meters. (I think that is around 12-13 feet?). So if it can wake up and snap a photo from there, then I can write the software to follow the movement and continually snap images.

If you are asking about how far it can communicate to the Jetson via my wireless using an antenna, I am not sure. I doubt it will be much without a repeater especially outside the house. BUT... It does also support the LoRaWAN protocol which has a range of 1/4 to 1/2 mile! So that is going to be my fallback for sending data back to the Jetson if I cannot get the range I want on WIFI. The only downside there is the max data size is 250 bytes at a time so I would need to break the images into multiple parts to send them. Plus it would be slow. Most likely, I will end up using a mix of the two protocols.

Slippy
11-26-2023, 05:21 PM
I wish I was smarter...:alcoholic:

Inor
11-26-2023, 06:58 PM
Are you using an Arduino to run it, or something else? Looks like the price on it (like everything else) has gone up. Amazon has them for about $10 now. I was toying with the idea of getting the development kit just to have something to play with to keep me out of trouble. Having a camera up by the road (there is a turnout there that people use to turn around) would be nice. Hmmm...:thinking:

Hey Pal,

I just discovered this about 10 minutes ago and immediately thought of you:

https://www.youtube.com/watch?v=6l9DWqb77KI

It is an emulator for Arduino and ESP32, complete with WIFI! As the video says, it is not completely fool-proof, but it does at least provide a starting point without investing a bunch of money in hardware that we are going to destroy 10 cents at a time!

Prepared One
11-27-2023, 09:26 AM
I wish I was smarter...:alcoholic:

Yeah, all that computer programing stuff is way over my head.

Box of frogs
11-27-2023, 09:55 AM
I wish I was smarter...:alcoholic:

Reading their posts on this thread makes me feel like these guys are running a one hour dry cleaner while I beat my clothes with rocks at the river. :lost:

Inor
11-27-2023, 10:08 AM
Reading their posts on this thread makes me feel like these guys are running a one hour dry cleaner while I beat my clothes with rocks at the river. :lost:

Ain't nothin' wrong with rocks (or rivers)... TJC is the real professional with the electronics hardware; I'm just a tinker...

T-Man 1066
11-27-2023, 01:55 PM
The collective talent on this forum is amazing! Proud to be part of it!

TJC44
11-27-2023, 02:18 PM
Ain't nothin' wrong with rocks (or rivers)... TJC is the real professional with the electronics hardware; I'm just a tinker...I can do the hardware, you have the ability to make it sing & dance.:banghead:

Sent from my SM-A037U using Tapatalk

TJC44
11-27-2023, 08:38 PM
Hey Pal,

I just discovered this about 10 minutes ago and immediately thought of you:

https://www.youtube.com/watch?v=6l9DWqb77KI

It is an emulator for Arduino and ESP32, complete with WIFI! As the video says, it is not completely fool-proof, but it does at least provide a starting point without investing a bunch of money in hardware that we are going to destroy 10 cents at a time!

I bookmarked it. Anyone can use it, as it runs in a browser, online. I imagine if you are logged in, you can save your projects. Another video also came up of a tutorial, but I lost it & need to look for it again.

Here it is, it's 90 minutes long: https://www.youtube.com/watch?v=BLrHTHUjPuw

TJC44
11-27-2023, 08:41 PM
I wish I was smarter...:alcoholic:

Slippy, and all,

You ARE smarter than me. You are certainly more successful in your career than I am.
And you are MUCH farther along in preparing for whatever than I am. I see some of the posts on preparedness here, and I feel like I'll get wiped out in the 1st month.
:cliff:

T-Man 1066
11-28-2023, 09:58 AM
Slippy, and all,

And you are MUCH farther along in preparing for whatever than I am. I see some of the posts on preparedness here, and I feel like I'll get wiped out in the 1st month.


I do feel the same way. Looking at most people I am well prepped, but looking here, definitely rookie for sure!

1skrewsloose
11-28-2023, 06:29 PM
I try not to compare my preps with others, too many variables come into play. Every decision is based on your location and finances and probability of this or that.

Me, I'm a country boy, I don't anticipate much for under 5 yd. confrontation, unless its the Fed. When I see them coming, if they don't look/acknowledge they are friendly, game over for them. They'll never get close enough to see my face.

I need a 50 cal.:)