Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 04:47 05 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2 No keyboard function on different keyboards that support PS/2

     Page 2 of 4    
Author Message
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 384
Posted: 12:06pm 09 Jul 2020
Copy link to clipboard 
Print this post

Hey John it is not the MCP2221A problem, without the chip is doesn't work either.

I uploaded a new video with more details on YouTube.

https://www.youtube.com/watch?v=MuuQT-vfqLY

I could solve the problem, but I think there is a problem with the firmware. It may initialize the keyboard way to early, so if I use my keyboard, which draws 100mA, it is not recognized; my other keyboard, which draws 50mA is! This procedure is perfectly reproducible.

Yes I tried differend cables and powersupplys! Always the same. If you watch the video I've uploaded on youTube you will see what I mean.

Thank you all for helping me :)

Greetings
Daniel
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3663
Posted: 12:46pm 09 Jul 2020
Copy link to clipboard 
Print this post

Without the chip how did you power the board?

John
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 384
Posted: 12:56pm 09 Jul 2020
Copy link to clipboard 
Print this post

Hi John,

the MCP2221A is not needed for powering up the Board. It works perfectly without.
This chip is only for serial communication, which is optional. I am powering it through the USB-Type B connector which is _also_ used as serial communication, but you don't need a MCP2221A for powering up the maximite.

Greetings
Daniel
Edited 2020-07-09 23:01 by Amnesie
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 02:56pm 09 Jul 2020
Copy link to clipboard 
Print this post

without any USB device present (2221 or 1455), the 'official' current limit for a USB port is 100mA. many ports will allow drawing a higher current, some as high as 1A or more, but not all. it depends on who designed the electronics inside the host and how strictly they wished to adhere to the USB specifications.

once the 2221 or 1455 has enumerated, a higher current may be available (depending upon how much current the 2221/1455 has requested the host to make available), but the CMM2 will generally be drawing the full current it requires the moment the power switch is turned on - before enumeration has completed. as in your case, this is a problem.

the USB port may respond to this unauthorized current draw by dropping the voltage available from the USB port. the H7 processor, 2221/1455, SD card, etc will all be ok with the voltage dipping down to as low as 3.5v as all these parts operate off a 3v3 LDO regulator. however, USB keyboards may require 5v.


to ensure 100% compatibility, the CMM2 should be operated off a 5v plugpack, the sort used for charging phones etc via a USB socket. these plugpacks supply a high current at all times.


i would recommend that when problems are encountered, the CMM2 should be powered through a "Y" cable, that passes just ground, D+ and D- to the host, while ground and 5v are passed to an external plugpack power supply.


cheers,
rob   :-)
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 384
Posted: 03:16pm 09 Jul 2020
Copy link to clipboard 
Print this post

  robert.rozee said  without any USB device present (2221 or 1455), the 'official' current limit for a USB port is 100mA. many ports will allow drawing a higher current, some as high as 1A or more, but not all. it depends on who designed the electronics inside the host and how strictly they wished to adhere to the USB specifications.

...

the USB port may respond to this unauthorized current draw by dropping the voltage available from the USB port. the H7 processor, 2221/1455, SD card, etc will all be ok with the voltage dipping down to as low as 3.5v as all these parts operate off a 3v3 LDO regulator. however, USB keyboards may require 5v.


Hi, but as I wrote; I even powered up the Maximite without the 2221 chip, so there should be no problem with current & voltage drop. To be preceise, I meassured it, there IS no voltage & current drop (with & without the 2221 chip). So it is not this chip.

It would solve the problem if the keyboard initialization by the firmware would happen maybe half a second later or so. I prooved this by connecting an external power supply to the keyboard and then powering up the maximite. So the keyboard already runs and had its time to "boot up". All this is maybe somewhat "rare" but, I can reproduce this failure with 4 different keyboards, only one keyboard works every time (it draws 50mA) all other draw 100mA.

At first you might think, that my power supply or cable isn't right. As I already said, I tried many different kind of powersupplys and cables - every time the same result. I even meassured voltage and current drop. Everything is fine, too.

The firmware is just too quick by checking if there is a keyboard or not. If I plug in the keyboard a second later after bootup, everything is fine.

Greetings
Daniel
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3663
Posted: 03:20pm 09 Jul 2020
Copy link to clipboard 
Print this post

  Amnesie said  Hi John,

the MCP2221A is not needed for powering up the Board. It works perfectly without.
This chip is only for serial communication, which is optional.


I know.

  Amnesie said  I am powering it through the USB-Type B connector


And if that is only allowed 100mA then that's your problem.

Try powering via a decent 5V PSU.

John
Edited 2020-07-10 01:21 by JohnS
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 384
Posted: 03:40pm 09 Jul 2020
Copy link to clipboard 
Print this post

Hello John,

