Three Ways to Make Arduino Works As A USB/TTL Converter

Even if you have years working with electronics, you will still find some simple hacks that you never thought about before. Personally and to save money, when I was a student with a very limited budget I knew that my Arduino UNO can work as a USB/TTL(serial) converter. I used to remove the Atmega328P from my Arduino UNO R3 board in order to use the board as a converter not as a development board.

Why we need to do some tweaking to Arduino in order to use 0 and 1 pins for direct USB <-> UART conversion? This is because of what’s called fan-out (fan-out of a logic gate output is the number of gate inputs it can drive). In Arduino UNO case, the RX & TX lines (pins 0 and 1) are connected to FT232RL/Atmega8U2 USB to TTL bridge and to the Atmega328P MCU (check the schematic). So using the same pins with an external connections without doing any changes to Arduino UNO board probably won’t work.

Patel Darshil over Hackster.io listed three ways to make Arduino works as a USB/TTL converter:

Hack #1: Set Pin 0&1 Mode to Input Mode

This is done using code:

Pin Mode Set Arduino

But why this solves the problem? Well, GPIO can operate in two modes, input and output. In the input mode the equivalent impedance of the pin is too high; therefore, the Arduino/Atmega328P’s pins will have almost no electrical effect to the converter RX/TX pins.

Hack #2: Keep Atmega in Reset Mode

Just connect the RES pin with GND (the bold red wire in the image bellow)

Arduino Reset
Image Courtesy of Patel Darshil

GPIOs are configured using special registers. For example, Atmega has GPIO port data direction register (DDR) to set the GPIO as an input or an output for each port. The value of this register is cleared during reset. Therefore, the MCU’s GPIOs mode will be input. This means high impedance, subsequently.

Hack #3: Remove The MCU

This is the common way used by most Arduino UNO users, but it’s not applicable when it comes to new versions of Arduino; where, the MCU is SMD and can’t be removed.

2018 Will Mark A Milestone in GPS Technology with 30-centimeter Accuracy

You’re in a crowded street with many high buildings around you and you find your car position on Google maps is wrong. That’s usual, right? This is caused from (fake/distorted) GPS signals reflected from the high buildings around you which make your GPS receiver do some wrong calculations. So be careful don’t always listen to what GPS assistant says!

GPS MEMES

Even with no wrong calculations, the current GPS accuracy is about 5 meters, but this is going to change in next year 2018; where, a new set of satellites with enhanced GPS signals will be available for public use.

The enhanced GPS signal can make the GPS receivers do position calculations with 30-centimeter accuracy instead of today’s 5 meters. Moreover, it solves the problem of reflections inside crowded area with buildings with narrow window to the sky.

The global navigation satellite systems: Europe’s Galileo, Russia’s Glonass, China’s Beidou and US’s GPS transmits information about its position, the current time and more. The receiver, then, uses these signals to calculate the distance from each satellite based on how long the messages took to arrive. However, knowing the distance from 3 satellites is enough to calculate the position using geometric process called trilateration. This message broadcasted by a satellite called L1 signal. where, L band is a range of frequencies from 1 to 2 gigahertz.

To know more about navigation message data structure on L1, read this guide (page 19).

How trilateration works in GPS
How trilateration works. Image Courtesy of Tim Gunther, National Geographic

The next generation set of satellite will broadcast, in addition to L1 signal, a higher frequency signal called L5; where, GPS signal carriers are in the L band and are centered at 1176.45 MHz for L5 and 1575.42 MHz for L1. The following image is going to explain why the new signal can solve the old problem of reflections.

How L5 GPS signal helps
Image Courtesy of Broadcom

Silicon chips market and specifically Broadcom provides BCM47755, the first chipBCM47755 that support the new generation GPS. However, BCM47755 seems interesting not only as a GPS receiver only but also as a sensors hub, where the new chip has 2 cores inside, ARM-based 32-bit Cortex-M4F (CM4), an ARM-based Cortex-M0 (CM0), to implement the ARM big.LITTLE architecture which considered as a new battery-saving method consist of slow processor cores (LITTLE) with relatively more powerful and power-hungry ones (big).

BCM47755 supports GPS,GLONASS, BeiDou (BDS), Galileo(GAL), and SBAS satellite systems and has an operating frequency 150 MHz for Cortex-M4F and 75 MHz for Cortex-M0 CPU. Regarding the peripherals, the new chip provides a set of features like any other off-the-shelf MCU:

  • Up to 50 programmable GPIOs.
  • 2 channel ADC with 12 bit resolution.
  • Flexible interfaces including:  3 SPI ports, four UART ports and four I2C ports.
  • 4 different timers.

Finally, the new chip is available in 77-pin WLBGA package.

To read more about the new GPS generation, check IEEE’s report.

