USB-RTC

https://github.com/mist-devel/mist-board/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team

slingshot
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2476
Joined: Mon Aug 06, 2018 3:05 pm

USB-RTC

Post by slingshot »

As some of you might already notice, the firmware got more generic support for @MasterOfGizmo's USB-RTC gadget. Currently the Minimig-AGA, both ST cores and Archie can take advantage of this device. I've built a version of the clock, and works well.
Here's the prototype on a breadboard (the Arduino was used to program the MCU):
usb-rtc-proto.jpg
The final device (with a missing electrolyte capacitor - I forgot to buy):
usb-rtc-final.jpg
I still have 9 empty PCBs:
usb-rtc-pcb.jpg
I plan to sell them fully built. I would ask 15 EUR for the parts and assembly, I'm not sure about the postage + payments cost. I assume it'll be another 10-15 EURs (anybody know the PayPal fees?)
You do not have the required permissions to view the files attached to this post.
Gehstock
Captain Atari
Captain Atari
Posts: 471
Joined: Wed Dec 21, 2016 7:18 pm
Location: EastGermany

Re: USB-RTC

Post by Gehstock »

:cheers:
brunosilva
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 132
Joined: Mon Apr 09, 2018 10:58 pm

Re: USB-RTC

Post by brunosilva »

i want one fully built :)
Postage to portugal. if I pay thru paypal friends and family you dont have any fees
slingshot
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2476
Joined: Mon Aug 06, 2018 3:05 pm

Re: USB-RTC

Post by slingshot »

Good!
I'm waiting for a cheap ABS plastic box, the device should fit into it perfectly. If not, then there'll be a little job for the Dremel :)
User avatar
vebxenon
Atari God
Atari God
Posts: 1230
Joined: Fri Apr 24, 2015 12:10 pm

Re: USB-RTC

Post by vebxenon »

Great! :D :D
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board
8bitguy1
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 128
Joined: Sat Feb 23, 2013 3:54 am

Re: USB-RTC

Post by 8bitguy1 »

I'd love one if you'll ship it to Canada.
slingshot
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2476
Joined: Mon Aug 06, 2018 3:05 pm

Re: USB-RTC

Post by slingshot »

8bitguy1 wrote: Mon Aug 03, 2020 7:12 pm I'd love one if you'll ship it to Canada.
According to the post's webpage, sending to Canada or to Portugal are the same price (almost 10 EUR for a registered letter) - maybe the surprise will come when I'll try to send.
8bitguy1
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 128
Joined: Sat Feb 23, 2013 3:54 am

Re: USB-RTC

Post by 8bitguy1 »

PM Sent
slingshot
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2476
Joined: Mon Aug 06, 2018 3:05 pm

Re: USB-RTC

Post by slingshot »

I got the good box today. According the Murphy's law, the PCB just don't fit:
usb-rtc-murphy.jpg
However with some hand-crafting, it can be pushed it:
usb-rtc-dremel.jpg
I had to cut one of the Zeners, but luckily there's another GND point near, thus it can be moved around easily.

And the final boxed device:
usb-rtc-boxed-final.jpg
According to my calculation, the final price would be 18 EUR with the box. I'll include a battery, but not the USB A-B cable.
Postage is 10 EUR, I hope it's the maximum.

Please PM me if interested, I'll send my paypal link then.
I want to wait for 4 orders at least, partly because I want to buy all the parts together, and partly because queuing in the post office is not in my top favourite free-time activities.

And please remind: I'm not a professional hardware maker, maybe the device will blow up your MiST - but very unlikely - and cutting of the box might not look professional. Also I don't plan to manufacture more than these 9 units.
You do not have the required permissions to view the files attached to this post.
User avatar
jotego
Captain Atari
Captain Atari
Posts: 272
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: USB-RTC

Post by jotego »

This looks really nice. After you've built that small batch, are you considering releasing your schematics for hardware sellers to provide it?
--
Source code of all my cores here.
My Patreon page here.
slingshot
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2476
Joined: Mon Aug 06, 2018 3:05 pm

Re: USB-RTC

Post by slingshot »

