-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SMP does not power off when the calculator is off #15
Comments
I confirm that the supply voltage is present on the SMP connector even when the calculator is turned off.
No, not directly, but through a voltage regulator.
I'm afraid it's not possible.
Yes, the microprocessor should be put in sleep mode after a few seconds of bus inactivity, and waken up by a CLOCK signal. Measurement results supplied by fellow @spark-sys: MK-90 turned off: MK-90 turned on: |
Too bad, that leaves us no capacity to make a WiFi version, at least for now. |
There's no guarantee that every MK-90 can supply 15mA. My earlier project of this kind failed, because it worked only with some of them. I guess that it drew too much current. Perhaps your device could be powered from the pin 39 of the rear expansion port? It's directly connected to the positive battery terminal. It's an ugly solution, I know... |
Is the Vbat terminal on the SMP port powered by the MK, btw? |
Also I noticed that arduino-based SMPEmu won't work if it's plugged in while the calculator is off. I suppose this is related to the fact that standby voltage on the Vcc line of the SMP slot is 3.5V, which might be below the default BODLEVEL fuse setting by Arduino IDE. I will also try removing the extra LEDs from the arduino to reduce current consumption. However looking at microSD datasheets, most of them use roughly up to 50mA when writing, so it might cause a reboot of the calculator. Seems like there is a need to somehow hardwire the emulator cartridge into the power circuits of the calculator or the battery slot... |
After removing the power LED, I was able to implement the power saving mechanism in 5c17558 However some issues arised.
@piotr433 If you could please test in regard of point № 3 and measure the new current consumption of the module, that would be very helpful :-) |
Unfortunately, this test cannot be performed on my present ATMEGA8 board. I have just ordered an ATMEGA328 board and hope to get it within a few days. |
Thoughts without testing - the problem is surely caused by the long startup time of the crystal oscillator (milliseconds range) and the SUT configurations bits setting. Proposed solutions:
|
@piotr433 Will anything bad happen if we feed stabilized +5v into the SMP port? Because that way we could add a stabilizer and a lipo battery and turn the flash cartridge into a memory+battery pack, for even further ease of use of the calculator :-) |
Feeding +5v into the SMP port wouldn't hurt the calculator, but wouldn't power it, either. In order to be sure I have tried this on my MK-90. |
OK, so maybe we could have a supercapacitor or a small battery inside our SMP to keep up with the current spikes of up to 30-50mA that an SD card can do? |
It's a good observation that the increased current demand will last only for short periods of time. I like your idea! |
Do you know the proper calculation formula though? I hardly remember anything apart from the ohm's law and some RLC filters :-( |
What do you want to calculate? The capacitor value? |
10uF is easy, these days we can get even more, can we go up to 1s then? |
mF means millifarad = 1000 microfarad |
oh, I'm not sure if small 10mF caps exist (I mean, I have some, but they are about the size of a vodka shot glass :D) yeah but those 3.3s will be after plugging in the SMP, not when turning on the calculator. It however is interesting if the high inrush current of the empty cap charging might burn the power circuitry of the calculator... |
Oh, it seems they indeed do exist! https://www.digikey.com/product-detail/en/rubycon/16PX10000MEFC16X31.5/1189-1125-ND/3134083 The huge ones I have are for 60V, that's why they are so big it seems. Probably 16V is a safe margin, as I doubt 6V or 10V ones exist, or if they do, that they are much smaller |
Yes, I have a few high efficiency switch mode 5-to-3.3v regulators, as well as some SD card slots with built in level converter ICs.
Wouldn't the resistor create problems at the time the current needs to be released (e.g. During a card write)?
// Ak.R.
iOS/Mac/Windows & Web developer
Vaporwave/ambient producer, sound/video engineer
Genjitsu Gadget Lab Member 001
http://genjit.su
…Sent from my iPhone
On 19 May 2018, at 01:07, Piotr Piatek ***@***.***> wrote:
The SMP port seems to be short-proof, but from my experience, when it is directly loaded with a capacitor > 100 uF, the calculator wouldn't turn on. A series current limiting resistor (470 ohm) would be needed.
BTW, if a capacitor is charged from a constant voltage source through a resistor, following formula applies:
The supply voltage required by an SD card is 3.3V, right? A voltage regulator would be needed between the capacitor an the card.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
It would limit the SD card average current, i.e. the duty cycle (how intensively the SD card can be accessed). Some current limiter is necessary, though, otherwise the MK-90 won't turn on. Perhaps a JFET BF245C with the gate connected to source? BTW, ensure that the capacitor is discharged before connecting it to the calculator. |
Could you please provide a schematic of what you mean? |
Good point! Just need to see how well it works with current bursts of 50mA now. Probably that will only happen after I finish my graduation paper though :(
// Ak.R.
iOS/Mac/Windows & Web developer
Vaporwave/ambient producer, sound/video engineer
Genjitsu Gadget Lab Member 001
http://genjit.su
…Sent from my iPhone
On 20 May 2018, at 00:39, Piotr Piatek ***@***.***> wrote:
The advantage of a JFET over a resistor is its nonlinearity. At low drain-source voltage it acts as a resistor of 120 ohm, otherwise like a current source of 16 mA (values measured on my specimen). The capacitor is loaded faster than through an ordinary series resistor of 5V / 16 mA = 312 ohm.
The circuit was tested on my MK-90.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I had to modify the AVR program because of following issues:
Measured current consumption:
|
I guess 2mA is enough, because the convenience of arduino bootloader is just too damn good, and 8MHz is likely too slow to read the SD card and output data at the same time.
Thanks for your help! :-)
// Ak.R.
iOS/Mac/Windows & Web developer
Vaporwave/ambient producer, sound/video engineer
Genjitsu Gadget Lab Member 001
http://genjit.su
…Sent from my iPhone
On 30 May 2018, at 23:35, Piotr Piatek ***@***.***> wrote:
I had to modify the AVR program because of following issues:
The subroutine recvCommand() cannot handle a SELECT pulse without CLOCK pulses (which appears on the SMP bus when a key is pressed or a beep emitted). It stays then in the WAIT_CLOCK_FALL loop consuming power. A crude fix was applied to the do_get_byte() routine.
The sleep / wake up code is overly complicated.
Measured current consumption:
No power saving (subroutine sleep_mode() commented out) - 10mA
SLEEP_MODE_ADC - 2mA
SLEEP_MODE_PWR_DOWN - less than 0.1mA (cannot measure more accurately), works only with an internal RC oscillator 8MHz with minimal startup time (HFuse=0xD9, LFuse=0xC2). This fuse modification disables the Arduino bootloader!
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
When the calculator is off, the module still remains powered on the VCC line.
Probably the Vcc line is just connected directly to the computer's battery input.
Proposed solutions:
@piotr433 Can you please chime in on how the Vcc line of the SMP socket is wired?
Thanks!
The text was updated successfully, but these errors were encountered: