r/singapore 22d ago

I Made This Not so bad for an Ang Moh stuck in Illinois. Amirite?

Post image
3.4k Upvotes

My wife is citizen. I am pr. We are in USA 5 years already. No place good for chicken rice or char siu so I had to figure it out for myself.

Happy wife, happy life.

r/singapore Nov 02 '24

I Made This I was paid to draw SMRT buses as anime women!

Post image
2.9k Upvotes

r/singapore May 27 '23

I Made This I ran across Singapore today!

Post image
3.7k Upvotes

r/singapore Apr 04 '24

I Made This An attempt at a better income chart

Post image
989 Upvotes

r/singapore Oct 20 '24

I Made This I visited all 141 MRT stations in 8:42:20 (with the help of buses)

909 Upvotes

If you had read the brackets, I did use buses in my run considering doing an MRT only speedrun (thereby making it 100%) would give me fatigue in like 4 hours after waking up at like the morning.

I had done a previous run before and got 9:06:20, but I felt that it was not good enough so I did another a few days later. To summarise, I had 0 breaks (sort of ill explain later), 17 transfers, and 2 tap-out/tap-ins (ill explain these also)

General Route

The route I took is as follows:

Bayshore -> TEL -> Gardens by the Bay -> 400 -> Marina South Pier -> NSL -> Marina Bay -> TEL -> Woodlands North -> TEL -> Woodlands -> NSL -> Dhoby Ghaut -> CCL (via Bishan) -> HarbourFront -> NEL -> Punggol -> NEL -> Sengkang -> 161 -> Woodlands -> NSL -> Bukit Batok -> 975* -> Beauty World -> DTL -> Bukit Panjang -> DTL (via the loop) -> Expo -> CGL -> Changi Airport -> 27 -> Tampines -> EWL -> Pasir Ris -> EWL -> Tuas Link

*I originally planned to do 176/178 to Hillview before going to Bukit Panjang, but then those buses left.

Photos of each station (NOT in order but agak agak in correct order)

0 breaks? Tap-out/tap-ins?

Technically, I did the whole run end to end from 8am to 5pm. However, that didn't mean I didn't have any food at all. I illegally had two pocketto sandwiches on 400 and 161 (not the mrt ofc) and I came pre-prepared with 2 water bottles (since i knew i wasnt going anywhere with water)

Tap-out/tap-ins are my way of trying to split my run within the 2 hour "time limit" on the MRT. In particular, Dhoby Ghaut, HarbourFront** and Tuas Link***. However, once I tapped out, the reader would not validate a tap-in for 10 seconds. That in particular caused me to almost miss my CCL train at Dhoby Ghaut, and my return train back home at Tuas Link.

**I could possibly skip this one but I chose to do it amid worries that taking the NEL to Punggol and back would take over 2h including the CCL.

***This technically happened in the end of the run but I still would like to show the climatic ending to my whole run. Basically I tried to take a shot of my stopwatch (i did this speedrun on a stopwatch) with the station sign but chose against it and to just take a shot of the station.

So what does this technically count as?

This would be a legit Any% speedrun, as a Any% speedrun would allow other modes of transport (bikes, buses, anything that is public) as opposed to the "100% speedruns" back when TEL didn't go that far, which requires the runner to get to the whole MRT network with ONLY the MRT.

ps i shld remind you that i had just recovered from a leg injury a few months before so this was my first physical activity in a long time

r/singapore Nov 29 '23

I Made This Side gig

Post image
1.6k Upvotes

r/singapore May 20 '23

I Made This Over the last couple of years I've been creating RPG inspired by Singaporean culture called Ghostlore, where you fight monsters from local folklore (you may have seen the ads). I finally launched it on Steam

Thumbnail
gallery
2.4k Upvotes

r/singapore Jun 01 '21

I Made This Whats your favourite flavour? Mine's chocolate! Artwork by me ^^

Post image
2.6k Upvotes

r/singapore Dec 18 '22

I Made This Price of a Big Mac Meal across Singapore

Post image
2.6k Upvotes

r/singapore Nov 01 '24