GPS vs. Beacons vs. Wi-Fi: Three Location Identifier Technologies

In IoT and digital age, location-based services applications are widespread: starting from Google maps to anti-loss devices and not ending with location-based marketing. The most common technologies used for user location identification are: GPS, WiFi and Beacons (a custom BLE profile).

Location-based (geofencing) marketing is a new way to enhance the personal experience while shopping. For example if you were near the shampoo section you will get on your mobile exclusive offers about that section.

Choosing the right location detection technology needs to take into consideration that GPS works optimally in the open sky environments and WiFi and Beacons can work probably indoors (and outdoors but within inhabited areas with hotspots). Now let’s get a brief look at each technology:

GPS

Thanks to on-the-shelf GPS modules/receivers from vendors like: Neoway and u-blox it’s easy to embed a GPS receiver into your project. What you need is a module sending its messages via UART to the MCU and a ready-made antenna attached to the module. There is a standard format for these modules messages called NEMEA. These messages contain information about the location that includes longitude, latitude, direction, speed … etc. These receivers need to see at least 4 satellites to compute a position.

There are many navigation systems like the Russian GLONASS, the European Union’s Galileo and the American GPS.

gps system how it works
Image courtesy of: Geneko

GPS is mainly designed to be an outdoor location detection system. Therefore, its performance decreases in enclosed places and across crowded areas with buildings.

WiFi

WiFi can be used in location detection (AKA Wi-Fi positioning system) when your phone or WiFi transceiver module like ESP32 or ESP8266 is near hotspots. You can consider WiFi like a coexisting system with GPS for indoor areas. Moreover, WiFi can be used to detect the location inside the enclosed/underground area; you can see the SubPos project on Hackaday to know how.

Image Courtesy of Blecky

Location detection systems using WiFi use techniques based on received signal strength indication (RSSI), angle of arrival (AoA) and time of flight (ToF). You can read more about these techniques from the Wikipedia article.

Bluetooth Beacons

Beacon technology is enabled by Bluetooth Low Energy (BLE) and it’s one of the BLE custom profiles. Beacons are used for proximity-aware applications like positioning indoors, and for location based advertisements. The idea behind this technology is to calculate the distance between the receiver and the transmitter by calculating the difference between the power of the sent and received signal (comparing the Received Signal Strength Indicator (RSSI) to a transmit (Tx) power). Knowing that, the power information is available in Apple iBeacon advertising packet (for example).

 

To know more about Bluetooth beacons please refer to our previous post about Beacons.

Read more about these three technologies in the DZone’s article.

Open-Hardware Reaches The Outer Space with UPSat Satellite

Libre Space Foundation completed the mission of building a completely Open-Source 2U CubeSat Satellite from scratch. It’s called “UPSat”.

On April 18th at Cape Canaveral in Florida, Atlas V Rocket launched Private Cygnus Cargo Ship, and UPSat was among its cargo.

Subsystems of UPSat. Image courtesy of UPSat

With both software and hardware parts published on github. UPSat seems to be a real open hardware project.

Let’s have a quick overview of the UPSat’s subsystems:

  • Electrical Power Subsystem EPS: This subsystem controls the CubeSat’s electrical power. UPSat is powered by 7 PV solar cells and 3 Li-Po rechargeable batteries (3.7V, 4Ah).
  • Image Acquisition Component IAC: The goal of the IAC is to shoot relatively good quality images pointing down to the Earth. IAC consists of a linux embedded board( DART4460 running OpenWRT), and a USB camera Ximea MU9PM-MH with attached lens.
  • Attitude Determination and Control Subsystem ADCS: The ADCS is armed with 3-axis digital gyroscope, magnetometer, Sun Tracker’s pointing vector GPS and Magneto-Torquers. This subsystem is responsible for stabilization of the cube satellite and orienting it in the desired direction.
  • On Board Computer subsystem OBC:  The brain of the satellite for decision making and monitoring of all subsystems. It’s based on STM32F4 microcontroller and uses FreeRTOS firmware.
    OBC PCB

     

  • Communications Subsystem COMMS: It’s based on CC1120, the TI’s High-Performance RF Transceiver.  Because of the low current consumption, the success of employing it in previous missions and other couple of reasons, the folks behind this project selected CC1120 among the others.

The project is completely open-Hardware and even the UPSat’s structure design files are available.

Source: Open Electronics

MEMS — A 22-billion-dollar-worth industry by 2018

Thanks to Micro-Electro-Mechanical-Systems MEMS technology, which will be a 22-billion-dollar-worth industry by 2018, our mobile phones are equipped with accelerometers and gyroscopes so they know the direction and rotate our mobile screen as needed. The applications of MEMS had expanded a lot in various fields like: energy harvesting using piezoelectric effect, microphones, gyroscopes, pressure sensors, accelerometers and many more. Moreover, this micro-level technology is going to be nano-level with Nano-Electro-Mechanical-Systems NEMS.

