Posts tonen met het label 1N4007. Alle posts tonen
Posts tonen met het label 1N4007. Alle posts tonen

vrijdag 25 november 2022

Mosha Eurorack Modules #10: I/O Module (Head phone output and MIDI input)

 

The I/O Module is a 6 HP module that provides some input and output facilities. The black knob is a double potentiometer that controls the left and the right channels. If a cable is plugged into the gold jack it will be either the left channel or both channels, and a cable plugged into the purple jack will be the right channel. The output is a TRS jack with the black dial controlling the volume. It uses two NE5532 OPAMP, one for each channel. The input voltage is divided by 5 using a resistor network. Because a dual voltage system is used, there is no output capacitor to normal the voltage.

The bottom six jacks are all MIDI related. The MIDI input is fed to the board from the rear of the box using a special conversion circuit (shown below. The 10k resistor in this circuit is essential and occasionally missing in online versions of this circuit). The optocoupler prevents ground loops through the MIDI cable and is required by the MIDI protocol for receiving data. There are two headers on the module, one to provide power to this circuit and one to transfer the MIDI signal to the PIC16F690 that is used to convert the MIDI.

The PIC16F690 was chosen because it has an USART (for MIDI) an analog input and a PWM that can be used as an analog output, and it can be programmed by the PICkit 2. The MIDI outputs are, in order: CV out for MIDI notes played on channel 4. The gate signal of these MIDI notes. The clock signal of the MIDI, and three drums from channel 10. The source code for the MIDI is available here.

To ensure a quick response to frequency changes the PIC16F690 is running at 20Mhz, which also allows 10-bit accuracy. There's a two pole active filter to prevent the PWM signal from interfering with the output, and a small trim potentiometer that allows setting the output voltage from 1x to 2.1x (10k with 9.1k non-inverting OPAMP, which may not be enough).



maandag 6 augustus 2012

The tweeting cat II

I managed to get the XBee USB explorer hooked up to my playstation 2 linux system, and it only crashed twice so far. Playstation 2 linux runs 2.2.1 (a very old release). Since 2.2.1 doesn't have USB and the Playstation 2 uses USB for the keyboard and mouse, they ported the 2.2.18 USB modules, but the driver for the XBee USB explorer only exists in 2.2.19 and up, so I had to port that back too. It required me to manually edit usbserial.c (as this contains PS2 specific code) but the other files could just be copied from 2.2.20 and 2.2.19.

The next step was to build the circuit. I saw a good option on bildr blog which I decided to persue:
I also added a 330 Ohm resistor and a LED to the ID-12, to make sure you could see when a tag was successfully scanned. The positive lead of the LED goes to the pin, for those that are wondering. As a battery supply I used four rechargeable NiMH AAA batteries, which give a voltage between 5.6 and 4.9 volt, I initially used a diode to drop the voltage by 0.7V to ensure that I didn't send more than 5.4V to the ID-12 (the XBee is protected by the 3.3V converter).

Then I had to attach it to a cat harness, for which I used electrical tape and band aid tape (to not bother the skin of the cat with the electronics). This is what Nephthys looks like with the system on:


You can see the LED and the RFID-12 on this picture.


And on this picture you can see the battery pack with the XBee attached to the back.

The system worked once, but the cat decided not to go after any of the RFID tags I put around the house and the system stopped working after an hour. After a lot of debugging I discovered this was because the batteries had run out of power (oddly enough the RFID-12 and the XBee still work, and the LED still blinks, but the RFID-12 refuses to send any data to the XBee, which made for a lot of trouble debugging. So I'll try the system without a diode next, which would give the system a lot more battery life.

As you can imagine, I'll put tags on the food bowls, the water bowls, the favorite sitting spots of the cat, maybe the litter box, but also the other cat, Miuty:


Of course, I'll also have to set up a twitter account and create a way to translate the RFID numbers into tweets. But it will all happen.