30 April 2020

PROJECT: Half-Life 2 AR2, Update #3 - The Waiting Game

LINK TO PREVIOUS POST

Progress has been quite slow thanks to the hectic period we are in (I'm looking at you COVID19). You would think that working from home would give me more time to work on projects, but being stuck inside for a big portion of the day is quite mentally draining....

But getting back to progress, initial tests of the firing pin assembly were quite positive, I could get reliable cycling up to 3Hz (in the game the AR2 cycles at ~9Hz). The big limiter here is the return motion, which can be improved by using a stiffer spring. However if the spring is too stiff then the forward motion will be negatively impacted. So now I am waiting for a bunch of springs to try out

To keep myself occupied I have started working on the magazine assembly. So far I have defined the area that will house all the electronics (batteries, servo, control board...), and am now figuring out the shell movement (from magazine to barrel). Here is how the AR2 is looking so far:

Also, if you have not seen my previous post I have decided to get the multi material upgrade (MMU2S) for my 3D printer (Prusa i3 MK3S). I envision this being crazy useful as it will enable me to print soluble supports, which will make printing awkward shapes (basically everywhere on AR2) much easier

UPDATE: It didn't ;^)

17 April 2020

RESEARCH: SolidWorks Topology Optimization

One of the things I have come to realise with my AR2 project is that having a multi-extrusion 3D printer would be crazy useful, as all my prints to date needed support material which unfortunately is a pain to remove. However, with a multi-extrusion printer you can do fancy stuff like print all supports in PVA, which dissolves in water!

UPDATE: Not with a single hotend ;^)

Hence, I finally bit the bullet (bad time to be spending due to COVID19...) and ordered the MMU2S upgrade for my Prusa i3 MK3S. But there is a small hurdle, the MMU2S is designed for large (and preferably flat) working areas, something I do not have. So I decided to modify my current work space with a shelf to hold the 5 rolls of filament, and to spice things up I tried using the Topology Optimization feature in SolidWorks to design the shelf brackets. Overall, this produced quite an organic shape that reduced the bracket weight and gave it the best stiffness to weight ratio


The Steps

NOTE 1: I am running SolidWorks 2018 SP5
NOTE 2: Here is an easy to follow tutorial on Topology Optimization in SolidWorks 

  1. Make a 3D model as you normally would
  2. Add a SolidWorks simulation (SOLIDWORKS Add-Ins → SOLIDWORKS Simulation)
  3. Create a new Topology Study (Simulation → New Study → Topology Study)
  4. Select body material (I went with PET as I will be printing in PETG)
  5. Define the fixtures (faces where the body will be held in place)
  6. Add a force as well as it's direction (I went with 50N as at most the shelf will hold 5 1kg rolls of filament)
  7. Add a model goal (I wanted to reduce mass by 40% while having best stiffness to weight ratio)
  8. Specify the preserved regions and depth (I selected the bracket mounting faces and went with a depth of 2.5mm)
  9. Specify De-mold direction (arrow should be pointing towards flat surface)
  10. Create a model mesh (I used a 2mm curvature-based mesh)
  11. Run the simulation
  12. Finally, adjust the target Material Mass and calculate the Smoothed Mesh

The Results

  • Original model: 
    • 74.4g
    • 210851mm³
  • Topology Optimized model: 
    • 44.5g
    • 84013mm³

03 March 2020

UPDATE: Worth The Weight

This one is for all my mates who through the day would never come, and while it's not Half-Life 3, it's certainly a step in the right direction ;^)

WORTH


THE


WEIGHT

27 January 2020

PROJECT: Half-Life 2 AR2, Update #2 - Barrel Assembly

LINK TO PREVIOUS POST

Quick update coming at ya, I have just made the 2nd prototype for the AR2 barrel assembly:

Current variant seems to be working quite well, while still having enough room for electronics. Now I just need to fix a few minor errors and move onto the next moving assembly, the firing pin

UPDATE: Various 3D Printed Projects

Here is another quick update, this time covering some 3D printed projects I recently completed:
  1. My wife’s laptop seems to overheat when encoding videos or playing GPU heavy games. So I made a stand to give the laptop intakes/vents more air and move the screen to a more comfortable height. If you want to make one yourself, you can find the model here
  2. Another one for my wife who mainly works from a laptop connected to an external monitor. Recently work threw out a fairly decent PC (i7-3770k CPU, 32GB RAM, GTX 760 GPU), so we decided to refurbish it has her main computer. The problem she soon encountered was that it was a pain having to unplug the monitor/keyboard/mouse from her laptop and plug them into the desktop, so I designed a wee box to house USB & HDMI extension cables. Come to think of it we should have just got a KVM switch…
  3. Lastly, I made some 3D printed frames for the postcards & instax/Polaroid pictures we got along our 4 month overseas trip. You can grab the model here

24 December 2019

PROJECT: Half-Life 2 AR2, Update #1 - Info & Model

Here is a passion project I have been slowly working on since 2012, and only recently has it started to take actual shape. The project is a rifle from my long time favourite video game Half-Life 2 called the Overwatch Standard Issue Pulse Rifle (OSIPR), however in the community it is more commonly referred to as the Pulse Rifle or the AR2
Overwatch Standard Issue Pulse Rifle (OSIPR) aka Pulse Rifle aka AR2

The plan is to make it as functional as possible (sound, lights, and movement wise) with the help of SolidWorks, Altium, and 3D printing. I then want to make a cosplay using the AR2, first as the Resistance/Rebels and finally as the Combine:
Resistance/Rebels from Half-Life 2