maybe I dont't understand your question? I am powering the maximite through a decent 5V PSU. I tried a few of them.

I have got a 5A laboratory power supply, from this PSU I am going via USB-cable to the USB-type-B connector, which is powering the Maximite.

Only by saying "going through the USB-Type B connector" this doesn't mean I use a laptop  as PSU. So there is no limitation of current or voltage. If I want to I could deliver up to 5A @ 30V through the USB-B-Cable... In fact I tried to go as high as 5,2volts.

Or do you suggest I should use the 5Vin pin of the Waveshareboard directly? Done that already, no difference.

Greetings
Daniel
Edited 2020-07-10 01:42 by Amnesie
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 03:41pm 09 Jul 2020
Copy link to clipboard 
Print this post

if you try and draw more than 100mA from the 5v pin on a PC's USB port, even with the D+ and D- pins disconnected, the host may limit the current by dropping the voltage at the 5v pin.

this behaviour is dependant largely on how the circuitry within the PC has been designed. most PCs have been designed to allow a higher current draw than given in the USB specifications, up to 1 amp in some cases, but you should not rely upon this. some PCs will only allow you to draw the 100mA. some (very rarely) impose absolutely no limit and will let out the magic smoke if there is a short between the 5v and ground pins.


cheers,
rob   :-)
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 384
Posted: 03:44pm 09 Jul 2020
Copy link to clipboard 
Print this post

Hi,

I wrote a few times I don't use a laptop or PC as host. I am aware of the usb limitations or restrictions. I plugged a USB-type-B cable in my laboratory power supply and from there I am going into the maximite Type-B connector.

Greetings
Daniel
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3663
Posted: 03:50pm 09 Jul 2020
Copy link to clipboard 
Print this post

  Amnesie said  Hello John,

maybe I dont't understand your question? I am powering the maximite through a decent 5V PSU. I tried a few of them.

I have got a 5A laboratory power supply, from this PSU I am going via USB-cable to the USB-type-B connector, which is powering the Maximite.


I never saw you say that before.

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 03:57pm 09 Jul 2020
Copy link to clipboard 
Print this post

  Quote   I plugged a USB-type-B cable in my laboratory power supply


Does your supply have a response time control for how quickly it adapts to changes in demand? Are you powering by plugging the USB or switching the PSU or switching the CMM2?

Suggest you at least try a simple wallwart or desktop computer supply
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 384
Posted: 04:02pm 09 Jul 2020
Copy link to clipboard 
Print this post

I wrote many times that I tried differend cables and powersupplys. I even meassured the voltage and current drop. This is the reason I already tracked down the problem this far.

@ Matherp
"Suggest you at least try a simple wallwart or desktop computer supply"
Yes I tried all of this before. Same results.  

"Are you powering by plugging the USB or switching the PSU or switching the CMM2?"
I tried all methods. No difference.

"Does your supply have a response time control for how quickly it adapts to changes in demand?"
No, but I tried a big linear lab power supply and many switch-mode-psu, so the current demand should not be the problem, at least not when it comes to a fast demand by the switched mode supply :)


Everything works when:


- I plug in the keyboard a second after the maximite booted up
- I replug the keyboard after the maximite booted up
- I use a different keyboard which draws only 50mA
- I use some kind of Y-adaptor improvisation to "power up" the keyboard before
 connecting it to the maximite and then boot up the maximite

Results are:

- my keyboards all work (even with 100mA and above)
- the keyboard with only 50mA draw works every time perfectly

So there is no faulty powersupply / cable / connector
and no problem with the mc2221 chip at all, because all accours even without this chip in its socket.

Again: no power supply (even not my 5A lab power supply) can solve the problem - there is no significant voltage / current drop either. So it is not the power supply.

My conclousion is:

either using my cheap 50mA keyboard, or plugging the keyboard every time after the maximite bootup.

A elegant way to solve this (maybe rare) problem would be via the firmware, by checking a little bit later for a keyboard.

Greetings
Daniel
Edited 2020-07-10 02:11 by Amnesie
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 04:10pm 09 Jul 2020
Copy link to clipboard 
Print this post

Don't understand why you are having the problem and not many others. Please try the attached hack version 0.5 second wait after reset before USB initialisation
CMM2V1.5.zip
.
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 384
Posted: 04:41pm 09 Jul 2020
Copy link to clipboard 
Print this post

Thank you,

I tried this version, but now everything is worse. Now even my cheap keyboard (that worked all the time, see my post above ^) doesn't work anymore. Only by pressing the reset button on the Waveshare board. Even if I re-plug the keyboard it doesn't recognize it anymore.

So I downloaded the version I had installed before (5.05.03) and now it works again (with the above mentioned problems). But all this behavior is not random, as I stated.
Because with the older firmware it acts as I wrote above, with your modification / the new firmware, the keyboard isn't recognized until I press the reset button right on the waveshare module.

The fact that I tried different cables, powersupplys and even meassured voltage and current drop leads me to the assumption that something is wrong with my Waveshare board. All this makes no sense, but the fact, that all this is perfectly reproducible and not random behavior (like missspelled characters or every time different acting), shows that something is very wrong and strange.

I am ordering a new waveshare module, mine is the old version with the "Y" which has 400 Mhz.

???

Greetings
Daniel
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 04:46pm 09 Jul 2020
Copy link to clipboard 
Print this post

One last try. Increase the capacitor under the battery to something bigger - say 470uF
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 384
Posted: 05:47pm 09 Jul 2020
Copy link to clipboard 
Print this post

Frist of all,

I am really thankful for taking the time for helping me,

I think it is way easier to watch the new video I made with the new firmware and your suggestion for the higher capacitor.

https://www.youtube.com/watch?v=-LpmYrlK7m8

in short:

everything is still the same, but in the video I show you my setup etc.

I said in the video "as you can see there is no voltage drop" and refering on my power supply, I know it does possibly not read that fast, to show me the drop! I meassured it before with my digital multimeter, the refresh-rate is much better!

Not on the video: I tried a 470uF capacitor, too. Went up to 1000uF low ESR type.


Greetings
Daniel
Edited 2020-07-10 03:48 by Amnesie
 
Poppy

Guru

Joined: 25/07/2019
Location: Germany
Posts: 486
Posted: 06:48pm 09 Jul 2020
Copy link to clipboard 
Print this post

  Amnesie said  
The fact that I tried different cables, powersupplys and even meassured voltage and current drop leads me to the assumption that something is wrong with my Waveshare board. All this makes no sense, but the fact, that all this is perfectly reproducible and not random behavior (like missspelled characters or every time different acting), shows that something is very wrong and strange.

I am ordering a new waveshare module, mine is the old version with the "Y" which has 400 Mhz.



I think it will be easier to return it properly cleaned depending on its distance selling ("Fernabsatz-Widerruf"), if still possible, than on legal warranty, for not being easy to really prove any defect in this issue.
But actually I would keep it for testing out again later, after having a new and successfully working setup

Where will you order the matching board?

The only way I found for Germany yet is directly at the Waveshare-Shop:
https://www.waveshare.com/coreh743i.htm

just as Geoff suggests on his site!

If so read the shipping details first and don´t forget the import turnover tax for the final amount and time and effort to pay, for the complete costs including shipping.

https://www.waveshare.com/shipping


Andre ... such a GURU?
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 384
Posted: 08:55pm 09 Jul 2020
Copy link to clipboard 
Print this post

Here some actual data:

Setup:

maximite with two thick 1mm˛ wire directly soldered cable to my bench top power supply, in series my multimeter acting as amperemeter

flipping the maximite pwr-switch: 5,2V @ 20mA going to 176,30mA idle @ 145,50mA
and this is with the keyboard attached! No dramatic peak in current consumption at all.

(the power consumption is pretty much a joke, compared to my tube amp builts... I play the guitar, too :) )

Then I tested the power consumption of only the keyboards: the declared "100mA"
keyboard draws in reality ~ max. 53mA @ idle...

Meanwhile I testet another firmware version (V5.05.04b4a). The same problems.
I am oficially giving up on this board and waiting for a new waveshare module, hoping for the newer "v" version...

It is indeed some kind of interesting that the firmware V5.05.03 works without any problems with my cheap black keyboard (see my videos), but swichting to newer firmware
for example the "V5.05.04b" , even this keyboard refuses to work right at the beginning! (works after re-plugging it). All this, again, is perfectly the same - every time. So the module MUST somehow interact with the changes made in the firmware. Don't get me wrong, I think the firmware is ok, but my module is kind of.... strange or defective. And yes, every time I checked the "verify" box on the firmware upload.

Greetings
Daniel
Edited 2020-07-10 07:07 by Amnesie
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 10:03pm 09 Jul 2020
Copy link to clipboard 
Print this post

hi daniel,
   one more thing you might like to try:

connect a 22uF capacitor between the RESET line on the waveshare module and ground, and a 10k pullup resistor from RESET to 3v3. these points are all available on the 20-pin JTAG connector - RESET is pin 15, 3v3 on pins 1 and 2, ground on even numbered pins 4 to 20.

this will delay the startup of the H7 processor by approximately 200mS.


also, have you tried using different USB cables to provide power to the CMM2?


cheers,
rob   :-)
 
Koryo
Newbie

Joined: 05/07/2020
Location: United States
Posts: 6
Posted: 10:11pm 09 Jul 2020
Copy link to clipboard 
Print this post

All my keyboards are backlit. To lower power draw, turning off the Back lights did not work. Nor did plugging it in post boot.
 
     Page 2 of 4    
Print this page
© JAQ Software 2024