Fixing the Mazda 2 AUX jack

So my 2010 Mazda 2 started to act up on me a few months ago – At first I had to jiggle the Aux cable a few times to be able to switch to Aux  input, but after a whiIe I had to use one hand to hold the plug in at just the right angle and another hand to press the Aux button on the control. A bit difficult to do while driving…

As it turns out, this is actually a common problem in Mazda vehicles, caused by their use of two pins to detect the insertion of the jack. The pins are supposed to be shorted out when the jack is inserted but after a while the pins wear down or get loose and the stereo is not able to sense that an AUX cable has been inserted. According to this YouTube video, the solution is to short out the two pins permanently, so here goes…

First, we have to open up the console. Press in and pull up the front of the console:

This will reveal the cables connecting to the lighter and the auxiliary (AUX) port. Carefully pull out the connector for the Aux port and note the wires connecting to the Aux connector. On my car, there were five wires: pink, black, white, red and green. The middle black, white and red wires presumably carry the audio signal while the pink and green wires are used to detect the insertion of the plug.

According to the video mentioned above, pins 2 and 6 have to be shorted, but note that that video refers to a US (?) Mazda 3 and other forum posts mention different pin numbers for other Mazda models. So, first thing to do is to check which pins to short. I just used a short length of wire to short out the pink and green wires and confirm that I could now select AUX using the control button.

VERY IMPORTANT ! The method I used is a destructive method so be very, very sure that you have the correct wires before cutting them.

