• Howdy! we're looking for donations to finish custom knowledgebase software for this forum. Please see our Funding drive thread

Thoughts regarding on-board notebook computer for E-bike use

nutsandvolts said:
mwkeefer said:
the atmel is the fastest MCU available and even it has a limit of 20mhz
This is not right, there are many many faster MCU, even made by Atmel

You are right... I kinda misspoke, the 8 bit atmel MCU is the fastest 8 bit MCU available and has a top clock (rated) of 20mhz with an instruction pipeline of 1:1

There are other type of architecture out there, even from atmel which are faster by far...

I was limiting my scope to the 8 bit microcontrollers out of habit (bad habit) in reality there are many processors out there, even some of the ARM architectures which would work great for an embedded logging computer platform.

> These are pretty tricky to program though. Most ARM require assembly startup routines and the vectored interrupts are >
> complex. There are many other ways to skin this same cat though, like using fancy ADCs with simpler uCs like AVR or PIC.

This is why I default to thinking in the 8 bit MCU world... ARM architecture does require fancy startup routines and yes the vectored interrupts are a bit of a pain to dispatch properly BUT - we could leverage the existing linux distributions out there for the platform as a base code and avoid much of the headache of ARM development.

If we wanted to be really slick, lets pick 3-4 primary devices to use for such a computer and develop the solution for all at the same time... take www.dd-wrt.com or the XBMC (XBox Media Center - Now running on XBox, X86, Mac and Linux) for example of Multi processor porting of linux, the work is done for us... we can leverage it and work in a higher language like C (never thought Id refer to C as a higher lanaguage).



Please accept my humble (and tired) appologies.

-Mike
 
Yes, that's fast enough for me... maybe not fast enough for Recumpence or the Docs but for me, yes!

Nice videos btw, I love the time lapse ... it makes it feel like a music video without music = )

If you don't mind I may snag your style of timelapse, I have 30 minute to 2 hour rides on video but who wants to see 2 hours of some dude doing 30-40mph or passing cars? Great solution to the issue of condensing my ride videos to "entertainment" vs visual logging.

-Mike
 
LOL!@

Dude - nutzandvoltz, your da man!

Ive been workin with ffmpeg for near 6 years (I think), core of CorePlayer for WM platform and VLC on Windows, Linux, Mac and iPhone = ) Ive even written patches for the darn code base = )

However... even though I know everything (no I'm not 17 - lol) I didn't know the details of your time lapse PNG grabber / reassembler and that method is much simpler than mine (Involving premier) so kudos and thanks again.

I use the same technique to create motion picture from still JPG files I capture with a video surveilance software package I wrote for some clients a while back... I needed to sample in MJPEG (same thing as the MPNG I suppose) due to the camera output but I also needed individual frames to do motion analysis and such.. Then the software would join the pieces into real-time video again and store them to a network offsite raid array (local caching for network outtages, power failure, etc).

Seriously great job and thanks for the details, they will help alot of people (not just me).

Don't worry about translating on my account, I am perfectly comfortable with Bash, Ash, Bourne and a few others noone knows about (prob)... I could use Cygwin but... it never works right for me, better to run in a VM or reboot to linux or Mac OS10 (all running on my netbook as multi boot off bootloader).

For everyone else... let me look at somthing tommorow when I get up today, I think I have some perl code that will in essence run the ffmpeg shell scripts on windows... I need to open those scripts and check the commands called to ensure it's compatible but I think I can cobble together a native interface on top of ffmpeg for windows and truly this is a piece of sw we could all use wrapped up in a shrink package = ) For free of course and open source = )

-Mike

PS: I think maybe we should move the stop motion stuff to a new thread, I don't want to hijack matts thread (though he could use this too, weve all seen his vids - jk)
 
mwkeefer said:
Whew this will teach me to lunch on a thread that's moving:

Aussie,

The hacked win7 (I don't mean hacked in a bad way) is nothing more than a custom install image built up, in Vista and XP we have tools from MS and third parties to do just this... I build all my oem images this way, meaning whenever I get a new dell or other PC (my build or not) I wipe windows clean... enumerate the internal hardware in linux usually then gather the drivers and depending on XP or Vista I use nLite or vLite respectivly (http://www.nliteos.com/ - http://www.vlite.net/).
Yeeees i know this I mentioned it in my initial post if you have a read of it :) i have customised XP & Vista many times adding and removing components using NLite...all started when i started using scsi drives yeeeears ago and didnt want to plug in floppy drives to load drivers, found NLite and never looked back brillinat program ain' it i haven't triedVLite though similar app im guessing :) ...I was simply making people hear aware there is a downloadable (cut down) Win 7 version for those that DONT know how or don't have the time to do so. :) Its a good option either way, as many people will try it and report bugs where as doing your own your the sole "beta tester" so to speak...Just a thought ;) TBH im sooooo over pc after 8 or so years heavily involved in the Overclocking and modding community here in australia, back before Watercoolong was off the shelf item i was milling my own in my mates engineering workshop To this day i still run my own designed custom waterblocks and build my own cases from scratch :) Sometimes its just good to download and use someone elses work, i'm probably not in your or nutsandvolts league but guess i have a lil more knowledge about building pcs than the average Joe still :)

