Multiple controllers in one design

Actually, many embedded systems use multiple microcontrollers and microprocessors. This is not about multi-core processors but several distinct processors used in one design. Multiprocessor systems allow the distribution of computing power among different processors, and this way, overall speed may be increased, coding simplified, and modularity reached. Using multiprocessor embedded design has many benefits. One of them is modularity. Imagine a situation when a particular microcontroller-based subsystem needs to be installed only if a particular opinion is installed. Another, as we mentioned, is coding simplicity. Instead of writing and debugging one complex firmware, it may be broken into several distinct, easily manageable functions on different MCU’s.

Continue reading

Debugging embedded hardware and software traces

When designing an embedded project, we typically focus on the actual application but do not pay enough attention to the hardware and software debugging process. Adding the debugging capability to the project requires some strategy. Simple situation: hardware may not be installed but connected to another circuit when needed. So software must support the functionality regardless of whether or not hardware is installed. Another example may be Embedded inboard with multiple temperature sensors. Hardware should detect when the sensor is connected or disconnected without interrupt other sensors’ readings. One way of debugging is software trace(log) to provide historical information on what was happening if something went wrong. This technique is a good solution for developers who have no ability to use other debugging tools because of the following reasons:

Continue reading

Long range directional microphones-myth and reality

There are a lot of myths about directed long-range microphones. You can hear that they can reach distances of 100, 200, and more meters, others say that this is a myth and these numbers are for commercial purposes. Let us try mathematically to find proof and see the real situation. Introduction to long-range microphones When talking about directed microphones, we usually remember that sound sources are in the open air and have no reverberation effects. So the only factor is the distance of the sound source object from the microphone. Along with the distance, sound power drops significantly, and in longer ranges, it interferes with other sounds like wind and other noises in the atmosphere. When the distance is about 100m, sound pressure drops more than 40dB(compared to a distance equal to 1m). If the sound level is 60dB, then from 100m, you will hear 20dB. The sound level of 20dB is less than other environmental noise, and many standard microphones are not sensitive enough for such sound levels. So we can say that directed microphones must have: Complying with these requirements with one microphone is quite a difficult task. Other solutions were creating low directive microphones with high sensitivity…

Continue reading

Control LPT port under windows XP using Delphi

Another way of controlling the LPT port under Windows 2000 and XP is using the Delphi language. In this case, library, inpout32.dll, is used, which allows controlling LPT port registers. And now how to do this from the beginning. Start Borland Delphi 7.0 and make a simple form where you can enter Data to be sent to the port, Port Address, buttons for writing to and reading from a port. If you are familiar with building forms this should be ease task. Okay, now let’s start programming; first of all wee need to include inpout32.dll in the project. For this, Delphi has several ways, but let’s stay to the easiest one when the library is in the same directory, where the project is. The header in section uses we have to place function prototypes Out32 and Inp32 with special compiler directive external, saying where to find this function.

Continue reading

Controlling external devices using COM port communications programmed using VB language

There are a lot of Radio amateurs that want to control external devices using computer standard ports. One of them is the COM port. Everybody wants things to be easy as people doing electronics are more hardware people, not software. COM port is more often used than LPT because COM port is more resistive to bigger loads, and there are fewer chances of failing. So if you know Visual Basic a little bit, then this shouldn’t be tough to use the MSComm Control component, located in Project->Components. You should check box MSComm Control. Later you have to add this control to the form and write some code for it.

Continue reading

Understanding and conversion different firmware file formats

Without getting too deep in discussions about why there are several firmware formats and extensions used. But the fact is that you can face firmware files with extensions like BIN, HEX, or E2P. Let’s see how these files look like and how to convert between them. First of all, it is important to mention that all firmware files can be one of two types: Text files contain ASCII symbols (codes from 32h to FFh); Binary files contain all ASCII symbols including nonprintable symbols (00h to FFh). First advice – never rely on file extension as it can be any. All are inside the file. So how to define what’s inside the file and what format? One easy way is to open a file with a notepad and see how the contents 犀利士 look inside. Continue reading

Continue reading

1-Wire protocol simple and easy

Dallas Semiconductor, owned by Maxim, developed the 1-Wire communication protocol. This protocol allows the communication of multiple chips to one host with minimal pin count. The protocol is called 1-Wire because it uses 1 wire to transfer data. The 1-Wire architecture uses a pull-up resistor to pull the data line’s voltage at the master side. 1-Wire protocol uses CMOS/TTL logic and operates at a supply voltage range of 2.8 to 6V. Master and slave can be receivers and transmitters, but only one direction at a time. LSB goes first always. Time slots transfer data in the 1-wire network. For instance, to write logic “1”, the master pulls the bus low for 15us or less. To write logic “0,” the master pulls buss low for at least 60us. The system clock is not required as each part is self-clocked and synchronized by the falling edge of the master.

Continue reading

How to make 5V from 1.5V

In many cases can be very handy to be able to convert 1.5V to 5V. Then you can power a microcontroller or an LED from a single AA or AAA battery. It is simple to do this as there are special IC’s as MAXIM MAX1674 or MAX7176. This is a step-up DC-DC converter that can convert voltages from 0.7V to any in the range from 2V to 5.5V. MAX1676 already has preset pins for 3.3V and 5V, making easier integration in 3.3 and 5V circuits. IC can dissipate up to 444mW. Bellow is a circuit that converts 1.5V to 5V. We need to get the maximum output of the current 300mA; then, we need to put some effort. Because output power is 5V·0.3A=1.5W, let’s say efficiency is 100%, then the power drawn from the battery will be 1.5W too. At 1.5V voltage, this will be 1A current. Not all batteries can drive such currents. Another important part is an inductor. For this wee need inductor with high current saturation, which usually leads to an increase in size.

Continue reading

Ultrasound transducers for measuring distance

Ultrasounds transducers for measuring distances are commonly used in robotics, automotive parking sonars. Ultrasound distance measuring is non -contact measuring method – radiation and reception of ultrasound waves. Ultrasound waves are mechanical acoustic waves with frequencies more than 20kHz. Normally humans cannot hear frequencies above 20kHz, while some animals can. For instance, bats use ultrasound location of objects. Dolphins communicate with each other using ultrasound signals. Ultrasound interacts with a hard body, and part of incoming wave energy is reflected; in other words – it is backscattered. So direct wave towards an object is backscattered widely – up to 180°. If the object is moving – the received frequency differs because of the Doppler effect. Let’s say simple example – parking sonar. Distance to object can be calculated very simply by the formula:

Continue reading

Avoid noises in mixed signal design

Today most of all embedded systems consist of two-part circuitry – digital and analog. The Digital part is usually the controller, its timing circuit, and other input-output devices. Frequently there is an analog part on the same board like ADC, OP amplifiers, sensors, and other analog circuitry. Such designs are called mixed-signal designs. Where digital and analog parts meet – the grounding problems start. The fact is that each conductor has its own impedance, so any current flowing results in voltage drops. Ground wires and planes aren’t exceptions. Digital and analog grounds can generate significant electromagnetic radiation that adds noises to signals we need. So the overall system quality drops because o poor design. In a good design, the analog ground plane and the digital ground plane should be separated. With multilayer PCB, this can be done very easily. Another issue is that digital signal traces shouldn’t cross analog ground, and analog signal wires shouldn’t cross the digital ground plane area. Of course, try to avoid aligning digital and analog wires as they can catch each other radiated noise.

Continue reading