2018 – Bijan Moradi http://bijanmoradi.com Sun, 11 Oct 2020 21:54:31 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.14 https://i0.wp.com/bijanmoradi.com/wp-content/uploads/2018/08/cropped-Untitled-2.png?fit=32%2C32 2018 – Bijan Moradi http://bijanmoradi.com 32 32 150847873 RTL-SDR Radio Adventures http://bijanmoradi.com/rtl-sdr-radio-adventures/ Mon, 25 Feb 2019 11:44:38 +0000 http://bijanmoradi.org/?p=200 RTL-SDR Radio Adventures The  RTL-SDR is a TV Dongle that is used to pick up digital TV. Using a feature on the chip called I/Q sampling, it is possible to tune to pretty much any frequency between 22mhz and 1200mhz. With a filter tuning to frequencies lower than 22mhz is also possible.   During my […]

The post RTL-SDR Radio Adventures appeared first on Bijan Moradi.

]]>

RTL-SDR Radio Adventures

The  RTL-SDR is a TV Dongle that is used to pick up digital TV. Using a feature on the chip called I/Q sampling, it is possible to tune to pretty much any frequency between 22mhz and 1200mhz. With a filter tuning to frequencies lower than 22mhz is also possible.

 

During my attempts, I have used everything between paperclip, to a long wire, to dipole antennas. I dealt with weird interference patterns that made tuning into weaker signals hard.

Interference within 1090MHZ while looking for aircraft transponders

For Aircraft Transponders I used a dipole with the current length for the frequency. I didn’t do any calculations as the majority of people have found two 7.5cm antennae in a dipole configuration give good results.

This write up is in progress.

Picking up passive aircraft ADS-B Transponder signals

Listening to ATC/Air Traffic.

 

Android support for SDR Driver

 

 
Data collected from a 11.5cm vertical dipole outside my house in San Diego.

Created using modified code from https://github.com/JorgeGT/PlotRTL1090.
 

 

The post RTL-SDR Radio Adventures appeared first on Bijan Moradi.

]]>
200
Neural Network Zoom Experiments http://bijanmoradi.com/neural-network-zoom-experiments/ Mon, 10 Sep 2018 21:23:21 +0000 http://bijanmoradi.org/?p=738 Neural Network Zoom Experiments     Neural Networks as a tool to both zoom and enhance images Here I will document my experiences using recurrent neural networks to supersample and enhance images. A properly trained neural network should be able to approximate a zoomed picture. It won’t be able to show information that was not […]

The post Neural Network Zoom Experiments appeared first on Bijan Moradi.

]]>

Neural Network Zoom Experiments

 

.

A visual representation of the input to a trained TensorFlow neural network.

 

Neural Networks as a tool to both zoom and enhance images

Here I will document my experiences using recurrent neural networks to supersample and enhance images. A properly trained neural network should be able to approximate a zoomed picture. It won’t be able to show information that was not visible before, but it is able to remove certain artifacts that other transformations can create.

Neural Networks use an input layer that consists of the image information, a series of hidden layers of various dimensions, and an output layer that is the corrected image. Neural Network layers consist of matrices containing gradient weights and biases that when multiplied with an activation function such as ReLU or Sigmoid will produce a simulation of a neuron firing.

Training this network of weights can be done via recursion. This calculates the error between the actual output and the expected output and uses it to train the neural network to minimize that error.

For our first example, I will take a very small circle with a picture of a Linux penguin on the inside. Our starting picture will be 100×100 and we are going to upsize it to 1000×1000 via both neural networks and traditional transformation mechanisms.

This is the original file that will be resized/supersampled. 100×100

Different methods of resizing

I will be attempting multiple methods of both neural and traditional resizing and will compare their results as objectively as possible.

Traditional Resizing (linear filtering)

“Traditionally” Resized using Paint – CLICK FOR ACCURATE SIZE

 

 

⇒ Traditional Algorithms

 

 

 

 

