Wednesday, August 13, 2014

7 things about embedded/electronics projects that you might have mistaken

Well I have not invested lots of years into embedded electronics. I was electronic enthusiastic but never done much into microcontroller and embedded stuff before 2011. By the end of 2011, I had ordered my Teensy (atmega based circuit with built in USB programmer interface). I had ordered Teensy basically to try USB based attack vectors by programming teensy as USB keyboard and trying to create a batch file on the victim computer and run it etc. Some good tools and frameworks have been written about the use of Teensy like devices as attack vector. (E.g. https://code.google.com/p/kautilya/ by @nikhil_mitt) So I am not going into details of embedded device as attack vector on computers.

 I had done some small projects using this Teensy like Remote Controlling PC via TV Remote. But I started programming of Atmega Chips (microcontroller) due to an incidence. My nephew had done some robotics class where they had taught (really?) them about atmega16 based line follower robot. Also gave each one a piece of hardware. But my nephew was given a further difficult challenge to complete on his own… To solve a maze. But neither my nephew nor other friends in class were able to complete task. They were not able to re-produce normal line following ability of robot at home. So my nephew called me expressed his problem. So, first I gave him general idea how the code should work. Then sent a partial code to help him but he couldn’t do it. So I and a friend of mine took this challenge. I was sure that it should work but we needed to get information about coding and sensor as well as prepare algorithm of the robot. So we started collecting datasheets and information about the tools and coding softwares etc. Within 8-10 days we were able to run the robot perfectly as per the requirements of the challenge. Reason telling you this story is embedded device is not that hard as you think. The person who knows any one programming language can easily use embedded device. That’s why I thought to write about 7 things you never knew were easy about Embedded Hardware devices projects.

1)      Embedded Hardware is not as difficult as you think!
2)      You don’t need to do soldering!
3)      You don’t need low level language like Assembly!
4)      It’s not as expensive as you think
5)      Simulators are your best friends!
6)      Don’t be afraid of PCB designing!

7)      Manufacturing like a pro

Embedded Hardware is not as difficult as you think!

I have been arranging Hardware training trying to get people involved into hardware hacking projects. But I have seen lots of people having the fear of hardware or embedded projects as if touching any microcontroller will give them -A.C. 240V electric current. Very less number of people were interested in the trainings even if some were free of cost. It is not as difficult as people think. I am telling this from my own experience. I had started programming with a line follower robot without any previous knowledge about these microcontrollers then also I had succeeded in completing the challenge of solving maze using line follower robot. If I can do it so do you can do it too isn’t it? This is not rocket science though people have created rockets using thisJ . Just see at some sample codes get some basic compliers or programming IDE for microcontrollers and start with simple codes. Most of the microchips would allow you to code in C or C++ language.

You don’t need to do soldering!

I have also seen people saying oh electronics you need wires you need to do soldering. I can’t user soldering gun etc. But hey you are in to new era of electronics and embedded devices. Lots of microcontroller devices come with the basic development kits readymade. Some times by the device manufacturers or sometimes by some local vendors.
For Ex. Atmega8 Development kit


You just need to plug-in cables and you can use these boards for GPIO (General Purpose Input Output). Some of these boards have basic input as switches and out puts as LED or Buzzer etc. So even if you don’t know soldering and you never have built electronics circuits… don’t be afraid.

You don’t need low level language like Assembly!

            One more reason people put forward for not doing embedded projects is they don’t know low level language like Assembly and they don’t want to take the trouble to learn assembly language. Wake up people. Almost all generally used Microcontrollers give us option to code in to higher level language such as C / C++. Most popular open-source hardware platform Ardiuno uses C++ as its base language in its IDE. Other major share or chips from Atmel use C or C++ both and also come with full visual studio based development environment.


It’s not as expensive as you think

            Normally we use most of the free software. So to start embedded project people are not ready to spend cash. But we don’t need lots of cash to start a microcontroller project. Lots of time a development kit could be brought for around 10$ to 20$ (600 to 1200 INR). So to start off you don’t need all big gadgets and don’t need to empty your pocketsJ. After starting some small projects you can check if you are embedded into it and want to spend more on it or not.

Simulators are your best friends!

            If you want to check circuits or microcontrollers without assembling any circuits then it is also possible. There are very good software simulators available these days which not only simulate most of the electronics circuits but lots of microcontrollers also. The normal hardware development cycle consist of following stages
Schematic Design -> PCB Layout –(wait for pcb)--> Physical Prototype -> Software development  --> System Testing

Instead of wasting time in more tedious development cycle system simulation can be used to do development in a rapid way.

There are free simulators like Simulator in Atmel Studio. There are some good professional quality simulators like Proteus (from http://www.labcenter.com/). 


Using simulator helps for quicker development of the electronics or embedded project.

Don’t afraid of PCB designing!

            In the old days the PCB designing used to be done via laborious manual processes. But PCB designing softwares have changed that a lot. There are some great PCB design software both Free (List of Free PCB design softwares) and Commercial (Like Proteus).



 Eagle (http://www.cadsoftusa.com/download-eagle/freeware/) is also one more free software which is pretty good for designing PCBs they have their commercial version for more than 2 layered PCB. We can do circuit design and convert it to a PCB design in some professional software like Proteus. Some other PCB designing software are also good for quickly creating PCB designs and generating manufacturing files for PCB manufacturer.
            

Manufacturing like pros.

As well as PCB designing the manufacturing of PCB has also became easy. There are lots of online services where you can design and order a PCB online.
For ex.
http://www.pcbpower.com/ - Indian website with Global reach of customers
http://www.pad2pad.com/ - They have their own software using which one can design a PCB and order directly online for manufacturing.
            http://www.leiton.de/en-index.html - Cheap rates
There are a lot other websites (Just google for “order PCB online”!) you can choose the one suitable for your need or a local one PCB manufacturer nearby you.
For assembly of the electronic circuits also, there are lots of online services available (like screamingcircuits or 7pcbassembly) but I found that the online services for the assembly of circuit are much more costly. Better option is to check for a local vendor who is doing assembly. Local vendors I found near-by give rate of around 0.004086$ which is like a quarter of 1 INR per soldering point. So I recommend to check for some local vendor rather than wasting too much money on online services of assembling circuits.
Always keep in mind that the PCB manufacturers and Assembly service providers would normally don’t give your order on time. So always keep good buffer time while giving order or bulk quantities to these vendors.

Conclusion

So get your feet wet in the fields of electronics (in electronic fluid) and embedded devices and you will find it good as hobby or business also.



Saturday, August 9, 2014

Garage4Hackers Ranchoddas Webcast on XSS Protection Bypass By Ashar Javed

Great talk about XSS filter bypass in the Ranchoddas Webcast by Garage4hackers.com