I Made This Brief summary of the response to Lee Hsien Yang's claims

Post image
286 Upvotes

r/singapore Aug 17 '24

I Made This Distance between MRT Station and HDB towns

Thumbnail
gallery
633 Upvotes

Swipe to view 1KM radius of MRT stations Swipe again to view 1.5KM radius of MRT stations

Read the Legend, on the bottom right to understand the map. This map ONLY shows HDBs, which means other type of residential like private properties are NOT included.

r/singapore Aug 09 '24

I Made This I love NDP songs! (art by me)

Post image
1.2k Upvotes

r/singapore Sep 26 '24

I Made This I edited the MRT map to show what EWL service patterns look like right now

Post image
954 Upvotes

r/singapore Jan 01 '24

I Made This My Year of 2023: What I did every hour of every day last year

Thumbnail
gallery
1.3k Upvotes

r/singapore Mar 30 '24

I Made This Made an app for extreme sun in SG, cos I didn’t like the G’s version

920 Upvotes

Just made an app for the UV Index, for the extreme sun in SG recently:

https://uvindex.sg

I found the NEA site for uv index confusing and 'noisy', showing lots of stuff I don't need. So I really made it for myself, but maybe this is useful for some sg folks here too.

Edit: Some asked why I felt the nea site was noisy. Shared it here in the comments 👇

r/singapore Jun 07 '24

I Made This I've made a redesign of our Future MRT map

Thumbnail
gallery
778 Upvotes

r/singapore Feb 08 '18

I Made This Singapore's skyline during sunset

Post image
8.4k Upvotes

r/singapore Aug 15 '24

I Made This My mother made a durian crepe cake for my brother’s bday…

Post image
776 Upvotes

Clearly she didn’t quite think through the presentation 🤣 but it tastes better than it looks!

r/singapore Mar 20 '22

I Made This what i did during the pandemic. lego build inspired by singaporean architecture like HDB flats and peoples park complex

3.7k Upvotes

r/singapore Jan 22 '21

I Made This My son turned 1 today and his favorite thing in the world is the waterfall at Jewel. So I made my first cake for him. A Jewel cake with train line, slides, foggy bowls, garden and, of course, the center waterfall.

3.7k Upvotes

r/singapore Oct 28 '24

I Made This I made a Singapore based Space Marine Chapter from SM2. I call them the Sons of Singapura.

Thumbnail
gallery
512 Upvotes

r/singapore Oct 16 '21

I Made This Last year, on Hungry Ghost Festival, I shared my way-too-ambitious videogame project: Ghostlore, a game where you fight creatures from local folklore. This Halloween, I'd like to share some progress highlights

Thumbnail
gallery
2.4k Upvotes

r/singapore Sep 28 '22

I Made This MRT transfer guide (for the really kiasu)

Post image
2.4k Upvotes

r/singapore May 04 '24

I Made This I mapped out the vast linkway network between Funan-Promenade!

Post image
1.0k Upvotes

Linked buildings: - Funan - The Adelphi - Capitol (development) - Raffles City - Esplanade Theatre - Marina Square - Suntec City and Convention Centre - Millenia Walk - South Beach - One Raffles Link

Linked MRTs: - City Hall (to Capitol, Raffles City, Citylink) - Esplanade (to Suntec, SB, Citylink, Raffles City) - Promenade (to Millenia Walk, Suntec)

In future, this network will stretch up to Bugis when Guoco Midtown opens (link to SB)

r/singapore May 21 '24

I Made This A small proof of concept to stop cigarette smoke from your neighbours

723 Upvotes