Image is adapted from HowToMechatronics.com YouTube channel

The basic idea behind MEMS is about having moving parts inside the silicon chip. Accelerometers for example, one of the most famous applications of MEMS, sense the acceleration by measuring the change of the capacitance C1, C2 between a moving part/mass and fixed plates. So when acceleration is applied in a particular direction it can be detected and measured.

Image is adapted from engineerguy YouTube channel

The amazing “How a smartphone knows up from down” video presented by Bill Hammack (engineerguy) can demonstrate in a clear way the principle of MEMS.

Last but not least, MEMS has applications in medical and health related technologies like Lab-On-Chip. LOCs can integrate a laboratory function in a single chip. So MEMS may not only solve technical problems, but they may also play an important role in solving problems in human health field.

“Genotyper” device. via NIAID

1.7K Voters Choose From about 100 SBC’s — The Results of Linuxgizmos 2017 Survey

Each year, Linuxgizmos does a survey about Single Board Computers (SBC) to find out how many of hackers and makers are using each of which . The results this year show apparently, the domination of Raspberry Pi 3 over the other 97 boards by a proportion of 4-to-1. Raspberry Pi 3 was launched in the first quarter of 2016 and brought some enhancements to RPi2 especially in the CPU side which was 300 MHz faster than the RPi2 one, and an updated ARM architecture: Cortex-A53.

The scores for each SBC was calculated using a Borda scores format: (3 x first choices) + (2 x 2nd choices) + (1 x 3rd choices).

 

Survey Results. Image courtesy of Linuxgizmos

Raspberry Pi didn’t win the first place only, but also the second and the third places went to Raspberry Pi models — the new Raspberry Pi Zero W and Raspberry Pi 2 Model B a Cortex-A53 version of the Raspberry Pi 2.

Dozens of RPi-like clones where on the 98 list of SBCs. Only one has a good result; The Odroid-C2 was in the top 10.

Chinese cheap SBCs like Orange Pi and NanoPi Neo, the 8$ SBC,  which are among the leaders in price and performance on paper had poor results — Orange Pi Zero was in the 28th place and the 31st was for NanoPi Neo.

Even that the most used CPU architecture in the hobbyists’ SBCs is ARM architecture (83 of the 98 boards in Linuxgizmos catalog are ARM based), the list also has eight x86-based boards and seven MIPS-based boards. However, Udoo x86 came in the sixth place, and Aaeon’s Intel Atom based UP Squared came in the 13th.

Last year, the highest ranked from x86-based boards was Intel’s MinnowBoard Turbot Dual.

Talking about the most important features that makers look for in the SBC; Open source software and community support were the most important factors. The other important features are purely about technical specs, except for the price in 5th place and the open source hardware info in the 4th place.

Image courtesy of Linuxgizmos

 

Last but not least, the results of this survey seem to be North America- and Europe-centered as shown in the following diagram. The centric results have some logical explanation. The folks behind linuxgizmos said that SurveyMonkey is blocked in China,the biggest Asian country. Only eight respondents came from China.

To see the full report, please refer to linuxgizmos website, and you can see the linuxgizmos list of 98 SBCs with specs. A table of all SBC scores is available also.

Open IoT Certification Mark – A New Certification For IoT Products

So it’s the time to witness the birth of a new certification for IoT industry. As security and data privacy in IoT platforms and products are two of the main concerns for developers and end-users, the new certificate discuss these concerns and even more. IoT is yet to have such certificate, as best of my knowledge, to pave the road to standardize the rules of openness and privacy in IoT. Although the term of IoT certification is already there, and some companies can do security test for your IoT products and certificate it, but nothing seems to analogy to certificate like open source hardware certificate, where anyone meets the principals, can use the OSH mark on his product.

Image courtesy of IoT.do

The new certification IoTMark was the output of a meetup hosted on June 16th 2017 in UK. This meetup gathered over 60 participants from UK and Europe. Specifically, a 22-page-long document was the output from this meetup. This document contains the principles of the certificate:

  • Privacy
  • Interoperability
  • Ownership, Permissions, Entitlement
  • Cost/biz models/pricing transparency
  • Security
  • Lifecycle, provenance, sustainability & future-proofing

To mention a few of these principles:

Privacy


The supplier of this product or service MUST be General Data Protection Regulation (GDPR) compliant.

This product SHALL NOT disclose data to third parties without my knowledge.

I SHOULD get full access to all the data collected about me.

….

Interoperability

  1. Have an open platform API [MUST]
  2. Provide comprehensive platform API documentation [MUST]

