Thursday, March 18, 2021

Kat-Net Part 3: Hardware Block Diagram

Hardware Block Diagram

 Kat-Net Hardware Block Diagram

As the system is designed to use low-cost existing hardware, the hardware layout is fairly straight forward. Main challenges will be arranging it into a neat space and portability.

The flow from left to right shows two antennas for the 4G LTE modem which is ideal for the modem which we have installed and performs diversity function for the modem. Data from the modem is passed to the router section via the application processor which is running OpenWRT. This application processor is chiefly responsible for most of software, everything except that which I refer as the "back end" which will be handled as a web service. It's possible this service could be handled via an on-board computer (shown at bottom), even one as simple as a Raspberry Pi, but I don't think the router is capable of handling it along with all its other router duties. As the network traffic is routed to the right, the WiFi 802.11ac router communicates with client devices.

Final version ideally should have an on-board battery bank, but I haven't implemented this feature yet. Bit of a short post on this subject, but it's pretty simple from a high level perspective.

Wednesday, March 17, 2021

Kat-Net Part 2: Prototype Software

Prototype Software

I have made a collection of various software systems which may be necessary or helpful to the project:


OpenWRT

This is an open source router firmware package which allows a very deep level of control. Not only does it provide many benefits, but it also is necessary for many of the other software as it is essentially the Operating System on which they are designed to run. Conveniently it is pre-installed on the GL-X750.


Nodogsplash

This package provides a captive portal / splash page system. It will serve as the stsrting point for when a user connects and send them to the login (or payment etc.) system.


BinAuth

This provides username/password functionality for logging in through the splash page.


Luci-app-nft-qos and nft-qos

This package provides a system for bandwith speed-limit and data cap control. This is ideal as a system to limit these things will need to be part of the purchase plan.


Custom Backend

More than any other part of this project, this part is very much unkown. Ideally this system will be passed information from NoDogSplash, provide a PayPal payment portal and return authorization data on what user, MAC address, IP address, time limit, bandwidth limit and data cap the user has been authorized for.


go.starthotspot.com or mywifiservice.com or hotspotsystem.com

These services provide a pre-baked back end. They would work fine, but they charge a commission on the hotspot prices. Plan is to roll our own system to accept Paypal payments and authorize users as detailed above.


Kat-Net Part 1: Prototype Hardware

Prototype Hardware

Modem / WiFi Router

As a prototype, low cost is a significant point of concern and therefore finding an affordable solution took some effort. At the last minute I found a GL-X750 from GL.iNet to be an appropriate starting place at $120 for the model with expanded band capability. The main sacrifice of this model is that it does not have any external connector for WiFi antennas, but only for cellular. In the final version I intend to have external antennas as a feature so this could be a final solution if not for that. I do plan to investigate if this can be added with some modification.


Another possibility for the prototype was a modem / router from KuWFi, but I found this to be more of a cheaply produced product. It does, however, have external antenna connectors for WiFi.


The final factor in choosing the GL-X750 was that it comes with OpenWRT already installed and fully supported on the hardware, which will be a significant help in configuring the final software solution.


Battery Bank

The battery bank likely to be used is still undetermined. It does not necessarily have the performance (mAh) that I would prefer for this application, but it does conveniently have a 12V output which the Modem / Router requires. I would like to get a full day of use on one charge cycle. This may fall short of that, but should be adequate for testing.


Support PC

I am unsure if this is strictly necessary, but I may embed a Raspberry Pi Zero W in order to serve the payment portal web page, perform system monitoring and provide other miscellaneous functions.


Pelican Case

A form factor fitting in a small case for complete portability is desired. 


Tuesday, March 16, 2021

Yamaha PSS-680 Keyboard Teardown

I recently took apart my Yamaha PSS-680 keyboard and had a look inside and took some photos. The reason for this project was that this keyboard was in need of refurbishment. Technically speaking, a cat had sprayed on it and it was in absolutely filthy state, but it still worked fine. I took it apart and did a very thorough cleaning and took some pictures inside.

Here is the keyboard, on top of my rather cluttered desk

