Cyclopi – Object Classification with Raspberry Pi and IoT Edge

Motivation and values

Project Description

  • CycloPi is an IoT device that do image classification from a streaming video with cloud-based central monitoring and reporting
  • CycloPi can act as an additional scanner at a self-service check out. For example, at Tesco whenever I buy banana or some certain type of grocery, I have to find them in the database. With CycloPi, it can immediately tell what I get and register it into the online inventory.  

Why IoT Edge?

Edge computing means to process data close to where the things happen 

  • Quick response time and having access to the system even when the internet is down
  • Use less network bandwidth
  • Protect privacy
  • Processing everything in the cloud can sometimes be too expensive

=> processes images from camera locally using machine learning and computer vision, then sends the processed data to the cloud to monitor, so the  cameras act as a sensor providing the content of the images. 

Results:

Firefly PCB Board

The objective of this project is to make PCB from scratch. The Firefly boards are synchronized LED using IR sensors.

Before starting the design, my partner and I set up proper dimensional units, minimum trace, drill and pad diameters. We are very conscious about avoiding sharp turn. We tried our best to reduce the amount of vias and traces. For milling process, by following the tutorial, we milled our bottom layer without any problem. We made sure the drill bits are in the right position before milling.

Fig1: Ultiboard design of the PCB
Fig: Solderpaste Job
Fig: Potentiometer Response

Vout pin looks like a square wave with high duty cycle, and the frequency of the waveform change as we rotate the potentiometer, which is the expected behavior. 

Fig: IR sensor respnnse

We checked Trig pin output using external IR LED circuit.

At first, we get 0V for trig pin signal, but the LED still change its blinking frequency as we approach IR LED to IR transistor.

The actual result for Vout is as expected that we get a square wave with very high duty cycle, and the frequency of the square wave change as we change the potentiometer input and the IR sensor input. 

The actual result for trigger pin is at 0V at first, but after debugging, it become as expected – a saw tooth wave represent how the capacitor charge up and discharge. The trigger voltage also change as potentiometer input change and when we approach the IR LED to the 3 transistors.

An Essay About Global Justice

Justice is a fundamental concept in political theory and philosophy. Traditionally, theories on justice are exclusively within the state, in consideration of state sovereignty. However, we are experiencing a transformative change in 21st century. The fall of the Berlin Wall marked the beginning of an unbounded world and intensifying globalization, where everything is connected. As things happens to a small part of the world can have butterfly effect to others, we need to expand our theories in global context. Moreover, contemporary events such as terrorism, genocide, increase of immigration to
developed countries raise awareness toward matters across border. Recently, the concept of “the wall” is brought up again by Donald Trump in US presidential election, and UK’s exit from the European Union, which raises the conflict between nationalism and globalism. Through discussion about the nature of justice and different position regarding global justice, it is clear that we should aim to ensure fair and just outcomes for everyone, but not as a single society.


First and foremost, a study in the concept of justice is necessary. Plato (1968) defines justice as a harmonious relationship where each member of society fulfills the role that naturally fitted to him/her. Through dialogs, he implies that justice is objective and is good by itself. There is a difference between justice and ethics, as ethics is internal virtue of individuals while justice is more external and institutional (Tan 2004, 21). However, ethics is the underlying principle for justice, because a just society needs to follow moral laws. John Locke (2002)’s political theory based on the idea of
justice as nature law according to God’s will, in support of morality as an universal rule. Moral universalism is also promoted in Eastern Philosophy. In Confucianism, “Yi” (righteousness) is an innate ethical nature (Yao 2000,34). For John Stuart Mill (1860), justice is the practice of utilitarian ethics,which maximizes happiness and prevents harm on the total or average welfare across all relevant individuals. On the other hand, Nietzsche believes that moral is not an universal fact, but rather something developed by people in power (Lee 2003,5). Thomas Hobbes (1651), similarly, emphasizes on power as the main driving force of men. He stated that by nature, man will always be at war with each other. The solution is the State, which has the ultimate power to produce, maintain and take away rights, as social contract helps us avoid the chaotic “state of nature”. Social contract is only possible if everyone has the same idea about fundamental good. Therefore, in term of either morality or common good, every person has the same basic concept of
human rights, which makes justice normative. An example of this universalism is the association of justice and fairness, which is proved to be inherent regardless of history, tradition and culture (Daston 2008, 1).

