Tesla Automatic Charger - How to build a Robotic Automatic Tesla charger

A FIRGELLI® Customer who has a Tesla decided to make his own Robotic Automatic Tesla Charger, and this is his video. Clearly, he knows a thing or two about electronics and software, because it is quite a bit involved with creating a device like this that requires sensors, motion devices, and software to make it all work together. He used a FIRGELLI Linear Actuator to swing the arm out from the wall towards the charging port on the car, with sensors to locate the correct location before inserting the nozzle in the correct location.

So at the heart of it, you've got a Raspberry Pi 4, and it's the brains for everything. It's mounted to the carriage, which runs on these two linear bearings top and bottom. And they provide the freedom left and right, the lateral freedom. And then got a linear actuator here that gives you extension. It rotates out to plug it in. If you go over to the business end, you can see you've got a big servo here and that rotates the charging handle out when it's needed, an ultrasonic distance since you're here so it doesn't hit the car, and then a camera which takes pictures and provides it to a machine learning model, a TensorFlow Lite model that runs on the Raspberry Pi. And that's how it finds the reflector and charge port.

It’s also got a light for when it's dark out and that's using a ZigBee protocol. That's what the little transmitter is there for. If you look at the main board, there is a power supply, motor controllers, all taking commands from the Raspberry Pi, and then a geared motor. And then it actually has outputs for an encoder, It’s using an Arduino as an encoder, just because they are so cheap and easy to use. So when it’s fired up It first just takes a couple of distance measurements to make sure that something is in the garage. And then the light comes on. That just defaults to on so that if it's dark out, the camera can see the reflector there.


It's a fairly complex TensorFlow model and it takes that six to eight seconds every time to run an inference on the 
Raspberry Pi 4, so it's not a fast process, but it'll take a picture, then It'll run that inference. And what it looks for is a reflector. You can see in the video it found one there with a score of 80%. So it's 80% confident. It then runs it again to make sure. Machine learning models are sometimes a little finicky and so it sometimes takes a few tries to be sure.  Once it's sure that something is there, then it'll start moving left and right to centered up on the correct spot. So in the video you can see at first it went a little too far and then it moves back. It does get pretty close. Once it's happy with how it's centered here, it'll turn the light off, and then using the Tesla API through the Tesla app, it'll open the charge port.


It doesn’t have any actuator on the actual charging handle. It's all done through the internet, which is a weak spot of this design. But in a pinch, Its got a second charger you 
can always just plug in. So it feels like it's pretty centered. It will start extending out the charger towards the nozzle. In the video you can see it's looking for the blue Tesla logo, which is a good reference point to program in,  and then also the charge port. But the Tesla logo is actually much easier to pick out than a charge port due to the definitive color, as the charge port looks very different from different angles and the logo always looks the same so it is more accurate. You'll then see it deploys the charging handle when it gets close. And then it  just goes back and forth until it's centered up.


This function needs a little extra fine tuning, and this part is actually an open loop. It’s
 not using the encoder. It works well enough however. The only feedback it's getting for left and right is from the camera. And then it's just setting a speed and going for a certain amount of time. So it could save a couple of misses here if I programmed to using coder and it knows exactly how far it's going. But it's still a work in progress. The charging handle is a little too flat which is what makes this portion difficult to force in the hole. A prong is used to just let the nozzle angle downwards into the charging port,  and it's allowed to pivot downward. So as it pushes in, it pivots downward into the position it should be in. 

So once it's plugged in, Its then 
scheduled to begin the charging by using the Tesla API again to figure out when scheduled charging should be finished. It'll use the Tesla API to release the charging handle and then retract back to its parked position. And that's it. 

Share This Article
Tags:

Need Help Finding the Right Actuator?

We precision engineer and manufacture our products so you get direct manufacturers pricing. We offer same day shipping and knowledgeable customer support. Try using our Actuator Calculator to get help picking the right actuator for your application.