KiM
 
If I am not mistake, the eagle tree has a max sample rate of 10 hertz. Not 10mhz. Would we need a sample rate faster than the chopping frequency of the controller?
 
Are there any PDA-iphone sized devices that will run windows and have a standard-sized high-speed usb port? I'm interested in running just simple programs, like CastleLink, and EVLogix's programming interface, and that's about it. I have a Mac, and I figure if I gotta pay almost $200 for VMWare Fusion and Windows XP, I might as well get a more mobile device to run Windows and these simple programs. Any plug and play ideas?
 
This won't run Windows, but it's PDA sized, has a prototyping or other board slot, sd card,
http://www.stm32circle.com/resources/stm32primer2.php
http://www.stm32circle.com/resources/stm32primer2.php#resources

The Primer2 offers an innovative, ergonomic design similar to its predecessor's, with MEMS-based controls (navigate by tilting the tool left, right, backward or forward). In addition, based on the feedback of Primer users, we've packed Primer2 with an unprecedented range of new features to stimulate your creative ideas including:
* STM32F103E (512 Kbytes Flash)
* Li-Ion battery with smart loading control for improved current management, battery autonomy (more than 6 hours), charging time and battery lifespan
* New interface possibilities:
o 128x160 pixel touch screen TFT display
o Codec-based audio record and playback with headset connector and integrated microphone
o 4-direction joystick and push button
o 4 additional push buttons based on touchscreen capability
* New evaluation features:
o Micro SD card connector
o IrDA transceiver
o 20-pin add-on connector for access to SPI, I2C, USART, CAN and analog/digital I/Os

All of this is in addition to the range of development features offered on both Primers:
* Ergonomic design
* MEMs accelerometer for capture of the 3D-position information (implemented in navigation controls on the Primer)
* Mini USB for embedded applications that communicate with an external USB host

Add-on connector and modules for easy hardware extension
To facilitate expansion of the STM32 Primer2 hardware, Raisonance incorporated a 20-pin connector. This connector provides easy access to peripherals on the target STM32 including the ADC, SPI, USART, CAN, I2C, as well as some I/Os.

The connector is situated to accomodate a PCB inside its casing with maximum dimensions 45 x 45mm with a clearance of approximately 7.5mm for componants between PCB and the casing. The casing includes an opening of 2 x 46mm situated to allow the PCB of an Add-on module to extend outside of the casing.

An Add-on module with wrapping area is provided with the STM32 Primer2 Pro available from Raisonance. The end of this module that extends outside the casing can be used or can be broken off if desired, leaving a remaining PCB of 45 x 42mm that is entirely enclosed inside the Primer2.