In history, there are evidences that the transcendental goal of global justice exists in every culture. Dante (1995) praises universal monarchy that maintains peace for the whole world. Confucianism’s ideal world is called “tian xia” – a harmonious political order that unify the whole world by moral power, without coercive force (Bell 2006, 24). With no doubt, global justice is the goal most cultures aim at.


Globalization calls more attention to global justice. The technology revolution in the last few decades transforms the world in term of economy, finance, communication in term of space and time. Travel between countries becomes easier. The Internet makes communication at distance fast and efficient. As a result, the market economy expands to global scope through free trade, capital flow, and labor. This is the beginning for increasing interdependence at intercontinental distance. The global financial crisis in 2007
and the EU debt crisis in 2009 are examples of how decisions and actions in one corner of the world can have fast and profound effect on the rest of the world. However, neoliberalism, which celebrates free market without regulation, rather than increase opportunities like it promised, increases inequality (Navarro 1998, 607). As the world is becoming more fluid, unbounded, and non-linear, global security is alerted with the form of terrorism which began
in 2001. Nayef Al-Rodhan (2009) mentioned that since human is driven by emotional self-interest, protecting humans emotional needs is fundamental to human well-being and human dignity. When people believe they are treated unjustly, they can turn to violence as a way to demand justice. Because information is easily accessible by everyone, state no longer holds sovereign power to constrain radical group from conducting violence to anywhere in the world (Naim 2013, 1). Bringing back the boundaries is not a good solution,
because land is no longer the only resource and distance cannot separate the network society which everyone is connected through communication technology. Most objections toward global justice center around the idea that practice of distributive justice should only circumscribe within state. However, justice at a national level only achieved when justice at global level is met (Banai & Ronzoni 2011, 3). For example, international tax competition
increases inequality in income and shifts jobs to countries with lower tax, which demonstrates the dependence between domestic policy and global policy. Also, a global basic structure is necessary for state to realize its domestic justice problems. Therefore, our best course of action is to unite to ensure fair and just for everyone, for our shared morality, for global security, and for our domestic social justice.


The remaining question is whether we should aim for justice as a “single society”. Cosmopolitanism holds that every human belongs to a single society with shared morality, regardless of culture, nationality, state, whose primary unit is an individual rather than nation state(Tan 2004). Therefore, we have responsibilities to people other than whom we share citizenship with. Most approaches suggested from extreme cosmopolitanism are problematic in one way or another. In concern of world poverty, Peter Singer (1972) uses the utilitarianism approach that focuses on providing basic needs to everyone. This position is criticized by a few main points. First, Singer assumes that meaningful transfer of wealth is possible, while in reality, it depends on many factors and requires much work in consideration of distance and political issues. Second, the materialistic view that poverty is the main cause of suffering and death overlooks many other important problems,
such as social and political issues. For example, the main cause of poverty in Bangladesh is indeed social problems: marital instability, overpopulation, and corruption of government (Human Rights Watch 2015). While Singer’s argument can trigger sense of guilt, it cannot change our behaviors, because it is far too demanding for ordinary people (Brown 2001, 164). Another widely discussed theory in recent years is John Rawls’ distributive justice, which also focuses on the impartiality of wealth distribution. Rawls (1971)
introduced the concept of an “original position”, a hypothetical condition in which potential contractors make decisions behind a veil of ignorance. This means the potential members only negotiate while ignoring knowledge of themselves, including their talents, intelligence, gender, race, conception of the good, etc. According to Rawls, this condition removes any possibility of bias to maintain fairness. Rawls thus derives “difference principle”, that the
first principle to be choosen is fairness and equality in the most extensive scheme, which includes the distribution of resource to people under unfavorable situation. In “The Law of Peoples”, Rawls extends the method in “A Theory of Justice” to the question of global scale, that global principles are chosen by representatives of Peoples in ideal original position without knowing which particular People they represent. The fact that Rawls perceive “fairness” as the only standard for justice makes him overlook many other important attributes. Talents, abilities, interest are not the same for everyone. Considering Plato’s idea of justice that everyone to pursue what one is good at, the “veil of ignorance”, by disregard one’s own talent, completely ignore this aspect of justice. The main problem with both Singer and Rawls is their narrow views of justice, that justice is nothing other than fairness.


