-
E_Block_Reduced_Cost_R1 ---> 19.014 cm3
(Use "attached" stl file below for 3D printing)This is a new modified E Block design that reduces the cm3 volume from 48.11 cm3 to
19.014 cm3.
A 2.53 x reduction in volume should reduce the cost by a factor 253 %.
19.014 x $0.25 = $4.75 or 3.61 euro (1 US = 0.76 euro 3/9/14)Be sure to shop around for the best price for 3D printing. We found many vendors with ridiculous, exorbitant, high prices.
This is a "bare bones" design without the fancy "bells and whistles" of the E_Block_R1.
There is no optional top cover.
There is no external four mounting holes in the enclosure but it still contains the six internal countersunk mounting holes.To review this 3D E Block cradle design enclosure, for the Espruino, go to the TinkerCad.com
website and under "Gallery" search for "E_Block_Reduced_Cost_R1"
Again, if you need to modify this design ... "just do it"Enjoy / Cheers
-
-
3D picture of E Block R1 from TinkerCad 3D on-line program.
The Espruino now has mounting holes - plenty of them!
In fact, there are more holes, in this ABS 3D plastic enclosure, than in a slice of Swiss cheese!A 3D "open source" stylish, colored/coloured, ABS, "E_Block" Espruino enclosure with cover was designed with 10 mounting holes!
Espruino now has many more mounting options (11 versus zero) now include the following:
1 - 6 internal 4/40 (0.125" or 3.175 mm M3 x 1.5p) mounting holes. (countersunk holes)
2 - 4 external 4/40 (0.125" or 3.175 mm M3 x 1.5p) mounting holes.
3 - Foam/3M tape on the back of the enclosure.
4 - Hot glue on the enclosure back or sides.
5 - Velcro (industrial) tape on the back of the enclosure.
6 - Hot glue on the external mounting tabs/holes.
7 - Tie wrapping the enclosure.
8 - 4/40 1/16" nylon standoffs with adhesive foam backing for the mounting holes.
9 - 4/40 metal hex/round standoff(s) for the mounting holes.
10 - ABS plastic adhesive (Vendors: Loctite/JB Plastic Epoxy for ABS) on back of the enclosure for permanent mounting.
11 - 1/8" aluminum or plastic rivets can be applied to both the internal and external mounting holes. Be careful when riveting the soft ABS plastic and use backup washers.Note A: Need a larger hole size? - just carefully use a hand reamer on the ABS 3D plastic!)
Note B: You can use the enclosure as a "protective enclosure box" for the Espruino. Just machine/sand/grind off the external mounting tabs.
To obtain your own E Block for the Espruino, all you need to do is to use the "attached", F R E E industry standard "stl" files and take it down to any "mom and pop" 3D printing service and have it sliced or printed for a "fee". Before you do this, check the text below
to see if it will fit your needs.3D printing tips:
There are really only two main types of 3D plastic slicer/filament materials ABS or PLA. The petroleum base ABS (better for this application) than the environmentally safe, corn/sugar based, low temperature, better resolution, PLA filament. (Your choice)
(E Block and Lego blocks are also made out of ABS. Playing with the Espruino is the same as playing with Lego blocks!)
PLA has a lower melting temperature and if you leave your E Block in a hot vehicle it might warp!There are so many 3D filament colors to choose from - just pick any colour. You can even pick "fluorescent" to have your Espruino "glow in the dark". I prefer "black with my Espruino" or maybe fluorescent to match the color of my Espruino when smoking or burning-up. (bit of humour)
Infill density is what you don't see in a 3D print. It's what is behind the solid looking walls of the enclosure. 0 % is hollow and 100% is solid. In this design, 50% infill density was specified which is good. Having it higher would takes many more hours to print and waste filament resources. In this design, a 3 hour print would almost double to 6 hours if the infill was changed from 50% to 100% !
Never ever choose a hourly rate for 3D printing and just only pay for the volume. The unit of filament volume is always cm3. The going rate in US is @ $0.25/cm3 ($USD), which is 7 times the cost of 3D slicer filament and all vendors make money but they still have to defray their inital cost for their 3D initial investment which runs into several thousand US dollars. Now days, their same piece of 3D machinery, can be had below $500 ($USD) (examples: XYZ printing - DaVinci 1.0 $499 USD or Ez3D The Phoenix $399) Other 3D printers want $100 "setup fee" just to turn on their machine and they also charge by the hour and by volume! Be extremely careful and do not pay excessive fees just for a piece of printed ABS/PLA 3D plastic!
We like to be clear. The above two reference 3D printers are only for a price reference only
and not an endorsement. Both 3D printers have flaws and you need to do thorough research before buying any 3D printer!Files attached:
E_Block_R1.stl volume (cm3): 48.11 @ 0.25 ($USD) = $12.03 or 9.15 euro (1 US = 0.76 euro 3/9/14)
E_Block_Cover_R1a.stl (optional) volume (cm3): 9.84 @ 0.25 ($USD) = $ 2.463D printing/manufacturing stats (3D machine dependent):
E_Block_R1 enclosure: 41 grams/16.73 meters of 1.75 mm filament @ 180 min./ 3 hours runtime/printing time (3D machine dependent)
E_Block_Cover_R1a : 11 grams/04.39 meters of 1.75 mm filament @ 41 min.Summary:
To print out the E Block enclosure, specify the material ABS, your color or the color the vendor has on hand and the infill density of 50%. Hand the "stl" file(s) to your 3D printer and negotiate the fee. The already computed "enclosure" volumes in cm3 are above.The finished computed volume in cm3 is for a 100% infill density.
Since most 3D printing vendors put a default of 50% infill density to save time and material, which makes a "honecomb fill structure" between the surface walls, don't let them charge you full price for the "finished volume" when you are getting 50% less!3D E_Block Enclosure Design:
The E block enclosure was designed to fit the Espruino, have mounting holes, allow for "open front" power and Espruino programming. You have to take the optional lid/cover off for access to the two push buttons for firmware updates. The enclosure cover/lid was only made for the two 20 pin GPIO female headers (0.350" / 9.017 mm or less in height). The horizontal 10 pin GPIO header could not be incorporated, in this design, due to material cover/lid stress. Of course, you could ditch the cover and just only use the protected 3D enclosure. The female header(s) do not fully protrude through the cover due to clearance of the battery connector. This means you will need to attach your wiring harness through the cover first then attach the lid to the Espruino. Due to accuracy/resolutions of different 3D printers, there might be a tight fit of the Espruino in the enclosure channels. Take out your Dremel or miniature rotary tool and grind or sand the ABS for proper clearance. (Do not machine the hard FR4 fiberglass of the Espruino printed circuit board even though the PCB routing clearance could be the source of the problem!)
This 3D enclosure design incorporates an "open front" for easy access to the battery connector, micro USB connector and the SD/transflash drive. Having an "open front" also provides for easy viewing of the Espruino's three RGB status LEDs.
Note C: You might have to drill a hole in the E_Block enclosure and lid/cover tab for a very secure lid tie-down. Be sure your mounting hardware does not conflict with the Espruino. Also, just use any plastic epoxy (Loctite/JB Plastic Epoxy) and secure a nut on the enclosure lid tab for easy assembly. Also, you could use Velcro across the lid to hold it in place.
Note D: The Espruino hortizontal connector GPIO header has 10 pins but in this design only 2 GPIO can be accessed (I2C2 bus). Of course, leave the lid/cover off and there would be no problem. Do not used any Espruino female "stacking header" connectors with this enclosure!
Note E: When applying female headers to the Espruino, for the first time, make sure on the bottom side when soldering all solder joints are even in height for a level fit into the enclosure. You might have to trim or cut the excess leads.
Note F: The E Block enclosure was not designed for optional component additions to the Espruino but many of them will fit. Just keep the components below and in between the headers. You will need to make sure your optional components will not conflict with the enclosure.
If so, you could modify the enclosure to your own needs. (see below)Note G: The Espruino mounting in the enslosure, is a "friction/jam fit" and if need be apply a small dap of plastic hot glue to hold it down or just let it float.
For those hackers, like me, who like to "tinker" and need to modify this design, just go to the "Free" on-line TinkerCad.com and modify or create another design from my open source public design. Just use their extremely easy to use and learn 3D TinkerCad and import my "open source" E_Block_R1 / E_Block_Cover R1 files and tinker away with your heart's desires. Export your design file in the "STL" format and you are ready for another 3D printing. (Search in TinkerCad.com "Gallery" for E_Block_R1 and E_Block_Cover_R1a)
Whew ... a lot of work for a piece of 3D plastic with holes in it!
Disclaimer --> This project is "as is!" <--<<<
End of project ...
Enjoy / Cheers ...
-
-
-
You got it! - "spot-on"
New York "city" sales tax 8.875%BTW ...
What you need to do is sell in a low tax state like Colorado (average 2.90%) which
doesn't discourage buying your Espruino due to high sales tax like New York.
Guess who is in Colorado? - SparkFun.Better yet, directly sell through Tindie.com
-
sales tax is added afterwards in the US
In the US, unless PUR3 has a "brick and motar" location in the state(51 states) then you can charge the going sales tax. The sales tax varies between state to state. There is no sales tax charged to the individual buying an Espruino from the UK!
Adafruit, which is your US distributor, in New York state, can only charge sales tax only for New York residences NOT individuals in another state! Ordering an Espruino from Adafruit from another state no sales tax is applied. -
v70 bigram should have 3250 jsvars, not 2250. Which file did you
flash? I'll investigate.@DrAzzy - not to worry but "no offense" I could never make BigRam work consistently with my application. I used Gordon's v70 on Github for 2250 JSVARs.
I'm... shocked that the WebIDE relies on an online service to minify
the code - especially one that can decide to stop working because
you're using it too much. That's awful.Make that two.
-
-
-
Too bad, there isn't a "clean state" to save(); if someone ever created a simple SD/transflash bootloader for the Espruino. It would have been a very cool feature to automatically load the Espruino from SD and then execute after saving. (No PC required)
As for code protection/encryption, it is not really worth the effort.
-
-
OK, I agree the Espruino doesn't have JavaScript code protection without the user going to great lengths in writing specific code for encryption.
On the second part, of the user writing a "simple bootloader" to the Espruino for
auto-booting via transflash drive, is there anyone on this forum board ever attempted to write a simple bootloader for the Espruino? Any code examples are welcomed.function onInit() { exec(require('fs').readFile("boot.js")); }
BTW ... I hope I did not misunderstood that "boot.js" is actually the sd file user application code
and not the bootloader code? (The bootloader code is the code above?) -
If you want to load code from the SD card (I guess you want to do this
to allow quick upgrades?) it's as simple as writing a really simple
bootloader and saving that to Espruino:Would be nice if this feature was built into the Espruino and all a user would have to do is to insert the transflash with the unique user ID with source code and just ground or tie to
vcc a "pre-determined" GPIO pin. No PC required. -
We have several customers that are located in a remote location like "Timbukto" and would like to protect our user application source file.
Is there a easy way to put a hex code source file on the Espruino transflash drive and have it boot-up a new source code on a power-on reset?
If not, it would be very cool to have this feature on the Espruino.
-
When you say it hangs at boot - do you mean it's hanging when it's
reset to send the code? or when you've saved the code and then reset
the Espruino?OK, put it another way, when I upload to the Espruino, I first issue a reset() then "upload" my code to the Espruino. The progress bar shows after erasing the chip. Then, after the end of the progress bar completion (100%), sometimes, on the Espruino LEDs, it shows them cycling and other times it does not after which it "hangs" with no communications feedback to the Espruino.
addition ...
I always upload the code and when everything is ok, only then do I issue a save(). -
Throughout my code development, I have noticed some strange quirks when uploading new code to the Espruino.
Observation 1
If there was a "large" amount of code revisions, from the previous upload, after hitting the reset() and upload in the IDE, the computer does not display the progress bar until it thinks what it should be doing. In some cases, 5 to 10 seconds can elapse until the progress bar is displayed for the user.
For a novice, like me, this delay without the progress bar showing, I would constantly send a reset to the Espruino. The progress bar should be shown immediately after the reset.Observation 2
Patching and making "large" new user code (using BigRam v70) the Espruino hangs at boot time. The trick I used was to "piecemeal" and upload "small" sections of code with no "boot hangs" until all the code was done.Note: This is the same problem I had previous going from v69 to v70 BigRam. What I did was to re-write an algorithm and the problem seemed to disappear?
Below could be the culprit - could be wrong? ...
Just to add that if you flash these, Espruino will start remembering
the code that you saved between firmware updates. If I've changed the
way data is stored internally then it can cause Espruino to hang at
boot time.To fix it, just press reset, and hold down BTN1 for a few seconds
immediately after releasing reset (but not before or you'll enter
bootloader mode with the pulsing blue LED).Windows 8.1 64 Bit
Chrome 35.0.1916.153 m (no beta)
Espruino 1v70 BigRam 3250 JSVARS
Web-IDE v 46
Board: Espruino v 1.3BTW ... Fixed your spellguard so it doesn't flag Espruino as mis-spelled.
-
-
-
After uploading the code to the Espruino it "hangs/stop/halts" the communications and the > prompt does not return. The only way to "unhang" the Espruino is to do a dis-connect/reset the Espruino/reconnect.
I figure if my new code works with BigRam then everything should be OK since all my RTCs
are running in my application user code.So far, one person has reported getting an espruino with a chip that
doesn't work with bigram.That is truly amazing since ...
The Espruino Board was Crowdfunded in September 2013 - and we've
already shipped almost 4000 boards to over 2000 customers!1 out of 4000 Espruino boards and not counting the clones!
-
Code that fails BigRam excluding other user application coding.
This code is pretty straightforward.var lcd,rtc,rtc1,gps; var gps_flag = false; var mon_1 = " "; var date_1 = " "; var yr_1 = " "; var hr_1 = " "; var min_1 = " "; var sec_1 = " "; var date_time1 = " "; var mon_2 = " "; var date_2 = " "; var yr_2 = " "; var hr_2 = " "; var min_2 = " "; var sec_2 = " "; var date_time2 = " "; var SF2014x = new Date(2014,2,9,2,0,0); var SF2014 = SF2014x.getTime(); var FB2014x = new Date(2014,10,2,2,0,0); var FB2014 = FB2014x.getTime(); var SF2015x = new Date(2015,2,10,2,0,0); var SF2015 = SF2015x.getTime(); var FB2015x = new Date(2015,10,3,2,0,0); var FB2015 = FB2015x.getTime(); var SF2016x = new Date(2016,2,13,2,0,0); var SF2016 = SF2016x.getTime(); var FB2016x = new Date(2016,10,6,2,0,0); var FB2016 = FB2016x.getTime(); var SF2017x = new Date(2017,2,12,2,0,0); var SF2017 = SF2017x.getTime(); var FB2017x = new Date(2017,10,5,2,0,0); var FB2017 = FB2017x.getTime(); var SF2018x = new Date(2018,2,11,2,0,0); var SF2018 = SF2018x.getTime(); var FB2018x = new Date(2018,10,4,2,0,0); var FB2018 = FB2018x.getTime(); var SF2019x = new Date(2019,2,10,2,0,0); var SF2019 = SF2019x.getTime(); var FB2019x = new Date(2019,10,3,2,0,0); var FB2019 = FB2019x.getTime(); // var TZ = -1; var EDT_EST = false; var dstLockout = false; var DST = 0; var idx1 = false; var idx2 = false; var gps_fix = false; function onInit(){ I2C1.setup({scl:B8,sda:B9}); lcd = require("HD44780").connectI2C(I2C1); digitalWrite([LED1,LED2,LED3],4); setTimeout("digitalWrite([LED1,LED2,LED3],2);", 1000); setTimeout("digitalWrite([LED1,LED2,LED3],1);", 2000); setTimeout("digitalWrite([LED1,LED2,LED3],0);", 3000); lcd.clear(); I2C2.setup({scl:B10, sda:B11}); rtc1 = require("DS3231R1").connect(I2C2); I2C1.setup({scl:B8, sda:B9}); rtc = require("DS3231R1").connect(I2C1); rtc.i2c.writeTo(0x68,0x0E,0x60); pinMode(C11,'input_pullup'); Serial4.setup(9600,{tx:C10,rx:C11}); gps = require("GPS").connect(Serial4, function(data) { gps_flag = true; }); lcd.setCursor(0,0); lcd.print("GPS No Button Clock"); pinMode(B3,'input_pullup'); } function RTC_INT_1Hz () { digitalPulse(LED3, 1, 25); date_time1 = rtc.readDateTime(); date_time2 = rtc1.readDateTime(); mon_1 = date_time1.charAt(0) + date_time1.charAt(1); date_1 = date_time1.charAt(3) + date_time1.charAt(4); yr_1 = date_time1.charAt(6) + date_time1.charAt(7); hr_1 = date_time1.charAt(9) + date_time1.charAt(10); min_1 = date_time1.charAt(12) + date_time1.charAt(13); sec_1 = date_time1.charAt(15) + date_time1.charAt(16); mon_2 = date_time2.charAt(0) + date_time2.charAt(1); date_2 = date_time2.charAt(3) + date_time2.charAt(4); yr_2 = date_time2.charAt(6) + date_time2.charAt(7); hr_2 = date_time2.charAt(9) + date_time2.charAt(10); min_2 = date_time2.charAt(12) + date_time2.charAt(13); sec_2 = date_time2.charAt(15) + date_time2.charAt(16); a = new Number(mon_1); if (a === 0) { } else { a = a-1; } b = new Number(date_1); c = new Number(yr_1); c = c + 2000; d = new Number(hr_1); e = new Number(min_1); f = new Number(sec_1); var utcDate = new Date(c,a,b,d,e,f,0); var utcDate_ms = utcDate.getTime(); a = new Number(mon_2); if (a === 0) { } else { a = a-1; } b = new Number(date_2); c = new Number(yr_2); c = c + 2000; d = new Number(hr_2); e = new Number(min_2); f = new Number(sec_2); var localDate = new Date(c,a,b,d,e,f,0); var localDate_ms = localDate.getTime(); EDT_EST = checkDST(localDate_ms); if (EDT_EST === true){ TZ = -4; } else { TZ = -5; } DST = processDST(localDate_ms); if ((DST === 1) && (dstLockout === false)) { digitalWrite(LED1,true); dstLockout = true; } if ((DST === -1) && (dstLockout === false)) { digitalWrite(LED1,true); dstLockout = true; } if (localDate.getHours() === 3) { dstLockout = false; digitalWrite(LED1,false); digitalWrite(LED2,false); } var TZdiff_ms = utcDate_ms-localDate_ms; var ms_diff = utcDate_ms + (TZ * 3600000) - localDate_ms; if ((utcDate.getHours() === 11) && (utcDate.getMinutes() === 59) && (utcDate.getSeconds() === 59)) { if ((ms_diff >= -5000 ) && (ms_diff <= 5000)){ rtc1.setTime(utcDate.getHours()+ TZ + 1,0); digitalWrite(LED2,true); } } lcd.setCursor(0,1); lcd.print(date_time1); lcd.print(" U"); idx1 = !idx1; if (idx1 === true){ lcd.print("*");} if (idx1 === false){ lcd.print(" ");} lcd.setCursor(0,2); lcd.print(date_time2); lcd.print(" L"); idx2 = !idx2; if (idx2 === true){ lcd.print("*");} if (idx2 === false){ lcd.print(" ");} lcd.setCursor(0,3); if (TZ === -4){ lcd.print("EDT Sum "); } else { lcd.print("EST Win "); } lcd.print("TZ"); lcd.print(new String(TZ)); lcd.print(" "); var dw = localDate.getDay(); if (dw === 0) {lcd.print("Sun");} if (dw === 1) {lcd.print("Mon");} if (dw === 2) {lcd.print("Tue");} if (dw === 3) {lcd.print("Wed");} if (dw === 4) {lcd.print("Thu");} if (dw === 5) {lcd.print("Fri");} if (dw === 6) {lcd.print("Sat");} lcd.print(" "); var month = localDate.getMonth(); if (month === 0) {lcd.print("Jan");} if (month === 1) {lcd.print("Feb");} if (month === 2) {lcd.print("Mar");} if (month === 3) {lcd.print("Apr");} if (month === 4) {lcd.print("May");} if (month === 5) {lcd.print("Jun");} if (month === 6) {lcd.print("Jul");} if (month === 7) {lcd.print("Aug");} if (month === 8) {lcd.print("Sep");} if (month === 9) {lcd.print("Oct");} if (month === 10) {lcd.print("Nov");} if (month === 11) {lcd.print("Dec");} if (gps_flag === true){ //print("got GPS"); gps_fix = !gps_fix; lcd.setCursor(19,0); if (gps_fix === true){ lcd.print("*");} if (gps_fix === false){ lcd.print(" ");} lcd.setCursor(0,1); gps_flag = false; } } function checkDST(current_ms){ if ((current_ms >= SF2014 ) && (current_ms <= FB2014)){ return true;} if ((current_ms >= SF2015 ) && (current_ms <= FB2015)){ return true;} if ((current_ms >= SF2016 ) && (current_ms <= FB2016)){ return true;} if ((current_ms >= SF2017 ) && (current_ms <= FB2017)){ return true;} if ((current_ms >= SF2018 ) && (current_ms <= FB2018)){ return true;} if ((current_ms >= SF2019 ) && (current_ms <= FB2019)){ return true;} return false; } function processDST(local_ms){ if (local_ms === SF2014 ) {return 1;} if (local_ms === FB2014 ) {return -1;} if (local_ms === SF2015 ) {return 1;} if (local_ms === FB2015 ) {return -1;} if (local_ms === SF2016 ) {return 1;} if (local_ms === FB2016 ) {return -1;} if (local_ms === SF2017 ) {return 1;} if (local_ms === FB2017 ) {return -1;} if (local_ms === SF2018 ) {return 1;} if (local_ms === FB2018 ) {return -1;} if (local_ms === SF2019 ) {return 1;} if (local_ms === FB2019 ) {return -1;} return 0; } setWatch(RTC_INT_1Hz, B3, { repeat: true, edge:'falling', debounce:0}); onInit();
-
BigRam has consistently failed "hangs" on my user application.
There are only two possibilities. My user code cause BigRam to fail or it was my Espruino chip? Everything, until now, pointed to my chip. Out of total frustration, I rewrote a large algorithm for auto DST (daylight savings time - module DS3231) since the DST is made for UK and not USA. Now, 8/12 BigRam release works on my chip? BigRam did not like my "old" user application code!
Total happiness is having 3250 jsvars!!!! -
No luck, as of 8/12 build BigRam still "hangs" on my Espruino chip.
I would like to state the obvious. (No offense or insults to your customers) With all the suggestions on this board to increase the jsvars, there is no mention of code efficiency. There is a difference between the professional Javascript "Gordons" of the world and novice, hackers like me. My user application bloatware, through efficient "professional" programming, could be reduced to the bare minimum and save hundreds of jsvars!
-
BTW ... Minification -Advanced Optimisation (not recommended) could get me another 16-17% if it was working?
Yes, Advanced Optimisations are what's produced by the closure
compiler in its 'advanced' mode. Problem is they tend to think that
they can rename absolutely everything, which breaks a lot. I think
someone could potentially write a configuration for it which explained
which things it's not allowed to rename, but I haven't had time to
look into it properly.
E_Clips_R1 ----> 0.3809 cm3
(Use "attached" stl file below for 3D printing)
E Clip cm3 0.3809 x $.25 = $0.095 or 0.072 euros <--- This cost is shocking!
Of course, you still have to negotiate for the best and lowest possible fee for 3D printing.
The lowest cost solution to mechanically hold the Espruino v 1.3 in place. It has a 1/16" / 0.062" or ~1.57 mm notch to grab the side of the printed circuit board. Order as many as you like but you need at least three of them for secure mounting. (2 sides / 1 back)
Do not use this E Clip anywhere on the front near the USB connector - there are small SMT components positioned in that area!
Has two 0.125" / 3.175 mm holes for secure mounting.
E Clip suspends/elevates the Espruino above the surface plane by 0.393622" or 10 mm. and it obstructs nothing.
The front transflash SD and USB micro connector can be easily accessed using the E Clip.
3D Printed order suggestion:
Make the "Infill density % = 100%" for the maximum strength possible.
To review this 3D E Clip, for the Espruino, go to the TinkerCad.com
website and under "Gallery" search for "E_Clips_R1"
Again, if you need to modify this design ... "just do it"
Enjoy / Cheers