As a control, I will resize using paint.net using the default settings. This uses a series of algorithms to fill the empty pixels with a mixed gradient allowing for a somewhat smooth resize.

 

 

 

 

Attempts using Neural Networks

Attempt 1 – alexjc/Neural-Enhance

My first attempt at resizing this photograph was to use the python toolNeural-Enhance with Windows 10. It should have been simple, but it turned into a disaster. I was never able to figure out how to mount the filesystem correctly. All the documentation that I could find on this issue is for other operating systems and was specifically not applicable to windows. This is due to the way the Unix filesystem is structured.  I tried both forward, and

One of the many similar file not found errors I was receiving.

backslash, full path, relative path, mounting the directory and trying, all to no avail. It is able to load the model, but I am unable to load the image file that I want to enhance.

I have had this working before in Linux, and plan on looking back into it again in the future. When I do I will update this article.

Attempt 1 Results- Failed to enhance images. Will look into it in the future.

 

 

Attempt 2 – Waifu2x Tool (x4 times)

I had to use this 4 times in a row to achieve the desired result as it only supported supersampling by factor x2. I initially wanted to steer clear of tools like this, but it’s always nice to have all the available information.

Single-Image Super-Resolution for Anime-Style Art using Deep Convolutional Neural Networks. And it supports photo.

It seems to work on a similar neural network principle as Neural-Enhance. It would not surprise me if they share the same (TensorFlow?) roots.

Original Size

Resized using Neural Networks via Waifu2x (4x)

 

 

 

 

 

 

 

 

 

 

 

Attempt 2 Results: Promising

Attempt 2 gave promising results. There are noticeable artifacts present around the lower fins of the penguin, present in the form of yellow color bleed. This is an issue absent in normal resizing tools. Besides that the image is clear, the lines concise, and there is no noise, much unlike its traditional counterpart.

 

Attempt #3 – A Paid service (It’s not good)  https://letsenhance.io/

I signed up for their trial. Uploaded my 100×100 image, and clicked the “magic” button. Here was the result.

Attempt #3 Results: Very Poor

Very disappointing to say the least, there is no reason I can see to use this over the free alternatives. Note the loss of pattern between the checkers, and the general noise in the image. I was able to get much better results off the above Waitfu2x tool for free, with less effort. Perhaps this is some sort of sophisticated proof of concept that flies right over my head. Or maybe people do buy into this marketing hype. Obviously much better results can be had for free than using https://letsenhance.io/ or any other paid service.

Attempt #4  – TensorZoom(Android)

This one is certainly the most frustrating to test. There are builds that can run on Windows, but I was unable to get it working. I didn’t document the process, but there was nothing useful learned. Instead, I will be using my Android Google Pixel OG phone to magnify the photo. Unlike the other examples, there is no limit to TensorZooms zoom setting.

TensorZoom with Android

 

Attempt #4 Results: Outstanding.

 

Neural Networks seem to do an alright job of upscaling small images with minimal artifacts. Depending on the method used the resized version may be much clearer than its traditionally scaled counterpart. It seems like areas of struggle in the image was during transitions between the penguin and the background. This means that Neural Network image scaling may be more prone to artifacts when there is more noise (such as a crowd of people in an image)

 

 

 

This is an article in progress. Neural Networks stand as a promising way to resize images in the future. They are currently capable of outperforming traditional resizing in some cases.

The post Neural Network Zoom Experiments appeared first on Bijan Moradi.

]]>
738
3D Printing II – Adding an external SoC and modeling a basic part http://bijanmoradi.com/3d-printing-ii-adding-an-external-soc-and-modeling-a-basic-part/ Mon, 10 Sep 2018 00:00:04 +0000 http://bijanmoradi.org/?p=727 3D Printing II – Adding an external SoC and modeling a basic part The issue of print reliability One of the issues that become apparent early on with large prints is the reliance the 3D printer has on the computer operating it. When 3d prints can take 10+ hours, the odds of a computer crash […]

The post 3D Printing II – Adding an external SoC and modeling a basic part appeared first on Bijan Moradi.

]]>
3D Printing II – Adding an external SoC and modeling a basic part

