M1S UPS abused for other purposes

Post Reply
User avatar
mad_ady
Posts: 12061
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 663 times
Been thanked: 1309 times
Contact:

M1S UPS abused for other purposes

Post by mad_ady »

I've played a bit with the M1S UPS board and a couple of battery cells I had (unprotected, sadly). It works just fine and it's able to keep the M1S alive for at least 10 minutes, even with my dead batteries (extracted from a dead USB power bank).

But the truth is - I'm not planning on using this UPS for the M1S. The M1S shall live as a smart dashboard/photo viewer in the kitchen. If power fails, the NAS and networking gear will be dead too, so the M1S would be isolated... No need for it to be alive. I could abuse the UPS to power a Nexus 7 tablet instead of its dead battery, but... meh...

Looking over the schematics, I found it uses CH552, which is a minimal MCU, with USB support that could be programmed via Arduino.
Now, I admit, I don't have experience with Arduino, and limited C knowhow (enough to make things worse), but the fact that it can behave like a programmable USB device, makes things interesting. Ideally, it could become a low-spec "Rubber Ducky", and behave like a keyboard and mouse and inject some payloads into target systems. Agreed, I'd need to make a propper USB cable for it, but that's doable. I don't know yet if it can be powered over the USB connection - that would be swell...

Well, what is this desire to use a fake USB device? The simplest answer - to create a mouse jiggler, or to inject a periodic ALT+TAB to keep the screen alive and make you look busy when you're not around. Currently, I'm wasting a whole C4 for this task, and it could be more useful for other things.

I can see that there are libraries and examples that do just that: https://github.com/DeqingSun/ch55xduino ... yboard.ino, so most likely I'll try it out, after I have a look at the schematic and see how to address leds and stuff.

Quick question - is the original code for the MCU planned to be released open source? It would be helpful to recreate the build enviornment and see how the ports are addressed. Another important thing is - if I "brick" the MCU with my poor code - can I recover it (force flash the original rom)? Also, it might be useful to add functionality on top of it...

Well, that's my plan. I have no firm timeframe to implement it, but I thought I'd write it down :)

User avatar
odroid
Site Admin
Posts: 42535
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3733 times
Been thanked: 2102 times
Contact:

Re: M1S UPS abused for other purposes

Post by odroid »

Our UPS firmware source code(ups_fw.zip) was publicly released when the M1S and UPS boards were announced a couple of weeks ago.
https://wiki.odroid.com/accessory/power ... d_download

But I seriously recommend you buying very cheap CH552 dev-boards something like this for your projects.
https://vi.aliexpress.com/item/1005004141926425.html

User avatar
mad_ady
Posts: 12061
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 663 times
Been thanked: 1309 times
Contact:

Re: M1S UPS abused for other purposes

Post by mad_ady »

Thanks for the suggestions! I had looked over the wiki page, but hadn't reached the end :lol:
We'll see how it goes!

User avatar
mctom
Posts: 4211
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polski
ODROIDs: XU4, M1, H3+, SP3, N2L, M1S, N2
Location: Gdańsk, Poland
Has thanked: 621 times
Been thanked: 850 times
Contact:

Re: M1S UPS abused for other purposes

Post by mctom »

Yeah, save your UPS board for some other project. Maybe the next Odroid will have the same 14-pin header? That would be awesome.

EDIT: And I'm sorry I can't recommend you any Arduino friendly devboard because it's too high level stuff for me. :D
Punk ain't no religious cult, punk means thinking for yourself!
OpenUPS
PiStackMon

Post Reply

Return to “UPS”

Who is online

Users browsing this forum: No registered users and 1 guest