Some of the more interesting (for our purposes) existing open-source projects already written for it:
http://www.stm32circle.com/projects/list.php?primer=2
100 2009-08-28 Nikon Remote 1.00 electronic repzak Primer2 43
90 2009-06-26 HANDHELD DATACOLLECTION TERMINAL STM32 Primer2 V1.1 electronic padmashan Primer2 265 Contest_2009
89 2009-06-26 Locus - A GPS extension for Primer2 0.9 electronic jola Primer2 299 Contest_2009
86 2009-06-26 Alcoholmeter 1.0 electronic androot Primer2 184 Contest_2009
78 2009-06-23 Micro Windows 0.1 other semsem Primer2 422 Contest_2009
75 2009-06-23 OpenStreetMap4Primer2 1.0 electronic FR4 Primer2 367 Contest_2009
73 2009-06-05 TouchScreenTest V1.0 other klausr Primer2 288
68 2009-09-10 Dictaphone 1.1 resource yrt Primer2 578
65 2009-03-27 Stdout2Usb 1.0 other slimphony Primer2 542
61 2009-02-24 CharacterGenerator 1.0 resource Francis All 373
57 2009-02-13 USB Mass storage 1.1 other sjoerd Primer2 1141
56 2009-02-13 SDCard Explorer 1.1 other sjoerd Primer2 1470
44 2009-01-22 EnergyMeter 1.1 sport Frisnit All 1127 Contest_2008
40 2009-01-22 Fast Chart 1.8 other Stewee All 3407 Contest_2008
17 2009-09-10 PrimerMouse 1.2 tool lionel All 1629
9 2008-12-12 Mems 1.1 other Remy All 1538
I don't think there's one yet for USB host function, but with the extra i/o's and/or the prototyping board input, there's no reason it couldn't be added.

FWIW, the STM32 is even designed to do 3-phase motor control. :) (I have a whole bike control system I wanted to base on the Primer, but I need a programmer to write it....)

All that for only $60:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=497-8511-ND
http://mouser.com/ProductDetail/STMicroelectronics/STM3210E-PRIMER/?qs=x3YFcZlYsHxGLKOk1gQ1sA%3d%3d
http://uk.farnell.com/stmicroelectronics/stm3210e-primer/kit-starter-cortex-m3-primer/dp/1679751?Ntt=STM3210E-PRIMER
http://www.google.com/search?q=STM3210E-PRIMER
 
nutsandvolts said:
VRdublove said:
Are there any PDA-iphone sized devices that will run windows and have a standard-sized high-speed usb port?
Nearly all PDA size devices don't run WinXP, so you'd have to find one that does, if you want to run EagleTree.

Is The World's Smallest Windows XP Computer For You?
I'm guessing no for cost reasons.

OQO
OQO Model 02 1.5 GHz

The beauty of eagle tree is once you analyze the protocol stream over USB for live mode, it's uber simple to handle it... Also I am reasonably certain they will provide you with their protocol so you can write your own interface. They are cool like that.

That said, EagleTree has it's voltage limits and based on the forum thread which covered the engineering of the v3, the 70v or so limit is only +2-3 v tolerant at best, somthing about they would have to put in much larger caps and a new current / voltage sensing system which would increase the size... there was talk of modifying a seagull sensor unit to do all we need (by EagleTree) but as yet I haven't seen this one.

For some the 10 mhz sample rate is just too low... I have not tried to reverse engineer the unit yet so I don't know if somehow we could overclock it to acheive higher sample rates (or what this would do to the MCU timing which probably regulates the USB interface).

Hmmm... maybe I should just post an entry in Matts contest but include the full digital dash and other features just on my mtn bike... I wanted to do something original with his drive anyway (in addition to the computer thing) but I won't reveal that until I post it up as a submission.

-Mike
 
nutsandvolts said:
Let's figure out how to do an order of magnitude better sampling rate than eagletree using cheap usb microcontroller board. Maybe fechter could help us make a little signal conditioning board for sampling hall sensors, phase currents, back EMF etc. Those signals would be input to ADC on microcontroller that looks just like a USB serial port on PC (laptop). Open the serial port by whatever means you choose (terminal program, acquisition software, custom software) and data constantly streams in. The more adventurous could take those signals and drive the motor themselves with the microcontroller. Similar mating boards could be power stages. I'm really a software guy but I do hardware for a living now and have SMD oven, logic analyzers, etc.