The issue of print reliability

One of the issues that become apparent early on with large prints is the reliance the 3D printer has on the computer operating it. When 3d prints can take 10+ hours, the odds of a computer crash wasting both time and physical resources becomes non-negligible. The solution to this problem is an external SoC such as a Raspberry Pi. We can use the SoC to control the print remotely with a web console. This SoC will stay always on and has the ability to remotely start the printer.

When choosing an SoC to use, it is necessary to understand the functions it will be performing. Our SoC needs to be able to serve a webpage and move a series of stepper motors quickly. This is not computationally expensive, so the logical choice is the Raspberry Pi Zero. Although it lacks the specifications of better SoC’s, its small power requirements and form factor make it perfect for this relatively simple task.

OctoPrint

Raspberry Pi 0 using OctiPi Linux controlling the printer.

OctoPrint is a prebuilt Pi image that contains Raspbian and OctoPi (A web control framework for 3D Printers). It can be found for download here: https://octoprint.org/download/

The installation process is fairly self-explanatory and I won’t be covering it here. Go take a look at the site for yourself.

This article is in progress, please check back for more.

Replacement grill handle

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OctoPi printing a Pig model.

The post 3D Printing II – Adding an external SoC and modeling a basic part appeared first on Bijan Moradi.

]]>
727
3D Printing Part I – The Basics http://bijanmoradi.com/3d-printing/ Tue, 04 Sep 2018 23:45:45 +0000 http://bijanmoradi.org/?p=551 My Printer: MonoPrice Maker Select V2 I am currently using a Monoprice Maker Select v.II. I have removed the default build surface and added borosilicate glass with silicon thermal pads to the headed aluminum gantry. I plan on replacing the Y-axis gantry as well. There are thicker blocks of milled aluminum online. Learning about 3D […]

The post 3D Printing Part I – The Basics appeared first on Bijan Moradi.

]]>

My Printer: MonoPrice Maker Select V2

I am currently using a Monoprice Maker Select v.II. I have removed the default build surface and added borosilicate glass with silicon thermal pads to the headed aluminum gantry. I plan on replacing the Y-axis gantry as well. There are thicker blocks of milled aluminum online.

Learning about 3D Printing

Note: This is not meant to be a full guide, this is just my process of learning about 3D printing. You will need additional resources and should do ample research before attempting 3D printing. It is unfortunately still in the early adopter phase.

3D printing is an awesome way to prototype and makes some pretty cool things quickly. It has the ability to change the way we think about creating objects the home printer has in modern households. It won’t replace it, rather it will work alongside it.

Basics of 3D Printing

3D Printing is accomplished through depositing layers of a material down in increments. The total sum of all the layers(X and Y) is the final 3D object. Below are the mechanics of a basic 3D printer based on the first model of the Prusa i3.

Several important steps are required to 3D print a model. Basically, the model must first be loaded into a slicer. This slicer takes the model and computes the fastest way for the nozzle to deposit the material along with any support structure if needed. It stores the file as a GCODE, and inside are the basic movement instructions for the microcontroller inside.

XYZ Axis on a Monoprice Maker Select V2 with a borosilicate glass plate

Printing Mechanisms
XYZ Mechanisms

Usually, there is a moving base that controls the Y axis, the X axis is controlled by a sliding mechanism(on the Z-axis gantry) and the Z axis moves the whole X-axis gantry upwards. This means that X and Z create a plane where Y (the baseplate) is the moving part that is being printed too.

The X-Axis uses a belt and slider mechanism to move along the Z-axis gantry. It must be manually leveled and calibrated with the Z-axis threaded rod.

The Y-Axis uses a belt and two rods on a slider. The Y-Axis contains the baseplate and its heating components if present.

The Z-Axis uses twin stepping motors connected to two threaded rods to give it precise lift. It contains both the X-Axis and the Nozzle.

Extrusion nozzle