Aside from the cleaning, the first thing I did was open up the case to see what damage might have been done to the PCBs. Fortunately they all seemed to be in excellent shape. There is a single pair of wires going to the bottom half of the case for the battery compartment (6 D-cell batteries, very old school) which you must be careful with when taking the unit apart.

Inside the keyboard, keys are towards the top of the image

One of the first things I noticed is what a massive ground plane this main board has. The keys themselves are attached to a piece of sheet metal. Since they went to the effort of attaching this metal to the ground in several places, I'm betting that it serves to provide RF shielding from the user. You wouldn't want any stray RF coupling into the sound mixing circuitry. The main keys and drum pads have individual ribbon cables connecting them to the main board and the drum pads are separated into two sections. If you happen to have a keyboard where one of these sections happens to be malfunctioning, this could explain why.

Isolation Diodes

Each key has its own individual diode. These isolation diodes are used to isolate the keys from each other to prevent rollover so that you can, if you want, play as many keys at once as you want. From what I recall, very old computer keyboards also required isolation diodes to prevent static electricity from getting back into the computer itself.

Sound processing board?

I wasn't able to remove the board shown above, but we can guess at its function based on the connections going to and from it. The power input goes directly to this board, both from the battery bank and from the DC adapter input so we can assume there are probably power regulators and filters on this board. The main speakers, headphone and line out jacks also connect to this board, so there is a good chance that there are audio amplifiers on this board as well. Aside from that, I'm not really sure. Are the actual FM synthesizers and mixers on this board?

From left to right: 8830PD XE405B0-070, Sanyo 8K4 LB1214 and another Sanyo 8K4 LB1214

