Home DIY or DIY Crazy DIY toy: homemade cell phone with a built-in dosimeter.Part 1

Crazy DIY toy: homemade cell phone with a built-in dosimeter.Part 1

by admin

Crazy DIY toy: homemade cell phone with a built-in dosimeter.Part 1
Hello, Habr.
By profession I am an electronic engineer, specializing in the development of devices based on microprocessors and microcontrollers.Over the years I got tired of this craft, so even in my spare time I make all sorts of electronic things based on controllers. It’s nice to breathe some life into a small piece of metal, even if its input is a reed switch, and the output is a LED.
I was scratching my head the other day, trying to figure out what could be useful for the household. After searching for interesting ideas on the Internet in general and on Habra in particular, it turned out that people are interested in homemade cell phones – accessories for such homemade products (GSM-modems, RF-connectors, antennas, SIM-holders) are becoming more and more available, and the topic is really interesting. For example, on Habra there were published articles "Mobile phone with your own hands" ( part 1 , part 2 ) and " Cell phone assembly kit ".
Unfortunately, its homemade cellular I had already assembled. Of course, now a similar design should be done in a slightly different format – replace the AVR microcontroller with ARM, add a graphical display, use a standard external antenna instead of the antenna drawn on the board… But this evolutionary path of development is somewhat boring and hardly the idea to modernize something that has already been made and even works, will win the evening laziness and procrastination. It would be a lot more fun if the projected crap never got made by anyone, or better yet, if there were certain doubts : "Will it work?"
To wrap up, I will just say that as a result of my search for new ideas, I decided to make homemade cell phone with built-in dosimeter – thing, crazy enough to be fun to work with and practical enough to come in handy.

In general terms

The approximate specification of the phone is as follows.
Hardware contents :
– SIM900GSM modem
– ARM Cortex-M3 STM32 processor
– Color display
– Gamma radiation detector
– Built-in relay
– Processor ports are on a comb connector, allowing connection of additional boards
– Processor JTAG is daisy chained into the junction box, making it possible to connect a debugger and debug software
Software :
– Voice calls (dialling, dialing, receiving incoming calls)
– Quick one button call (SOS button)
– SMS (receiving, transmitting)
– Integration of GSM and dosimeter (call to predefined number and/or generation of SMS-message when radiation level exceeds a certain threshold)
– GSM and relay integration (control of relay by calls and SMS)
– Integration of dosimeter and relay (activation of relay at a certain radiation level)
Ideology :
– The hardware and software (schematics, source code, CAD files) of the dosimeter phone will be made freely available (Open-source hardware)
Let’s start developing the device by designing the circuit fragments.

Radiation detector

Crazy DIY toy: homemade cell phone with a built-in dosimeter.Part 1
The classic radiation detector, capable of detecting all types of radioactive radiation (alpha, beta, and gamma), is based on Geiger-Mueller counter Domestic dosimeters use SBM-20 or SBM-21 counters, while foreign ones use LND7317. Geiger-Mueller counters have a lot of advantages, but there are a lot of disadvantages – high price and poor accessibility. For example, a dosimeter based on the LND7317, even offered within the crowdfunding project. on Kickstarter, was selling for $400 with a promise to sell the completed device for $800 ("As this device is to some extent an update to the Inspector, it will have a higher retail price tag, probably closer to $800").
Fortunately, there is an alternative to the Geiger-Mueller counter – a semiconductor detector based on a PIN diode. Maxim has even published a appnote "Application note 2236, Gamma-Photon Radiation Detector, " which uses low-noise operational amplifiers and a comparator in addition to the PIN diode. Every time the PIN diode detects a gamma ray, it generates a short digital pulse of a few microseconds on the circuit output – just right for connecting to external interrupt input of the microcontroller. By accumulating statistical information about the number of detected gamma rays for tens or hundreds of seconds, you can recalculate the values (after calibration, of course) in the usual μR or mSv and show the user on the built-in display.
Crazy DIY toy: homemade cell phone with a built-in dosimeter.Part 1
I’ve altered the original scheme somewhat :
The PIN diode has been replaced by BPW34S (available at Chip Deep);
operational amplifier replaced by LMH6672 , and the comparator to LM311 , cheaper and more available (available at Promelectronica);
The circuit has two supply voltages, 12 V and 5 V, so I added a power chip 78L05 which you can buy in any radio stall; I suppose the current consumption on the 5V channel is low, so the low efficiency of the linear regulator will practically not affect the total energy balance of the device. The circuit of the detector is here
When using a semiconductor detector, keep in mind that it does not "see" alpha and beta radiation (which, fortunately, attenuates fairly quickly as you move away from the radiation source), and is inferior to a Geiger-Mueller counter in detecting gamma radiation (as far as I understand the physics of the process, High-energy gamma rays will be detected by both types of devices, but low-energy quanta have enough energy only to excite the Geiger-Mueller counter, and the PIN-diode detector will not work; I hope readers who are more familiar with the issue will comment).
In case the parts listed in the schematic are not available to you, try to find analogues. A parametric search on the Compel Web site often helps me with this. For example, you can get a list of low noise DUTs by including catalog operational amplifiers a "Noise" filter. There is a similar filtering function in the catalog "Terraelectronics.

