Universal Model M Controller
- phosphorglow
- Location: Indianapolis - USA
- Main keyboard: IBM Model M
- Main mouse: Kensington Expert Mouse
- Favorite switch: Buckling Spring!
- DT Pro Member: -
- Contact:
Okie doke. Well, in the mean time, here's what we've got:
View of USB-B connector and reset button. The reset button will have a smaller actuator and be more recessed than this. I'll have a slot in the "cover" to poke it with a paper clip.
View from the inside looking out. Notice the voltage regulator pads.
Also note the row of through holes on the upper left, that's the USB header tap, which comes in handy for your own cable/panel and for the next picture...
Take form of... MICRO USB!
(Well, visualize it. I don't have one on hand yet.)
I'll be updating the pads to accommodate through hole mounting legs, once I find the perfect connector. I keep going back to the Hirose ZX62D-B-5PA8.
Here's where things get a little fun. Ignore the highlighted holes. They don't exist. The rest do.
So, the idea is, USB input riding the rails to the controller. Unless you're using a Lipo for bluetooth, in which case you cut the traces. Then you have the USB input cabled to the Lipo, and then coming back in on the left side, which then goes back to the controller.
On the bottom of that board will be a SMT pushbutton (found one that sits in at 1.7mm) for bluetooth pairing. The previous reset button will be replaced with the same size button in the spot that the USB-B connector took up on the controller.
And lastly, for now, this.
The EE's can stop cringing at my previous use of 90 degree traces. Got those taken care of.
Mounting holes for 122 key M's, as well as a square cut out for the M's with the smaller controller. So far it happily fits everything I've tried it on, one way or another.
These pictures are maybe an hour or two old? There have been small revisions since then, but even those are bound to be tweaked, so you get the idea.
Oh yeah... Ideas! Throw some at me! Suggestions, tweaks, insight, or something you want implemented.
View of USB-B connector and reset button. The reset button will have a smaller actuator and be more recessed than this. I'll have a slot in the "cover" to poke it with a paper clip.
View from the inside looking out. Notice the voltage regulator pads.
Also note the row of through holes on the upper left, that's the USB header tap, which comes in handy for your own cable/panel and for the next picture...
Take form of... MICRO USB!
(Well, visualize it. I don't have one on hand yet.)
I'll be updating the pads to accommodate through hole mounting legs, once I find the perfect connector. I keep going back to the Hirose ZX62D-B-5PA8.
Here's where things get a little fun. Ignore the highlighted holes. They don't exist. The rest do.
So, the idea is, USB input riding the rails to the controller. Unless you're using a Lipo for bluetooth, in which case you cut the traces. Then you have the USB input cabled to the Lipo, and then coming back in on the left side, which then goes back to the controller.
On the bottom of that board will be a SMT pushbutton (found one that sits in at 1.7mm) for bluetooth pairing. The previous reset button will be replaced with the same size button in the spot that the USB-B connector took up on the controller.
And lastly, for now, this.
The EE's can stop cringing at my previous use of 90 degree traces. Got those taken care of.
Mounting holes for 122 key M's, as well as a square cut out for the M's with the smaller controller. So far it happily fits everything I've tried it on, one way or another.
These pictures are maybe an hour or two old? There have been small revisions since then, but even those are bound to be tweaked, so you get the idea.
Oh yeah... Ideas! Throw some at me! Suggestions, tweaks, insight, or something you want implemented.
-
- Location: UK
- Main keyboard: Filco ZERO green alps, Model F 122 Terminal
- Main mouse: Ducky Secret / Roller Mouse Pro 1
- Favorite switch: MX Mount Topre / Model F Buckling
- DT Pro Member: 0167
I am so looking forward to this . With my franken silver label on the way ( is it AT, XT is it terminal NOBODY KNOWS! ) i am thinking i will be in the market for a replacement controller .
- Halvar
- Location: Baden, DE
- Main keyboard: IBM Model M SSK / Filco MT 2
- Favorite switch: Beam & buckling spring, Monterey, MX Brown
- DT Pro Member: 0051
Yes! Looking forward to this.
http://www.conrad.de/ce/de/product/1836 ... stend-1-St
The switch is functionally used to both switch between Bluetooth and USB and turn the battery power on or off.
Switch on: run on battery in bluetooth mode. If USB is connected it only loads the battery.
Switch off: run on USB if it's connected. Also loads the battery if needed. If USB is not connected this is a more or less hard power-off, the controller gets no power.
One pole is in parallel to the switch on the Lipo Rider and switches the battery power supply on or off. The other pole of the switch is connected to an AVR pin so the AVR chip knows if it should be running on Bluetooth or USB. This second pole might be unneeded though, you could directly get the voltage on the switched side over a high ohm resistor.
If you're fine with running the keyboard on battery all the time, even when running on USB, the switch could be fully omitted and you could switch between Bluetooth and USB with a keyboard macro.
Unfortunately there's no connectors on the Lipo Rider for a parallel switch so I had to improvise badly. I'll have a look if there's a better alternative.
My hardware looks really lame in comparison to this of course!
I'm using this double-pole switch but there are probably better alternatives without LED:phosphorglow wrote: ↑Halvar - what needs to actually happen to switch between direct connection via usb and Bluetooth?
http://www.conrad.de/ce/de/product/1836 ... stend-1-St
The switch is functionally used to both switch between Bluetooth and USB and turn the battery power on or off.
Switch on: run on battery in bluetooth mode. If USB is connected it only loads the battery.
Switch off: run on USB if it's connected. Also loads the battery if needed. If USB is not connected this is a more or less hard power-off, the controller gets no power.
One pole is in parallel to the switch on the Lipo Rider and switches the battery power supply on or off. The other pole of the switch is connected to an AVR pin so the AVR chip knows if it should be running on Bluetooth or USB. This second pole might be unneeded though, you could directly get the voltage on the switched side over a high ohm resistor.
If you're fine with running the keyboard on battery all the time, even when running on USB, the switch could be fully omitted and you could switch between Bluetooth and USB with a keyboard macro.
Unfortunately there's no connectors on the Lipo Rider for a parallel switch so I had to improvise badly. I'll have a look if there's a better alternative.
My hardware looks really lame in comparison to this of course!
- phosphorglow
- Location: Indianapolis - USA
- Main keyboard: IBM Model M
- Main mouse: Kensington Expert Mouse
- Favorite switch: Buckling Spring!
- DT Pro Member: -
- Contact:
Thanks for clarifying, Halvar! I think I got this pretty well rigged up for that scenario now.
Found a perfectly fitting slide switch to fit where the USB-B goes. 5mm tall, with a 5mm actuator that will sit just above the case and be just accessible enough. Just high enough to keep that little board from being too high and interfering with the USB cable. So far, looks like perfect clearance. That connector area looks like it has plenty of space until you start trying to cram stuff in there!
Also leaving extra through holes to stuff an LED or two on the mini board.
Anyhoo - pretend like you're connecting the bluetooth hardware, and let me know if anything seems weird or could be done differently.
Open for suggestions/modifications before I send this off to be made on Tuesday or Wednesday.
Before then I'll be tweaking some traces to pretty them up, extending the breadboard area to the right a little more, possibly adding traces to the correct pin locations for the EZ Key module (maybe? It looks like it will fit with clearance to spare, at least on a full sized M), and probably adding some pad connectors on the bottom that connect to the ribbon connectors in case something goes horribly wrong with this layout. Then a Teensy can get slapped in the breadboard area and save the day. Don't think that will be an issue since my prototype worked until I put it in a coma that I haven't woken it up from yet, but it's a nice reassurance when you're getting 50 boards...
Also, going for an ENIG finish for shelf life and solderability with leaded/lead free. I really like the idea of a green color PCB for the sake of tradition, but red looks awesome... So I don't know yet?
Found a perfectly fitting slide switch to fit where the USB-B goes. 5mm tall, with a 5mm actuator that will sit just above the case and be just accessible enough. Just high enough to keep that little board from being too high and interfering with the USB cable. So far, looks like perfect clearance. That connector area looks like it has plenty of space until you start trying to cram stuff in there!
Also leaving extra through holes to stuff an LED or two on the mini board.
Anyhoo - pretend like you're connecting the bluetooth hardware, and let me know if anything seems weird or could be done differently.
Open for suggestions/modifications before I send this off to be made on Tuesday or Wednesday.
Before then I'll be tweaking some traces to pretty them up, extending the breadboard area to the right a little more, possibly adding traces to the correct pin locations for the EZ Key module (maybe? It looks like it will fit with clearance to spare, at least on a full sized M), and probably adding some pad connectors on the bottom that connect to the ribbon connectors in case something goes horribly wrong with this layout. Then a Teensy can get slapped in the breadboard area and save the day. Don't think that will be an issue since my prototype worked until I put it in a coma that I haven't woken it up from yet, but it's a nice reassurance when you're getting 50 boards...
Also, going for an ENIG finish for shelf life and solderability with leaded/lead free. I really like the idea of a green color PCB for the sake of tradition, but red looks awesome... So I don't know yet?
Last edited by phosphorglow on 06 Mar 2015, 12:43, edited 1 time in total.
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
Beautiful. The power switch is smartly implemented. It suits being tucked away back there quite nicely, as you don't need to touch it if you don't want to. Leave that to the OCD brigade like me!
Bluetooth does also require a pairing trigger of some sort, though. I'm thinking a keyboard shortcut would be the nice, subtle approach. Though others have certainly found their own way…
https://learn.adafruit.com/convert-your ... d/overview
Pairing mode does benefit from some kind of indicator as well. That blue button there lights up, so serves both purposes. Wonder what we should use? I'd really rather not drill anything through the case! Perhaps a wee light round back with the switch? Or an LED module attached to the barrel frame, so you can see the light glowing around the base of the Escape key?
Bluetooth does also require a pairing trigger of some sort, though. I'm thinking a keyboard shortcut would be the nice, subtle approach. Though others have certainly found their own way…
https://learn.adafruit.com/convert-your ... d/overview
Pairing mode does benefit from some kind of indicator as well. That blue button there lights up, so serves both purposes. Wonder what we should use? I'd really rather not drill anything through the case! Perhaps a wee light round back with the switch? Or an LED module attached to the barrel frame, so you can see the light glowing around the base of the Escape key?
- phosphorglow
- Location: Indianapolis - USA
- Main keyboard: IBM Model M
- Main mouse: Kensington Expert Mouse
- Favorite switch: Buckling Spring!
- DT Pro Member: -
- Contact:
Thanks!
Is a key shortcut actually possible? That would be interesting! As of right now there's a pushbutton on the mini board. The plunger will be long enough to be pressed without interfering with the USB cable. I'll fiddle around with placing an LED on there. Avoiding any drilling is a major goal of this venture!
Is a key shortcut actually possible? That would be interesting! As of right now there's a pushbutton on the mini board. The plunger will be long enough to be pressed without interfering with the USB cable. I'll fiddle around with placing an LED on there. Avoiding any drilling is a major goal of this venture!
- phosphorglow
- Location: Indianapolis - USA
- Main keyboard: IBM Model M
- Main mouse: Kensington Expert Mouse
- Favorite switch: Buckling Spring!
- DT Pro Member: -
- Contact:
But since you brought up the topic, here's how I'm doing LEDs nowadays:
Surface mount LEDs and custom cut mylar holders. Fun stuff!
Surface mount LEDs and custom cut mylar holders. Fun stuff!
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
Slick. I want a few of those! What's their power draw like? One to indicate USB powered battery charging, as well as a blinker for Bluetooth pairing would be just the ticket.
Actually, if we can get layer locks in the controller, I'd want more indicators besides! But LEDs suck juice hard, so these indicators would be about brief flashes rather than solid steady lights.
As for the key combo Bluetooth pairing trigger idea: I don't see a reason why not. We're running the controller, and if the EZkey doesn't take a signal to trigger pairing, we could always hack up something of our own. That's why I like replacing the original controller so much! Not only do you get a lot of immediate power saving, but you can implement new features right from the driving seat. Even stuff like password locks.
The big feature I'd like to see is smart polling. That's the key to saving power: slowing down the matrix scan cycle when the board's idle for a few seconds. Progressively slower rates can lead all the way to full sleep, automatically, if desired.
Actually, if we can get layer locks in the controller, I'd want more indicators besides! But LEDs suck juice hard, so these indicators would be about brief flashes rather than solid steady lights.
As for the key combo Bluetooth pairing trigger idea: I don't see a reason why not. We're running the controller, and if the EZkey doesn't take a signal to trigger pairing, we could always hack up something of our own. That's why I like replacing the original controller so much! Not only do you get a lot of immediate power saving, but you can implement new features right from the driving seat. Even stuff like password locks.
The big feature I'd like to see is smart polling. That's the key to saving power: slowing down the matrix scan cycle when the board's idle for a few seconds. Progressively slower rates can lead all the way to full sleep, automatically, if desired.
- Halvar
- Location: Baden, DE
- Main keyboard: IBM Model M SSK / Filco MT 2
- Favorite switch: Beam & buckling spring, Monterey, MX Brown
- DT Pro Member: 0051
@phosphorglow: wow, that LED solution is neat!
Re pairing, the EZKey has an input pin that triggers pairing when drawn to 3V, so yes, the controller can do it.
There's also an output pin for the bluetooth LED. Annoyingly, this LED slowly blinks all the time when the keyboard is connected so it definitely can't be too bright:
.
Re pairing, the EZKey has an input pin that triggers pairing when drawn to 3V, so yes, the controller can do it.
There's also an output pin for the bluetooth LED. Annoyingly, this LED slowly blinks all the time when the keyboard is connected so it definitely can't be too bright:
.
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
Ingeniously bad! I'd definitely recommend against connecting anything to that. On all grounds: power, irritation, common sense…
The way Apple's Bluetooth keyboards use their single LED is about right. You never see it unless you just turned on the board (it glows solidly for a few seconds) or the board is in pairing mode (it blinks in a sharp pattern faster than any in the table, where it's off most of the time but still highly conspicuous) or when a host wakes it up (solid glow for a second or so). When you're actually using the keyboard, you never see it. Ideal!
Of course it helps that Apple can read the battery level from the host and display low power warnings on screen instead. We might need something to handle that. (My suggestion: a key combo which triggers a varying number of flashes from an indicator. Or maybe a flash of three LEDs in a row. Depends what we can measure.) Or just not bother and recommend attaching to USB whenever in doubt!
The way Apple's Bluetooth keyboards use their single LED is about right. You never see it unless you just turned on the board (it glows solidly for a few seconds) or the board is in pairing mode (it blinks in a sharp pattern faster than any in the table, where it's off most of the time but still highly conspicuous) or when a host wakes it up (solid glow for a second or so). When you're actually using the keyboard, you never see it. Ideal!
Of course it helps that Apple can read the battery level from the host and display low power warnings on screen instead. We might need something to handle that. (My suggestion: a key combo which triggers a varying number of flashes from an indicator. Or maybe a flash of three LEDs in a row. Depends what we can measure.) Or just not bother and recommend attaching to USB whenever in doubt!
- phosphorglow
- Location: Indianapolis - USA
- Main keyboard: IBM Model M
- Main mouse: Kensington Expert Mouse
- Favorite switch: Buckling Spring!
- DT Pro Member: -
- Contact:
Heeee! This gets more exciting every day! Neat!
Depending on the LED color and what resistor is paired up, I think it was in the 5-10ma range. I'll have to hook one up to my ammeter again to double check. I'll probably be modifying the mounting of the LED to face up but I'll need to create a small "wall" to block visibility at certain angles. At that point they should be able to run a bit dimmer and draw less current. It's on my fiddle list.
I'm glad the 1286 has so many extra pins - I'd love some layer lock LEDs in addition to the regular lock keys. Which hasu's firmware supports if I recall correctly. I wonder if he has the smart polling integrated? That would be super exciting.
Oooh, yeah... those blinkies are a bit much. Definitely be tucking that one nice and dim into the connector area.
I'm thinking a tiny little SMT in front of the reset button paired to like a 1.5-2k resistor. Plenty of room right there I think.
Depending on the LED color and what resistor is paired up, I think it was in the 5-10ma range. I'll have to hook one up to my ammeter again to double check. I'll probably be modifying the mounting of the LED to face up but I'll need to create a small "wall" to block visibility at certain angles. At that point they should be able to run a bit dimmer and draw less current. It's on my fiddle list.
I'm glad the 1286 has so many extra pins - I'd love some layer lock LEDs in addition to the regular lock keys. Which hasu's firmware supports if I recall correctly. I wonder if he has the smart polling integrated? That would be super exciting.
Oooh, yeah... those blinkies are a bit much. Definitely be tucking that one nice and dim into the connector area.
I'm thinking a tiny little SMT in front of the reset button paired to like a 1.5-2k resistor. Plenty of room right there I think.
- phosphorglow
- Location: Indianapolis - USA
- Main keyboard: IBM Model M
- Main mouse: Kensington Expert Mouse
- Favorite switch: Buckling Spring!
- DT Pro Member: -
- Contact:
Looks like the Lipo rider has a built in charge indicator, but that's beginning to open up a new can of worms for putting extra LEDs on the mini board. Unless creative placement will allow utilizing the speaker grill..?
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
There's two good places for LEDs, and you're already thinking of them:
Depends how cheaply you can implement something like that LED holder of yours! For occasional, flashing lights I think it's magnificent! And when on USB power, they're obviously good for general lighting duties too. As a Shift+Shift=Caps Lock user myself, my SSKs could use a lock light! Ditto for embedded numpad mode.
- Tucked around back in the SSL opening, next to the USB port and switch.
- Mounted to barrels, where they are visibly associated with certain keys.
Depends how cheaply you can implement something like that LED holder of yours! For occasional, flashing lights I think it's magnificent! And when on USB power, they're obviously good for general lighting duties too. As a Shift+Shift=Caps Lock user myself, my SSKs could use a lock light! Ditto for embedded numpad mode.
- phosphorglow
- Location: Indianapolis - USA
- Main keyboard: IBM Model M
- Main mouse: Kensington Expert Mouse
- Favorite switch: Buckling Spring!
- DT Pro Member: -
- Contact:
Ohhhhh yeeeeeahhh! Hadn't thought of using the barrel LEDs for the charge status, good call! I wonder if pulling the switch on the Lipo to ground via a key combo in firmware would work? Of course, that will require some fun tinkering attaching small wires to the Lipo.
As for implementing the holders, I can basically whip up whatever design/layout I can create and cut it out on my electric die cutter. ^_^
As for implementing the holders, I can basically whip up whatever design/layout I can create and cut it out on my electric die cutter. ^_^
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
How many "bars" of battery power are reported by the battery controller?
I'd got for momentary lights (blinks on request) over static (on for hours at a time) LEDs in any case when running off battery power.
Interestingly, the Apple keyboard I mentioned has a standard Caps Lock light (in the same location as on the MacBook lines) which glows green regardless of battery! I guess Apple took the approach of WHO CARES ABOUT THOSE GUYS. Caps Lock is more of a warning than a way of life…
I'd got for momentary lights (blinks on request) over static (on for hours at a time) LEDs in any case when running off battery power.
Interestingly, the Apple keyboard I mentioned has a standard Caps Lock light (in the same location as on the MacBook lines) which glows green regardless of battery! I guess Apple took the approach of WHO CARES ABOUT THOSE GUYS. Caps Lock is more of a warning than a way of life…
Sweet. With the kind of interest I expect a Bluetooth SSK kit to generate, and several lights per board, I think it'll see a lot of work!phosphorglow wrote: ↑As for implementing the holders, I can basically whip up whatever design/layout I can create and cut it out on my electric die cutter. ^_^
- Halvar
- Location: Baden, DE
- Main keyboard: IBM Model M SSK / Filco MT 2
- Favorite switch: Beam & buckling spring, Monterey, MX Brown
- DT Pro Member: 0051
I'm sensing battery voltage with one of the ADC input ports of the microcontroller, and my plan was to just use a LED to light up or blink when battery is low. There's still a lot to do in my software ...Muirium wrote: ↑How many "bars" of battery power are reported by the battery controller?
I'd got for momentary lights (blinks on request) over static (on for hours at a time) LEDs in any case when running off battery power.
I'm using the "standard" LiPo Rider, not the LiPo Rider Pro, so mine doesn't have any charge status LEDs.
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
So just a binary FULL / LOW then? Or can we do better without extra hardware?
Low warning is good. Hell of a lot better than sudden power loss. Each extra shade of grey improves matters asymptotically.
Low warning is good. Hell of a lot better than sudden power loss. Each extra shade of grey improves matters asymptotically.
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
Good is for others to decide. But here's one I like: flash LEDs along the function row (F1-4 or even F1-12 if you have that accuracy) when the user hits a certain combo. And crucially: do it whether connected to a host or not!
Robotic typing of strings is interesting but limited. (Just the sort of thing to shock the unexpecting!) I want one in honour of Jack Torrance of course.
Robotic typing of strings is interesting but limited. (Just the sort of thing to shock the unexpecting!) I want one in honour of Jack Torrance of course.
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
It looks nice!
I skimmed the board image and found some to think about. I'm not 100% sure about these, just hope it helps.
- J4 and J11 connectors are provided 5V from USB. This won't be safe when MCU runs at 3.3V. I think they also should be supplied MCU VCC voltage(3.3V).
- For Bluetooth option 'external power input' pin is needed to feed with battery? If you use EZkey it has regulated 3.3V output(100mA).
- VCC line(U6 regulator input) will be connected to USB 5V directly when it acts as a normal USB only controller or it'll be connected to 'external power input' when Bluetooth. You will need solder jumper for this.
EDIT: Added diagram.
I skimmed the board image and found some to think about. I'm not 100% sure about these, just hope it helps.
- J4 and J11 connectors are provided 5V from USB. This won't be safe when MCU runs at 3.3V. I think they also should be supplied MCU VCC voltage(3.3V).
- For Bluetooth option 'external power input' pin is needed to feed with battery? If you use EZkey it has regulated 3.3V output(100mA).
- VCC line(U6 regulator input) will be connected to USB 5V directly when it acts as a normal USB only controller or it'll be connected to 'external power input' when Bluetooth. You will need solder jumper for this.
EDIT: Added diagram.
phosphorglow wrote: ↑ Anyhoo - pretend like you're connecting the bluetooth hardware, and let me know if anything seems weird or could be done differently.
Open for suggestions/modifications before I send this off to be made on Tuesday or Wednesday.
- phosphorglow
- Location: Indianapolis - USA
- Main keyboard: IBM Model M
- Main mouse: Kensington Expert Mouse
- Favorite switch: Buckling Spring!
- DT Pro Member: -
- Contact:
Ok I think I see what you mean, but I'm still a little confused.
The Lipo rider regulates the voltage back up to 5V, so essentially we're still running off of "USB" voltage even on battery power.
So, that power input will be heading to the voltage regulator AND to UVCC (which is an internal voltage regulator on the 1286). From the voltage regulator, it's brought down to 3.3V and connecting to VCC, AVCC, and UCAP.
So, regardless of whether the controller will be connected to external USB or internal power, it should still be configured to run at 3.3V/8MHz in this application.
Am I overlooking something or do I understand this correctly?
Configuring for 3.3V/8MHz will lower the power consumption which is the goal for battery operation, and we still get the same 5V for LEDs.
The Lipo rider regulates the voltage back up to 5V, so essentially we're still running off of "USB" voltage even on battery power.
So, that power input will be heading to the voltage regulator AND to UVCC (which is an internal voltage regulator on the 1286). From the voltage regulator, it's brought down to 3.3V and connecting to VCC, AVCC, and UCAP.
So, regardless of whether the controller will be connected to external USB or internal power, it should still be configured to run at 3.3V/8MHz in this application.
Am I overlooking something or do I understand this correctly?
Configuring for 3.3V/8MHz will lower the power consumption which is the goal for battery operation, and we still get the same 5V for LEDs.
Last edited by phosphorglow on 09 Mar 2015, 19:00, edited 2 times in total.
- phosphorglow
- Location: Indianapolis - USA
- Main keyboard: IBM Model M
- Main mouse: Kensington Expert Mouse
- Favorite switch: Buckling Spring!
- DT Pro Member: -
- Contact:
Here's this from the datasheet.
Teensy schematic connects 3.3V to UCAP as well, but I think that's basically just for direct 3V battery power. According to the datasheet, I suppose I don't need to do the same thing, right?
Teensy schematic connects 3.3V to UCAP as well, but I think that's basically just for direct 3V battery power. According to the datasheet, I suppose I don't need to do the same thing, right?
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
I didn't know Lipo rider output is 5V. I think it works as you said but my concern is sitll there. When MCU core runs 3.3V it is not safe to handle higher 5V with IO pins. Pratically it may be no problem.
Another concern is,
VBUS is used for USB plug-in detection and it is not good idea to connect to battery, it should be connected to real USB 5V line. This is not indispensable but will be needed to support switching between Bluetooth and USB.
- J4 and J11 connectors are provided 5V from USB. This won't be safe when MCU runs at 3.3V. I think they also should be supplied MCU VCC voltage(3.3V).
Another concern is,
VBUS is used for USB plug-in detection and it is not good idea to connect to battery, it should be connected to real USB 5V line. This is not indispensable but will be needed to support switching between Bluetooth and USB.
- phosphorglow
- Location: Indianapolis - USA
- Main keyboard: IBM Model M
- Main mouse: Kensington Expert Mouse
- Favorite switch: Buckling Spring!
- DT Pro Member: -
- Contact:
No problem Havlar! Hope all is well! It'll probably be another couple of days anyhoo. Lots of other things keep popping up.
I see what you mean hasu. For some reason the idea that the IO pins pulling 5V to ground for the LEDs when set for 3.3V wouldn't be a big issue, but I agree - it doesn't sound safe at all. It might work, but who knows for how long.
So, I'm thinking the simplest solution would be to just cut the 5V trace that runs the remainder of the circuit and power it from the voltage regulator? It's rated for 500ma. How does that sound?
I see what you mean hasu. For some reason the idea that the IO pins pulling 5V to ground for the LEDs when set for 3.3V wouldn't be a big issue, but I agree - it doesn't sound safe at all. It might work, but who knows for how long.
So, I'm thinking the simplest solution would be to just cut the 5V trace that runs the remainder of the circuit and power it from the voltage regulator? It's rated for 500ma. How does that sound?
This I'm curious about since Halvar seems to have been able to do this:hasu wrote: ↑Another concern is,
VBUS is used for USB plug-in detection and it is not good idea to connect to battery, it should be connected to real USB 5V line. This is not indispensable but will be needed to support switching between Bluetooth and USB.
I'm guessing he's using one of the ADC pins?Halvar wrote: ↑One pole is in parallel to the switch on the Lipo Rider and switches the battery power supply on or off. The other pole of the switch is connected to an AVR pin so the AVR chip knows if it should be running on Bluetooth or USB. This second pole might be unneeded though, you could directly get the voltage on the switched side over a high ohm resistor.
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
Sounds good. Probably 3.3V is even enough to turn on old LEDs.phosphorglow wrote: ↑No problem Havlar! Hope all is well! It'll probably be another couple of days anyhoo. Lots of other things keep popping up.
I see what you mean hasu. For some reason the idea that the IO pins pulling 5V to ground for the LEDs when set for 3.3V wouldn't be a big issue, but I agree - it doesn't sound safe at all. It might work, but who knows for how long.
So, I'm thinking the simplest solution would be to just cut the 5V trace that runs the remainder of the circuit and power it from the voltage regulator? It's rated for 500ma. How does that sound?
As Halvar said, Bluetooth module can be controlled with the physical switch state IO pin.This I'm curious about since Halvar seems to have been able to do this:hasu wrote: ↑Another concern is,
VBUS is used for USB plug-in detection and it is not good idea to connect to battery, it should be connected to real USB 5V line. This is not indispensable but will be needed to support switching between Bluetooth and USB.
I'm guessing he's using one of the ADC pins?Halvar wrote: ↑One pole is in parallel to the switch on the Lipo Rider and switches the battery power supply on or off. The other pole of the switch is connected to an AVR pin so the AVR chip knows if it should be running on Bluetooth or USB. This second pole might be unneeded though, you could directly get the voltage on the switched side over a high ohm resistor.
VBUS is for doing funcy things in firmware, you can use Bluetooth without VBUS connection I described.
EDIT:
Technically VBUS is needed to USB interrupt VBUSTI which is useful for USB stack to manage power/connection cycle. But without that I think you can do, in fact ATMega32U2 has no VBUS pin.
- Halvar
- Location: Baden, DE
- Main keyboard: IBM Model M SSK / Filco MT 2
- Favorite switch: Beam & buckling spring, Monterey, MX Brown
- DT Pro Member: 0051
VBUS and UVCC are connected to the Lipo Rider's 5v USB output pin. I can't detect if USB is connected to the PC from these, because they're always on +5V whenever the controller is on. It wouldn't make sense to use this for detection of a connected PC anyway, because you could always also connect a USB charger or a PC in some power saving mode to the USB port. You could also want to use the keyboard for your tablet via BT while it's connected to the PC by USB for charging. That's why I went with the switch instead of some kind of autodetect.