The Nozzle mounted on the Z-Axis gantry is responsible to the depositing of the plastic material. It does this using a small gear assembly connected to a stepper motor. This allows a precise amount of material to be deposited, known as the Extrusion rate.

Extrusion rate is dependent on the speed of the nozzle with relation to the baseplate. Temperature and filament often make a significant difference of the operating nozzle temperature. Some filaments use custom GCODE(Low-level code) to change the temperature in small calibrated amounts. Chemicals inside the filament react to this change by turning to a desired, usually pre-calibrated color. This is most often utilized by wood filaments to emulate the natural rings that form on wood as it weathers the seasons.

Motor Control

The main control unit and Power Supply

Motor Control is attained through a central box combining both a microcontroller and a DC power supply. This combination allows for a compact, easy to manufacture component but is the one flaw of this specific (MP Maker Select V2). Inside lie a large fire hazard and vulnerability. The connector for the heated base plate is not rated to draw the amount of current required. This has caused numerous people to watch as smoke pours out of their unit. The overload caused the connectors to smolder and melt. See This for more and see This for the MOSFET correction, which resolves this issue.

 

The motor control box generally supports two methods of connecting SD Card, and direct control.  Direct interfacing with a computer will show it as an Arduino. The computer has control over the Microcontroller and is able to run whatever it likes. This allows for use of Raspberry Pi computers to directly control the 3D printers movements. All of this requires the model to be sliced into a GCODE file by a slicer

 

Bed Leveling, Calibration, Settings

This is by far the most tedious part of dealing with a cheap 3D printer. Many new expensive printers auto level and have calibration options that negate this issue. It is normal for this process to take multiple hours if you have a bent baseplate or are just unlucky. It is a very precise process that lacks any sort of accuracy.

In this post, I don’t want to delve into those specifics as they are just busywork and practice. Here is a VERY helpful video on leveling your baseplate and ensuring the X-Axis is ready to go. He also gives some nice starter print mods such as the thumbscrews.

Slicing a model into GCODE

Cura Ultimaker with the Prusa i3 Configuration

In order to 3D print a model, it must first be sliced into a GCODE. This GODE contains the direct motor movement instructions for the microcontroller to interpret. That is why it is critial you only use GCODE files configured for your printer, otherwise your printer may attempt to operate outside of its parameters.

The Slicer I use is called Ultimaker Cura. It has most features of the paid (and expensive) competitors. There is a default configuration in Cura called “i3 Prusa”. This configuration works perfectly for the MP Maker Select V2 I owned as it is a clone of it. Most clones will work fine with the same settings so long as they are a bit slower.

Ultimaker and most other Slicer programs use something called an STL file as input. This is a standard AutoCAD mesh and most modeling software can output directly to them. Conversion solutions are readily available for everything else.

 

 

 

Uploading a GCODE to the printer

Once a GCODE file is generated, it must be uploaded to the microprocessor on the 3D Printer.

Using an SD card – Most printers will allow you to select it from an interface for printing.

Using a USB interface – Most printers will show up as an Arduino computer. By opening the slicer and pressing ‘Print’ with the correct interface selected the 3D printer will begin printing. During this process, the computer is directly controlling the movements of the motors and must remain on with the slicer open.

My first print. Whoops. I was having issues leveling my X axis.

 

That should do it! That is all a basic print needs. In a future article, I will be outlining the process of adding a small SoC such as a Raspberry Pi 0 to control the printer with a web interface. This will remove the need to upload any sort of GCODE to the printer.

 

 

The post 3D Printing Part I – The Basics appeared first on Bijan Moradi.

]]>
551
5km point to point Internet without Line of Sight http://bijanmoradi.com/5km-point-to-point-ptp-internet-without-line-of-sight-los/ Sun, 26 Aug 2018 18:53:41 +0000 http://bijanmoradi.org/?p=228 Creating an internet connection across San Diego with no Line of Sight (LoS).   This project utilized two Ubiquity 900Mhz radios to accomplish a Point to Point link between a building in North La Jolla, and a building in Clairemont. This was about a 5km distance that needed to be bridged. The idea was to […]

