Author Archives: pierremuth

The quest of a beacon for cats (part 2)

IMG_6452

It’s been few month now Mio is wearing the beacon, so what can we conclude ? First part: The quest of a beacon for cats (part 1)

Battery lifetime

The CR2032 battery lasted 100 days, with 60 seconds between RF emissions. It corresponds to roughly 144’000 pulses. As the beacon transmits the battery voltage, I could log and trace the trend. However the voltage of these battery don’t drop gently at the end of their life. There is a slight slope a month before dying, but I suppose it’s better to anticipate and exchange the battery after 12 weeks of use.

batteryLifetime

Field research

Mio’s collar has a lock that opens itself if too much pull strength is applied. It appended once the collar stayed outside because Mio hang it up at a fence (or maybe it’s possible I didn’t close it correctly).

It was interesting to search it by looking at the RSSI value on the receiver. It was fun as well for my neighbors, how saw me roaming around with an antenna. In the end the necklace was lying on a fence something like 50 meters away from the house. By making circles around I could estimate the range to maximum 100 meters.

As it was rightfully pointed out to me, the beacon allows to find the collar, not the cat. But the chances Mio keeps the collar is greater than nothing at all.

Conclusion

I’m rather satisfied by the battery lifetime and the range, so I will probably keep this solution for a long time. We really enjoy seeing the beacon signal chart, it reassures us to know Mio is around.
Creative Commons License

Advertisements

3D printed Synchrotron Magnet replica

 

The Cern Proton-Synchrotron (PS) is a fascinating machine. While there are many synchrotrons around the world, this one started its operation in 1959. The PS, which is nowadays part of the acceleration chain of the Large Hadron Collider (LHC), measures 628 meters of circumference. It was the first strong-focusing synchrotron (or alternating-gradient focusing), at a time when synchrotrons look like the BLN Cosmotron.

The PS main magnet units combine dipole and quadrupole magnetic functions, weight more than 30 tons and are around 4.2 meters long.

There are a 100 of these magnets along the PS ring. Some coils have been replaced, but they are still the same and the yokes are untouched.

For more details about the PS and its history, there is a complete and nicely written report available on the Cern website: http://cds.cern.ch/record/1359959

In 1959 John Adams (leader of the construction team at that time) announced the successful acceleration of protons up to 24GeV.

If you pay attention, on the picture you can spot a small scale model on the desk.

That is the target of this blog post.

2-0290.jpgThere is plenty of documentations and archives at Cern, and it was impressive to find the original mechanical drawings of the magnets. So I started Fusion360 and played with the drawings. Of course, there are yet 3D models files, but they are extremely detailed and it would shortcut the fun.

Let start with the yokes:

The magnet blocks stand:

Coils, supports and feet:

And let’s print it :

The scale is 1:20 and pictures bellow show the difference with the real thing:

IMG_6546

IMG_6549

The STL files are in this repository : https://github.com/pierre-muth/PSMagnet

Thanks for reading !

Creative Commons License

Images from Cern are free of charge for educational and informational use. The Cern term of use for audiovisual media can be find here : https://copyright.web.cern.ch/ . This project was realized as a hobby, outside Cern.

Quick & basic equatorial mount motorisation

IMG-20190225-WA0000

Several years ago I had a challenging combo in mind. Giving a try to astro-photography while not ruining myself.

orion mini EqI didn’t start with nothing as I would like to use my camera, a full-frame DSLR with a variety of lens. I don’t have any experience in astro-photography, then I bought the Orion Mini-Eq, a beginner tabletop equatorial mount for camera, plus a small DC motor. But I didn’t manage to get decent shots, and the mount start to be dusty.

I recently focus a bit more on this subject and I tried to improve myself on two key ingredients. The orientation and the motorisation.

The main axis of the mount should be precisely set parallel to the Earth rotating axis, in order to compensate this rotation with the motor. This will enable taking long exposure picture without start trails.

Orientation

In the north hemisphere a good approximation is to target the polar star (Polaris) to align the main axis. But it implies, in my case, to set the second axis precisely to 0 and have the star in view. The markings on this mount are not really helpful and Polaris is visible only on one side of the house. So I printed a plate with a cylinder that fits in the bottom tube of the main axis. It is precisely at 46.28 degrees, the latitude of my place.

