Tag Archives: PIC16F

Glow Discharge Numeric Indicator Adventures

IMG_6028

Even if it has been done to death, well, I’m not different from people who succumb to the nixie charms. I have liked the effect of this glowing neon once I saw it for the first time on an old HP instrument. There is nothing unusual in the story I will tell, many had already and many will have this adventure. Here is my personal experience leading to this tiny nixie clock. Yes. Yet another clock.

Quick background links

us2142106_boswau

This technology used to display numbers can be fascinating. Especially if we replace the story at a time when it was not trivial for an electronic device to display digits. At least not as easy as it is now on displays such as the one you are reading this.

And this (hi)story is very well detailed here. Of course, Wikipedia has a nice article as well.

Part 1: Playing and prototyping with high voltage

What appeared challenging to me was first to tie from 170V to ground the cathode of the digit to glow. But of course, this problem was solved when nixies were used. To practice, I got nice little tubes, the IN-17. They are sufficiently common to still be affordable. Switching the high voltage of the 10 different cathodes can be done with old chips such as the K155ID1. It’s an easy to use chip in my opinion. Just a BCD decoder with high voltage capability. Still it consumes a lot, but they are a bit more practical than transistor and multiplexing. However, I still need one chip per tube, each of them has 4 logic input. I then used addressable latch chip that were lying there, three 74LS259, to control everything with 5 micro-controller output.

For the rest of the design, I switched to more modern electronic components. I used a PIC16F micro-controller to drive the latches and decode the time from a dedicated DS1307 RTC chip. Two buttons to increment the hours and minutes and we’re almost done. Not without some wire-mess of course.

What remains is the high voltage power supply. I used a 12V to 170V module in the IGG1-64×64 display, but this time I would prefer to have it from the 5V of an USB charger. There is plenty of 5V ‘nixie power-supply’ over eBay, but Mark Smith from https://surfncircuits.com/ did really a nice job to optimize his design and make it open. So, I reuse his work and ordered directly his board from Oshpark.

IMG_5965

Even if it’s an exercise, the result deserves a case. I played a bit with Fusion360 and try to make something a bit retro. As the numbers within the tubes are quite deep compare to their size, the vision angles are a bit limited. That’s the reason why the front panel can be adjusted. The small neon bulbs used as separators don’t glow exactly with the same color of the nixies, fortunately an orange filter equalizes the tones. The case is printed with PLA.

Part 2: A purpose for tiny tubes

IMG_5910

What you see in the picture on the left is a board found in a trash container. No case where there, but I noticed some tubes. Unfortunately one of the 8 was broken, but it means 7 were spared. Looking closer, I found the keyboard aside, and on the board, the brand “Walther” was engraved. It was a calculator (Walther-ETR2), and the display is made of small nixie tubes. I tried several time to bring it back to life, without success. And same story to find a replacement tube.

These tubes are NEC LD-8007, and seems to be part of the smallest ones. Maybe it explains their rarity and the fact I didn’t success to find a replacement one. So I thought I cannot let them lying and taking the dust (as so many stuff in what I cannot call an office anymore, let’s call this room the lab’). I had several ideas to use them, but I stick to simple and start a new clock.

In order to make something decent and correctly scaled with the tube size, I would like to make something small. I should look for more modern solutions.

Modern chips

Besides being small, there are few features I’d like to achieve. First is reusing the Mark’s efficient USB to 170V power-supply design. Then it would be nice to have wifi connectivity, allowing setup without button through a web page and automatically get the time with NTP.

esp32wroom

I discovered the ESP32 module and finally decide to have a look on the Arduino platform. I tried different editor/IDE, to finally start to make something useful with VScode plus the platformIO plug-in.

The Microchip high-voltage chips, even if it’s oversize for this application, simplifies and reduce the component number. Actually, these chips would allow multiple digit to be lighten at the same time. Not very useful for a clock and it would require a resistor for each of the different digit of the tubes (the 60 cathodes in total), instead of one resistor per anodes (6). As many people already did, I used two HV5522, they are 32 bit shift register with high voltage open drain output. The counterpart of these chips is they need 12V for the power and logic signals.

Schematics, PCB, soldering

To summarize, the main components needed are:

  • The ESP32 module and its 3.3V regulator
  • The high voltage shift registers and their 12V step-up power supply
  • The nixie tubes and their 170V power supply
  • 4 logic level adaptations, USB connector, etc…