Particularism claims that the standards of justice arises from shared
meaning and practice of particular society, and one of the roles of the state is reinforcing those social norms. Any account of our global responsibilities which ignore the fact that we are also a part of a national community omits an important aspect of how we, as human, relate to one another. Universal standard privileges specifically Western values. There are multiple arguments from East Asia view points toward Western approach (Bell 2006, 54). Cultural factors can affect the prioritizing of rights, when rights are conflict
with each other. East Asia government would choose economic rights over civil and political human rights, like how China would underpay labor to maintain its advantage in manufacturing and keep the wheel going on providing jobs for everyone. Traditional culture resources also justify rights, because customs has higher chance of leading to long term commitment and resolution. Moreover, since Asian culture values modesty, a more subtle, indirect, less forceful way to address human right would be more appropriate. Lastly, cultural values provide moral foundation. While the West focus
on individualism, the East put highest values on profound duty toward immediate community and nationalism. For example, in Japanese history, a person would commit “seppuku” (ritual suicide) due to any kind of dishonor or shame toward the community. Therefore, it is practically impossible to impose total cosmopolitanism on any community due to significant difference
of values.

Margaret Moore (2010) provides more good arguments against extreme cosmopolitanism. Beside the argument that culture is related to the exercise of self autonomy, she stated that a global democracy would limit the participation of individual because universal laws reflect less of individual’s own will. In her opinion, collective autonomy is a better political practice rather than single society. Different countries would make different choice
when value conflicts, for example, one would choose environmental preservation over economic interest and one other would do the opposite. Again, Moore put emphasis on the Western aggression of cosmopolitanism, which is, ironically, a kind of culturally biased conception of good. Still, beside being a part of national community, we also belong to a global community of persons (Nussbaum 1996, 3), so we should not overlook the many other relationships that connect us with the rest of the world. Kwame Anthony Appiah (2010) supports a less extreme position which states we have global obligation, but we should be considerate of the practices and beliefs of others. Michael Walzer (1994) proposes a middle ground solution for this conflict: that we have both “thin obligation”, which is universal across border, and “thick obligation”, which is relative to culture. He argues that morality is strongly culture integrated in the beginning, and the universal case only appears in special occasion. In other word, rather than being the foundation, moral minimum is only a piece of historically depended moral maximum. We should indeed aim for just outcome, but not as a single society, because respect toward difference is necessary. Charles Taylor (1999)
proposes that instead of arguing for the universal validity of ones views, participants in global dialogue should allow the possibility that their own beliefs may be mistaken and work out an “overlapping consensus” of human rights norms. Forcing any individual or any nation to follow international standard against their own belief is destructive. In this term, we should try our best to understand each other, and effective conversation and consideration of
culture are necessary in global context. The truth is, concern about global justice is not necessarily in tension with particularism attachment. We ought to look at this topic not only in term of moral obligation, but also in term of global politics, or else we would
mistakenly combine the duties of humanitarian assistance with the duties of global justice. While they are both morally required duties, duties of humanitarian only require commitment until reaching desirable goal, while duties of justice is an ongoing process of improving structure to regulate inequalities
(Tan 2004, 23). Tan believes the root cause of global poverty is structural problem of a world that privilege the rich. Similarly, Thomas Pogge (2005), through the lens of human rights, suggests the use of cosmopolitanism for the global institutional order. He based his argument on the idea that all human have equal rights, and “because rights and duties are inextricably linked, the ideas of human right only make sense if we acknowledge the duty
of all people to respect it”. He argues that some of the rules that govern international institutions, such as those that generally advocate free trade but allow protectionism in affluent developed countries, involve hypocrisy and unfairness to some of the worlds most vulnerable people. Sweatshops in developing countries in which labors work under hazardous conditions is an example of how economic advantage of affluent countries comes from the
suffering of people from the other side of the world. Therefore, Pogge believes developed countries have negative duty to reform the global order to better secures human rights. This focus mainly on political structure, not on redistribution. The mere transfer of wealth and resources doesn’t address the core of the problem, just like how you give fish to the poor person without teaching him how to fish. However, what Pogge suggests is hard to achieve,
if it conflicts with national interest.