orion mini Eq print plate

On this plate I can put a bull’s eye bubble level and a compass (or a phone). It is not perfect I imagine, but it helps me learn.

Motorisation

The main axis rotation speed should be one turn per day, the same as the Earth.

motor gearboxI found on eBay some stepper motors with a gearbox. The gear around the Eq-mount divides the rotation by 100 already, so adding a 1:100 gearbox on the stepper side divides it, in total, by 10’000. There is 86’400 seconds in a day, so the stepper motor speed should be 8.64 seconds per turn. This gearbox has a compact planetary gears arrangement.

Controller

silentstepstick-tmc2130-stepper-motor-driverI choose the famous TMC2130 stepper motor controller, mainly because the silent StealthChop mode promises a smooth rotation. In particular the Silent-Step-Stick board of Watterott/pololu, that simplifies the wiring.

An article in hackaday describes in detail how these controllers work. This time I would like to have something  useful rapidly, I then took an ESP32 with the arduino framework. I could just plug libraries for the TMC2130 and for a small LCD character screen.

IMG_20190315_103535

The ESP32 has to send pulses to the stepper motor controller, corresponding to the steps we want to generate. The motor has 200 steps per revolution, and the controller supports 256 micro-steps. It means we have to generate 51’200 pulses per motor revolution. We saw that the motor has to spin at 8.64 seconds per turn, so it gives 5925.9 pulses per seconds.

Coming from tiny 8bit micro-controllers, I first used a timer of the ESP32 to generate the pulses at a precise time interval. The ESP32 has timers that can be set down to the 80Mhz clock and the counter it on 64bits, which is quite remarkable. I set the prescaler at 80 to count micro-seconds, and the counter to 1687 in order to generate interrupts 5925 times per seconds. On the interrupt routine, we just flip high and low the step pin.

However I didn’t expect that the generated pulses don’t have a stable period. I naively forgot the ESP32 arduino framework probably relies on RTOS, thus some interrupts has greater priority than my timer. The period time in average is correct of course, but the period varies pulse to pulse.

After some googling, it was obvious to use the PWM instead. Everything is there with the ledc() function, and can be set with a 0.4 Hz resolution. I measured the pulse period difference between timer and PWM method :

timerVSpwm

Enough confident after this success, I just add three buttons to change the digit values of the output frequency, and the rotation direction. Also an option to stop the motor, it should not spin when the power is cut.

Next step is to make a basic case to put everything inside, my awful wiring don’t deserve public views.

And finally, I attached the motor on the Eq mount.

With everything attached, the system looks like that:

IMG_20190317_115945

The two following pictures are single frames, quickly processed from the raw camera files. Bellow is the Orion nebula, the tracking speed is not perfect as the stars still make trails. The theoretical value of 5925Hz micro-step frequency is certainly off due to the ESP32 oscillator real value. The exposure time is 60 seconds.

IMG-20190225-WA0001

Bellow the Andromeda galaxy, 60 seconds as well but with corrected frequency, hence a better tracking.

IMG-20190225-WA0000

Conclusion

I have now no excuse for waiting a clear night and start learning picture stacking with advanced astro-photo softwares !

You can find the arduino code and the 3D files here on github: https://github.com/pierre-muth/QuickEqMountController

Creative Commons License

The quest of a beacon for cats (part 1)

IMG_6409Mio is a tiny female cat, with a rather independent and proud way of life. She spends quite a lot of time outside doing… well… important cat stuff, among proving her duchess status to the other neighbor cats. However, she never misses us, each evening after work, when we come back home. She can enter the warm house in order to get the well deserved food and attention.

Until one day. And the day after.

It affected me far more than I could expect, but fortunately the worst things I started to imagine were false. Mio came back home. We conclude she might be being locked by mistake in a barn from the neighborhood. That’s where started the idea of a small RF beacon for Mio. It should to be very small, at least a month of battery life, and can enable a kind of search with a receiver.

What exists

I usually enjoy to think about and make solutions by myself, but what exists yet on the market ?

cat_PawTracker

thepawtracker.com

There are some expensive modules that combine GPS and GSM. Usually they come with a subscription (monthly fees) and you get the beacon location from a website. The few days of battery life is problematic, and they cannot be realistically attached to a small cat due to their size.