The post 5km point to point Internet without Line of Sight appeared first on Bijan Moradi.

]]>

Creating an internet connection across San Diego with no Line of Sight (LoS).

 

This project utilized two Ubiquity 900Mhz radios to accomplish a Point to Point link between a building in North La Jolla, and a building in Clairemont. This was about a 5km distance that needed to be bridged. The idea was to use my parents quick internet at my own house that could only use DSL. The project really wasn’t able to deliver on that front, as the throughput ended up being too low. Between the two properties lay trees, hills, other buildings and more. Making a normal 2.4 or 5ghz not viable as they don’t penetrate through obstructions well.

These radios establish a standard WI-FI network using normal protocols complete with an SSID and WPA2 encryption. The main difference being that it all runs over 900Mhz instead of 2400Mhz or 5000Mhz.

 

First Connection

It took a while to get first connection. At one point I became concerned the radios were defective as they would not operate in the same room. However, it turns out that the high gain was just too much if they are too close together. After climbing a tree and pointing the antenna where I [thought] its counterpart was I received a beep and a small red light lit up, indicating a connection with the other point. It was faint, wouldn’t stay connected and was too slow to load

First signs of life

the other antennas web interface. Through a mix of remote desktop, a hacked together network and messed up

First Connection: Weak but workable

subnet, I was able to have the antenna on the same network as the internet during troubleshooting.

 

Optimization of the link

After much trial and error and driving between the two points, I was able to establish a stable, albiet weak connection. Over the course of about a week, I did corrections to the antenna alignment and height/position. Moving it in both locations until I reached a level were I was satisfied it would not go any higher.

I then messed around with the channel width, and found that the larger channels actually limited bandwidth likely due to the obstructions weakening the signal if it is less concentrated over a larger area.

 

 

 

 

 

 

 

 

 

 

 

 

End Result

Finally, after a lot of tweaking I was able to reliably attain 10-15MBPS depending on the weather. This was usual

ly a pretty even split between up link and down link when tested. It really wasn’t fast enough to replace my DSL connection, and weather (specifically the marine layer at the La Jolla house) limited its reliability. I never ended up using it much, and it will probably go back to my previous employer when they have a use for it.

 

 

 

 

 

 

 

The post 5km point to point Internet without Line of Sight appeared first on Bijan Moradi.

]]>
228
Rotting Bench Restoration http://bijanmoradi.com/rotting-bench-restoration/ http://bijanmoradi.com/rotting-bench-restoration/#respond Sat, 25 Aug 2018 01:43:08 +0000 http://bijanmoradi.org/?p=153 This is an old bench that is just about at the end of its life. I decided to see if I could restore it or at least get a little more use out of it before it finally collapsed into itself. This was a two day project that involved disassembly, repair,  sanding, painting, and sealing. […]

The post Rotting Bench Restoration appeared first on Bijan Moradi.

]]>

This is an old bench that is just about at the end of its life. I decided to see if I could restore it or at least get a little more use out of it before it finally collapsed into itself. This was a two day project that involved disassembly, repair,  sanding, painting, and sealing.

Bench Before Restoration

 

Process of Restoration

Check back here for a detailed walk through of the process I went through while repairing this bench.

 

 

 

Final Product

 

 

In the end I needed to use epoxy to bond parts of the bench that could no longer be screwed screwed into due to wood rot. Not really what I intended as I wanted the job to ‘be done right’. However, considering the poor condition of the bench, I can’t complain too much about the result

I’d say it actually looks pretty good.

 

The post Rotting Bench Restoration appeared first on Bijan Moradi.

]]>
http://bijanmoradi.com/rotting-bench-restoration/feed/ 0 153
DIY Solar Cart: Cheap solar power http://bijanmoradi.com/solar-cart/ http://bijanmoradi.com/solar-cart/#respond Thu, 23 Aug 2018 23:46:58 +0000 http://bijanmoradi.org/?p=83 DIY Solar Cart: Cheap solar power The Solar Cart Project started as a test of a solar panel. Simply run a single LED light in my room with an two alarm system 12v batteries in parallel. Giving a total of 12AH of power. Here is the proof of concept back when I thought it would […]