John Rawls said “Justice is the first virtue of social institutions, as truth is of systems of thought.” (Rawls 1971, 1). Even though what John Rawls offers is only theory, from that foundation, a core set of values has been derived, specifically, the UN’s Core International Human Right Treaties. These rights are not contested publicly so far. It is practically impossible to reach the ultimate state of justice and fairness, because justice itself is idealistic. At a certain point, a small improvement would cost a lot of resources. Ensuring
just and fair outcome for every one is a necessary goal in post-modernism to protect human rights and global security. However, we should not disregard cultural factors. An understanding of differences, and willingness to compromise, can help global conversation and negotiation converge to the golden
mean, in other words, a satisfactory social contract. Many problems require a careful consideration of fundamental structure, which is also important as an addition to moral responsibility. In conclusion, we should see the world as a society consisting of many different communities striving toward the goal of ensuring fair and just outcome for everyone.


References
[1] Plato & Bloom, A. (ed.), (1968) The Republic. New York, Basic Books.
[2] Tan, K. (2004) Justice without Borders: Cosmopolitanism, Nationalism
and Patriotism, Cambridge, Cambridge University Press.
[3] von Leyden, W. (ed.) (2002) John Locke: Essays on the Law of Nature:
The Latin Text with a Translation, Introduction and Notes, Together with
10
Transcripts of Locke’s Shorthand in His Journal for 1676, Clarendon
Press.
[4] Yao, X. (2000) An Introduction to Confucianism, Cambridge University
Press.
[5] Mill, J.S. (1860). On Liberty (2 ed.). London: John W.Parker & Son.
[6] Spinks, Lee (2003). Friedrich Nietzsche. Florence, KY: Routledge
[7] Hobbes, T. (1651). Leviathan. Menston: Scolar P.
[8] Daston, L. (2008) Life, Chance and Life Chances
[9] Dante (1995) Monarchia, Prue Shaw (trans. and ed.), Cambridge: Cambridge University Press.
[10] Navarro, V. (1998). Neoliberalism, Globalization, Unemployment, Inequalities, and the Welfare State, International Journal of Health Services.
[11] Al-Rodhan, Nayef R.F. (2009), Sustainable History and the Dignity of
Man: A Philosophy of History and Civilisational Triumph, LIT.
[12] Naim, M. (2013), The End of Power, New York, Basic Books.
[13] Banai, A & Ronzoni,M (2011) Social Justice, Global Dynamics: Theoretical and Empirical Perspectives, Routledge.
11
[14] Singer, P (1972). Famine, affluence, and morality. Philosophy and Public Affairs 1 (3):229-243.
[15] Rawls, J. A. (1971) A Theory of Justice. Cambridge, MA: Harvard University Press.
[16] Rawls, J. (1999) The law of peoples: With, the idea of public reason
revisited
[17] Human Rights Watch (2015) Discrimination, Inequality, and PovertyA
Human Rights Perspective.
[18] Blattberg, C, (2009) Patriotic Elaborations: Essays in Practical Philosophy, McGill-Queen
[19] Beitz, C. R. (1979) Political Theory and International Relations, Princeton University Press
[20] Brown, C. (2001) Sovereignty, Rights and Justice, London, Polity Press
[21] Moore, M. (2010) Ethics and World Politics, Oxford, Oxford University
Press.
[22] Bell, D. (2006) Beyond Liberal Democracy: Political Thinking for an
East Asian Context, Princeton: Princeton University Press.
[23] Nussbaum, M. (1996) For Love of Country: Debating the Limits of Patriotism, Boston, MA: Beacon Press.
12
[24] Appiah, A.K (2010), Cosmopolitanism: Ethics in a World of Strangers
(Issues of Our Time), W. W. Norton.
[25] Walzer, M. (1994) Thick and thin: moral argument at home and abroad,
University of Notre Dame Press.
[26] Taylor, C., (1999) The East Asian Challenge for Human Rights, J. R.
Bauer and D. Bell (eds.), New York: Cambridge University Press.
[27] Pogge, T. (2005) Global Responsibilities: Who Must Deliver on Human
Rights, New York, Routledge.

