Few tips for building reliable SPI interface

Many SPI tutorials use the standard notation of bus design where each device is directly in parallel connected to SCK, MISO, MOSI, and CS lines. This usually works without a problem, but there can be problems when more than one SPI device is on the bus. There might be several issues that can occur on poor design. Here are three suggestions for better SPI improvements: Pull up resistor helps to prevent the response from multiple devices at once. This might come from poor software design when CS pins aren’t appropriately initialized. The second problem is with MISO pin. Some SPI devices don’t enter tri-state even when CS is pulled high. So when talking to other SPI devices this will cause failures. Be sure to check if SPI device supports tri-state when inactive; otherwise, add external tri-state buffer like 74AHC1G125. And last thing is SPI transactions. In systems where multiple SPI devices are used, there is a risk of using different settings that were selected on different devices. Most importantly, transactions can ensure exclusive use of the SPI bus when needed….

Continue reading

How to build self resetting load switch in embedded circuits

In many microcontroller projects, we need to control loads such as relays, bulbs, or motors. From microcontroller side, we simply send a signal that turns the device on or off. Microcontrollers usually don’t care what’s going on further – is load switched on, or is it failing? Of course, we can build feedback and read voltage from sense resistor and switch load off in case it draws too much current. But sometimes, relying on the microcontroller to work reliably when it can be hung due to overload conditions is not accepted. We need to use passive methods of protection. Few additional discrete components can make a big difference. Anthony suggests a transistor-based overload protection circuit, which doesn’t do anything in normal conditions. But once the current exceeds the limit, it shuts off switching the MOSFET transistor immediately, thus probably saving the rest of the circuit from frying. A straightforward solution is to use NPN transistor, which base is connected to the load current sense resistor. It value is selected so that voltage drop on load threshold current would open transistor…

Continue reading

How to Install GSM Repeater

Mobile technology has opened a lot of doors for communication in places that weren’t always possible. Today, you can use your cell phone just about anywhere. For this reason, it can be even more frustrating when you experience a weak signal in your home or office. The best solution for this problem is to install a GSM repeater in the area where you are experiencing low reception. What is a GSM Repeater? A low signal can be caused by a variety of conditions, such as interference, thick walls or other obstructive structures, or the distance from the cell tower. Since cell phones operate by transmitting radio waves from one base station to the mobile unit, the GSM repeater acts as a middle receiver, in which the signal is amplified before being sent to the cell phone.

Continue reading

Forget about Weak Signal with Mobile Phone Signal Booster

Have you ever had the situation in the office when you desperately needed to call your client and agree on a deal, but your mobile phone kept breaking, saying that there was no connection? The Old Story of the Old World The story of people complaining that their mobile phone is always out of coverage is not new and quite typical worldwide. This very problem is rather painful for workers whose work efficiency depends on calls. Unfortunately, it can be a typical problem of many multistoried buildings, where most office plankton works.

Continue reading

Arduino and Matlab scope project

Oscilloscope is quite a universal instrument which I would recommend to invest first. Normal bench scope does the job pretty well. I am not a big fan of DIY scopes that are built of microcontroller and LCD or interfaced to PC via the serial interface. You will never get decent sampling and functionality with low-end parts. But in other hand, building such scope can be fun and be a good choice for student projects. prem_ranjan shares his Arduino-based scope project, where he outputs waveform to MATLAB plots. The investment into this project is minimal. O course you could capture signal directly to Arduino analog pin, but op-amp based signal conditioning could make life easier. In the end, here are few features of this scope:

Continue reading

Multichannel ADC using DMA on STM32

Previously we have tried to do a single conversion of one ADC channel. We were waiting for the ADC result in a loop, which isn’t an effective way of using processor resources. It is better to trigger a conversion and wait for the conversion to complete the interrupt. This way, a processor can do other tasks rather than wait for ADC conversion to complete. This time we will go through another example to set up more than one channel and read ADC values using interrupt service routine. How does multichannel ADC conversion works? If we need to convert several channels continuously, we need to set up Sequence registers (ADC_SQRx). There are three sequence registers: ADC_SQR1, ADC_SQR2, and ADC_SQR3 where we can set up a maximum of 16 channels in any order. Conversion sequence starts with SQ1[4:0] settings in ADC_SQR3 register. Bits [4:0] hold the number of ADC channels.

Continue reading