I cut the pink (#2) and green (#6) wires and shorted them together. In retrospect, I think the green (#6) wire was actually ground and shorting wire #2 (pink) to ground is probably the signal to indicate insertion of the Aux plug. It would have been smarter to cut the wires 1 cm away from the connector and use a crimp connector to short the pink and green wires together so that it would have been easier to reverse the process, but that’s 20/20 hindsight. This is what I actually did: I just cut the pink and green wires, stripped a little bit of the ends and wrapped them together.

After putting everything back together again, I am now able to switch between radio and AUX using the button and even though I cut the green (ground ?) wire there doesn’t seem to any static or other interference so far.

Advertisements

Watching the watchers


Originally published under the title “An eye for an eye” in the Computer Times supplement of The Straits Times on Aug 13, 2003

In 1991, the Law Reform Committee of the Singapore Academy of Law proposed that Singapore adopt a Data Protection law to complement the Computer Misuse Act.

Over the next decade, many countries such as Canada, Australia and Hong Kong introduced new laws or strengthened existing laws on Privacy and Data Protection.

Singapore, in contrast, chose not to adopt any omnibus Privacy or Data Protection laws even though it enacted a far-reaching Computer Misuse Act.

This reflects the fact that, in Singapore, the balance between individual and group is tilted firmly in favour of the group. This was clearly seen in the Government’s response to the severe acute respiratory syndrome (Sars) outbreak.

Surveillance cameras were installed in the homes of persons under quarantine. Confirmed and suspected Sars patients were compelled to reveal details of their movements and contacts under amendments to the Infectious Diseases Act.

During parliamentary debate on the amendments, only one MP, Mr Chiam See Tong, voiced concerns: The possibility that information collected by Health Ministry contact tracers could be misused.

He supported the Bill, on balance, and in view of the urgency of the situation. But Mr Chiam’s concern over possible abuse of personal information is certainly justified.

Several police officers have been convicted for using the Ministry of Home Affairs database to illegally obtain personal information about other people.

Sars contact tracers are covered under the Official Secrets Act (OSA) but the OSA has primarily been used to guard the Government’s secrets not individuals’.

Other laws such as the Income Tax Act and Statistics Act specifically prohibit the disclosure of information obtained under the respective Acts.

The Census Act also provides that information collected during a census cannot be used as evidence for prosecution of offences under other Acts. It is unfortunate that no similar safeguards were built into the Infectious Diseases Act.

One positive development in Privacy protection in Singapore has been the incorporation into law of ‘fair information principles’ as they apply to the Consumer Credit Bureau.

The bureau is required to ensure that all the data it collects is used only under specified purposes. They are: accurate and up-to-date; accessible to the subject; kept secure; and destroyed after a specified time

The right of access to our own credit reports is a landmark in Singapore privacy law. Up until now, individuals have not had a right of access to personal information held on them by government departments or businesses.

Ironically, while we have no right to view our own medical records, health care providers are not legally obliged to protect the confidentiality of our medical records.

In the Simon Shorvon scandal, pharmacies at two hospitals released the names of patients taking a certain drug to Dr Shorvon even though he had no legitimate use for that information. Had the pharmacies put more robust patient confidentiality rules in place, the scandal might well not have taken place.

The National Trust Council has finalised its Data Protection Code but because it is voluntary and intended primarily to promote e-commerce rather than to protect individuals, it is of very limited value to people seeking to protect their privacy.

Some recent events illustrate the difference in the Government’s response to surveillance technology when it is used by individuals rather than by the Government itself.

In the first incident, a Raffles Junior College (RJC) student used a personal digital assistant to videotape his teacher berating another student and tearing up the student’s notes. This video eventually made its way onto the Internet and resulted in a reprimand for the camera-wielding pupil.

The college’s principal spoke of ‘betrayal’. Indeed, government ministers lost no time in admonishing the student for the irresponsible use of technology.

Barely two months prior to the incident, the Government had been busy installing video cameras in the homes of people placed under Sars Quarantine Orders.

The Police have also announced that they will be setting up a network of 30 video cameras in Little India, Boat Quay and Newton Hawker Center to deter trouble-makers.

It seems odd for the principal of RJC to assert a right to privacy in the classroom when, by design, a classroom is filled with students who are supposed to be taking notes. The ‘privacy’ that the principal is talking about is really the freedom from accountability.

In the words of author David Brin: ‘Whenever a conflict appears between privacy and accountability, people demand the former for themselves and the latter for everybody else.’

In his book, The Transparent Society, Brin recognises that advances in technology are inevitable and that they result in ubiquitious surveillance.

In a controversial leap, he then argues that this may be a good thing and that we should welcome it but only if the surveillance is two-way.

If governments and corporations have the power to shine a torchlight onto the lives of individuals, citizens – all individuals -must also have the power to shine the torchlight back at the mighty and the strong.

The question facing society, then, is not whether it should ban cameras (a moot point as it’s not negotiable), but rather who should control the cameras.

Disconcerting as his arguments may be to privacy fundamentalists, Brin poses a key question: is the loss of privacy that technology brings acceptable – even desirable – if that same technology leads to greater accountability for those in power

In Singapore, what would happen if the Land Transport Authority (LTA) takes a different approach to privacy in Electronic Road Pricing and asks its CEO and board of directors to install satellite-based in-vehicle units (IU) in their cars, and to publish their real-time locations on a publicly-accessible website – just as the authority can monitor the movements of other motorists.

Changes in technology may be inevitable. But it is people who write the rules that govern how they use technology and where to delineate the boundaries of privacy.

To paraphrase Acting Minister for Manpower Dr Ng Eng Hen, individuals must be responsible in their use of technology – and the government even more so.

Ngiam Shih Tung is an engineer in a multi-national aviation company.

Sampling checks in GE 2015

The Elections Department released early indications of polling results for the first time during the 2015 General Elections by publicly announcing the result of sampling checks within 2 hours of the close of polls. Sampling checks have been carried out since 2001 or earlier, but the results were not made known to all candidates or the public until this year. The sampling check is carried out by Counting Assistants drawing a sample of 100 ballots from each counting table after opening the ballot boxes and mixing the ballot papers together. As each counting table corresponds to one polling district and there are about 2,000-3,000 voters per polling station, the 100-ballot sample per polling district corresponds to 3-4% of votes cast and is a large enough sample to make a good estimate of the final polling result

As shown in Table 1, the margin of error varies from ±1.2% points for a large GRC, Pasir Ris-Punggol with 66 polling districts, to ±4.4 % points for Potong Pasir, the smallest Single Member Constituency (SMC) with only 5 polling districts.  For simplicity, no adjustments are made to account for the variation in number of voters in each polling district, and the error margin is calculated for a 50:50 vote split.  The Straits Times has reported that the error margin for sampling counts is ±4% but this is a worst case and only applies to Potong Pasir which is the smallest SMC by far. On average, the uncertainty in the sampling check is within 1.3% points for GRCs and 3.3%  points for SMCs.

Table 1 – Error margins for selected constituencies and SMC and GRC averages
Number of polling districts Sample size Margin of error at 50% vote share
Pasir Ris-Punggol GRC 66 6,600 1.2%
Aljunied GRC 50 5,000 1.4%
East Coast GRC 32 3,200 1.7%
Bukit Panjang SMC 11 1,100 3.0%
Potong Pasir SMC 5 500 4.4%
GRC Average 45 4,500 1.5%
SMC Average 9 900 3.3%
Error margin is calculated as half the width of the two-sided 95% confidence interval (Normal approximation) at 50% vote share. All polling districts within a constituency are assumed to have an equal number of voters.

In a first-past-the-post election, however, what counts is not the actual vote share but crossing the 50% threshold. If we ignore three-cornered fights and make use of the normal approximation again, we can calculate a “victory threshold” or minimum sampling check result for which a candidate can be 95% certain of victory.  This is shown in Table 2 for selected constituencies.  Note that the victory threshold is slightly lower than would be obtained if we simply added the error margin from Table 1 to 50% because the victory threshold is a one-sided rather than a two-sided test. If you’re not statistically-inclined, don’t worry about it – that effect is small in this case. In Aljunied, despite the appearance of a nail-biting finish, the 52:48 sampling check result was above the victory threshold for the Workers’ Party and the PAP in fact had only a 0.2% chance of winning in that constituency once the sampling check result was known [See note 1].  In Punggol East, however, the sampling check result of 51% for PAP was lower than the victory threshold of 52.4% and the PAP could only be 75% certain that they would win there. Put another way, Lee Li Lian still had a 25% chance of winning even after seeing the sampling check results. In all the other constituencies, the winning party’s sampling check result significantly exceeded the victory threshold so the final result was not in doubt once the sampling checks were completed.

Table 2 – Victory threshold for selected constituencies.
No. of polling districts Victory threshold Actual PAP share in sampling check Probability of PAP win given sampling check result
Pasir Ris-Punggol (6-member GRC) 66 51.0% 73% 100%
Aljunied (5-member GRC) 50 51.2% 48% 0.2%
East Coast (4-member GRC) 32 51.5% 61% 100%
Sengkang West (SMC) 13 52.3% 63% 100%
Punggol East (SMC) 12 52.4% 51% 75%
Hougang (SMC) 9 52.7% 42% 0.0%
Potong Pasir (SMC) 5 53.7% 68% 100%
1. Victory threshold is defined as the minimum sample count result for which a candidate can be 95% certain of receiving over 50% of the actual vote (one-sided test).
2. Probability of PAP win is the probability that the actual PAP vote share is > 50%, given the observed sampling check result.

The error between the sampling check and the actual result gets smaller as the sample size increases. Hence GRCs will have smaller error margins than SMCs and 6-member GRCs will have smaller error margins than 3-member GRCs. This is seen in Figure 1 where the difference between the sampling check and the actual result was only 0.1% points in the 6-member Pasir Ris-Punggol GRC while the largest difference of 2.6% points was observed in MacPherson SMC.  The observed differences between sampling check and actual vote counts were all within the expected 95% error margins except for one constituency, but one out of 29 is about right, statistically. We also did not take rounding errors into account, which slightly widen the margin of error.

image001

The sample check is a form of a quick count, which is used in developing democracies where there are concerns with regards to the compilation of electoral results by the central government. In Singapore’s case, there is no obvious need for a quick count as the entire counting process can be observed by candidates’ counting agents and elections results have always been announced within a few hours. Nonetheless, given that the Elections Department has chosen to conduct sampling checks, the decision to publicly reveal sampling check results is a welcome one.

Notes

[1] Some additional uncertainty is caused by the sampling check results only being reported as whole number percentages. The true PAP sampling check result from 5,000 samples could have been as high as 48.5% rather than the reported 48%.  However, this would still have given the PAP only a 1.8% chance of victory once the sampling check results were known.

Data

Sampling check results  and actual vote counts are tabulated in Sample check vs actual v3 (Excel format).

A version of this note was previously published on The Online Citizen, http://www.theonlinecitizen.com/2015/09/how-accurate-is-the-ge-sample-vote-count/.

What proportion of Singapore citizens are on the electoral rolls ?

DOS does not publish breakdowns of citizen population by age group. The published population pyramids are for “residents” which includes permanent residents. However, the government did publish the actual number of Singapore citizens aged 20-64 in 2011 in the population white paper together with forecasts up to 2060. Chart 6 shows their forecast for the number of citizens aged 20-64 in 2015 as around 2.2 million (I use their scenario with maximum intake of new citizens). The ratio of working-age to elderly citizens is around 5 in Chart 8. This allows us to estimate the total number of Singapore citizens 20 and above in 2015 as 2.64 million.  An ELD press release on 27 July 2015 states that there are 2,460,977 electors on the electoral register. Thus, approximately 2.46/2.64 = 93% of Singaporeans of voting age are on the electoral register. For simplicity, I’m not adjusting the denominator for those above 20 but below 21.

Apart from those who were dropped from the the electoral register for failing to vote in previous elections, various other categories of people are not eligible to vote (Section 6 of the Parliamentary Election Act), but the biggest category are probably prisoners. The total number of prisoners (including drug detainees) in Singapore is around 10,000 so that should not affect the figure that much. I presume that the NPTD population figures do not include overseas Singaporeans, so that would not contribute to the missing 7% either. The predominant explanation for voting-age Singaporeans not included in the electoral register is probably be that they failed to vote in previous elections but did not apply to restore their names to the electoral register by choice, ignorance or inability to pay the $50 fee required. 93% registration is high by international standards, but does seem a bit low considering that Singaporeans are automatically enrolled when they turn 21 and only drop off (mostly) if they fail to vote without reasonable excuse.

The International Institute for Democracy and Electoral Assistance (International IDEA) has published a table showing that only about half of Singapore’s voting-age population actually voted. While the first three columns are consistent with ELD figures, the fifth column, Voting Age Population, appears to have been derived by subtracting the number of residents below 21 from the total population including non-citizens. The high proportion of non-citizens (including PRs) living in Singapore, especially in the working age population, therefore inflates the denominator and the low Voting-Age-Population turnout calculated by IDEA may be literally true but not meaningful because a large proportion of the denominator are non-citizens. The numerator is also only for voters in contested constituencies. The voter participation rate is thus further reduced by the prevalence of walkovers in past elections.

Screen Shot 2015-08-25 at 6.03.30 am

(Documenting here for reference as the question came up in discussion recently)

Kremlinology Singapore-style: Reading the electoral district tea leaves

UPDATE: The EBRC report has been released. See comments at bottom of post.

The Elections Department (ELD) recently published revisions to polling districts. This revision comes six months after the last revision in February, which is an unusually short interval as previous revisions were spaced a year or more apart. Polling districts (PDs), also known as precints, are sub-divisions within constituencies and their main significance is that all voters in a polling district will vote at the same polling place within a polling station. Changes to constituency boundaries are normally made by rearranging polling districts into different constituencies so that ELD will not have to compile new electoral registers before the next election. However, changes to precint boundaries do not necessarily mean that those precints will be moved to a different constituency. As usual, ELD did not highlight the changes that were made, but a quick comparison of the July notificaton with the previous February one shows changes in the following polling districts.

Choa Chu Kang GRC CK10,CK11
East Coast GRC EC01, EC41
Jurong GRC JR10, JR11
Moulmein-Kallang GRC MK03, MK05
Nee Soon GRC NS53
Pasir Ris-Punggol PN69, PN70
Sembawang SB02, SB03, SB18, SB21, SB22
Tanjong Pagar TP12, TP13

(If readers spot any other changes which I missed, please drop me a note at shihtung@ngiam.net) Many of the changes do seem to be errata in the sense of just being minor clarifications or streamlining of precint boundaries. However, there are some which could foreshadow changes in constituency boundaries.

The scenic polling district with nobody living in it

ConeyIsland Pulau Serangoon (Coney Island) has been cut out of polling district EC01 and placed into its own precint, EC41. This is quite strange because I’m quite sure no one actually lives there right now. While part of it is zoned for residential use, it will probably remain a “rustic park” for several more years. Why carve it out into its own precint now ? My guess is that the intention is to move it from East Coast GRC into a new Punggol GRC so that it can be managed together with the rest of Punggol New Town. The electoral register is not publicly accessible so I do not know the actual number of electors living in Punggol estate but there are only 24 polling districts, which may be just enough for a 3-member GRC.

Hougang, Sengkang, Pasir Ris, Where Am I ?

Talking of Pasir Ris-Punggol GRC, that GRC includes one-third of Sengkang new town and stretches all the way to Hougang Ave 8. Two of the PD’s at the border of Sengkang and Hougang estates were also rationalised in the recent revision. PN69 previously included a condominium and nursing home north of Buangkok Drive as well as 9 HDB blocks along Hougang Ave 8. In the latest revision, that PD was redrawn to include only the condo and nursing home between Compassvale Bow and Buangkok Drive. The HDB blocks in Hougang Ave 8/10 were consolidated into one precint, PN70.  This seems unusual to me because the new PN69 polling district comprises one condo with 625 units, and a relatively small (72-bed) nursing home while PN70 consists of 24 HDB blocks. If the intent of tweaking polling districts is to balance out the distribution of voters, this change would seem to go against that. Interestingly enough, however, Buangkok Drive is the boundary between Sengkang and Hougang estates. Whereas before, half of PN69 was in Sengkang and the other half was in Hougang estate, PN69 is now entirely in Sengkang. MARUAH has previously called for electoral boundaries to be aligned with URA planning areas. If the boundaries are to be redrawn, a logical spliit would be to assign PN69 to a new Sengkang GRC while PN70 is merged into a Hougang GRC.

Sengkang-Hougang

Sengkang estate is currently split between three constituencies: Sengkang West SMC, Pasir Ris-Punggol GRC and Punggol East SMC. While the government has traditionally not made major changes to opposition-held constituencies such as Punggol East, and many other HDB estates are also split between different Town Councils, it would make far more sense to simply consolidate Sengkang into a single GRC and to hive off the Hougang portion of Pasir Ris-Punggol into an enlarged Hougang or Aljunied-Hougang GRC.  Combining Sengkang West, Sengkang Central (now in Pasir Ris-Punggol) and Punggol East would give a GRC with 43 polling districts – about right for a 5-member GRC. Of course, boundary delineation is not based solely on objective estate management grounds. Government may instead leave Punggol East alone and combine Punggol and Sengkang West and Central into a Punggol-Sengkang GRC instead. If they do create a Sengkang GRC, however, that would leave 6 Pasir Ris-Punggol precincts (PN64-PN68 and PN70) which are actually in Hougang estate, orphaned. Perhaps these should be merged into Aljunied-Hougang together with another 5 precincts presently in Ang Mo Kio GRC (AM16-AM20) but which are part of Hougang estate, in exchange for Punggol East ?

Constituency boundaries are not aligned with estate boundaries
Constituency boundaries are not aligned with estate boundaries

UPDATE 8:00 PM Haha. This post was posted in the wee hours of the morning of 24 July and the Electoral Boundaries Review Committee (EBRC) report was released at 3:00 pm. Looks like my predictive ability can be described as half-full or half-empty.

Coney Island – Coney Island was indeed transferred out of East Coast GRC but not into a new GRC. Instead it was added to the existing Pasir Ris-Punggol GRC

Sengkang – A new boundary was indeed created along Buangkok Drive by hiving off the Hougang portions of Pasir Ris-Punggol. PN69 was retained within Pasir Ris-Punggol while PN70 went to Ang Mo Kio.

Hougang – As predicted, PN70 was transferred out of Pasir Ris-Punggol but not into Hougang-Aljunied. Instead, it was absorbed into Ang Mo Kio GRC together with the portion of Pasir Ris-Punggol south of Buangkok Drive.

Whitley Road – I didn’t get round to writing this up last night, but I did notice that MK03 and MK05 in Moulmein-Kallang GRC were realigned so that the boundary would be along Whitley Road rather than in the middle of the landed housing estate at Chancery Lane. My inference was that this was in preparation for Whitley Road to become a boundary between two constituencies, and this was borne out when Moulmein-Kallang was dissolved and MK03 went to Holland-Bukit Timah while MK04 was added to Tanjong Pagar GRC.

So overall, my predictions were accurate at micro-level but I did not do so well at higher level. My two correct predictions, Coney Island and Whitley Road, are not very consequential. Where I failed was being too idealistic in the North-East region. The PAP presumably recognised that they would face a tough fight in the Punggol/Sengkang/Hougang North area so instead of creating a new GRC for the HDB’s latest showcase estates in the North-East, they bled off the voters into AMK and Pasir Ris-Punggol, both six-member GRCs, to dilute the voting strength of the younger voters in those estates. I completely did not foresee that Sengkang would be split further, into four constituencies, with part of Sengkang going into AMK GRC. At this rate, Ang Mo Kio is becoming the new Marine Parade. Specifically, the area around Hougang Street 51 and 61 was transferred from Pasir Ris-Punggol GRC to Ang Mo Kio GRC. The HDB Blocks near Street 61 have thus moved from Aljunied to Pasir Ris-Punggol to Ang Mo Kio GRC in the last three elections. In addition, one-third of the voters in Sengkang West SMC have been moved from the constituency into Ang Mo Kio GRC.

MARUAH Electoral Boundary Delimitation Position Paper

In brief,

  • The delimitation process in Singapore is opaque and not subject to public scrutiny. Some boundaries appear to be arbitrary or designed to favour one party. This results in weaker community ties and cynicism towards the political process.
  • Maruah urges the government to raise the level of impartiality, equality, representativeness, non-discrimination and transparency of the boundary delimitation process in Singapore

Slides from the press conference are here:

4GRCs-in-5-elections

MARUAH Electoral Boundary Delimitation Powerpoint Presentation

and the position paper itself is at Maruah’s website. Maps of changes in electoral boundaries from 1991-2011 are in Annex 2 (with thanks to the people at http://www.singapore-elections.com).

The Israeli attacks on Gaza in perspective compared to Singapore

image

Map of reported Israeli airstrikes and ground engagements in Gaza, overlaid on map of Singapore. Gaza is even smaller than Singapore, roughly 40km long x 6-12 km wide, in comparison to mainland Singapore’s, 40 km x 20 km. Israel has declared 44% of Gaza off-limits in the present offensive, so 1.8 million Gazans are squeezed into an area of 200 sq km, less than one-third of Singapore. In that light, the 1,000-plus Palestinian casualties, most incurred over the last few days, are hardly surprising. Though I suppose Israel’s defenders would argue that the casualty rate would be even higher if Israel did not follow such strict rules of engagement.

Red areas in the Singapore map represent what the URA calls “special uses” in its Master Plan. What that usually means is military facility. Note the presence of SAF bases immediately next door to Jurong West, Woodlands, Yishun and several other HDB estates.

Sources:
http://www.mapmash.in/gaza.html
http://www.bbc.com/news/world-middle-east-28458377
URA Master Plan