GSM modem

Crazy DIY toy: homemade cell phone with a built-in dosimeter.Part 1
A key detail of our device. Fortunately, there comes a time when a full-fledged GSM/GPRS modem is really seen as a circuit part – buy it, solder it, work it. Some shamanism in connection with searching bugs, features and separating them from each other, of course, is present, but in general, the threshold of entering this area is quite low.
The most popular option, in my opinion, is the GSM/GPRS modem SIM900 , the number of topics on which in the profile conference (the best source of knowledge for the novice phone builder), as I think, confirms my rightness.
The wiring diagram of the GSM modem is here
The control from the central controller is realized through UART (RXD, TXD circuits). PWRKEY circuit is needed so that the controller can change the modes of the modem. Despite the presence of PWRKEY, you must have the ability to remove the power from the modem hardware (ENA circuit on pin 2 of the power chip D1 ST1S10PHR ). ST1S10PHR I recommend due to the set of two nice features – high allowable load current (it is necessary, because the GSM-module by documentation "has the right" to consume a significant current and if the power supply subsystem does not provide it, the module will reboot; such current surges occur rarely, but nevertheless you should be aware of them) and the low price.

Display

Crazy DIY toy: homemade cell phone with a built-in dosimeter.Part 1
This is where I’m still pondering.
On the one hand there are common and proven displays like WG12864 – monochrome, 128 x 64 dots, data loading through a parallel interface. On the other hand, the Chinese people’s industry is actively offering colorful and cheap alternative – color TFT displays, 128×160 pixels, data loading via SPI (makes PCB tracing much easier). It’s just not clear whether it will be possible to buy such displays from the PRC on any more or less stable basis, or whether their sellers are rotating with the speed of dying flies. Please, if anyone has any experience with a stable purchase of such displays in China, write back in the comments.
So far it seems to me the most sensible way to design the circuit and make the printed circuit board so that you can solder both WG12864 and some Chinese noname onto it.

Microcontroller

In place of the controller I see the ARM Cortex-M3 from STM.
Why ARM?
In my opinion, until recently (about 3-5-7 years ago) the designer of general purpose embedded systems (not radiation, not microconsumption) had a wide choice of controllers to use. I personally started with PIC, then I had i8051, then I learned AVR on my own and made many projects with it. However, I think there is almost no choice now. ARM beats AVR not only on price/opportunity ratio, but also on price! I don’t know, what it is explained by, peculiarities of production or marketing reasons, but for me only, as a developer, a switch to ARM seems inevitable and unavoidable. I will be glad to hear arguments of other architectures adepts, but personally I have already walked both AVR and i8051 into a better world.
Why STM32?
I don’t think ARM controllers from STM are somehow fundamentally better than the controllers from NXP or TI It’s just that when I was choosing which particular ARM to dump the AVR on, the STM32 was just as good to get as the NXP, a little cheaper, plus, the smallest STM package was smaller than the smallest NXP one.
From the perspective of the processor, the phone dosimeter functionality is simple enough, some kind of super performance is not needed, so it is quite suitable processor type STM32F101C8T6 in TQFP-48 package. But keeping in mind the need to connect a keyboard (a lot of legs), a display (also a lot of legs) and, especially, an external board on which you can have all sorts of useful extensible nishtya, it is better to take STM32F103RBT6 in TQFP-64.

Constructive

Crazy DIY toy: homemade cell phone with a built-in dosimeter.Part 1
The design as "just" a circuit board with parts seems a bit sub-optimal to me. Of course, DIY is DIY, and contemplating a green PCB mask will please the eye of both the seasoned professional and the novice amateur. Plus, it seems to me that a homemade case certainly serves its purpose (dust protection, usability, etc.), but it kind of nails the overall aura of the device. You can use the case from OKW + a specialized membrane keyboard, which would provide a great tactile experience, but it would greatly increase the overall cost of the device, and the aura, again…
The optimal variant in my opinion is to use two Plexiglas plates – one shaped and without cutouts, closes the device from below, the other, also shaped and with cutouts for buttons, display, speaker and microphone, is mounted on top. Good examples in my opinion are here’s and here’s Only I’d probably prefer a slightly tinted plexiglass, so that the "guts" look doesn’t interfere with the functionality.

Continue?

Crazy DIY toy: homemade cell phone with a built-in dosimeter.Part 1
As the saying goes, "sabotage proper." To make such a device or not? If the beginning is interesting and a device with this functionality will be in demand, then the work will continue. Also, I will be grateful for comments and criticism, as fixing bugs at the beginning of the project will save a lot of nerves and money later.

You may also like