The post DIY Solar Cart: Cheap solar power appeared first on Bijan Moradi.

]]>

DIY Solar Cart: Cheap solar power

The Solar Cart Project started as a test of a solar panel. Simply run a single LED light in my room with an two alarm system 12v batteries in parallel. Giving a total of 12AH of power.

Here is the proof of concept back when I thought it would be a quick project.

Initial Proof of Concept

 

Besides the two 12V batteries the system also contained: A single 5amp inline automotive fuse on the positive end of the battery, a cheap PWM charge controller, and a 150W monocrystalline solar panel. This was all wired using 14AWG landscape wiring.

Upgrading to a central (wooden) chassis and adding fuses

Obviously this system can’t power much for very long, so I continued to expand it. I purchased a sealed 12v AGM 100AH marine battery and found a piece of wood to begin attaching more components on too. With such a large battery there is a greater chance of a short circuit allowing serious current flow, and potentially starting a fire. So I needed to also add more versatile protections such as removable fuses. I also added a single current meter that read the total load on the battery using a single shunt.

The Fusebox serves the most important role in this power distribution system.

 

You may note two oddities. The first being the black wire connecting to the fuse box. This has nothing to do with polarity, it’s just the landscape wiring that connects to the lights which are not dependent on polarity. Secondly, I connected the charge output from the charge controller back into the fusebox to charge the battery instead of just connecting directly to the battery bank. This allows for there to be some level of protection if the PWM charge controller fails to cut power at the correct voltage. I’m honestly not sure how or if that can happen, but you can’t be too careful.

The next logical expansion was to allow for the powering of A/C components using an inverter. There are two ways of going about this – Connecting directly to the panel, or backfeeding into the grid. Since I didn’t have a grid-tie off, I opted to be totally isolated. There are ways of getting around this (see self-islanding microinverters which sync to the sin wave of the grid and then output into your house via a suicide plug) however these are of questionable legality and certainly against SDG&E’s rules.

 

Inverter added to the test setup

 

Inverter for AC power

As you can see, I added a 1000W inverter (Yes far more powerful than I needed). I fused it at the rating of the wire so it would blow far before reaching enough current to be hazardous. I also added a switch for the lights.

Because of the growth in complexity, I needed some kind of common return for the ground. I had started using the shunt for this, placing things I didn’t want measured on the final bolt of the shunt. However, this became unsustainable and had started to look very cluttered. So I knew I had to once again expand the system to include a common negative bus.

 

Another issue that presented itself is the fact that the amp-meter is one directional. This meant that if the panels were receiving energy while powering something, the meter would get stuck at zero as the net movement of power to the batteries is positive. I had initially solved this by putting the solar power ground after the shunt measurement. This only moved the problem, as now I had no idea how much power the panels were delivering.

 

I explored a few ways to fix this, such as a relay that switches the connections on the shunt when it detects power in the other direction or perhaps a new meter all together. However, I thought for cost, time and diagnostic reasons it would be advantageous to have two meters. One for incoming solar power, and one for all the draw on the entire system.

Final Prototype configuration before being moved into the metal enclosure.

For some odd reason I was unable to use a common shunt here. I figured if I reversed the sensor connectors on the shunt it would measure the reverse amperage. It just seemed to give me gibberish readouts. Not sure what was going on there…? I ended up giving up and just using two.

 

Enclosure and battery cart

 

 

 

 

 

 

 

 

 

 

 

 

Leaving the wooden testbed

After this was done I realized that having so much electrical equipment screwed and glued into wood is a pretty large fire hazard. I decided I needed to quickly rectify this. Around this same time, I began toying with the idea of making the entire setup portable. Thus I settled on the only logical conclusion: A

service cart with an electrically isolated conduit box. I also bought two more 100AH batteries. Bringing the total up too 3 12V 100AH batteries. Or 3600W

 ,                            Final Result

 

 