jotego wrote: Fri Aug 07, 2020 3:48 pm This looks really nice. After you've built that small batch, are you considering releasing your schematics for hardware sellers to provide it?
Till already released the schematics:
https://github.com/harbaum/I2C-Tiny-USB
Connecting the DS1307 is straightforward, and the PCB layout is very simple, I think a professional hardware manufacturer can do a better job in an hour :) Maybe even with SMD parts (and smaller footprint at the end).

For an easy DIY work, the I2C-USB and a DS1307 board with a battery holder can be bought at several places, just you need to marry them.
NegSol
Captain Atari
Captain Atari
Posts: 393
Joined: Sat Dec 05, 2015 9:22 pm

Re: USB-RTC

Post by NegSol »

Thanks for sharing. I was looking into it and the ds1307 was the part I would want to avoid.

It should also work with a ds3231 generic I2C board, correct? Was there anything else one needs besides the I2C-Tiny-USB firmware on the device (I was looking into use a sparkfun)? Mist will do all the rest? Or would I need to adjust the Mist firmware to get the ds3231 working? :shrug:
kolla
Captain Atari
Captain Atari
Posts: 400
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: USB-RTC

Post by kolla »

A bit big and clunky for what it is, surely it must be possible to shrink into a smaller "stick"? :)
-- kolla
slingshot
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2476
Joined: Mon Aug 06, 2018 3:05 pm

Re: USB-RTC

Post by slingshot »

NegSol wrote: Sat Aug 08, 2020 6:50 am Thanks for sharing. I was looking into it and the ds1307 was the part I would want to avoid.

It should also work with a ds3231 generic I2C board, correct? Was there anything else one needs besides the I2C-Tiny-USB firmware on the device (I was looking into use a sparkfun)? Mist will do all the rest? Or would I need to adjust the Mist firmware to get the ds3231 working? :shrug:
I assume you have to modify the firmware to use it. It might be possible that the DS1307 is not the most precise RTC, but it's assumed to be used only at constant room temperature, and also we don't need atomic clock precision, right?
slingshot
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2476
Joined: Mon Aug 06, 2018 3:05 pm

Re: USB-RTC

Post by slingshot »

kolla wrote: Sat Aug 08, 2020 10:47 am A bit big and clunky for what it is, surely it must be possible to shrink into a smaller "stick"? :)
It's relative, you can put it next to the MiST on its edge, or put on the MiST, or just hide it somewhere. As the USB ports are very close to each other, a dongle-like approach might interfere with the port next to-above-belove where you plug it. The box size is 80x40x20mm, and as it's off-the-shelf, it's relatively cheap.
Last edited by slingshot on Sat Aug 08, 2020 11:13 am, edited 1 time in total.
NegSol
Captain Atari
Captain Atari
Posts: 393
Joined: Sat Dec 05, 2015 9:22 pm

Re: USB-RTC

Post by NegSol »

slingshot wrote: Sat Aug 08, 2020 11:03 am
I assume you have to modify the firmware to use it. It might be possible that the DS1307 is not the most precise RTC, but it's assumed to be used only at constant room temperature, and also we don't need atomic clock precision, right?
Yes - sure :)

I will try and get it running with the DS3231 - already ordered ;-) - Also I remember having build a word clock around the DS3231. Anyhow, it should be good as it can use the defaut ds1306 libs available for arduinos. I will give it a shot and will report back - cheers :mrgreen:
slingshot
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2476
Joined: Mon Aug 06, 2018 3:05 pm

Re: USB-RTC

Post by slingshot »

NegSol wrote: Sat Aug 08, 2020 11:12 am
I will try and get it running with the DS3231 - already ordered ;-) - Also I remember having build a word clock around the DS3231. Anyhow, it should be good as it can use the defaut ds1306 libs available for arduinos. I will give it a shot and will report back - cheers :mrgreen:
I would also consider the MCP7940M, it might be not more precise, but dirt cheap compared to the DS1307 (the DIP8 version is surprisingly expensive). However it surely requires firmware mods, the protocol has minor differences. I don't know if auto-detection of the clock chip is possible, then it would be possible to support more than one type of RTC.
slingshot
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2476
Joined: Mon Aug 06, 2018 3:05 pm