I’m more and more efficient now with Kicad, too bad I had just finished when Kicad5 was released. You can find the schematics bellow.

boards

For the PCBs I made a stack of two boards. I could then limit the final size of the clock. The width is mainly determined by the ESP32 module, and the length is set to have roughly the same spacing around the tubes. To limit the height, I’ve placed the tallest component, which is the 33uH coil from the 170V power-supply, in a hole through the board.

For aesthetic reason I made a third board that will come on the top of the two others, to cover the soldering and high voltage conductors. As usual I used OSHPark for the PCBs, they have high quality standards. Here is the instant rendering right after uploading the kicak pcb files:

And the actual boards:

IMG_5971

We can discuss this choice, but I solder the tube pins on the surface, and not through-hole or with sockets. The main reason is space gain. To do so, I had to bend the 12 wires of each tubes in an homogeneous way. I made a simple tool to hold all the tube roughly in the same way:

IMG_5909

I’m still after all these years enjoying soldering components 😉

IMG_5972

IMG_5997

On the first try with all the tubes, the 170 voltage dropped quite low, enough to make the numbers barely glowing. After some debug, it seems that putting the components on both sides adds some parasites/cross-talk on the current limit line of the UCC3803 chip. Fortunately decoupling capacitor seems to solve the problem. I’m still not 100% sure of the issue, but now the voltage stays around 160V.

IMG_5999

IMG_6000

A small touch of 3D printing

Everything could be left naked, or hidden in a case. Again I played with Fusion360 and I tried to find an elegant way to enclose these 3 boards. I ended up with three parts that are fixed in a sandwich way with the PCB, everything fixed by the 4 tiny M2 screws. It should only add 2mm around the clock, with the same height.

IMG_5970

IMG_6012

IMG_6028

Scales in perspective

I have the privilege to have a Zen clock made by Dalibor Farny, and from the beginning, I cannot deny the inspiration:

IMG_6011

For the scale, the coins are respectively one swiss-franc, one euro, 10 penny, and quarter dollar.

IMG_6006

Advertisements

Wireless temperature probe

Here is an attempt to give some information on the wireless probes I’m using with my Raspberry pi logging station (for the full story). The wireless link is performed by nRF24l01+ modules.

1- Reception

The data reception is done by directly connect a nRF24l01 module on the raspberry pi SPI port. And the pilogger java project  configure and handle the data reception/treatment, thanks to the Pi4J library.

2- The probe

To sense temperature without using long wires, there is a constraint to consider: the wireless module powering. It could be for example from a solar panel, or from a battery. Using a solar panel is not always possible. In case of measuring outside temperature, the solar panel should be deported to the sensor, as the sensor should not be exposed to the sun. Moreover, the charging circuit efficiency is critical for small sized module.

Powering only using battery simplifies the module but requires very low consumption component to last a reasonable time. The nRF24l01 wireless transceiver is very efficient on that way. To keep a very low consumption, I choose the MAX31723 temperature sensor. It is precise and uses the same SPI communication protocole as the nRF24l01 module. To manage these components, I choose the microchip PIC16F1825.

The schematics files of the module below could be find on the github pilogger repository.

wireless_sch

As well as the PIC code in C. The code put the micro-controller in sleep mode for roughly 4 seconds between each temperature measurements and transmissions. And the all circuit is powered directly from two AA Ni-MH batteries. Each components could still work down to the lower battery voltage of roughly 2 volts, and charged batteries are around 2.6 volts which is below the max 3.3 volts of the RF module.

I didn’t yet make printed circuits, then I use prototyping board such as :

In addition of the temperature, I used the internal voltage reference of the PIC to get the battery voltage and send it to the pilogger.

For the moment, I did two of these probes. One is outside in a waterproof case powered by two 1000 mAh AAA  Ni-MH batteries, and  one on the attic, powered by two 2000 mAh AA batteries. I don’t have yet a full battery life-time. I can see the battery voltage decreasing very slowly over a month, but Ni-MH discharging curves are rather flat for low current. I will update this post once probe stopped working !

Edit:

After 100 days of sending 12 bytes of data every 4 seconds, I think we can conclude the overall circuit does not consume too much energy. The two AAA 1000mAh battery voltage only drop by 40 mV. Let see if this can last one year !

out_bat