Combine from Half-Life 2

Looking back, one of the major reasons this project has only recently started to gain momentum is due to the gradual improvement of my own skillset
For example, when I first started in 2012 I planned to make the rifle completely out of wood and mimic the firing pin movement with a motor, this proved to be quite difficult so I shelved the project. The second attempt (2015) involved me exporting the 3D model from the game files and importing it into SketchUp, I soon found that the model had too many errors to work with plus doing such a complex assembly in SketchUp was never a good idea, so the project was shelved again

With my current attempt I have designed the 3D model completely from scratch in SolidWorks (see pictures below). Next I plan to:
  1. Figure out mechanical movement of barrel, reload mechanism, and firing pin
  2. Design the circuit (sound, lights, and movement) in Altium
  3. Adjust 3D model internals and solve how it all fits together in SolidWorks
  4. 3D print rifle on my trusty Prusa i3 MK3S
AR2 game model (exported from w_irifle)

Overlaid AR2 game & SolidWorks models

AR2 SolidWorks model

Simulated AR2 barrel mechanism (gear & rack exported from Gear Template Generator)

10 October 2019

PROJECT: Solar Weather Station, Update #4 - RTC & FRAM

LINK TO PROJECT PACK

Turns out you can't just turn on the SGP30 (air quality sensor), wait a few seconds for it to warm up, and then take a reading. Instead you must burn-in the sensor for 12hrs after which you can obtain a baseline value. From this point on you need to:
  1. Fire up the sensor every hour or so and store the current baseline (as well as actually read the current air quality)
  2. Check that the stored baseline is not older than 1week, if it is then you must do the 12hour burn-in stage again
A scenario where #2 could happen is when the sunshine has not been so great and so the weather station has been without power for more than 1week. 

What all this means is that I need to check how much time has passes since a baseline has been measured/stored. To achieve this the easiest way would be to use an RTC (PCF2129) to log the time and FRAM (FM24CL64B-G) to record any values I need to store (like old baseline value and the time it was recorded).

RTC (PCF2129 vs DS3231)

After doing a bit of digging it turned out that most people tend to use the DS3231 a tried and true RTC whose behaviour is well understood in all sorts of implementations. Then you also have the PCF2129 which is a newer RTC that offers lower power consumption and is surprisingly cheaper (2.38AUD/1000pcs for PCF2129 vs 6.33AUD/1000pcs for DS3231).
NOTE 1: Dan has a good blog post comparing the two in terms of accuracy. The DS3231 is the winner here as is you can expect it to be fast by ~1sec/year, whereas the PCF2129 is expected to be slow by ~1sec/month. This was not a worry for me as I was expecting to sync up the RTC every once in a while.

On paper (or datasheet) it looked like the PCF2129 is a clear winner for me as it's typical 3.3V draw is 2.5uA (from both Vcc & Vbat), whereas DS3231 is a whopping 70uA from Vcc and 3.0uA from Vbat. But I wanted to see just how true this is so I tested both of them with my trusty 121GW:

What I found really put things in perspective. Here is the power consumption plot where both y-axis are to same scale:
And here is one where y-axis are properly scaled:
As you can see you can expect a power saving of x40 when using the PCF2129 (vs DS3231).
NOTE 2: Here is the Arduino driver I used for the RTC's, and here are the steps I used to test the power consumption (I was logging in ~0.2ms intervals, 121GW limit):
  • 0sec:     Log start (all OFF)
  • 20sec:   Vbat ON
  • 60sec:   Vcc ON
  • 260sec: Vcc OFF
  • 300sec: Vcc ON
  • 340sec: Vcc OFF
  • 380sec: Vbat OFF
  • 400sec: Log end (all OFF)

FRAM (FM24CL64B-G)

The next problem was where to store the baseline & timestamp value. I could have easily written the values in the non-volatile memory of nRF52 but this is limited to 10000 write/erase cycles (or 1.8x10⁹ with wear levelling). Whereas if I use FRAM then I can expect a write/erase cycle count of 1x10¹⁴. 
NOTE 3: This is not accounting for memory retention which is 10years for nRF52 (at 40°C) and 151years for FRAM (at 65°C for FM24CL64B-G).

To put things into perspective if I was to write values 8760times/year (once every hour) then each memory would last:
  • nRF52 (no wear levelling):    ~1year
  • nRF52 (with wear levelling): ~200000years
  • FRAM (FM24CL64B-G):          ~10000000000years

Interestingly enough when I was picking out the FRAM I finally managed to get a counterfeit module. Initailly I ordered the Fujitsu MB85RC64TA & Cypress FM24CL64B-G as both were identical in memory structure (8bits wide & 65311 addresses) and had pretty much the same I²C command format. 

What I quickly found out was that with the MB85RC64TA I could not successfully write/read values even though I was sending the correct address/data structure and received the expected acknowledge bit. I tried the same script with the FM24CL64B-G and it worked without any issues.
NOTE 4: The MB85RC64TA has a high speed mode (3.4MHz) which can mess things up if the master does not support it, but all my tests used the standard 100kHz speed. 

Getting out the logic analyser proved what I was seeing:
Finally having a closer look at the suspected counterfeit IC (MB85RC64TA) did raise a few questions:
  1. Why was the top & bottom surface (of same package) different?
  2. Why was the pin1 indent looking so shallow?
  3. Why does it look like the top surface has been polished and engraved with a laser?
NOTE 5: CTISMT have a couple of really good presentations on how to spot counterfeit components.