Trantuete Posted March 27, 2013 Report Share Posted March 27, 2013 Hi Forum, I have a problem with the AINSER64 module. Well, actually it's not the complete module, but only the MCP3208 I am using, because I need only one single ADC channel with the low jitter values of the MCP. So I simply used one single analog input and clamped all other inputs to ground. No need for multiplexers and shift register. I used the ainser_jitter_mon application to test it and MIOS Studio only reports conversion values for module 1 and mux 1 on all eight channels of mux 1. So far so good,...., but: No matter what position my potentiometer is in, the values permanently are in the range of 3800 - 4095 with huge jitter values of 192 and more. The voltage on the analog input of the MCP does behave as intended when I move the potentiometer. But the ADC values don't. They stay at 3800+... I guess there's some communication error.... any idea someone? Thanks for help... Quote Link to comment Share on other sites More sharing options...
TK. Posted March 27, 2013 Report Share Posted March 27, 2013 Is the green "uC Link" LED flashing (PWM modulated)? It would identify, that the communication is up&running. And where exactly did you connect the pot? And which voltage do you measure between the AGND and Vref pin of the MCP3208? Btw.: I will release a special AINSER8 PCB for unmuxed ADC channels soon. The driver will then provide unmultiplexed scans as well. Due to layout reasons, A0..A7 will be mapped to channel CH7..CH0 (mirrored) See also http://www.ucapps.de/mbhp/mbhp_ainser8.pdf Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Trantuete Posted March 27, 2013 Author Report Share Posted March 27, 2013 Thanks for quick answer... First of all I don't have any LEDs connected to the module. The uC Link LED is controlled by the 74HC595 and since I don't use multiplexers, I also don't have the 595... I'm supplying both the Vdd and the Vref from one 5V regulator, only the 10 Ohms resistor between them. The voltages are OK at 4.97 V. The Potentiometer is connected to CH7 (mirrored as you said) of the MCP3208...and that corresponds with what I see in MIOS Studio: I only see values for the first eight pins of module 1. If I type check_mux 2...8 I see only "--". So I guess the communication is running. Only the values don't correspond to my Analog Input Voltage, which is adjustable between 0 V and Vref. This is the display of MIOS Studio (Attachment) It looks like the input was floating but always at the top of the range. And as I said, changes on the analog input voltage don't cause any changes. I tried other channels of the MCP3208....same thing... Maybe the MCP 3208 is defective, also it's straight out of the box... The AINSER8 module sounds good, and looking at the schematics,... that's exactly what I have here....I simply left out the LED...everything else is identical. Guess I'm gonna do a little more research or simply buy a new MCP3208 .... :pinch: Thanks for the help... MIOSStudio.bmp Quote Link to comment Share on other sites More sharing options...
Trantuete Posted March 28, 2013 Author Report Share Posted March 28, 2013 Hi again, I just scoped the signals between µC and MCP3208 and they look a bit strange I think. I attached two scopes of the Clock Signal, one with a Time base of 250 µs and the other with 1 µs. Is that how the Clock is supposed to look? I rather thought of a square signal... I used 3,3V --> 5V levelshifting and the Signal doesn't even reach 4 V. The other Signals CS and Din also don't reach 5V. Regards, Simon Quote Link to comment Share on other sites More sharing options...
TK. Posted March 28, 2013 Report Share Posted March 28, 2013 No, this isn't normal. The clock should look like in this snapshot: Do you also notice such a "weak" signal directly on J19 when the AINSER64 module is disconnected?If yes: then the problem is related to the 74HCT541 (IC1) - check that this chip is correctly supplied at 5VIf no: then the problem is located at the AINSER module Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Trantuete Posted March 28, 2013 Author Report Share Posted March 28, 2013 Wow, thanks for being so kind to measure the signal on your core. And so quickly... appreciate that. I should mention that I'm using the STM32 Core. So there's no 74HCT541. The MCP3208 is controlled by the STM directly via pull up resistors on the SC, SO and RC lines. If I disconnect the MCP3208 so that I can measure the signal directly, it looks the same as before, so it seems to be a problem of the µC. I checked all the Vdd voltages on the stm32. They're all at 3.3V so everything is OK here. I have no idea what else could be the problem... :no: Maybe I should try and configure the outputs in push/pull mode and see if I get the right signals. The MCP3208 should be able to handle 3.3V signals, right? Best regards, Simon Quote Link to comment Share on other sites More sharing options...
TK. Posted March 28, 2013 Report Share Posted March 28, 2013 You are using a STM32... this was an important hint! ;-) Yes, please try it in push-pull mode at 3.3V. (set "#define AINSER_SPI_OUTPUTS_OD 0" in your mios32_config.h file) With some luck, the MCP3208 can still be supplied at 5V, which gives you a larger voltage range for the pots. So, try both options: J26 set for 3.3V or 5V Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Trantuete Posted April 2, 2013 Author Report Share Posted April 2, 2013 Hi, hope you had a nice and long weekend...well at least here in Germany. Little update: Switching to push-pull mode did not solve the problem. The signals still looked weird although now with a level of around 3 V. Next thing I tried, was to change the SPI peripheral that was used to J16 instead of J19 (changing the "#define AINSER_SPI" hook in ainser.h to 0) et voilá, it works. AINSER_jitter_mon now outputs jitter values of up to 7. Not perfect, but I'm happy for the moment. Looks like my PORTB or at least the outout transistors are damaged, for what reason ever. My J5 input pins connected to PORTB however do work. So now 'm gonna use J16 for AINSER. Any idea on how to improve jittering? I'm supplying my core with batteries, a standard 3.3V Regulator and a low drop 5 V Regulator. So ripple should not be the issue... Maybe the value of my test potentiometer is too high (470k) so it introduces measurable resistive noise. On the other hand it's fed through a low-pass filter with a cut-off-frequency as low as a handfull of Hz. Any idea is welcome... Thanks very much for the support so far... Quote Link to comment Share on other sites More sharing options...
TK. Posted April 2, 2013 Report Share Posted April 2, 2013 I will check this on my MBHP_CORE_STM32 module soon to check if I can (somehow) reproduce the issue. Any idea on how to improve jittering? I'm supplying my core with batteries, a standard 3.3V Regulator and a low drop 5 V Regulator. So ripple should not be the issue... How high is the jitter? There is no way to get better results than +/- 1 I even get this excellent result when my MBHP_CORE_LPC17 module is supplied via a cheap USB hub. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Trantuete Posted April 3, 2013 Author Report Share Posted April 3, 2013 Ahh....forget what I said about jitter...it's allright. I checked that again and I've got jitter of +/-2 and a very few times +/-3. I think that's OK. Maybe I'll try other pot values and see if that makes any difference. Thank you very much for support...µCApps is a great project! I'm learning so much working on my own project. And I realize how much work you put in here to establish this awesome platform. I really appreciate your work. If I ever get to finish my project, I will post some pictures or a video here. It's kind of an alternative use for MIOS. But since it's my very first MIOS project, and I'm just learning to program in C, it may still take a while. Quote Link to comment Share on other sites More sharing options...
TK. Posted April 3, 2013 Report Share Posted April 3, 2013 Thanks for the compliments! :) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
John_W._Couvillon Posted April 6, 2014 Report Share Posted April 6, 2014 TK, Forum. As a work around for the low resolution of analog inputs to the LPC17, i build the AINSER8 for use with the pots on my organ swell pedals. Using the control surface for setup, there is a setup for an AIN and also an AINSER. Which of these should be used.? jOrgan is configured with two swell shoes, one on midi channel 0 and one on channel 1. The console swell shoes .seem to function, but there is no output from the AINSER8. that shows up as an input on the monitor in jOrgan. The LPC router is configured, but stil no input. Has the driver for the AINSER8 operating through j19 always been in midio128-ver3? I have not upgraded ver.3 since the initial installation. I am running jOrgan with linux puppy which does not support mios studio, so I am essentially running blind. I checked and rechecked the circuitry with nothing found. Voltage is present across the pots, and a variable voltage is present on the individual channel inputs to the AINSER8. Help Johnc Quote Link to comment Share on other sites More sharing options...
TK. Posted April 7, 2014 Report Share Posted April 7, 2014 MIDIO128 only supports the AINSER64 and not the AINSER8 module. So, currently it won't be possible to use the AINSER8 module properly. I added this to the wishlist. Once a new firmware version is available, you have to update it with MIOS Studio. So, use the time to find a solution for this (e.g. by booting a different Linux version, or by using a different PC) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
John_W._Couvillon Posted April 8, 2014 Report Share Posted April 8, 2014 TK, Not good news! Do I understand then that there is no way to get the AINSER8 working? This is confusing. The circuitry is provided. The interconnection diagrams to connect to the LPC17 are provided, but there is no firmware to finish the deal. Did I miss or mis-read something in the literature? Evidently I am the only midibox user that has ever tried to use an LPC17 to midify an organ with swell shoes and cresendo pedal having pots. If I am misinformed, i would appreciate someone setting me straight. As I recall PER S published a fix to midio128 ver. 2 running on a core 8, a couple of years ago. My setup includes a core 8 which could be uised for the swell pedals. Question: Will the resolution be better then with the LPC17 running midio128 ver. 3? TK, since I have a fully functional, headless, 12 Rank Theatre organ, SAMS and all, built around the LPC17 and midio128 ver 3., but only half playable with out swell shoes. I built the AINSER8 because an organ doesn't neet 16,32 or 64 ADCs, only 3, and that is what the AINSER8 is perfect for. I hope the AINSER8 firmware is not too far down the wishlist. I am aware that the overwhelming majority of users of the LPC17 are other then organ guys. However, the LPC17/midio128 ver3. combination is so very close to being the complete deal. You helped get functional hardware and firmware going to midify SAMS, and everything else on the electronic organ. Getting the AINSER8 working would be the final step. I'll donate a case of beer to your cause if it will "grease the skids"! Johnc Quote Link to comment Share on other sites More sharing options...
TK. Posted April 9, 2014 Report Share Posted April 9, 2014 Well, if you see the AINSER menu item, you can already use the AINSER8 module. Disadvantage: one pot movement will generate 8 MIDI events instead of only 1 (because the analog input is not multiplexed). The 7 redundant MIDI events can be disabled by clearing all MIDI port flags (USB1..4, OUT1..4, OSC1..4) However, if you are saying, that no MIDI events are generated at all, there is either a connection or a software configuration problem. It's very difficult to support you on such an issue remotely if you are not able to use MIOS Studio; and I can't help you on Linux issues! If you would be able to use MIOS Studio, you could just follow the testing procedure under: http://www.ucapps.de/mbhp_ainser8.html Your observations with the ainser_jitter_mon application would make it much easier to give additional debugging hints... Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.