It turned into a project to make a solar ‘crash cart’ able to sustain an area with a loss of power quickly.

The post DIY Solar Cart: Cheap solar power appeared first on Bijan Moradi.

]]>
http://bijanmoradi.com/solar-cart/feed/ 0 83
Amazon Safe Aurduino Control http://bijanmoradi.com/amazon-safe-aurduino-control/ http://bijanmoradi.com/amazon-safe-aurduino-control/#respond Thu, 23 Aug 2018 22:33:53 +0000 http://bijanmoradi.org/?p=79   Cracking and Reusing: An Amazon Basic Safe The story starts with a locked Amazon Basic safe. I couldn’t find the key anywhere, and although I was almost 99% sure it was empty, I just wanted to be safe. I tried the common ballpoint pen trick to try to jimmy it open but that failed. […]

The post Amazon Safe Aurduino Control appeared first on Bijan Moradi.

]]>

 

Cracking and Reusing: An Amazon Basic Safe

The story starts with a locked Amazon Basic safe. I couldn’t find the key anywhere, and although I was almost 99% sure it was empty, I just wanted to be safe. I tried the common ballpoint pen trick to try to jimmy it open but that failed.

I tried the drop and open technique where the safe is supposed to be opened as it falls. This is supposed to let the lock outside of the catch. That also failed for me.

 

 

Breaking into the safe

Initially, I had lost both the key and combo to the safe and wanted to get inside. I tried the normal/useless ways of getting in such as prying, dropping an opening to try to catch the latch and more. At one point I tried jamming the barrel of a ballpoint pen into the cylindrical lock after hearing reports of it working on Amazons own reviews. For a little while, it felt like I would never be getting into this safe.

However, once I took a moment to think about the situation getting inside was much easier. I figured that there’s a powered electromagnet for the clasp (as there were reports online about strong magnets unlocking them). Therefore there must be some way for it to receive power once the correct code is entered into the panel.

Aha!

I popped off the panel, and… To my dismay, Amazon had prepared for this.  Inside revealed a ribbon cable, which was connected to the matrix for the keypad input, along with three additional power wires for the LEDs. The actual electronics remained inside the door of the safe. They took the time and added manufacturing costs (nearly DOUBLE the length of wire) to ensure that removing the panel would not allow an intruder into the safe.

Unfortunately for Amazon, they neglected something both fatal and obvious. When the front panel is removed, the slot for the ribbon cable is HUGE.

I noticed the back of the PCB and then the connectors. One of these powered the locking mechanism. Using some jumper cables and a 9v battery I was able to open the safe and finally retrieve its contents.

 

The Idea of a smart lock addition

I decided adding a ‘smart lock’ would be a good idea. With such an addition a safe can do many more checks such as multiple simultaneous pin entry, remote Bluetooth unlocking and even unlocking via the internet is possible. It is actually a very simple project, with the hardest part being the code behind the Arduino as it will also have to handle the screen.

I plan on using an Arduino Tiny to interface with the safe, and a Pi Zero to interface with whatever else. I’m also considering using TensorFlow and this together in a future project for facial unlocking.

 

Here is a proof of concept sketch

Left – Plans for the Arduino safe. Right – an Early prototype of the safe. Numpad not implemented.

Using a transistor to prevent overdraw on the Pi.

The white blocks are only blocking out an inside joke with a friend. Its not even a funny one.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Please excuse how primitive it looks. Just trying to convey my basic idea. All of this new wiring would be inside the case in a finished one, but for now its out and easily accessible. It allows locking and unlocking of the lock via signaling on a pin on the Arduino unit. Without the screen, the entire setup could be completely hidden and miniturized, even with a Rasperry Pi connected within it.

 

 

In progress. Please check here soon for a detailed documentation of the smart safe.

Safe in progress.

 

Current (Ongoing)

 

 

 

The post Amazon Safe Aurduino Control appeared first on Bijan Moradi.

]]>
http://bijanmoradi.com/amazon-safe-aurduino-control/feed/ 0 79