Shown above are three ICs near and slightly tucked under the sub-board shown earlier. As for the first IC (let's call it XE405 for short) I can't find any information. Any help on that would be appreciated. The dual Sanyo ICs are general purpose transistor arrays (exciting, I know) with 7 channels of common-emitter arranged transistors including some internal resistors each. There are two more transistors in this area, so I guess they needed a total of 16 transistors here.

From left to right: PC900, 8836PD XE416D0-093 and a Toshiba TC5565APL-12

<The TC5565APL-12 is a 8k Word RAM. The PC900V, interestingly, is a photocoupler with 710 Volt isolation. It actually has a powered amplifier with hysteresis on the output side.


Note: this post was previously unpublished. I have decided to publish it as "good enough". 


Kat-Net

Kat-Net

Writing a blog in 2021 is a bit old school, a bit passe. For me, it's going to serve a purpose of collecting my project notes, thoughts and methods. Especially those which can't be recorded as part of a live stream or YouTube video. It will also serve as a launching place for me to write more thought out articles which can be reposted elsewhere. Hopefully others can learn from this as well. 

About Kat-Net

Kat-Net is a project designed with a simple concept in mind which combines several existing technologies. The ultimate goal is to provide WiFi internet access, through a paid portal, over a cellular network (at least 4G LTE). This system could be used to provide access to guests at festival in a rural area, for example. The hardware portion is intended to target a small, battery operated and portable form factor.

Friday, July 24, 2015

B&K 2831E Digitial Multimeter Review


I recently had the opportunity to bring home a new piece of test equipment, so I thought I'd tear it apart and take a look inside. The B&K 2831E is a 4 1/2 digit bench multimeter with some nice features and fairly good specs. From personal experience I already know that I like this instrument, but I hadn't had a chance to look inside until now.


First impression on opening it up was sort of "that's it?" because for the most part there is only a single board which isn't even densely populated. Based on its specs (e.g. 0.03% VDC accuracy) I was hoping to see a lot of high-precision resistors and other neat things like that. There is only a single large thick film resistor and a ceramic cased power resistor (seen below along with the 4 wire connections from the front panel). Towards the back of the unit is an IC related to the USB and a pair of (in white package) optical isolator ICs. The RS232 IC and connector can be seen missing nearby, which is a feature on the 5491E. Two black boxes seen below are some of the various relays used for switching between various modes and scale settings. The one on the right appears to be heat damaged, possibly from soldering and hopefully not from that nearby red wire. This could be related to the unit's problem which is that it gets stuck during the self test (relay not switching in test signal perhaps).


One of the unit's fuses is inside, connected on a sub-board of the front panel. The copper bar is a current shunt. It is a known value, usually trimmed by shaving or clipping, used to measure the amount of current passing through it. You can also just about see the two ferrites as well which help reduce noise on those lines.


On the main board there is an RF enclosure which I opened to see what was inside. Nothing really stood out as out of the ordinary and I'm not quite sure why this section needed to be shielded. Are they producing a signal which must be contained or are they being shielded from signals? The shield does not contact the exposed landing evenly, so I'm not very impressed with the RF shield, if it's even needed. Here is the list of some of the ICs in that section:

ES636 - RMS to DC converter
LM393 - opamps
HEF4066B - quad analog switch
OPA4343 - opamp

The main processor for the BK 2831E is an Atmega 128A which is an 8-bit microcontroller with 2 8-bit PWM channels and an 8 channel 10-bit ADC. Not knowing as much about Atmega micros as I do about PICs, I can't provide much insight into it's outstanding features, but it seems like a capable part. Perhaps the bulk of measurement is done with this unit, which if the case then I am rather impressed considering the 0.03% VDC accuracy. I couldn't find a precision reference voltage, but I will have to take another look. The 12MHz clock crystal for the micro is right next door.


In the picture above you can see the microcontroller as well as several caps, voltage regulators, rectifiers (very bottom edge of screen) and some loops passing through ferrite (left side below row of caps, presumably filtering). The main voltage transformer sends various voltages to this section where they are rectified, filtered and regulated. I measured +5V, -24V, and 2.5V, but I may have missed some. The connector on the right goes to the front panel display PCB.


As mentioned earlier, I am a fan of this type of VFD and in general I like the looks of the front of the unit. Front panel controls are very easy to use with a single hand and intuitive. The front panel power switch connects to a real line switch in the back via a brass rod. Real line ("mains") switches are always an appreciated feature. One complaint I have with this meter is that my Probe Master probes which use the safety-type banana jacks would not easily connect to the front panel sockets shown here (I had to use a fair bit of force, but they do work). I'm not really sure whether that's the fault of B&K's design, but I can tell you that those probes work easily with other meters.

In terms of features it covers the standard range of Volts and Amps AC and DC, resistance, continuity, diode, frequency and period. The accuracy and range of these measurements is good and comparable to what you would expect from similar 4 1/2 digit meters. The DC range goes up to 1000V, which I have been meaning to try, but haven't gotten around to it. Ranges that high and more are useful for me to be able to measure directly with some precision. One slight disappointment is that the frequency measurement only goes up to 1MHz, although the accuracy is good. It's not a frequency counter after all and I personally have instruments that can measure frequency much better, but it would have been nice to have more.

One of my favorite features is the ability to perform two measurements at once, for example Volts AC and DC or Volts AC and frequency. That is a nice feature, but it does slow down the front panel display update rate to about half. In normal mode the update rate has 3 settings (fast, med., slow) which is useful depending on what you're looking at, although it's important to remember it affects the accuracy (slow is best accuracy).

Something interesting about the 2831 instruments is that as you go lower in letter (2831D, C, B etc) you seem to get older instruments. Normally I am used to test equipment manufacturers updating their numbers on new models, but maybe this is just how B&K does it. It's something to keep in mind when you're shopping around though. It might be interesting to see how the instrument evolved over time. For me personally, I would definitely prefer the E model over any others as it is the most modern looking (I like the smaller teal colored VFD over the older red LED style display). I don't know how the specifications compare between versions.

All together the B&K 2831E is a nice unit on the bench and I would buy another one if I needed it (and I have, in fact). I have a Yamaha PSS-680 digital synthesizer keyboard that I want to take apart and do a tear down of. I'm not sure how much of the circuit I would be able to identify and I don't feel qualified to review it, but since I have the need to take it apart for cleaning I thought it would be interesting to have a look. I am also still planning to talk about my HP 3585A spectrum analyzer, but it will probably take longer due to it's complexity.

Friday, June 26, 2015

Controlling a Negative Voltage Outuput in a Control Loop

I know it's been a while since I last posted and I've been rather busy. Hopefully I can get a chance to post more often soon. I'm thinking of doing a semi-teardown of a HP 3585A Spectrum Analyzer. Now, on to the problem:

Let's say you have a device in your circuit that outputs a negative voltage, but all your control and power supply voltages are positive. How do you handle feedback of the negative voltage with the positive control signal? The short answer is "with a summing junction," but I've written a little more detail on it.

Fig.1 - Click to enlarge

Let's start with the voltage divider. You should design this such that the full output of your feedback (your negative voltage) is divided down to the negative of the maximum control voltage. That's assuming this is the correct sense that you want, maximum positive control voltage equals maximum negative voltage output. In other words, for maximum output divide down to -5V for a max control Voltage of +5V. I also added a small capacitor here, which adds some filtering and helps with phase margin.

Next is the all important summing junction. You should design this to zero out the command voltage when a matching feedback voltage is present on the voltage divider. In other words, at full output the divider should be at -5V and control voltage at +5V so the voltage at the midpoint of the summing junction should be zero Volts. Ignoring the summing junction, these resistors would be equal, but you could also design it for +3V to zero out -5V or something. Compensate for the divider by calculating the parallel combination of the lower divider resistor and the feedback side resistor of the summing junction. Then set the control voltage side resistor of the summing junction based on the balance you need. Finally, it is best to set the summing junction resistor values at least 1 order of magnitude higher than the lower divider resistor in order to avoid influencing the divider ratio. All these values are calculable using basic electrical theory (Ohm's law, Kirchoff's laws, etc).
Example: Assume R4 = 30k, Max Feedback Voltage at divider cap = -5V and Max Control Voltage = +5V. For zero volts at summing point at max control and feedback, R5 = 330k and R6 = 300k.
Finally is the control section of the circuit (well, it's all part of the control loop really). In my application (a high voltage negative power supply) I used an operational amplifier. You could use a microcontroller or other methods depending on your needs, but be aware that you may have negative voltages at the summing junction with certain conditions. My opamp is set up as a noninverting amplifier, with added low pass filtering. Set the values here so that they filter out any noise you expect to receive, but also have a reasonable response time.

Something important to consider with R1 and R2 (the opamp resistors) is overall loop gain and stability. You may need to (depending on your application) design the opamp and overall loop gain such that the gain is 1 or less (R2 <= R1). The reason for this is that with high gain and multiple phase shifts you can get your control loop into a situation where it is oscillating itself. This is called loop oscillation and is generally to be avoided. Filtering also helps with this. In my application, the high voltage negative power supply constitutes a high gain block which had multiple unpredictable phase shifts inside it which could cause loop oscillation if not planned for and controlled.

Keep in mind that the negative output of your device or circuit does not necessarily have to be linear, but it must be monotonic. Here is an overall description of how the circuit works:
At a steady state of 0V output with everything powered up, the Control Voltage is switched from 0V to +5V. Since the voltage from the divider is 0V, the voltage at the summing junction becomes a positive value. The output of the opamp starts increasing, which goes to the control input of the device or circuit and the output of the device starts increasing (going towards some negative voltage). At some point, the output of the device reaches the desired value and feedback from the divider equals -5V. With the feedback value = -5V and control voltage = +5V, the voltage at the summing junction is equal to 0V and the opamp's output stops increasing.
 Assume a semi-steady state where the Control Voltage = +5V, feedback voltage = -5V and output is at a desired level. Now the control voltage is reduced to +2.5V. Since the feedback voltage is at -5V, the value at the summing junction is now -2.5V which is seen by the opamp. The opamp starts decreasing its output thereby controlling the device to reduce its negative voltage output. Eventually the control voltage and feedback voltage balance where the output of the device would be about 1/2 of its maximum output (2.5/5).
Please note that it is not necessary to have a negative power supply for the opamp, as the goal is not to output a negative voltage from the opamp, only to reduce its output. I hope this is helpful to someone, even though it may be considered fairly basic it may not be entirely obvious.