Re: USB-RTC

Post by slingshot »

I've sent the first ones yesterday, hopefully they'll arrive early next week.
It turned out that the parcel weight (for a single piece) is just below the 50g limit, thus the postage is cheaper a bit (I've contacted the buyers about that).
I have still some remaining: the price is 18 EUR with the ABS box + 6,5 EUR for postage = 24,5 EUR total for a single item.
slingshot
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2476
Joined: Mon Aug 06, 2018 3:05 pm

Re: USB-RTC

Post by slingshot »

DanyPPC
Atari God
Atari God
Posts: 1166
Joined: Tue Feb 21, 2017 7:02 am

Re: USB-RTC

Post by DanyPPC »

:cheers:
User avatar
vebxenon
Atari God
Atari God
Posts: 1230
Joined: Fri Apr 24, 2015 12:10 pm

Re: USB-RTC

Post by vebxenon »

slingshot wrote: Fri Aug 21, 2020 3:19 pm One more core with RTC support:
https://github.com/mist-devel/mist-bina ... 200821.rbf
:cheers: :cheers: :cheers:
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board
NegSol
Captain Atari
Captain Atari
Posts: 393
Joined: Sat Dec 05, 2015 9:22 pm

Re: USB-RTC

Post by NegSol »

I am giving up my attempt to build a USB-RTC based on the DigiSPARK (https://github.com/harbaum/I2C-Tiny-USB ... /digispark)

I tried to connect a DS3231 RTC module to no avail. Also connecting a DS1307 did not work.

Strangely enough I get time info on a RaspberrryPi from the DS3231 RTC module using the i2cget command connected via DigiSpark turned I2C-Tiny-USB. But connected to the MiST nothing. I used the pre-complied Hex file (main.hex https://github.com/harbaum/I2C-Tiny-USB ... k/main.hex) for flashing the DigiSpark.

Not sure what to do about it so I quit it now. Maybe the lesson is that the Digispark road does not work for adding RTC to MiST (at least not for me). :(
slingshot
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2476
Joined: Mon Aug 06, 2018 3:05 pm

Re: USB-RTC

Post by slingshot »

NegSol wrote: Fri Aug 28, 2020 8:31 pm I am giving up my attempt to build a USB-RTC based on the DigiSPARK (https://github.com/harbaum/I2C-Tiny-USB ... /digispark)

I tried to connect a DS3231 RTC module to no avail. Also connecting a DS1307 did not work.

Strangely enough I get time info on a RaspberrryPi from the DS3231 RTC module using the i2cget command connected via DigiSpark turned I2C-Tiny-USB. But connected to the MiST nothing. I used the pre-complied Hex file (main.hex https://github.com/harbaum/I2C-Tiny-USB ... k/main.hex) for flashing the DigiSpark.

Not sure what to do about it so I quit it now. Maybe the lesson is that the Digispark road does not work for adding RTC to MiST (at least not for me). :(
Could you read/write the RTC via the /dev/rtcX device and hwclock?
On the MiST, you can get some debug info from the ARM UART port.
NegSol
Captain Atari
Captain Atari
Posts: 393
Joined: Sat Dec 05, 2015 9:22 pm

Re: USB-RTC

Post by NegSol »

The MiST I was using lost its debug port a long time ago :lol:

I have 2nd own stored away that is still intact. Maybe worth a try. Never used the UART port on the MiST before. Is it the same like with MiSTer? I did use it there a few years back. Any command you would recommend or simply „cat“ info of dev? Does it even have cat? Or will it simply dump out some info during boot?
NegSol
Captain Atari
Captain Atari
Posts: 393
Joined: Sat Dec 05, 2015 9:22 pm

Re: USB-RTC

Post by NegSol »

Ok - everyday you learn - I connected the micro usb of my other MiST to a Windows Desktop. I expected to see a com port. But I only got a "MiST-Board" device. Apparently the micro usb on the MiST cannot be used for serial. So one would have to solder to the SD cards TTL pins. I guess that closes the troubleshooting for me :lol: :lol: :)

Anyway @slingshot - if you have another on of your pre-build RTCs left I would be interested now ;-)
Post Reply

Return to “MiST”