Nexys 2 FPGA CALCULATOR

Team Members: Nicholas Bilcheck, Sam Greenberg, and Hang Ha

Project Title: Nexys2 Calculator

Project Objectives:

The goal of this project is to develop a broader understanding of Verilog and the Nexys2 board to develop a functional and useful product.  The product for this project will be a calculator whose functionality is limited only by time constraints. In order to develop a calculator, knowledge on components that can be used with the Nexys2 board to make a more practical device will need to be obtained.  These additional components include but are not limited to a keypad for inputs and a LCD display for outputs. In order to power the LCD display, knowledge on how to use an arduino to supply 5 V will also be required. In addition, further knowledge of Verilog will be required to input values from separate components, use those inputs to perform calculations, and then output those results to various screens.  This knowledge will likely be obtained initially from instruction sets and other guides made by the developers of the Nexys2 board, the keypad, and the LCD. Using these guides will allow for an understanding of how integration between the modules and physical components will work. Furthermore, our goal for this project is to implement and master the modules necessary for storing and managing our data on the calculator and implementing the add, subtract, multiply and divide modules.  A significantly challenging task for this project will be displaying the values on the LCD in our calculator. In addition, attempting to take further advantage of the LCD to display operators and previous entries will be later goals that will hopefully be achieved. A successful final project will have lead our group to obtain and understand the knowledge necessary to develop a calculator for the Nexys2 board involving all the functionality previously discussed, while adding further functionality as the project progresses and always being open to improving the final project. 

Hang is in charge of the inputs. This includes the keypad and buttons on the Nexys2 board. Hang will need to implement modules to correctly receive input from the user and interpreting that information as a 4-bit number. She will then have to convert that into its decoded meanings – numbers and operations. In addition, she will have to figure out how the keypad works in terms of how to wire the keypad to the board and how to supply and read voltages to understand the outputs from the device. When she has finished that she will be assisting Nicholas with his section of the project.  Along the way, she will work on integrating the various project components together.

Sam is in charge of the computational aspect of the project. He will have to implement the different computational algorithms which include addition, subtraction, multiplication and division. Implementing these modules may be as simple as just using the operators or may involve writing individual modules to perform the operation.  At later stages of the project Sam will also need to implement these operations, possibly with possibly negative numbers and order of operations. Sam will then need to pass the stored values to Nicholas for his phase of the project.

Nicholas will be using the information sent to him from Sam’s phase of the project to display on the LCD display the information stored in the calculator. This will include the previous number, the operation, and the result. Nicholas may eventually, if time permits, need to learn how to display “scrolling” information to allow the user to read text longer than the LCD display will allow.

There are three big portions in the block diagram: The keypadToHex decoder, the processor, and the output. 

The keypadToHex decoder: this block will receive an input from a 4×4 keypad, and figure out which button was pressed using the keypadScan module.  The keypadScan module will be made up of a multiplexer and an FSM . There is also a debouncer inside this block so that inputs from the keypad function properly. The output will be a hexadecimal value that indicates which value is pressed of the inputs whether it is a decimal value, a clear function, or an operator. This block is of difficult complexity and Hang works on this module.

A delay module is used to delay the key-pressed signal so the keypad scanner and the computational module can work together.

The computing module: this block receives the hexadecimal input from the keypadToHex module. The code involves a case/if statement to navigate through different arithmetic modules and produce the result of the equation as the output. This task is very difficult and Sam works on this module.

The result from the computational module is connected to a binary to decimal converter, which divide the result into hundreds digit, tens digit, and one digits so that it can be easily displayed on either 7 segment display or LCD.

The hexToAscii module converts hex value to corresponse string value.

The storeEq module store the equation string until the equal button is pressed. At that point, the result of the equation is assigned to the equation string.  

The LCD module: this block receives inputs from the memory block to display equations and results on the LCD display. This task is very difficult as well. Hang and Nick work on this module. 

How the module will be tested: The methods of testing will mostly involve having the Nexys2 board run the module. For the keypadToHex decoder, there will be the 7-segment-display on the board show the value of the button pressed. For the arithmetic module simulations will be run as well as physically using the Nexys2 board.  For the LCD display, the only method of testing that will be used is attempting to display and change outputs on the LCD display properly.