The preparation for the certificate didn’t finish yet, where The folks behind this certification will finalize it and register the mark by December 2017.

Don’t forget to have a look at the full document here. Who knows; You could use it in your next product. It’s really worth to give it a bid!

Source: Adafruit Blog

White Paper: Cut the Cord with Power over Ethernet (PoE)

Providing AC power to each device individually is an extra cost especially for organizations when installing IP cameras, VoIP phones or network access switches and routers in the facilities. To help in this way some modern protocols, like USB and Ethernet, provide the power over the same data cable. However, USB is not designed for networking and long distance network applications. Besides that, the 900 mA at 5V in USB 3.0 is suitable for low-power devices like external hard disks but can’t provide enough power for high-power devices like switches and other network instruments. For these reasons, PoE (Power over Ethernet) can be the best choice.

CAT-5/5e twisted-pair Ethernet cable. Image courtesy of: CableOrganizer

PoE can provide power up to 30W beside data connectivity on any standard CAT-5/5e twisted-pair Ethernet cable, and supports 10Base-T, 100Base-T, 100Base-TX, and 1000Base-T Gigabit Ethernet interfaces.

The LEX Computech 3I390NX Series

As an example of an SCB (Single Computer Board) that provides PoE on its ports is a board called 3I390NX from LEX COMPUTECH which is based on the latest Intel Pentium Processor N4200/ N3350/E3950 Apollo Lake processor family. The Ethernet ports are provided by the Intel Ethernet controller i1211-AT.

3I390NX SCB features are:

  • Intel Apollo Lake N4200/N3350/E3950 CPU/chipset.
  • On Board 4GB DDR3L.
  • Display: HDMI, DP, VGA & eDP.
  • 5 x GbE (4 x PoE) LAN.
  • 2 x Mini PCIe.
  • 6 x USB.
  • HD Audio.
  • 2 x COM (1 x RS232 / 422 / 485 port (external), 1 x RS232 / 422 / 485 port (internal)).
  • Hardware digital Input & Output, 8 x DI / 8 x DO.

To know more about this SCB you can preview the full white paper published on IEEE Spectrum, or download it directly from here.

Are Today’s MCUs Overdesigned? A Research Team Has The Answer

MCUs are called microcontrollers because they embed a CPU, memory and I/O units in one package. Apparently, today’s MCUs are full of peripherals and in most cases they are not used in the application, and from an engineering point of view this is a waste of money and energy, but on the other hand, for developers and consumers it’s about programmability and flexibility.

Rakesh Kumar a University of Illinois electrical and computer engineering professor and John Sartori a University of Minnesota assistant professor tried to prove that processors are overdesigned for most applications.

Kumar and his colleagues did 15 ordinary MCU applications using openMSP430 microcontroller with bare metal and RTOS approach (both are tested in their study). Surprisingly, the results showed that all of these applications needed no more than 60 percent of the gates. Therefore, smaller MCUs can be used (cheaper and less power consuming). As stated by Sartori, “a lot of logic that can be completely eliminated, and the software still works perfectly”.

Bespoke Processor research results
Image courtesy by: University of Illinois/ACM

In the image above the analysis of unused gates for two applications: Interpolation FIR filter and Scrambled Interpolation FIR. The red dots are the used gates and gray ones are the not used ones.

The research team called the optimum MCU the “Bespoke Processor”, and described the process “like a black box. Input the app, and it outputs the processor design.” says Kumar.

Source: IEEE Spectrum

Solr: Digital Wrist Watch Calculates time from Sun Position

Time can be calculated using the azimuth of the sun (aka solar time). Based on this idea, Tinkerman has built an unusual project called Solr. The concept is to translate the position of the sun into time presented on a vintage display. This new digital watch is freak enough to work only with a battery and the sun. The battery is needed to power the electronic parts and the sun is needed to calibrate the shadow of a screw with a reference line to calculate the time digitally using a digital compass.

Solr watch in action

The PCB has a white line and all you have to do is to align the shadow of the screw to it. The science behind this project rely on the fact that a change of 1 degree in longitude equals to 4 minutes. So, as the day is passing the orientation you need to follow to make the shadow align with the white line increases and therefore the time can be calculated. HMC5883L ( 3-axis digital magnetometer) is used to determine the orientation. This chunk of code in Solr’s repo makes the method used to calculate the time very clear.

The firmware (written in Arduino C) behind this project has three main tasks:

  1. Calibrating the HMC5883L, and the calibration procedure is explained in the HMC5883L datasheet.
  2. Calculate the time according to the bearing of the circuit.
  3. Display on HP QDSP-6064 display.

HP QDSP-6064 display

The PCB is assembled using the assembling service (PCBA) from Seeedstudio and designed using Eagle CAD. You can download the source files from here.

 

RELATED POSTS