** Performing sampling on an order of magnitude would be over sampling which involves taking any number of readings and calculating the average from those multiple readings... disadvantage, additional cycles to aquire data from the A2D channel ... advantage, the sample rate becomes 16 or even 24bit accurate. I am not sure that I understood the "order of magnitude" statement if you mean to aquire more than 10 samples per second as opposed to better A2D resolution there are many ways to do it... all depending on the situation.

This is $37
EVAL-ADUC7020MKZ.jpg


Multichannel, 12-bit, 1 MSPS ADC
Fully differential and single-ended modes
0 V to VREF analog input range
12-bit voltage output DACs
Up to 4 DAC outputs available
On-chip voltage reference
On-chip temperature sensor (±3°C)
Voltage comparator

DAC output -> throttle (smart cruise control?)

Kit Mini Dev for ADuC7026/7027
ADuC7020 Evaluation Board Reference Guide
ADuC Precision Analog Microcontroller, 12-bit Analog I/O, ARM7TMDI
 
I have seen it (protocol analyzers are one of my specialties) but would rather we ask for it first... I'll email them, then call them monday to see how they feel about the release of the Live Protocol.

I do think they will release it and I believe that even if they dont it will surface.

-Mike
 
nutsandvolts said:
amberwolf said:
All that for only $60:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=497-8511-ND
Hey that's pretty cool for $60.
Yeah, I have the old Primer1, without the touchscreen or expansion board or SD slot/etc, and even THAT is really cool. For a time, they could be had for $35 or less, though they're harder to find nowadays since the new one came out. It's what I was going to base my bike computer system on until they came out with this one--it simply is exactly enough to do everything I wanted to do, without any "hacking" of the hardware; just add the plugin module in the prototyping slot and load the program (once I can find someone to help write it) and voila! ;)

Also, I think if you made friends with your local big-name electronics supplier (like Avnet, or whoever is in your area), you could probably get one for a lot less.


You typically need a whole lot of I/O lines for adding USB host. Although the USB bus only has 2 data (differential) and 2 power lines (power and ground), the interface between host controller and processor has many more, usually something like a 16-bit interface. This board isn't well setup for that, and if you need USB host function it only makes sense to select a board that already has the function. Another problem is the USB host must provide some serious power management capabilities, best not done on a proto section of board.
Ah; that I did not know. Well, I suppose it might still be possible to add slow-speed USB host by having a *second* microcontroller dedicated to servicing the USB host chip, then using it's serial data lines to send everything back to the Primer, all within the proto slot.

It's a hack, and maybe not even possible, but it's the only quick idea I could come up with. :)

Power management; now that is another issue I don't know how to deal with. :(

I do know that USB host capability has been requested to be part of the SMT32 line by various people, since it already can be a master/host/slave/client for many other types of serial data, but USB is the one really needed for a lot of non-industrial applications.


Writing code for ARM Cortex is not easy.
[/quote]
No kidding. ;) I'm sure it doesn't help that I have had immense trouble even learning a tiny bit of C, which is what is used for this series.

Still, with little dev units like this already around, it might be worth it simply because no packaging is necessary--it's already in a great form factor and shape, etc, to be used on something like a handlebar application, just pop it off and in your pocket when you walk away.

Since it *is* part of the ARM line, is it at least theoretically possible to take open-source projects for the PDAs that use ARMs, and base new projects specifically for this on their code? (I know the OS and rest of the hardware is different, but the structure they use might still save some time?)
 
nutzandvolts,

I actually built my own wedge using a very low level virtual USB windows driver which allows me to intercept all USB IO Calls at the API level and analyze then after logging for data content to identify protocols... I have somthing similar for smart cards and a few other types of interface.

I normally build my own equipment like this, it's far cheaper than the commercial equiv... I wrote the logging software for the PC in windows but I could port it to linux in a week or so.

With regards to the Arm9 - I wasn't suggesting using the Arm9 or Atmel MCU as the Primary controller unit.... just as slave sensor units connected via i2C to an A2D.

-Mike
 
Back
Top