Some bluetooth tag seems to have some success. They are small and have a long battery life. These tags have however only a 10th of meter range, and some relies on the proximity of a smartphone, with the special app’ installed and running…

balise500pxFinally, over internet I found a very interesting article of someone having the same concern. (https://www.f1nqp.fr/articles.php?lng=fr&pg=144 in french). I’m less confident with analog RF electronics. In addition, the size of the antenna wire is not very confortable. However this solution should be kept.

Exploring RF modules

I discarded the modules working at wifi frequencies (2.4GHz) for two reason. Maybe I should come back here later, but with a coin-cell battery budget, these frequencies are absorbed easily by walls.

IMG_6406

I made some tests with three different RF modules. From left to right:

1 – A basic 315Mhz transmitter

These modules seems to meet the low power requirements. I can even use a TV usb dongle as SDR to receive and find the beacon. The difficulty comes from the antenna. A 1/4 wave antenna for 315MHz is 23cm long. If I spool the wire inside a small case, it makes a coil and degrades dramatically the antenna impedance/efficiency. So the range goes down to something like 10 meters.

2 – Lora module based on SX1278 at 433MHz

These LoRa modules are amazing. They have a really huge range, more than 500 meters. But the problem is still the antenna at 433Mhz. If I use a simple wire, wrapped in the case, I must increase the output power to the maximum (~+17dBm). Then the battery dies after a day. Mainly because the peak current is up to 100mA, thus not suitable with coin-cells.

3 – ST electronics module base on SPIRIT1 at 868Mhz

The ST SPSGRF module integrates the antenna, in a very small board. The power consumption is very interesting as well, so let’s go a bit further with them.

For each module, made a draft case. I choose a small PIC12F1822 in SOIC package to drive them.

IMG_6407

ST SPIRIT1 tests

The PIC code basically setup the module and send a message every minute. Fortunately, in addition of the numerous application notes, ST provides a little application (STSW-CONNECT9) to generate dthe setup C code of the Spirit1. It is very convenient as the registers are quite numerous. The message sent is just composed of the battery voltage and the battery voltage drop during the RF broadcast.

The 3D drawing is done with Fusion360. To make the case waterproof, I used neoprene glue on the outside join between the cap and the body. With the screwdriver tool that fits the pattern on the cap, there is enough torque to tear the glue appart to unscrew it. I had to pay attention to not cover the antenna with the coin-cell battery. Event shifted like that, I’m sure it reduces the transmission efficiency.

 

 

Receiver and integration

On the receiver side, one interesting feature of the Spirit1 is the RSSI value – in received signal strength. It not gives an absolute distance between the two modules, as it is greatly dependent of the obstacles, but it rather gives an idea.

IMG_6413I used the ESP32 on this side for two reasons. First because there are nice libraries for the RF module and different screens, and because I would like the wifi connectivity. With wifi, I can connect it to my logging station and observe the evolution of the signals. I had a PCD8544 LCD, pretty much enough to display few values and a small history chart. The screen on the receiver let me take it outside and try to locate the signal. It displays RSSI, voltages, and a countdown in order to knows roughly when the beacon will emit.

The PIC code, the ESP32 codes and 3D models are on this github repository: https://github.com/pierre-muth/RF-cat-beacon

 

 

From the tests I made, the range is around 100 meters. I had the receiver outside in the village, while the cat is (sleeping) in the house (which has half a meter thick walls).

I have now additional logged data channels, I can observe the trends of RSSI and battery voltage on logging station.

 

 

Conclusion for now

I need to wait more to conclude on the battery lifetime. Over the last 10 days, the voltage seems constant at 3V. I could increase the transmission rate if possible.

I’m not sure about the reception range, is it enough to locate the beacon by walking around in the village? That’s why I should continue to study the other solutions. For example, I just saw it exists 433MHz ceramic antenna as well. Maybe it enables the use of the LoRa module at low power. They are still interesting as their modulation scheme makes the reception very sensitive.

Thanks for reading and take care of your cat.

Creative Commons License

Destination moon

Recently inspired by some 3D printed rockets lamp, I thought maybe it’s a good occasion to start the exercice myself from scratch.

 

As a child, reading the Tintin ‘Destination moon‘ adventures really expand my dreams and I still enjoy reading this comic. The iconic red and white rocket has not too complicated shapes, but still interesting. Of course the rocket it is yet modeled, and plenty of 3D files can be found over internet. However the most accurate in my opinion is the work of Gregory V.

So I started Fusion360 with some contraints in mind.

  • As accurate as possible shape from the comic
  • A size up to 50 cm tall
  • Assembling without extra parts

I used the same solution as Gregory for the alternating red and white parts, but the structure rods are printed with the two central pars.

 

And the assembly looks like the following :

assembly

Lets start the lovely Prusa i3 and be patient. The rocket is printed in three times. For a total of approximately 45 hours and 480 grams of PLA.

 

To generate a dynamic plume of smoke effect, this time I used 3D Studio Max and its ‘meta-particle’ system :

tintin3DS

Few white LEDs connected to the USB port of the computer gives a result which I’m quite satisfied!

IMG_6053

Thanks for reading and if you’d like to go further, this repository might interest you.

Creative Commons License

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

Creative Commons License

ИГГ1-64/64M Adventure

IMG_5436

It appends I spend a bit of time on eBay looking for uncommon or old displays such as the famous Nixie tubes. Large matrix displays emerge some time ago maybe due to the discover of an old stock. However, I never found someone using them, for a good reason. Around 360 Volts is needed to light up a pixel.

Gazotron

gazotronGazotron, or Газотрон is (or was) an Ukrainian electronic tube manufacturer (do not confuse with Gas-o-tron). It’s not easy to find information about this company, even gazotron.com is closed. But actually there is still plenty of their products available if you would like to buy electronic tubes, such as IN4-nixie tubes. The logo is dot inside a circle.

81491517582909158

They made in the 90’s different sort of dot matrix panels. They are quite large, 19x19cm, and for the moment I saw 3 kind of pixel composition. A 32×32 matrix, all pixels are green. A 64×64 matrix, pixels alternating green and red, and finally a 64×64 matrix with red-green-blue alternating pixels.

I bought one green-red some time ago, and recently saw a page on hackaday.io that revive my interest.

Seek for information

The short datasheet provided with the screens (shown in the mentioned page) explains the voltage values needed to light up the pixels as well as the timings, but it does not help to find a way to generate these high voltage signals.

My research on internet first leads me to this Youtube video demonstrating a 8×8 pixel drive, and a quick view of the breadboard circuit. Then I start to find forums written in Russian where someone manage to drive the all 32×32 matrix.

And finally, a piece of a datasheet showing a circuit example able to generate the ~400 Volts anode signal from a 200 Volts source.

35281517586682013

Test Drive

I reproduced the circuit on a breadboard as well, using a 180V ‘nixie’ power supply.

IMG_5318

Motivated by this success, I started Kicad and designed a PCB. I Selected SMT components in order to reduce the size of the 64 anode drivers and the 64 cathode drivers. The board arrived as perfect as usual with OSHPark.

IMG_5366

And they are working!

IMG_5365

 

Cabling and soldering

There is 92 components and 34 wires on each of the 8 boards to solder. As I don’t own a air soldering station, I did everything with a good iron and solid patience.

But it was worth the effort, they all work great.

Interface

I used the same micro-controller as the BIG_CLOCK to talk with the high voltage boards. Especially because it has at least the 32 outputs needed. To interface this controller with the outside world and being able to display some useful pictures, I used the serial port.

I could then make a tiny Java program that copy part of the computer screen and send it to the serial port.

IMG_5436

Fun with Pixel Dust

I was quite amazed by the code demonstrated on a 64×64 led matrix by Adafruit (https://www.adafruit.com/product/3649). So why not trying this on the IGG1 display?

I have a MPU-9250 IMU and a raspberry-pi zero. However I need to adapt the code for this accelerometer, and send the data to the screen with the serial port. I’m more comfortable with Java than C or python, then I translate the code from Adafruit in Java.

To conclude

The full story and details are on the hackaday.io page here:

https://hackaday.io/project/46302-1-64x64m-adventure

Sources and schematics are on the following github repository:

https://github.com/pierre-muth/IGG_-64x64M

It was really a good time see this screen getting back to life, now it needs a purpose such as a weather forecast display or a nice clock. A lot is possible with the raspberry pi, including the use of the PIR sensor to only turn on the screen when someone is around…

Creative Commons License