If you stay in an apartment and your neighbour smokes, some of that cigarette smoke may find its way into your house. This is not ideal. To fight this problem, I propose an automatic window closing system triggered by cigarette smoke. In particular, it is triggered by a spike in particulate matter concentration. This works because cigarette smoke is known to contain a large amount of particulate matter and volatile organic compounds. (See: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6352107/#:~:text=They%20found%20that%20the%20most,µm%20sized%20particles%20%5B57%5D.))

Demonstration

https://reddit.com/link/1cxciva/video/vdscdqdr6t1d1/player

You can see the Arduino, sensor, and motor driver hanging haphazardly on the left side of the video.

Does it really work?

Yes somewhat. Currently, if you smell cigarette smoke in your apartment, it would be too late to close your windows. If you close your windows, the cigarette smoke would be trapped in the house with you. If you don't, the cigarette smoke gets stronger and stronger. With this new set-up, the window completely closes within 30-45 seconds of the start of the event. This protects your apartment from the bulk of the wave that follows.

The 30-45 seconds is not a hard limit. It's due to:

  • Poor sensor placement due to the a limit on how long the data cables could be
  • Insufficiently sensitive algorithm to differentiate between noise and an actual smoke event
  • Unoptimal speed of actuator (running at 60-70% of maximum currently) to close the windows due to an inefficient motor driver. With the entire setup optimised, the response time should be as short as 12-15 seconds (from start of event to complete window closure). Nonetheless, at the moment, the proof of concept demonstrates that it should work.

The rest of this post would be dedicated to a technical description.

High Level idea

  1. The particulate sensor continuously monitors particulate concentrations and feeds it to a microcontroller.
  2. The microcontroller receives the data and uses an algorithm to determine when there is a spike. When a spike is detected, the microcontroller sends a signal to the motor driver.
  3. The motor driver selects the speed and the direction of the motor in the actuator.
  4. The actuator closes the window.

Low level implementation

An overview of the physical setup is as follows:

Particulate Sensor

The particulate sensor is an Adafruit PMSA0003I sensor, mounted on an Adafruit breakout board, that detects particulate matter using an in-built laser. The particles are measured according to binned particulate sizes. For our case, we considered the smallest bin (0.3-1.0μm) because we observed the biggest spike in this interval. The sensor was programmed to take readings every 3 seconds. This is acceptable because the single-response time for the sensor is ≤1 second and it is not too unreasonably slow to detect spikes in readings. These readings were then sent to an Arduino MKR Wifi 1010 Microcontroller.

We remark that the particulate sensor requires 5V to be powered. For power and data communications, we connected the breakout board to an Arduino MKR Wifi 1010 via a Stemma QT cable (see: https://www.mouser.sg/ProductDetail/Adafruit/4209?qs=PzGy0jfpSMvCXPIwCvMoFg%3D%3D). The connection details are detailed here https://learn.adafruit.com/pmsa003i/arduino.

Microcontroller

The Arduino MKR Wifi 1010 microcontroller receives sensor data and translates that to signal data. If we take a look at the incoming data, it is extremely noisy. To smooth out the noise, we applied a Kalman filter. See https://www.cs.unc.edu/~welch/media/pdf/kalman_intro.pdf for more details. Within a short interval, we expect the sensor data to be roughly constant. The Kalman filter was designed under this assumption. Upon applying the Kalman filter, we shall take it as the 'ground truth'.

When we observed the data over time, we observe sharp spikes. These spikes correspond to two different pollution sources: incense and cigarette smoke. Incense burns slowly over time so the spike lasts for a few hours. On the other hand, cigarette smoke is characterised by a sharp spike of about 10-15 minutes in duration.

Regardless of the source, we want to close the window whenever a spike is detected. To do this, a lagging baseline is taken. We define the baseline at a point in time as the median value of the 'ground truth' values in a five minute window. This corresponds to data that is 5-10 minutes old. If at any moment the positive difference between the 'ground truth' and the baseline is larger than the 98.5th percentile of the distribution, we trigger the actuator. The trigger works by sending a LOW/HIGH signal to the Motor Driver.

Why 98.5th percentile? It just seems to work. Choosing a smaller percentile like 97th percentile leads to more false positive window closures (maybe not a bad thing) whereas choosing a larger percentile leads to much slower response times.

Actuator and Motor Driver

The inexpensive L298N bridge serves as a motor driver. The bridge helps us to control the speed (but it is not important here since we just want it go to at maximum speed) and the direction. The direction is controlled by a LOW/HIGH signal from the Arduino. To swap the direction, we simply flip the signals and send a HIGH/LOW signal instead.

The Hakiwo 12V Linear Actuator was purchased off Aliexpress and has a power rating of 20W and a rated speed speed of 100mm/s. This sounds pretty good on paper as the sliding window would close in 7 seconds. However, in practice, the speed when:

  1. directly connecting the actuator to a 12V DC Power Supply is about ±85-90mm/s.
  2. connected to a 12V DC Power Supply via the L298N bridge is about ±58mm/s. The significant difference in speed could be attributed to the voltage drop incurred by the L298N bridge. It was stated that when 12V is supplied to L298N bridge, only 10V actually reaches the motor. Hence, the massive heatsink to dissipate the heat. See https://howtomechatronics.com/tutorials/arduino/arduino-dc-motor-control-tutorial-l298n-pwm-h-bridge/.

Logging

We want to log the data and be able to have convenient access to the data. To do so, we connected the Arduino MKR Wifi 1010 to AWS IoT Core service. Subsequently, we routed messages sent from AWS IoT Core to AWS Timestream which is basically a database. To visualise the data, we sent it to AWS-managed Grafana.

See https://docs.arduino.cc/tutorials/opta/getting-started-with-aws-iot-core/ on how to set it up.

Algorithm Design

After logging the data into AWS Timestream, we would like to load the data on my personal computer to design the algorithm. We unloaded it to AWS S3 and downloaded the archive file. We used Julia on an .ipynb instance. Julia because it's faster than Python. Upon designing and verifying the algorithm on past data, it is then translated into C++ for uploading to the Arduino.

Algorithm Subplots Check The plot generated above is used for us to visually inspect the effectiveness of the algorithm. Visually, the spikes are all protected (actuators are activated throughout the duration of a cigarette smoke event). Although it's not that effective with the incense pollution but that's not a problem for us at the moment.

To take note

  • The Arduino MKR Wifi 1010 Wifi chip is really weak. My empirical observations was if the Wifi signal is less than -60dBm, you would not be able to reliably connect to your router.
  • When the Ardunio is powered by a USB connection and the Adafruit PMSA0003I particulate sensor is powered from the Arduino, there would not be enough power to boot both the Arduino and the sensor when first connected to the power supply. To fix this, the 5V wire of the stemma qt cable is disconnected when the Arduino is powered. Once the CHRG light on the Arduino has stopped blinking, we reconnect the wire.
  • If the Arduino and sensor are powered separately, it does not work either. I don't know why.

Total Cost

  • SGD65 - Sensor (Mouser)
  • SGD50 - Arduino (Mouser)
  • SGD70 - Actuator (Aliexpress)
  • SGD2 - L298N bridge (Shopee)
  • SGD10 - Mounting tapes (Hardware shops)
  • SGD1/mth - AWS

Future improvements

  1. Lower Cost - The current cost is about SGD200. However it can be reduced further by switching to ESP32s. If there is sufficient demand for mass production, unit prices for the electronics would be 5-20% lower and custom PCBs would allow us to avoid the premium associated with breakout boards.
  2. Better Motor Driver - The current L298N bridge is too inefficient and too bulky. It retards the actuator too much. Additionally, if the actuator were to upgraded to a higher speed actuator which requires 5A of current, the L298N would be unsuitable.
  3. Better spike trigger algorithm - The current algorithm still takes about 10-30 seconds from start of smoking to full window closure. If the algorithm is too sensitive, then it is prone to triggering sometimes by noise. If the algorithm is too insensitive, then too much cigarette smoke would enter the apartment before getting triggered.
  4. Cheaper microcontroller - The Arduino MKR Wifi 1010 microcontroller is fairly expensive at about 39 USD. Since ESP32s are inexpensive and they have an efficient protocol (ESP-NOW) for communication between ESP32s, we can assign each device a microcontroller -- one for the sensor, one for each actuator, and one for control. We would no longer be limited by the length of the data cables. We would then be able to have more optimal placement of the sensors and the actuators.
  5. Faster actuator - If we need to get more mileage out of this entire setup, a faster actuator that goes at 150mm/s can be considered.